package iremotewinspool

import (
	"context"
	"fmt"
	"strings"
	"unicode/utf16"

	dcerpc "github.com/oiweiwei/go-msrpc/dcerpc"
	errors "github.com/oiweiwei/go-msrpc/dcerpc/errors"
	uuid "github.com/oiweiwei/go-msrpc/midl/uuid"
	dcetypes "github.com/oiweiwei/go-msrpc/msrpc/dcetypes"
	dtyp "github.com/oiweiwei/go-msrpc/msrpc/dtyp"
	ndr "github.com/oiweiwei/go-msrpc/ndr"
)

var (
	_ = context.Background
	_ = fmt.Errorf
	_ = utf16.Encode
	_ = strings.TrimPrefix
	_ = ndr.ZeroString
	_ = (*uuid.UUID)(nil)
	_ = (*dcerpc.SyntaxID)(nil)
	_ = (*errors.Error)(nil)
	_ = dcetypes.GoPackage
	_ = dtyp.GoPackage
)

var (
	// import guard
	GoPackage = "par"
)

var (
	// Syntax UUID
	RemoteWinspoolSyntaxUUID = &uuid.UUID{TimeLow: 0x76f03f96, TimeMid: 0xcdfd, TimeHiAndVersion: 0x44fc, ClockSeqHiAndReserved: 0xa2, ClockSeqLow: 0x2c, Node: [6]uint8{0x64, 0x95, 0xa, 0x0, 0x12, 0x9}}
	// Syntax ID
	RemoteWinspoolSyntaxV1_0 = &dcerpc.SyntaxID{IfUUID: RemoteWinspoolSyntaxUUID, IfVersionMajor: 1, IfVersionMinor: 0}
)

// IRemoteWinspool interface.
type RemoteWinspoolClient interface {

	// RpcAsyncOpenPrinter retrieves a handle to a specified printer, port, print job or
	// print server. A client uses this method to obtain a print handle to an existing printer
	// on a remote computer.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcOpenPrinterEx.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.2.14.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.2.14.
	OpenPrinter(context.Context, *OpenPrinterRequest, ...dcerpc.CallOption) (*OpenPrinterResponse, error)

	// RpcAsyncAddPrinter installs a printer on the print server.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcAddPrinterEx.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.2.15.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.2.15.
	AddPrinter(context.Context, *AddPrinterRequest, ...dcerpc.CallOption) (*AddPrinterResponse, error)

	// RpcAsyncSetJob pauses, resumes, cancels, or restarts a print job on a specified printer.
	// This method can also set print job parameters, including the job priority and document
	// name.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcSetJob.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.3.1.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.3.1.
	SetJob(context.Context, *SetJobRequest, ...dcerpc.CallOption) (*SetJobResponse, error)

	// RpcAsyncGetJob retrieves information about a specified print job on a specified printer.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcGetJob.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.3.2.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. Aside from the specific
	// nonzero return values documented in section 3.1.4, the client MUST treat any nonzero
	// return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.3.2.
	GetJob(context.Context, *GetJobRequest, ...dcerpc.CallOption) (*GetJobResponse, error)

	// RpcAsyncEnumJobs retrieves information about a specified set of print jobs on a specified
	// printer.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcEnumJobs.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.3.3.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. Aside from the specific
	// nonzero return values documented in section 3.1.4, the client MUST treat any nonzero
	// return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.3.3.
	EnumJobs(context.Context, *EnumJobsRequest, ...dcerpc.CallOption) (*EnumJobsResponse, error)

	// RpcAsyncAddJob does not perform any function, but returns ERROR_INVALID_PARAMETER.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcAddJob.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.3.4.
	//
	// Return Values: This method MUST return ERROR_INVALID_PARAMETER ([MS-ERREF] section
	// 2.2).
	//
	// This method MUST be implemented to ensure compatibility with protocol clients.
	AddJob(context.Context, *AddJobRequest, ...dcerpc.CallOption) (*AddJobResponse, error)

	// RpcAsyncScheduleJob does not perform any function, but returns ERROR_SPL_NO_ADDJOB.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcScheduleJob.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.3.5.
	//
	// Return Values: This method MUST return ERROR_SPL_NO_ADDJOB ([MS-ERREF] section 2.2).
	//
	// This method MUST be implemented to ensure compatibility with protocol clients.
	ScheduleJob(context.Context, *ScheduleJobRequest, ...dcerpc.CallOption) (*ScheduleJobResponse, error)

	// RpcAsyncDeletePrinter deletes the specified printer object.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcDeletePrinter.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.2.4.
	//
	// The client MUST call RpcAsyncClosePrinter (section 3.1.4.1.10) with the PRINTER_HANDLE
	// ([MS-RPRN] section 2.2.1.1.4) represented by the hPrinter parameter after calling
	// RpcAsyncDeletePrinter.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.2.4.
	DeletePrinter(context.Context, *DeletePrinterRequest, ...dcerpc.CallOption) (*DeletePrinterResponse, error)

	// RpcAsyncSetPrinter sets configuration information, initialization data, and security
	// information of the specified printer to the values contained in the method parameters.
	// It can also perform an action to change the active status of the printer.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcSetPrinter.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.2.5.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.2.5.
	SetPrinter(context.Context, *SetPrinterRequest, ...dcerpc.CallOption) (*SetPrinterResponse, error)

	// RpcAsyncGetPrinter retrieves information about a specified printer.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcGetPrinter.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.2.6.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. Aside from the specific
	// nonzero return values documented in section 3.1.4, the client MUST treat any nonzero
	// return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.2.6.
	GetPrinter(context.Context, *GetPrinterRequest, ...dcerpc.CallOption) (*GetPrinterResponse, error)

	// RpcStartDocPrinter notifies a specified printer that a document is being spooled
	// for printing.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcStartDocPrinter.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.9.1.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.9.1.
	StartDocPrinter(context.Context, *StartDocPrinterRequest, ...dcerpc.CallOption) (*StartDocPrinterResponse, error)

	// RpcAsyncStartPagePrinter notifies a specified printer that a page is about to be
	// printed.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcStartPagePrinter.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.9.2.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.9.2.
	StartPagePrinter(context.Context, *StartPagePrinterRequest, ...dcerpc.CallOption) (*StartPagePrinterResponse, error)

	// RpcAsyncWritePrinter adds data to the file representing the spool file for a specified
	// printer, if the spooling option is turned on; or it sends data to the device directly,
	// if the printer is configured for direct printing.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcWritePrinter.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.9.3.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.9.3.
	WritePrinter(context.Context, *WritePrinterRequest, ...dcerpc.CallOption) (*WritePrinterResponse, error)

	// RpcAsyncEndPagePrinter notifies a specified printer that the application is at the
	// end of a page in a print job.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcEndPagePrinter.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.9.4.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.9.4.
	EndPagePrinter(context.Context, *EndPagePrinterRequest, ...dcerpc.CallOption) (*EndPagePrinterResponse, error)

	// RpcAsyncEndDocPrinter signals the completion of the current print job on a specified
	// printer.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcEndDocPrinter.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.9.7.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.9.7.
	EndDocPrinter(context.Context, *EndDocPrinterRequest, ...dcerpc.CallOption) (*EndDocPrinterResponse, error)

	// RpcAsyncAbortPrinter aborts the current document on a specified printer.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcAbortPrinter.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.9.5.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.9.5.
	AbortPrinter(context.Context, *AbortPrinterRequest, ...dcerpc.CallOption) (*AbortPrinterResponse, error)

	// RpcAsyncGetPrinterData retrieves configuration data for the specified printer or
	// print server.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcGetPrinterData.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.2.7.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. Aside from the specific
	// nonzero return values documented in section 3.1.4, the client MUST treat any nonzero
	// return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.2.7.
	GetPrinterData(context.Context, *GetPrinterDataRequest, ...dcerpc.CallOption) (*GetPrinterDataResponse, error)

	// RpcAsyncGetPrinterDataEx retrieves configuration data for the specified printer or
	// print server. This method extends RpcAsyncGetPrinterData (section 3.1.4.1.6) and
	// can retrieve values stored under the specified key by RpcAsyncSetPrinterDataEx (section
	// 3.1.4.1.9).
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcGetPrinterDataEx.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.2.19.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. Aside from the specific
	// nonzero return values documented in section 3.1.4, the client MUST treat any nonzero
	// return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.2.19.
	GetPrinterDataEx(context.Context, *GetPrinterDataExRequest, ...dcerpc.CallOption) (*GetPrinterDataExResponse, error)

	// RpcAsyncSetPrinterData sets configuration data for the specified printer or print
	// server.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcSetPrinterData.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.2.8.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.2.8.
	SetPrinterData(context.Context, *SetPrinterDataRequest, ...dcerpc.CallOption) (*SetPrinterDataResponse, error)

	// RpcAsyncSetPrinterDataEx sets configuration data for the specified printer or print
	// server. This method is similar to RpcAsyncSetPrinterData (section 3.1.4.1.8) but
	// also allows the caller to specify the registry key under which to store the data.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcSetPrinterDataEx.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.2.18.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// specified in [MS-RPRN] section 3.1.4.2.18.
	SetPrinterDataEx(context.Context, *SetPrinterDataExRequest, ...dcerpc.CallOption) (*SetPrinterDataExResponse, error)

	// RpcAsyncClosePrinter closes a handle to a printer, server, job, or port object that
	// was previously opened by either RpcAsyncOpenPrinter (section 3.1.4.1.1) or RpcAsyncAddPrinter
	// (section 3.1.4.1.2).
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcClosePrinter.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.2.9.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.2.9.
	ClosePrinter(context.Context, *ClosePrinterRequest, ...dcerpc.CallOption) (*ClosePrinterResponse, error)

	// RpcAsyncAddForm adds a form name to the list of supported printer forms.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcAddForm.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.5.1.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.5.1.
	AddForm(context.Context, *AddFormRequest, ...dcerpc.CallOption) (*AddFormResponse, error)

	// RpcAsyncDeleteForm removes a form name from the list of supported printer forms.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcDeleteForm.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.5.2.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.5.2.
	DeleteForm(context.Context, *DeleteFormRequest, ...dcerpc.CallOption) (*DeleteFormResponse, error)

	// RpcAsyncGetForm retrieves information about a specified printer form.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcGetForm.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.5.3.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. Aside from the specific
	// nonzero return values documented in section 3.1.4, the client MUST treat any nonzero
	// return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.5.3.
	GetForm(context.Context, *GetFormRequest, ...dcerpc.CallOption) (*GetFormResponse, error)

	// RpcAsyncSetForm sets the printer form information for the specified printer.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcSetForm.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.5.4.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.5.4.
	SetForm(context.Context, *SetFormRequest, ...dcerpc.CallOption) (*SetFormResponse, error)

	// RpcAsyncEnumForms enumerates the printer forms that the specified printer supports.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcEnumForms.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.5.5.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. Aside from the specific
	// nonzero return values documented in section 3.1.4, the client MUST treat any nonzero
	// return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.5.5.
	EnumForms(context.Context, *EnumFormsRequest, ...dcerpc.CallOption) (*EnumFormsResponse, error)

	// RpcAsyncGetPrinterDriver retrieves data about a specified printer driver on a specified
	// printer.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcGetPrinterDriver2.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.4.6.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. Aside from the specific
	// nonzero return values documented in section 3.1.4, the client MUST treat any nonzero
	// return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.4.6.
	GetPrinterDriver(context.Context, *GetPrinterDriverRequest, ...dcerpc.CallOption) (*GetPrinterDriverResponse, error)

	// RpcAsyncEnumPrinterData enumerates configuration data for a specified printer.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcEnumPrinterData.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.2.16.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. Aside from the specific
	// nonzero return values documented in section 3.1.4, the client MUST treat any nonzero
	// return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.2.16.
	EnumPrinterData(context.Context, *EnumPrinterDataRequest, ...dcerpc.CallOption) (*EnumPrinterDataResponse, error)

	// RpcAsyncEnumPrinterDataEx enumerates all registry value names and data under the
	// key for the specified printer.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcEnumPrinterDataEx.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.2.20.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. Aside from the specific
	// nonzero return values documented in section 3.1.4, the client MUST treat any nonzero
	// return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.2.20.
	EnumPrinterDataEx(context.Context, *EnumPrinterDataExRequest, ...dcerpc.CallOption) (*EnumPrinterDataExResponse, error)

	// RpcAsyncEnumPrinterKey enumerates the subkeys of a specified key for a specified
	// printer.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcEnumPrinterKey.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.2.21.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.2.21.
	EnumPrinterKey(context.Context, *EnumPrinterKeyRequest, ...dcerpc.CallOption) (*EnumPrinterKeyResponse, error)

	// RpcAsyncDeletePrinterData deletes a specified value from the configuration of a specified
	// printer.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcDeletePrinterData.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.2.17.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.2.17.
	DeletePrinterData(context.Context, *DeletePrinterDataRequest, ...dcerpc.CallOption) (*DeletePrinterDataResponse, error)

	// RpcAsyncDeletePrinterDataEx deletes a specified value from the configuration data
	// of a specified printer, which consists of a set of named and typed values stored
	// in a hierarchy of registry keys.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcDeletePrinterDataEx.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.2.22.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.2.22.
	DeletePrinterDataEx(context.Context, *DeletePrinterDataExRequest, ...dcerpc.CallOption) (*DeletePrinterDataExResponse, error)

	// RpcAsyncDeletePrinterKey deletes a specified key and all of its subkeys from the
	// configuration of a specified printer.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcDeletePrinterKey.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.2.23.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.2.23.
	DeletePrinterKey(context.Context, *DeletePrinterKeyRequest, ...dcerpc.CallOption) (*DeletePrinterKeyResponse, error)

	// RpcAsyncXcvData provides the means by which a port monitor client component can communicate
	// with its server-side counterpart, the actual port monitor hosted by the server.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcXcvData.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.6.5.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. Aside from the specific
	// nonzero return values documented in section 3.1.4, the client MUST treat any nonzero
	// return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.6.5.
	XcvData(context.Context, *XcvDataRequest, ...dcerpc.CallOption) (*XcvDataResponse, error)

	// RpcAsyncSendRecvBidiData sends and receives bidirectional data. This method is used
	// to communicate with print monitors that support such data.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcSendRecvBidiData.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.2.27.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.2.27.
	SendRecvBIDIData(context.Context, *SendRecvBIDIDataRequest, ...dcerpc.CallOption) (*SendRecvBIDIDataResponse, error)

	// RpcAsyncCreatePrinterIC creates an information context for a specified printer.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcCreatePrinterIC.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.2.10.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.2.10.
	CreatePrinterIC(context.Context, *CreatePrinterICRequest, ...dcerpc.CallOption) (*CreatePrinterICResponse, error)

	// RpcAsyncPlayGdiScriptOnPrinterIC returns font information for a printer connection.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcPlayGdiScriptOnPrinterIC.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.2.11.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.2.11.
	PlayGDIScriptOnPrinterIC(context.Context, *PlayGDIScriptOnPrinterICRequest, ...dcerpc.CallOption) (*PlayGDIScriptOnPrinterICResponse, error)

	// RpcAsyncDeletePrinterIC deletes a printer information context.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcDeletePrinterIC.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.2.12.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.2.12.
	DeletePrinterIC(context.Context, *DeletePrinterICRequest, ...dcerpc.CallOption) (*DeletePrinterICResponse, error)

	// RpcAsyncEnumPrinters enumerates available local printers, printers on a specified
	// print server, printers in a specified domain, or print providers.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcEnumPrinters.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.2.1.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. Aside from the specific
	// nonzero return values documented in section 3.1.4, the client MUST treat any nonzero
	// return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.2.1.
	EnumPrinters(context.Context, *EnumPrintersRequest, ...dcerpc.CallOption) (*EnumPrintersResponse, error)

	// RpcAsyncAddPrinterDriver installs a specified local or a remote printer driver on
	// a specified print server, and it links the configuration, data, and driver files.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcAddPrinterDriverEx.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.4.8.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.4.8.
	AddPrinterDriver(context.Context, *AddPrinterDriverRequest, ...dcerpc.CallOption) (*AddPrinterDriverResponse, error)

	// RpcAsyncEnumPrinterDrivers enumerates the printer drivers installed on a specified
	// print server.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcEnumPrinterDrivers.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.4.2.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. Aside from the specific
	// nonzero return values documented in section 3.1.4, the client MUST treat any nonzero
	// return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.4.2.
	EnumPrinterDrivers(context.Context, *EnumPrinterDriversRequest, ...dcerpc.CallOption) (*EnumPrinterDriversResponse, error)

	// RpcAsyncGetPrinterDriverDirectory retrieves the path of the printer driver directory
	// on a specified print server.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcGetPrinterDriverDirectory.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.4.4.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. Aside from the specific
	// nonzero return values documented in section 3.1.4, the client MUST treat any nonzero
	// return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.4.4.
	GetPrinterDriverDirectory(context.Context, *GetPrinterDriverDirectoryRequest, ...dcerpc.CallOption) (*GetPrinterDriverDirectoryResponse, error)

	// RpcAsyncDeletePrinterDriver removes the specified printer driver from the list of
	// supported drivers for a specified print server.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcDeletePrinterDriver.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.4.5.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.4.5.
	DeletePrinterDriver(context.Context, *DeletePrinterDriverRequest, ...dcerpc.CallOption) (*DeletePrinterDriverResponse, error)

	// RpcAsyncDeletePrinterDriverEx removes the specified printer driver from the list
	// of supported drivers on a specified print server, and deletes the files associated
	// with the driver. This method also can delete specific versions of the driver.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcDeletePrinterDriverEx.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.4.7.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.4.7.
	DeletePrinterDriverEx(context.Context, *DeletePrinterDriverExRequest, ...dcerpc.CallOption) (*DeletePrinterDriverExResponse, error)

	// RpcAsyncAddPrintProcessor installs a specified print processor on the specified server
	// and adds its name to an internal list of supported print processors.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcAddPrintProcessor.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.8.1.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.8.1.
	AddPrintProcessor(context.Context, *AddPrintProcessorRequest, ...dcerpc.CallOption) (*AddPrintProcessorResponse, error)

	// RpcAsyncEnumPrintProcessors enumerates the print processors installed on a specified
	// server.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcEnumPrintProcessors.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.8.2.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. Aside from the specific
	// nonzero return values documented in section 3.1.4, the client MUST treat any nonzero
	// return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.8.2.
	EnumPrintProcessors(context.Context, *EnumPrintProcessorsRequest, ...dcerpc.CallOption) (*EnumPrintProcessorsResponse, error)

	// RpcAsyncGetPrintProcessorDirectory retrieves the path for the print processor on
	// the specified server.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcGetPrintProcessorDirectory.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.8.3.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. Aside from the specific
	// nonzero return values documented in section 3.1.4, the client MUST treat any nonzero
	// return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.8.3.
	GetPrintProcessorDirectory(context.Context, *GetPrintProcessorDirectoryRequest, ...dcerpc.CallOption) (*GetPrintProcessorDirectoryResponse, error)

	// RpcAsyncEnumPorts enumerates the ports that are available for printing on a specified
	// server.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcEnumPorts.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.6.1.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. Aside from the specific
	// nonzero return values documented in section 3.1.4, the client MUST treat any nonzero
	// return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.6.1.
	EnumPorts(context.Context, *EnumPortsRequest, ...dcerpc.CallOption) (*EnumPortsResponse, error)

	// RpcAsyncEnumMonitors retrieves information about the port monitors installed on a
	// specified server.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcEnumMonitors.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.7.1.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. Aside from the specific
	// nonzero return values documented in section 3.1.4, the client MUST treat any nonzero
	// return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.7.1.
	EnumMonitors(context.Context, *EnumMonitorsRequest, ...dcerpc.CallOption) (*EnumMonitorsResponse, error)

	// RpcAsyncAddPort adds a specified port name to the list of supported ports on a specified
	// print server.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcAddPortEx.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.6.3.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.6.3.
	AddPort(context.Context, *AddPortRequest, ...dcerpc.CallOption) (*AddPortResponse, error)

	// RpcAsyncSetPort sets the status associated with a specified port on a specified print
	// server.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcSetPort.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.6.4.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.6.4.
	SetPort(context.Context, *SetPortRequest, ...dcerpc.CallOption) (*SetPortResponse, error)

	// RpcAsyncAddMonitor installs a specified local port monitor, and links the configuration,
	// data, and monitor files on a specified print server.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcAddMonitor.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.7.2.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.7.2.
	AddMonitor(context.Context, *AddMonitorRequest, ...dcerpc.CallOption) (*AddMonitorResponse, error)

	// RpcAsyncDeleteMonitor removes a specified port monitor from a specified print server.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcDeleteMonitor.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.7.3.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.7.3.
	DeleteMonitor(context.Context, *DeleteMonitorRequest, ...dcerpc.CallOption) (*DeleteMonitorResponse, error)

	// RpcAsyncDeletePrintProcessor removes a specified print processor from a specified
	// server.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcDeletePrintProcessor.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.8.4.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.8.4.
	DeletePrintProcessor(context.Context, *DeletePrintProcessorRequest, ...dcerpc.CallOption) (*DeletePrintProcessorResponse, error)

	// RpcAsyncEnumPrintProcessorDatatypes enumerates the data types that a specified print
	// processor supports.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcEnumPrintProcessorDatatypes.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.8.5.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. Aside from the specific
	// nonzero return values documented in section 3.1.4, the client MUST treat any nonzero
	// return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.8.5.
	EnumPrintProcessorDataTypes(context.Context, *EnumPrintProcessorDataTypesRequest, ...dcerpc.CallOption) (*EnumPrintProcessorDataTypesResponse, error)

	// RpcAsyncAddPerMachineConnection persistently saves the configuration information
	// for a connection, including the print server name and the name of the print providers
	// for the specified connection.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcAddPerMachineConnection.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.2.24.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.2.24.
	AddPerMachineConnection(context.Context, *AddPerMachineConnectionRequest, ...dcerpc.CallOption) (*AddPerMachineConnectionResponse, error)

	// RpcAsyncDeletePerMachineConnection deletes the stored connection configuration information
	// that corresponds to the pPrinterName parameter value.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcDeletePerMachineConnection.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.2.25.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.2.25.
	DeletePerMachineConnection(context.Context, *DeletePerMachineConnectionRequest, ...dcerpc.CallOption) (*DeletePerMachineConnectionResponse, error)

	// RpcAsyncEnumPerMachineConnections enumerates each of the per-machine connections
	// into a specified buffer.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcEnumPerMachineConnections.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.2.26.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. Aside from the specific
	// nonzero return values documented in section 3.1.4, the client MUST treat any nonzero
	// return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.2.26.
	EnumPerMachineConnections(context.Context, *EnumPerMachineConnectionsRequest, ...dcerpc.CallOption) (*EnumPerMachineConnectionsResponse, error)

	// RpcSyncRegisterForRemoteNotifications opens a notification handle by using a printer
	// handle or print server handle, to listen for remote printer change notifications.
	//
	// Return Values: This method returns either an HRESULT success value ([MS-ERREF] section
	// 2.1) to indicate successful completion, or an HRESULT error value to indicate failure.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	SyncRegisterForRemoteNotifications(context.Context, *SyncRegisterForRemoteNotificationsRequest, ...dcerpc.CallOption) (*SyncRegisterForRemoteNotificationsResponse, error)

	// RpcSyncUnRegisterForRemoteNotifications closes a notification handle opened by calling
	// RpcSyncRegisterForRemoteNotifications (section 3.1.4.9.1).
	//
	// Return Values: This method returns either an HRESULT success value ([MS-ERREF] section
	// 2.1) to indicate successful completion or an HRESULT error value to indicate failure.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	SyncUnregisterForRemoteNotifications(context.Context, *SyncUnregisterForRemoteNotificationsRequest, ...dcerpc.CallOption) (*SyncUnregisterForRemoteNotificationsResponse, error)

	// RpcSyncRefreshRemoteNotifications gets notification information for all requested
	// members. This SHOULD be called by a client if the "RemoteNotifyData Flags" key in
	// the RpcPrintPropertiesCollection instance (section 2.2.4), which was returned as
	// part of the notification from calling RpcAsyncGetRemoteNotifications (section 3.1.4.9.4),
	// has the PRINTER_NOTIFY_INFO_DISCARDED bit set ([MS-RPRN] section 2.2.3.2).
	//
	// Return Values: This method returns either an HRESULT success value ([MS-ERREF] section
	// 2.1) to indicate successful completion or an HRESULT error value to indicate failure.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	SyncRefreshRemoteNotifications(context.Context, *SyncRefreshRemoteNotificationsRequest, ...dcerpc.CallOption) (*SyncRefreshRemoteNotificationsResponse, error)

	// A print client uses RpcAsyncGetRemoteNotifications to poll the print server for specified
	// change notifications. A call to this method is suspended until the server has a new
	// change notification for the client. Subsequently, the client calls this method again
	// to poll for additional notifications from the server.
	//
	// Return Values: This method returns either an HRESULT success value ([MS-ERREF] section
	// 2.1) to indicate successful completion or an HRESULT error value to indicate failure.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	GetRemoteNotifications(context.Context, *GetRemoteNotificationsRequest, ...dcerpc.CallOption) (*GetRemoteNotificationsResponse, error)

	// RpcAsyncInstallPrinterDriverFromPackage installs a printer driver from a driver package.
	//
	// Return Values: This method returns either an HRESULT success value ([MS-ERREF] section
	// 2.1) or an HRESULT error value to indicate failure.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	InstallPrinterDriverFromPackage(context.Context, *InstallPrinterDriverFromPackageRequest, ...dcerpc.CallOption) (*InstallPrinterDriverFromPackageResponse, error)

	// RpcAsyncUploadPrinterDriverPackage uploads a driver package so it can be installed
	// with RpcAsyncInstallPrinterDriverFromPackage (section 3.1.4.2.7).
	//
	// Return Values: This method returns either an HRESULT success value ([MS-ERREF] section
	// 2.1) or an HRESULT error value to indicate failure.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	UploadPrinterDriverPackage(context.Context, *UploadPrinterDriverPackageRequest, ...dcerpc.CallOption) (*UploadPrinterDriverPackageResponse, error)

	// RpcAsyncGetCorePrinterDrivers gets the GUID, versions, and publish dates of the specified
	// core printer drivers, and the paths to their packages.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcGetCorePrinterDrivers
	// ([MS-RPRN] section 3.1.4.4.9).
	//
	// Return Values: This method returns either an HRESULT success value ([MS-ERREF] section
	// 2.1) or an HRESULT error value to indicate failure.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.4.9.
	GetCorePrinterDrivers(context.Context, *GetCorePrinterDriversRequest, ...dcerpc.CallOption) (*GetCorePrinterDriversResponse, error)

	// RpcAsyncCorePrinterDriverInstalled determines if a specific core printer driver is
	// installed.
	//
	// Return Values: This method returns either an HRESULT success value ([MS-ERREF] section
	// 2.1) or an HRESULT error value to indicate failure.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	CorePrinterDriverInstalled(context.Context, *CorePrinterDriverInstalledRequest, ...dcerpc.CallOption) (*CorePrinterDriverInstalledResponse, error)

	// RpcAsyncGetPrinterDriverPackagePath gets the path to the specified printer driver
	// package.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcGetPrinterDriverPackagePath,
	// [MS-RPRN] section 3.1.4.4.10.
	//
	// Return Values: This method returns either an HRESULT success value ([MS-ERREF] section
	// 2.1) or an HRESULT error value to indicate failure.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	GetPrinterDriverPackagePath(context.Context, *GetPrinterDriverPackagePathRequest, ...dcerpc.CallOption) (*GetPrinterDriverPackagePathResponse, error)

	// RpcAsyncDeletePrinterDriverPackage deletes a specified printer driver package.
	//
	// Return Values: This method returns either an HRESULT success value ([MS-ERREF] section
	// 2.1) or an HRESULT error value to indicate failure.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	DeletePrinterDriverPackage(context.Context, *DeletePrinterDriverPackageRequest, ...dcerpc.CallOption) (*DeletePrinterDriverPackageResponse, error)

	// RpcAsyncReadPrinter retrieves data from the specified job object.
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcReadPrinter.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.9.6.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.9.6.
	ReadPrinter(context.Context, *ReadPrinterRequest, ...dcerpc.CallOption) (*ReadPrinterResponse, error)

	// RpcAsyncResetPrinter resets the data type and device mode (For more information,
	// see [DEVMODE]) values to use for printing documents submitted by the RpcAsyncStartDocPrinter
	// method (section 3.1.4.8.1).
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcResetPrinter.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.2.13.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.2.13.
	ResetPrinter(context.Context, *ResetPrinterRequest, ...dcerpc.CallOption) (*ResetPrinterResponse, error)

	// RpcAsyncGetJobNamedPropertyValue retrieves the current value of the specified Job
	// Named Property (section 3.1.1).<31>
	//
	// The counterpart of this method in the Print System Remote Protocol ([MS-RPRN]) is
	// RpcGetJobNamedPropertyValue. All parameters not defined below are specified in [MS-RPRN]
	// section 3.1.4.12.1.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol specified in [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.12.1.
	GetJobNamedPropertyValue(context.Context, *GetJobNamedPropertyValueRequest, ...dcerpc.CallOption) (*GetJobNamedPropertyValueResponse, error)

	// RpcAsyncSetJobNamedProperty creates a new Job Named Property (section 3.1.1), or
	// changes the value of an existing Job Named Property for the specified print job.<32>
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcSetJobNamedProperty.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.12.2.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol specified in [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.12.2.
	SetJobNamedProperty(context.Context, *SetJobNamedPropertyRequest, ...dcerpc.CallOption) (*SetJobNamedPropertyResponse, error)

	// RpcAsyncDeleteJobNamedProperty deletes an existing Job Named Property (section 3.1.1)
	// for the specified print job.<33>
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcDeleteJobNamedProperty.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.12.3.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol specified in [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.12.3.
	DeleteJobNamedProperty(context.Context, *DeleteJobNamedPropertyRequest, ...dcerpc.CallOption) (*DeleteJobNamedPropertyResponse, error)

	// RpcAsyncEnumJobNamedProperties enumerates the Job Named Property (section 3.1.1)
	// for the specified print job.<34>
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcEnumJobNamedProperties
	// (section 3.1.4.12.4). All parameters not defined below are specified in [MS-RPRN]
	// section 3.1.4.12.4.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.12.4.
	EnumJobNamedProperties(context.Context, *EnumJobNamedPropertiesRequest, ...dcerpc.CallOption) (*EnumJobNamedPropertiesResponse, error)

	// RpcAsyncLogJobInfoForBranchOffice processes one or more Branch Office Print Remote
	// Log Entries (section 3.1.1).<35>
	//
	// The counterpart of this method in the Print System Remote Protocol is RpcLogJobInfoForBranchOffice.
	// All parameters not defined below are specified in [MS-RPRN] section 3.1.4.13.1.
	//
	// Return Values: This method returns zero to indicate successful completion or a nonzero
	// Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat
	// any nonzero return value as a fatal error.
	//
	// Exceptions Thrown: This method MUST NOT throw any exceptions other than those that
	// are thrown by the underlying RPC protocol specified in [MS-RPCE].
	//
	// This method MUST adhere to the parameter validation, processing, and response requirements
	// that are specified in [MS-RPRN] section 3.1.4.13.1.
	LogJobInfoForBranchOffice(context.Context, *LogJobInfoForBranchOfficeRequest, ...dcerpc.CallOption) (*LogJobInfoForBranchOfficeResponse, error)

	// AlterContext alters the client context.
	AlterContext(context.Context, ...dcerpc.Option) error

	// Conn returns the client connection (unsafe)
	Conn() dcerpc.Conn
}

// TableDword represents the TABLE_DWORD RPC constant
var TableDword = 1

// TableString represents the TABLE_STRING RPC constant
var TableString = 2

// TableDevMode represents the TABLE_DEVMODE RPC constant
var TableDevMode = 3

// TableTime represents the TABLE_TIME RPC constant
var TableTime = 4

// TableSecurityDescriptor represents the TABLE_SECURITYDESCRIPTOR RPC constant
var TableSecurityDescriptor = 5

// SplfileContentTypePropertyName represents the SPLFILE_CONTENT_TYPE_PROP_NAME RPC constant
var SplfileContentTypePropertyName = "Spool File Contents"

// BIDIType type represents BIDI_TYPE RPC enumeration.
type BIDIType uint16

var (
	BIDITypeNull   BIDIType = 0
	BIDITypeInt    BIDIType = 1
	BIDITypeFloat  BIDIType = 2
	BIDITypeBool   BIDIType = 3
	BIDITypeString BIDIType = 4
	BIDITypeText   BIDIType = 5
	BIDITypeEnum   BIDIType = 6
	BIDITypeBlob   BIDIType = 7
)

func (o BIDIType) String() string {
	switch o {
	case BIDITypeNull:
		return "BIDITypeNull"
	case BIDITypeInt:
		return "BIDITypeInt"
	case BIDITypeFloat:
		return "BIDITypeFloat"
	case BIDITypeBool:
		return "BIDITypeBool"
	case BIDITypeString:
		return "BIDITypeString"
	case BIDITypeText:
		return "BIDITypeText"
	case BIDITypeEnum:
		return "BIDITypeEnum"
	case BIDITypeBlob:
		return "BIDITypeBlob"
	}
	return "Invalid"
}

// PrintJobPropertyType type represents RPC_EPrintJobPropertyType RPC enumeration.
type PrintJobPropertyType uint16

var (
	PrintJobPropertyTypeString PrintJobPropertyType = 1
	PrintJobPropertyTypeInt32  PrintJobPropertyType = 2
	PrintJobPropertyTypeInt64  PrintJobPropertyType = 3
	PrintJobPropertyTypeByte   PrintJobPropertyType = 4
	PrintJobPropertyTypeBuffer PrintJobPropertyType = 5
)

func (o PrintJobPropertyType) String() string {
	switch o {
	case PrintJobPropertyTypeString:
		return "PrintJobPropertyTypeString"
	case PrintJobPropertyTypeInt32:
		return "PrintJobPropertyTypeInt32"
	case PrintJobPropertyTypeInt64:
		return "PrintJobPropertyTypeInt64"
	case PrintJobPropertyTypeByte:
		return "PrintJobPropertyTypeByte"
	case PrintJobPropertyTypeBuffer:
		return "PrintJobPropertyTypeBuffer"
	}
	return "Invalid"
}

// BranchOfficeJobEventType type represents EBranchOfficeJobEventType RPC enumeration.
type BranchOfficeJobEventType uint16

var (
	BranchOfficeJobEventTypeInvalidJobState     BranchOfficeJobEventType = 0
	BranchOfficeJobEventTypeLogJobPrinted       BranchOfficeJobEventType = 1
	BranchOfficeJobEventTypeLogJobRendered      BranchOfficeJobEventType = 2
	BranchOfficeJobEventTypeLogJobError         BranchOfficeJobEventType = 3
	BranchOfficeJobEventTypeLogJobPipelineError BranchOfficeJobEventType = 4
	BranchOfficeJobEventTypeLogOfflineFileFull  BranchOfficeJobEventType = 5
)

func (o BranchOfficeJobEventType) String() string {
	switch o {
	case BranchOfficeJobEventTypeInvalidJobState:
		return "BranchOfficeJobEventTypeInvalidJobState"
	case BranchOfficeJobEventTypeLogJobPrinted:
		return "BranchOfficeJobEventTypeLogJobPrinted"
	case BranchOfficeJobEventTypeLogJobRendered:
		return "BranchOfficeJobEventTypeLogJobRendered"
	case BranchOfficeJobEventTypeLogJobError:
		return "BranchOfficeJobEventTypeLogJobError"
	case BranchOfficeJobEventTypeLogJobPipelineError:
		return "BranchOfficeJobEventTypeLogJobPipelineError"
	case BranchOfficeJobEventTypeLogOfflineFileFull:
		return "BranchOfficeJobEventTypeLogOfflineFileFull"
	}
	return "Invalid"
}

// GDI structure represents GDI_HANDLE RPC structure.
type GDI dcetypes.ContextHandle

func (o *GDI) ContextHandle() *dcetypes.ContextHandle { return (*dcetypes.ContextHandle)(o) }

func (o *GDI) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *GDI) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(4); err != nil {
		return err
	}
	if err := w.WriteData(o.Attributes); err != nil {
		return err
	}
	if o.UUID != nil {
		if err := o.UUID.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&dtyp.GUID{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	return nil
}
func (o *GDI) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(4); err != nil {
		return err
	}
	if err := w.ReadData(&o.Attributes); err != nil {
		return err
	}
	if o.UUID == nil {
		o.UUID = &dtyp.GUID{}
	}
	if err := o.UUID.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	return nil
}

// Printer structure represents PRINTER_HANDLE RPC structure.
type Printer dcetypes.ContextHandle

func (o *Printer) ContextHandle() *dcetypes.ContextHandle { return (*dcetypes.ContextHandle)(o) }

func (o *Printer) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *Printer) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(4); err != nil {
		return err
	}
	if err := w.WriteData(o.Attributes); err != nil {
		return err
	}
	if o.UUID != nil {
		if err := o.UUID.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&dtyp.GUID{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	return nil
}
func (o *Printer) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(4); err != nil {
		return err
	}
	if err := w.ReadData(&o.Attributes); err != nil {
		return err
	}
	if o.UUID == nil {
		o.UUID = &dtyp.GUID{}
	}
	if err := o.UUID.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	return nil
}

// Size structure represents SIZE RPC structure.
type Size struct {
	X int32 `idl:"name:cx" json:"x"`
	Y int32 `idl:"name:cy" json:"y"`
}

func (o *Size) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *Size) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(4); err != nil {
		return err
	}
	if err := w.WriteData(o.X); err != nil {
		return err
	}
	if err := w.WriteData(o.Y); err != nil {
		return err
	}
	return nil
}
func (o *Size) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(4); err != nil {
		return err
	}
	if err := w.ReadData(&o.X); err != nil {
		return err
	}
	if err := w.ReadData(&o.Y); err != nil {
		return err
	}
	return nil
}

// Rectangle structure represents RECTL RPC structure.
type Rectangle struct {
	Left   int32 `idl:"name:left" json:"left"`
	Top    int32 `idl:"name:top" json:"top"`
	Right  int32 `idl:"name:right" json:"right"`
	Bottom int32 `idl:"name:bottom" json:"bottom"`
}

func (o *Rectangle) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *Rectangle) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(4); err != nil {
		return err
	}
	if err := w.WriteData(o.Left); err != nil {
		return err
	}
	if err := w.WriteData(o.Top); err != nil {
		return err
	}
	if err := w.WriteData(o.Right); err != nil {
		return err
	}
	if err := w.WriteData(o.Bottom); err != nil {
		return err
	}
	return nil
}
func (o *Rectangle) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(4); err != nil {
		return err
	}
	if err := w.ReadData(&o.Left); err != nil {
		return err
	}
	if err := w.ReadData(&o.Top); err != nil {
		return err
	}
	if err := w.ReadData(&o.Right); err != nil {
		return err
	}
	if err := w.ReadData(&o.Bottom); err != nil {
		return err
	}
	return nil
}

// DevMode structure represents DEVMODE RPC structure.
type DevMode struct {
	DeviceName    []uint16 `idl:"name:dmDeviceName" json:"device_name"`
	SpecVersion   uint16   `idl:"name:dmSpecVersion" json:"spec_version"`
	DriverVersion uint16   `idl:"name:dmDriverVersion" json:"driver_version"`
	Size          uint16   `idl:"name:dmSize" json:"size"`
	DriverExtra   uint16   `idl:"name:dmDriverExtra" json:"driver_extra"`
	Fields        uint32   `idl:"name:dmFields" json:"fields"`
	Orientation   int16    `idl:"name:dmOrientation" json:"orientation"`
	PaperSize     int16    `idl:"name:dmPaperSize" json:"paper_size"`
	PaperLength   int16    `idl:"name:dmPaperLength" json:"paper_length"`
	PaperWidth    int16    `idl:"name:dmPaperWidth" json:"paper_width"`
	Scale         int16    `idl:"name:dmScale" json:"scale"`
	Copies        int16    `idl:"name:dmCopies" json:"copies"`
	DefaultSource int16    `idl:"name:dmDefaultSource" json:"default_source"`
	PrintQuality  int16    `idl:"name:dmPrintQuality" json:"print_quality"`
	Color         int16    `idl:"name:dmColor" json:"color"`
	Duplex        int16    `idl:"name:dmDuplex" json:"duplex"`
	YResolution   int16    `idl:"name:dmYResolution" json:"y_resolution"`
	TTOption      int16    `idl:"name:dmTTOption" json:"tt_option"`
	Collate       int16    `idl:"name:dmCollate" json:"collate"`
	FormName      []uint16 `idl:"name:dmFormName" json:"form_name"`
	_             uint16   `idl:"name:reserved0"`
	_             uint32   `idl:"name:reserved1"`
	_             uint32   `idl:"name:reserved2"`
	_             uint32   `idl:"name:reserved3"`
	NUp           uint32   `idl:"name:dmNup" json:"nup"`
	_             uint32   `idl:"name:reserved4"`
	ICMMethod     uint32   `idl:"name:dmICMMethod" json:"icm_method"`
	ICMIntent     uint32   `idl:"name:dmICMIntent" json:"icm_intent"`
	MediaType     uint32   `idl:"name:dmMediaType" json:"media_type"`
	DitherType    uint32   `idl:"name:dmDitherType" json:"dither_type"`
	_             uint32   `idl:"name:reserved5"`
	_             uint32   `idl:"name:reserved6"`
	_             uint32   `idl:"name:reserved7"`
	_             uint32   `idl:"name:reserved8"`
}

func (o *DevMode) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *DevMode) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(4); err != nil {
		return err
	}
	for i1 := range o.DeviceName {
		i1 := i1
		if uint64(i1) >= 32 {
			break
		}
		if err := w.WriteData(o.DeviceName[i1]); err != nil {
			return err
		}
	}
	for i1 := len(o.DeviceName); uint64(i1) < 32; i1++ {
		if err := w.WriteData(uint16(0)); err != nil {
			return err
		}
	}
	if err := w.WriteData(o.SpecVersion); err != nil {
		return err
	}
	if err := w.WriteData(o.DriverVersion); err != nil {
		return err
	}
	if err := w.WriteData(o.Size); err != nil {
		return err
	}
	if err := w.WriteData(o.DriverExtra); err != nil {
		return err
	}
	if err := w.WriteData(o.Fields); err != nil {
		return err
	}
	if err := w.WriteData(o.Orientation); err != nil {
		return err
	}
	if err := w.WriteData(o.PaperSize); err != nil {
		return err
	}
	if err := w.WriteData(o.PaperLength); err != nil {
		return err
	}
	if err := w.WriteData(o.PaperWidth); err != nil {
		return err
	}
	if err := w.WriteData(o.Scale); err != nil {
		return err
	}
	if err := w.WriteData(o.Copies); err != nil {
		return err
	}
	if err := w.WriteData(o.DefaultSource); err != nil {
		return err
	}
	if err := w.WriteData(o.PrintQuality); err != nil {
		return err
	}
	if err := w.WriteData(o.Color); err != nil {
		return err
	}
	if err := w.WriteData(o.Duplex); err != nil {
		return err
	}
	if err := w.WriteData(o.YResolution); err != nil {
		return err
	}
	if err := w.WriteData(o.TTOption); err != nil {
		return err
	}
	if err := w.WriteData(o.Collate); err != nil {
		return err
	}
	for i1 := range o.FormName {
		i1 := i1
		if uint64(i1) >= 32 {
			break
		}
		if err := w.WriteData(o.FormName[i1]); err != nil {
			return err
		}
	}
	for i1 := len(o.FormName); uint64(i1) < 32; i1++ {
		if err := w.WriteData(uint16(0)); err != nil {
			return err
		}
	}
	// reserved reserved0
	if err := w.WriteData(uint16(0)); err != nil {
		return err
	}
	// reserved reserved1
	if err := w.WriteData(uint32(0)); err != nil {
		return err
	}
	// reserved reserved2
	if err := w.WriteData(uint32(0)); err != nil {
		return err
	}
	// reserved reserved3
	if err := w.WriteData(uint32(0)); err != nil {
		return err
	}
	if err := w.WriteData(o.NUp); err != nil {
		return err
	}
	// reserved reserved4
	if err := w.WriteData(uint32(0)); err != nil {
		return err
	}
	if err := w.WriteData(o.ICMMethod); err != nil {
		return err
	}
	if err := w.WriteData(o.ICMIntent); err != nil {
		return err
	}
	if err := w.WriteData(o.MediaType); err != nil {
		return err
	}
	if err := w.WriteData(o.DitherType); err != nil {
		return err
	}
	// reserved reserved5
	if err := w.WriteData(uint32(0)); err != nil {
		return err
	}
	// reserved reserved6
	if err := w.WriteData(uint32(0)); err != nil {
		return err
	}
	// reserved reserved7
	if err := w.WriteData(uint32(0)); err != nil {
		return err
	}
	// reserved reserved8
	if err := w.WriteData(uint32(0)); err != nil {
		return err
	}
	return nil
}
func (o *DevMode) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(4); err != nil {
		return err
	}
	o.DeviceName = make([]uint16, 32)
	for i1 := range o.DeviceName {
		i1 := i1
		if err := w.ReadData(&o.DeviceName[i1]); err != nil {
			return err
		}
	}
	if err := w.ReadData(&o.SpecVersion); err != nil {
		return err
	}
	if err := w.ReadData(&o.DriverVersion); err != nil {
		return err
	}
	if err := w.ReadData(&o.Size); err != nil {
		return err
	}
	if err := w.ReadData(&o.DriverExtra); err != nil {
		return err
	}
	if err := w.ReadData(&o.Fields); err != nil {
		return err
	}
	if err := w.ReadData(&o.Orientation); err != nil {
		return err
	}
	if err := w.ReadData(&o.PaperSize); err != nil {
		return err
	}
	if err := w.ReadData(&o.PaperLength); err != nil {
		return err
	}
	if err := w.ReadData(&o.PaperWidth); err != nil {
		return err
	}
	if err := w.ReadData(&o.Scale); err != nil {
		return err
	}
	if err := w.ReadData(&o.Copies); err != nil {
		return err
	}
	if err := w.ReadData(&o.DefaultSource); err != nil {
		return err
	}
	if err := w.ReadData(&o.PrintQuality); err != nil {
		return err
	}
	if err := w.ReadData(&o.Color); err != nil {
		return err
	}
	if err := w.ReadData(&o.Duplex); err != nil {
		return err
	}
	if err := w.ReadData(&o.YResolution); err != nil {
		return err
	}
	if err := w.ReadData(&o.TTOption); err != nil {
		return err
	}
	if err := w.ReadData(&o.Collate); err != nil {
		return err
	}
	o.FormName = make([]uint16, 32)
	for i1 := range o.FormName {
		i1 := i1
		if err := w.ReadData(&o.FormName[i1]); err != nil {
			return err
		}
	}
	// reserved reserved0
	var _reserved0 uint16
	if err := w.ReadData(&_reserved0); err != nil {
		return err
	}
	// reserved reserved1
	var _reserved1 uint32
	if err := w.ReadData(&_reserved1); err != nil {
		return err
	}
	// reserved reserved2
	var _reserved2 uint32
	if err := w.ReadData(&_reserved2); err != nil {
		return err
	}
	// reserved reserved3
	var _reserved3 uint32
	if err := w.ReadData(&_reserved3); err != nil {
		return err
	}
	if err := w.ReadData(&o.NUp); err != nil {
		return err
	}
	// reserved reserved4
	var _reserved4 uint32
	if err := w.ReadData(&_reserved4); err != nil {
		return err
	}
	if err := w.ReadData(&o.ICMMethod); err != nil {
		return err
	}
	if err := w.ReadData(&o.ICMIntent); err != nil {
		return err
	}
	if err := w.ReadData(&o.MediaType); err != nil {
		return err
	}
	if err := w.ReadData(&o.DitherType); err != nil {
		return err
	}
	// reserved reserved5
	var _reserved5 uint32
	if err := w.ReadData(&_reserved5); err != nil {
		return err
	}
	// reserved reserved6
	var _reserved6 uint32
	if err := w.ReadData(&_reserved6); err != nil {
		return err
	}
	// reserved reserved7
	var _reserved7 uint32
	if err := w.ReadData(&_reserved7); err != nil {
		return err
	}
	// reserved reserved8
	var _reserved8 uint32
	if err := w.ReadData(&_reserved8); err != nil {
		return err
	}
	return nil
}

// DocInfo1 structure represents DOC_INFO_1 RPC structure.
type DocInfo1 struct {
	DocName    string `idl:"name:pDocName;string" json:"doc_name"`
	OutputFile string `idl:"name:pOutputFile;string" json:"output_file"`
	DataType   string `idl:"name:pDatatype;string" json:"data_type"`
}

func (o *DocInfo1) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *DocInfo1) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(6); err != nil {
		return err
	}
	if o.DocName != "" {
		_ptr_pDocName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.DocName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.DocName, _ptr_pDocName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.OutputFile != "" {
		_ptr_pOutputFile := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.OutputFile); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.OutputFile, _ptr_pOutputFile); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.DataType != "" {
		_ptr_pDatatype := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.DataType); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.DataType, _ptr_pDatatype); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *DocInfo1) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(6); err != nil {
		return err
	}
	_ptr_pDocName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.DocName); err != nil {
			return err
		}
		return nil
	})
	_s_pDocName := func(ptr interface{}) { o.DocName = *ptr.(*string) }
	if err := w.ReadPointer(&o.DocName, _s_pDocName, _ptr_pDocName); err != nil {
		return err
	}
	_ptr_pOutputFile := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.OutputFile); err != nil {
			return err
		}
		return nil
	})
	_s_pOutputFile := func(ptr interface{}) { o.OutputFile = *ptr.(*string) }
	if err := w.ReadPointer(&o.OutputFile, _s_pOutputFile, _ptr_pOutputFile); err != nil {
		return err
	}
	_ptr_pDatatype := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.DataType); err != nil {
			return err
		}
		return nil
	})
	_s_pDatatype := func(ptr interface{}) { o.DataType = *ptr.(*string) }
	if err := w.ReadPointer(&o.DataType, _s_pDatatype, _ptr_pDatatype); err != nil {
		return err
	}
	return nil
}

// DriverInfo1 structure represents DRIVER_INFO_1 RPC structure.
//
// This section describes members commonly used in DRIVER_INFO (section 2.2.1.5) and
// RPC_DRIVER_INFO (section 2.2.1.3.1) structures.
type DriverInfo1 struct {
	// pName: A pointer to a string that specifies the name of the printer driver; for example,
	// "QMS 810". For rules governing printer driver names, see section 2.2.4.3.
	Name string `idl:"name:pName;string" json:"name"`
}

func (o *DriverInfo1) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *DriverInfo1) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(6); err != nil {
		return err
	}
	if o.Name != "" {
		_ptr_pName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.Name); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.Name, _ptr_pName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *DriverInfo1) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(6); err != nil {
		return err
	}
	_ptr_pName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.Name); err != nil {
			return err
		}
		return nil
	})
	_s_pName := func(ptr interface{}) { o.Name = *ptr.(*string) }
	if err := w.ReadPointer(&o.Name, _s_pName, _ptr_pName); err != nil {
		return err
	}
	return nil
}

// DriverInfo2 structure represents DRIVER_INFO_2 RPC structure.
//
// This section describes members commonly used in DRIVER_INFO (section 2.2.1.5) and
// RPC_DRIVER_INFO (section 2.2.1.3.1) structures.
type DriverInfo2 struct {
	// cVersion (4 bytes): A DWORD that has an implementation-specific value that identifies
	// the driver version and the operating system version for which the printer driver
	// was written. The driver version contained by each printer driver object in the "List
	// of Printer Drivers" is described in section 3.1.1.<13>
	VersionCount uint32 `idl:"name:cVersion" json:"version_count"`
	// pName: A pointer to a string that specifies the name of the printer driver; for example,
	// "QMS 810". For rules governing printer driver names, see section 2.2.4.3.
	Name string `idl:"name:pName;string" json:"name"`
	// pEnvironment: A pointer to a string that specifies the environment that the printer
	// driver supports. For rules governing environment names, see section 2.2.4.4.
	Environment string `idl:"name:pEnvironment;string" json:"environment"`
	// pDriverPath: A pointer to a string that specifies a file name or full path and file
	// name for the file that contains the printer driver. For more information on driver
	// files, see [MSDN-MPD]. For rules governing path names, see section 2.2.4.9.
	DriverPath string `idl:"name:pDriverPath;string" json:"driver_path"`
	// pDataFile: A pointer to a string that specifies a file name or a full path and file
	// name for the file that contains printer driver data. For more information on driver
	// files, see [MSDN-MPD]. For rules governing path names, see section 2.2.4.9.
	DataFile string `idl:"name:pDataFile;string" json:"data_file"`
	// pConfigFile: A pointer to a string that specifies a file name or a full path and
	// file name for the printer driver configuration module. For more information on driver
	// files, see [MSDN-MPD]. For rules governing path names, see section 2.2.4.9.
	ConfigFile string `idl:"name:pConfigFile;string" json:"config_file"`
}

func (o *DriverInfo2) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *DriverInfo2) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.VersionCount); err != nil {
		return err
	}
	if o.Name != "" {
		_ptr_pName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.Name); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.Name, _ptr_pName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.Environment != "" {
		_ptr_pEnvironment := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.Environment); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.Environment, _ptr_pEnvironment); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.DriverPath != "" {
		_ptr_pDriverPath := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.DriverPath); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.DriverPath, _ptr_pDriverPath); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.DataFile != "" {
		_ptr_pDataFile := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.DataFile); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.DataFile, _ptr_pDataFile); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.ConfigFile != "" {
		_ptr_pConfigFile := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.ConfigFile); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.ConfigFile, _ptr_pConfigFile); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *DriverInfo2) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.VersionCount); err != nil {
		return err
	}
	_ptr_pName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.Name); err != nil {
			return err
		}
		return nil
	})
	_s_pName := func(ptr interface{}) { o.Name = *ptr.(*string) }
	if err := w.ReadPointer(&o.Name, _s_pName, _ptr_pName); err != nil {
		return err
	}
	_ptr_pEnvironment := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.Environment); err != nil {
			return err
		}
		return nil
	})
	_s_pEnvironment := func(ptr interface{}) { o.Environment = *ptr.(*string) }
	if err := w.ReadPointer(&o.Environment, _s_pEnvironment, _ptr_pEnvironment); err != nil {
		return err
	}
	_ptr_pDriverPath := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.DriverPath); err != nil {
			return err
		}
		return nil
	})
	_s_pDriverPath := func(ptr interface{}) { o.DriverPath = *ptr.(*string) }
	if err := w.ReadPointer(&o.DriverPath, _s_pDriverPath, _ptr_pDriverPath); err != nil {
		return err
	}
	_ptr_pDataFile := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.DataFile); err != nil {
			return err
		}
		return nil
	})
	_s_pDataFile := func(ptr interface{}) { o.DataFile = *ptr.(*string) }
	if err := w.ReadPointer(&o.DataFile, _s_pDataFile, _ptr_pDataFile); err != nil {
		return err
	}
	_ptr_pConfigFile := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.ConfigFile); err != nil {
			return err
		}
		return nil
	})
	_s_pConfigFile := func(ptr interface{}) { o.ConfigFile = *ptr.(*string) }
	if err := w.ReadPointer(&o.ConfigFile, _s_pConfigFile, _ptr_pConfigFile); err != nil {
		return err
	}
	return nil
}

// DriverInfo3 structure represents RPC_DRIVER_INFO_3 RPC structure.
//
// This section describes members commonly used in DRIVER_INFO (section 2.2.1.5) and
// RPC_DRIVER_INFO (section 2.2.1.3.1) structures.
type DriverInfo3 struct {
	// cVersion (4 bytes): A DWORD that has an implementation-specific value that identifies
	// the driver version and the operating system version for which the printer driver
	// was written. The driver version contained by each printer driver object in the "List
	// of Printer Drivers" is described in section 3.1.1.<13>
	VersionCount uint32 `idl:"name:cVersion" json:"version_count"`
	// pName: A pointer to a string that specifies the name of the printer driver; for example,
	// "QMS 810". For rules governing printer driver names, see section 2.2.4.3.
	Name string `idl:"name:pName;string" json:"name"`
	// pEnvironment: A pointer to a string that specifies the environment that the printer
	// driver supports. For rules governing environment names, see section 2.2.4.4.
	Environment string `idl:"name:pEnvironment;string" json:"environment"`
	// pDriverPath: A pointer to a string that specifies a file name or full path and file
	// name for the file that contains the printer driver. For more information on driver
	// files, see [MSDN-MPD]. For rules governing path names, see section 2.2.4.9.
	DriverPath string `idl:"name:pDriverPath;string" json:"driver_path"`
	// pDataFile: A pointer to a string that specifies a file name or a full path and file
	// name for the file that contains printer driver data. For more information on driver
	// files, see [MSDN-MPD]. For rules governing path names, see section 2.2.4.9.
	DataFile string `idl:"name:pDataFile;string" json:"data_file"`
	// pConfigFile: A pointer to a string that specifies a file name or a full path and
	// file name for the printer driver configuration module. For more information on driver
	// files, see [MSDN-MPD]. For rules governing path names, see section 2.2.4.9.
	ConfigFile string `idl:"name:pConfigFile;string" json:"config_file"`
	// pHelpFile: An optional pointer to a string that specifies a file name or a full path
	// and file name for the printer driver help file. For more information on driver files,
	// see [MSDN-MPD]. For rules governing path names, see section 2.2.4.9.
	HelpFile string `idl:"name:pHelpFile;string" json:"help_file"`
	// pMonitorName: An optional pointer to a string that specifies a language monitor.
	// For rules governing monitor names, see section 2.2.4.8.<14>
	MonitorName string `idl:"name:pMonitorName;string" json:"monitor_name"`
	// pDefaultDataType: An optional pointer to a string that specifies the default data
	// type of print jobs created with this driver (for example, enhanced metafile spool
	// format (EMFSPOOL) or RAW Format). For rules governing data type names, see section
	// 2.2.4.2.
	DefaultDataType string `idl:"name:pDefaultDataType;string" json:"default_data_type"`
	// cchDependentFiles: The number of characters in the multisz pointed to by pDependentFiles.
	DependentFilesLength uint32 `idl:"name:cchDependentFiles" json:"dependent_files_length"`
	// pDependentFiles: An optional pointer to a multisz that specifies the names of the
	// files that the printer driver is dependent on. If specified, this list MUST include
	// at least one file name and SHOULD be ordered as follows:
	//
	// * The file name of the printer driver manifest ( 831cd729-be7c-451e-b729-bd8d84ce4d24#gt_566759dc-6e10-4b36-b710-f4296c1fbc83
	// ) , if present.
	//
	// * If the printer driver is a derived printer driver ( 831cd729-be7c-451e-b729-bd8d84ce4d24#gt_3101a6be-4528-4314-afe4-ea9d26a106eb
	// ) , the names of all the files the derived printer driver depends on. If the printer
	// driver is not a derived printer driver, all of the other files the printer driver
	// depends on.
	//
	// * If the printer driver is a derived printer driver, the file name of the printer
	// driver manifest of the corresponding class printer driver ( 831cd729-be7c-451e-b729-bd8d84ce4d24#gt_f4048a04-2516-44fc-ba42-2b5bee2782d5
	// ).
	//
	// * If the printer driver is a derived printer driver, the names of all of the files
	// the corresponding class printer driver depends on. <15> ( e81cbc09-ab05-4a32-ae4a-8ec57b436c43#Appendix_A_15
	// )
	DependentFiles string `idl:"name:pDependentFiles;size_is:(cchDependentFiles);pointer:unique" json:"dependent_files"`
}

func (o *DriverInfo3) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if o.DependentFiles != "" && o.DependentFilesLength == 0 {
		o.DependentFilesLength = uint32(ndr.UTF16Len(o.DependentFiles))
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *DriverInfo3) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.VersionCount); err != nil {
		return err
	}
	if o.Name != "" {
		_ptr_pName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.Name); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.Name, _ptr_pName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.Environment != "" {
		_ptr_pEnvironment := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.Environment); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.Environment, _ptr_pEnvironment); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.DriverPath != "" {
		_ptr_pDriverPath := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.DriverPath); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.DriverPath, _ptr_pDriverPath); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.DataFile != "" {
		_ptr_pDataFile := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.DataFile); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.DataFile, _ptr_pDataFile); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.ConfigFile != "" {
		_ptr_pConfigFile := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.ConfigFile); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.ConfigFile, _ptr_pConfigFile); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.HelpFile != "" {
		_ptr_pHelpFile := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.HelpFile); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.HelpFile, _ptr_pHelpFile); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.MonitorName != "" {
		_ptr_pMonitorName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.MonitorName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.MonitorName, _ptr_pMonitorName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.DefaultDataType != "" {
		_ptr_pDefaultDataType := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.DefaultDataType); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.DefaultDataType, _ptr_pDefaultDataType); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if err := w.WriteData(o.DependentFilesLength); err != nil {
		return err
	}
	if o.DependentFiles != "" || o.DependentFilesLength > 0 {
		_ptr_pDependentFiles := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			dimSize1 := uint64(o.DependentFilesLength)
			if err := w.WriteSize(dimSize1); err != nil {
				return err
			}
			sizeInfo := []uint64{
				dimSize1,
			}
			_DependentFiles_buf := utf16.Encode([]rune(o.DependentFiles))
			if uint64(len(_DependentFiles_buf)) > sizeInfo[0] {
				_DependentFiles_buf = _DependentFiles_buf[:sizeInfo[0]]
			}
			for i1 := range _DependentFiles_buf {
				i1 := i1
				if uint64(i1) >= sizeInfo[0] {
					break
				}
				if err := w.WriteData(_DependentFiles_buf[i1]); err != nil {
					return err
				}
			}
			for i1 := len(_DependentFiles_buf); uint64(i1) < sizeInfo[0]; i1++ {
				if err := w.WriteData(uint16(0)); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.DependentFiles, _ptr_pDependentFiles); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *DriverInfo3) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.VersionCount); err != nil {
		return err
	}
	_ptr_pName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.Name); err != nil {
			return err
		}
		return nil
	})
	_s_pName := func(ptr interface{}) { o.Name = *ptr.(*string) }
	if err := w.ReadPointer(&o.Name, _s_pName, _ptr_pName); err != nil {
		return err
	}
	_ptr_pEnvironment := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.Environment); err != nil {
			return err
		}
		return nil
	})
	_s_pEnvironment := func(ptr interface{}) { o.Environment = *ptr.(*string) }
	if err := w.ReadPointer(&o.Environment, _s_pEnvironment, _ptr_pEnvironment); err != nil {
		return err
	}
	_ptr_pDriverPath := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.DriverPath); err != nil {
			return err
		}
		return nil
	})
	_s_pDriverPath := func(ptr interface{}) { o.DriverPath = *ptr.(*string) }
	if err := w.ReadPointer(&o.DriverPath, _s_pDriverPath, _ptr_pDriverPath); err != nil {
		return err
	}
	_ptr_pDataFile := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.DataFile); err != nil {
			return err
		}
		return nil
	})
	_s_pDataFile := func(ptr interface{}) { o.DataFile = *ptr.(*string) }
	if err := w.ReadPointer(&o.DataFile, _s_pDataFile, _ptr_pDataFile); err != nil {
		return err
	}
	_ptr_pConfigFile := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.ConfigFile); err != nil {
			return err
		}
		return nil
	})
	_s_pConfigFile := func(ptr interface{}) { o.ConfigFile = *ptr.(*string) }
	if err := w.ReadPointer(&o.ConfigFile, _s_pConfigFile, _ptr_pConfigFile); err != nil {
		return err
	}
	_ptr_pHelpFile := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.HelpFile); err != nil {
			return err
		}
		return nil
	})
	_s_pHelpFile := func(ptr interface{}) { o.HelpFile = *ptr.(*string) }
	if err := w.ReadPointer(&o.HelpFile, _s_pHelpFile, _ptr_pHelpFile); err != nil {
		return err
	}
	_ptr_pMonitorName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.MonitorName); err != nil {
			return err
		}
		return nil
	})
	_s_pMonitorName := func(ptr interface{}) { o.MonitorName = *ptr.(*string) }
	if err := w.ReadPointer(&o.MonitorName, _s_pMonitorName, _ptr_pMonitorName); err != nil {
		return err
	}
	_ptr_pDefaultDataType := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.DefaultDataType); err != nil {
			return err
		}
		return nil
	})
	_s_pDefaultDataType := func(ptr interface{}) { o.DefaultDataType = *ptr.(*string) }
	if err := w.ReadPointer(&o.DefaultDataType, _s_pDefaultDataType, _ptr_pDefaultDataType); err != nil {
		return err
	}
	if err := w.ReadData(&o.DependentFilesLength); err != nil {
		return err
	}
	_ptr_pDependentFiles := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		// XXX: for opaque unmarshaling
		if o.DependentFilesLength > 0 && sizeInfo[0] == 0 {
			sizeInfo[0] = uint64(o.DependentFilesLength)
		}
		var _DependentFiles_buf []uint16
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array _DependentFiles_buf", sizeInfo[0])
		}
		_DependentFiles_buf = make([]uint16, sizeInfo[0])
		for i1 := range _DependentFiles_buf {
			i1 := i1
			if err := w.ReadData(&_DependentFiles_buf[i1]); err != nil {
				return err
			}
		}
		o.DependentFiles = strings.TrimRight(string(utf16.Decode(_DependentFiles_buf)), ndr.ZeroString)
		return nil
	})
	_s_pDependentFiles := func(ptr interface{}) { o.DependentFiles = *ptr.(*string) }
	if err := w.ReadPointer(&o.DependentFiles, _s_pDependentFiles, _ptr_pDependentFiles); err != nil {
		return err
	}
	return nil
}

// DriverInfo4 structure represents RPC_DRIVER_INFO_4 RPC structure.
//
// This section describes members commonly used in DRIVER_INFO (section 2.2.1.5) and
// RPC_DRIVER_INFO (section 2.2.1.3.1) structures.
type DriverInfo4 struct {
	// cVersion (4 bytes): A DWORD that has an implementation-specific value that identifies
	// the driver version and the operating system version for which the printer driver
	// was written. The driver version contained by each printer driver object in the "List
	// of Printer Drivers" is described in section 3.1.1.<13>
	VersionCount uint32 `idl:"name:cVersion" json:"version_count"`
	// pName: A pointer to a string that specifies the name of the printer driver; for example,
	// "QMS 810". For rules governing printer driver names, see section 2.2.4.3.
	Name string `idl:"name:pName;string" json:"name"`
	// pEnvironment: A pointer to a string that specifies the environment that the printer
	// driver supports. For rules governing environment names, see section 2.2.4.4.
	Environment string `idl:"name:pEnvironment;string" json:"environment"`
	// pDriverPath: A pointer to a string that specifies a file name or full path and file
	// name for the file that contains the printer driver. For more information on driver
	// files, see [MSDN-MPD]. For rules governing path names, see section 2.2.4.9.
	DriverPath string `idl:"name:pDriverPath;string" json:"driver_path"`
	// pDataFile: A pointer to a string that specifies a file name or a full path and file
	// name for the file that contains printer driver data. For more information on driver
	// files, see [MSDN-MPD]. For rules governing path names, see section 2.2.4.9.
	DataFile string `idl:"name:pDataFile;string" json:"data_file"`
	// pConfigFile: A pointer to a string that specifies a file name or a full path and
	// file name for the printer driver configuration module. For more information on driver
	// files, see [MSDN-MPD]. For rules governing path names, see section 2.2.4.9.
	ConfigFile string `idl:"name:pConfigFile;string" json:"config_file"`
	// pHelpFile: An optional pointer to a string that specifies a file name or a full path
	// and file name for the printer driver help file. For more information on driver files,
	// see [MSDN-MPD]. For rules governing path names, see section 2.2.4.9.
	HelpFile string `idl:"name:pHelpFile;string" json:"help_file"`
	// pMonitorName: An optional pointer to a string that specifies a language monitor.
	// For rules governing monitor names, see section 2.2.4.8.<14>
	MonitorName string `idl:"name:pMonitorName;string" json:"monitor_name"`
	// pDefaultDataType: An optional pointer to a string that specifies the default data
	// type of print jobs created with this driver (for example, enhanced metafile spool
	// format (EMFSPOOL) or RAW Format). For rules governing data type names, see section
	// 2.2.4.2.
	DefaultDataType string `idl:"name:pDefaultDataType;string" json:"default_data_type"`
	// cchDependentFiles: The number of characters in the multisz pointed to by pDependentFiles.
	DependentFilesLength uint32 `idl:"name:cchDependentFiles" json:"dependent_files_length"`
	// pDependentFiles: An optional pointer to a multisz that specifies the names of the
	// files that the printer driver is dependent on. If specified, this list MUST include
	// at least one file name and SHOULD be ordered as follows:
	//
	// * The file name of the printer driver manifest ( 831cd729-be7c-451e-b729-bd8d84ce4d24#gt_566759dc-6e10-4b36-b710-f4296c1fbc83
	// ) , if present.
	//
	// * If the printer driver is a derived printer driver ( 831cd729-be7c-451e-b729-bd8d84ce4d24#gt_3101a6be-4528-4314-afe4-ea9d26a106eb
	// ) , the names of all the files the derived printer driver depends on. If the printer
	// driver is not a derived printer driver, all of the other files the printer driver
	// depends on.
	//
	// * If the printer driver is a derived printer driver, the file name of the printer
	// driver manifest of the corresponding class printer driver ( 831cd729-be7c-451e-b729-bd8d84ce4d24#gt_f4048a04-2516-44fc-ba42-2b5bee2782d5
	// ).
	//
	// * If the printer driver is a derived printer driver, the names of all of the files
	// the corresponding class printer driver depends on. <15> ( e81cbc09-ab05-4a32-ae4a-8ec57b436c43#Appendix_A_15
	// )
	DependentFiles string `idl:"name:pDependentFiles;size_is:(cchDependentFiles);pointer:unique" json:"dependent_files"`
	// cchPreviousNames: The value of this member MUST be the number of characters in the
	// multisz pointed to by pszzPreviousNames.
	PreviousNamesLength uint32 `idl:"name:cchPreviousNames" json:"previous_names_length"`
	// pszzPreviousNames: An optional pointer to a multisz that specifies any previous printer
	// drivers that are compatible with this driver.
	PreviousNames string `idl:"name:pszzPreviousNames;size_is:(cchPreviousNames);pointer:unique" json:"previous_names"`
}

func (o *DriverInfo4) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if o.DependentFiles != "" && o.DependentFilesLength == 0 {
		o.DependentFilesLength = uint32(ndr.UTF16Len(o.DependentFiles))
	}
	if o.PreviousNames != "" && o.PreviousNamesLength == 0 {
		o.PreviousNamesLength = uint32(ndr.UTF16Len(o.PreviousNames))
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *DriverInfo4) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.VersionCount); err != nil {
		return err
	}
	if o.Name != "" {
		_ptr_pName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.Name); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.Name, _ptr_pName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.Environment != "" {
		_ptr_pEnvironment := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.Environment); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.Environment, _ptr_pEnvironment); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.DriverPath != "" {
		_ptr_pDriverPath := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.DriverPath); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.DriverPath, _ptr_pDriverPath); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.DataFile != "" {
		_ptr_pDataFile := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.DataFile); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.DataFile, _ptr_pDataFile); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.ConfigFile != "" {
		_ptr_pConfigFile := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.ConfigFile); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.ConfigFile, _ptr_pConfigFile); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.HelpFile != "" {
		_ptr_pHelpFile := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.HelpFile); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.HelpFile, _ptr_pHelpFile); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.MonitorName != "" {
		_ptr_pMonitorName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.MonitorName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.MonitorName, _ptr_pMonitorName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.DefaultDataType != "" {
		_ptr_pDefaultDataType := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.DefaultDataType); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.DefaultDataType, _ptr_pDefaultDataType); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if err := w.WriteData(o.DependentFilesLength); err != nil {
		return err
	}
	if o.DependentFiles != "" || o.DependentFilesLength > 0 {
		_ptr_pDependentFiles := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			dimSize1 := uint64(o.DependentFilesLength)
			if err := w.WriteSize(dimSize1); err != nil {
				return err
			}
			sizeInfo := []uint64{
				dimSize1,
			}
			_DependentFiles_buf := utf16.Encode([]rune(o.DependentFiles))
			if uint64(len(_DependentFiles_buf)) > sizeInfo[0] {
				_DependentFiles_buf = _DependentFiles_buf[:sizeInfo[0]]
			}
			for i1 := range _DependentFiles_buf {
				i1 := i1
				if uint64(i1) >= sizeInfo[0] {
					break
				}
				if err := w.WriteData(_DependentFiles_buf[i1]); err != nil {
					return err
				}
			}
			for i1 := len(_DependentFiles_buf); uint64(i1) < sizeInfo[0]; i1++ {
				if err := w.WriteData(uint16(0)); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.DependentFiles, _ptr_pDependentFiles); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if err := w.WriteData(o.PreviousNamesLength); err != nil {
		return err
	}
	if o.PreviousNames != "" || o.PreviousNamesLength > 0 {
		_ptr_pszzPreviousNames := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			dimSize1 := uint64(o.PreviousNamesLength)
			if err := w.WriteSize(dimSize1); err != nil {
				return err
			}
			sizeInfo := []uint64{
				dimSize1,
			}
			_PreviousNames_buf := utf16.Encode([]rune(o.PreviousNames))
			if uint64(len(_PreviousNames_buf)) > sizeInfo[0] {
				_PreviousNames_buf = _PreviousNames_buf[:sizeInfo[0]]
			}
			for i1 := range _PreviousNames_buf {
				i1 := i1
				if uint64(i1) >= sizeInfo[0] {
					break
				}
				if err := w.WriteData(_PreviousNames_buf[i1]); err != nil {
					return err
				}
			}
			for i1 := len(_PreviousNames_buf); uint64(i1) < sizeInfo[0]; i1++ {
				if err := w.WriteData(uint16(0)); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.PreviousNames, _ptr_pszzPreviousNames); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *DriverInfo4) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.VersionCount); err != nil {
		return err
	}
	_ptr_pName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.Name); err != nil {
			return err
		}
		return nil
	})
	_s_pName := func(ptr interface{}) { o.Name = *ptr.(*string) }
	if err := w.ReadPointer(&o.Name, _s_pName, _ptr_pName); err != nil {
		return err
	}
	_ptr_pEnvironment := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.Environment); err != nil {
			return err
		}
		return nil
	})
	_s_pEnvironment := func(ptr interface{}) { o.Environment = *ptr.(*string) }
	if err := w.ReadPointer(&o.Environment, _s_pEnvironment, _ptr_pEnvironment); err != nil {
		return err
	}
	_ptr_pDriverPath := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.DriverPath); err != nil {
			return err
		}
		return nil
	})
	_s_pDriverPath := func(ptr interface{}) { o.DriverPath = *ptr.(*string) }
	if err := w.ReadPointer(&o.DriverPath, _s_pDriverPath, _ptr_pDriverPath); err != nil {
		return err
	}
	_ptr_pDataFile := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.DataFile); err != nil {
			return err
		}
		return nil
	})
	_s_pDataFile := func(ptr interface{}) { o.DataFile = *ptr.(*string) }
	if err := w.ReadPointer(&o.DataFile, _s_pDataFile, _ptr_pDataFile); err != nil {
		return err
	}
	_ptr_pConfigFile := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.ConfigFile); err != nil {
			return err
		}
		return nil
	})
	_s_pConfigFile := func(ptr interface{}) { o.ConfigFile = *ptr.(*string) }
	if err := w.ReadPointer(&o.ConfigFile, _s_pConfigFile, _ptr_pConfigFile); err != nil {
		return err
	}
	_ptr_pHelpFile := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.HelpFile); err != nil {
			return err
		}
		return nil
	})
	_s_pHelpFile := func(ptr interface{}) { o.HelpFile = *ptr.(*string) }
	if err := w.ReadPointer(&o.HelpFile, _s_pHelpFile, _ptr_pHelpFile); err != nil {
		return err
	}
	_ptr_pMonitorName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.MonitorName); err != nil {
			return err
		}
		return nil
	})
	_s_pMonitorName := func(ptr interface{}) { o.MonitorName = *ptr.(*string) }
	if err := w.ReadPointer(&o.MonitorName, _s_pMonitorName, _ptr_pMonitorName); err != nil {
		return err
	}
	_ptr_pDefaultDataType := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.DefaultDataType); err != nil {
			return err
		}
		return nil
	})
	_s_pDefaultDataType := func(ptr interface{}) { o.DefaultDataType = *ptr.(*string) }
	if err := w.ReadPointer(&o.DefaultDataType, _s_pDefaultDataType, _ptr_pDefaultDataType); err != nil {
		return err
	}
	if err := w.ReadData(&o.DependentFilesLength); err != nil {
		return err
	}
	_ptr_pDependentFiles := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		// XXX: for opaque unmarshaling
		if o.DependentFilesLength > 0 && sizeInfo[0] == 0 {
			sizeInfo[0] = uint64(o.DependentFilesLength)
		}
		var _DependentFiles_buf []uint16
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array _DependentFiles_buf", sizeInfo[0])
		}
		_DependentFiles_buf = make([]uint16, sizeInfo[0])
		for i1 := range _DependentFiles_buf {
			i1 := i1
			if err := w.ReadData(&_DependentFiles_buf[i1]); err != nil {
				return err
			}
		}
		o.DependentFiles = strings.TrimRight(string(utf16.Decode(_DependentFiles_buf)), ndr.ZeroString)
		return nil
	})
	_s_pDependentFiles := func(ptr interface{}) { o.DependentFiles = *ptr.(*string) }
	if err := w.ReadPointer(&o.DependentFiles, _s_pDependentFiles, _ptr_pDependentFiles); err != nil {
		return err
	}
	if err := w.ReadData(&o.PreviousNamesLength); err != nil {
		return err
	}
	_ptr_pszzPreviousNames := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		// XXX: for opaque unmarshaling
		if o.PreviousNamesLength > 0 && sizeInfo[0] == 0 {
			sizeInfo[0] = uint64(o.PreviousNamesLength)
		}
		var _PreviousNames_buf []uint16
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array _PreviousNames_buf", sizeInfo[0])
		}
		_PreviousNames_buf = make([]uint16, sizeInfo[0])
		for i1 := range _PreviousNames_buf {
			i1 := i1
			if err := w.ReadData(&_PreviousNames_buf[i1]); err != nil {
				return err
			}
		}
		o.PreviousNames = strings.TrimRight(string(utf16.Decode(_PreviousNames_buf)), ndr.ZeroString)
		return nil
	})
	_s_pszzPreviousNames := func(ptr interface{}) { o.PreviousNames = *ptr.(*string) }
	if err := w.ReadPointer(&o.PreviousNames, _s_pszzPreviousNames, _ptr_pszzPreviousNames); err != nil {
		return err
	}
	return nil
}

// DriverInfo6 structure represents RPC_DRIVER_INFO_6 RPC structure.
//
// This section describes members commonly used in DRIVER_INFO (section 2.2.1.5) and
// RPC_DRIVER_INFO (section 2.2.1.3.1) structures.
type DriverInfo6 struct {
	// cVersion (4 bytes): A DWORD that has an implementation-specific value that identifies
	// the driver version and the operating system version for which the printer driver
	// was written. The driver version contained by each printer driver object in the "List
	// of Printer Drivers" is described in section 3.1.1.<13>
	VersionCount uint32 `idl:"name:cVersion" json:"version_count"`
	// pName: A pointer to a string that specifies the name of the printer driver; for example,
	// "QMS 810". For rules governing printer driver names, see section 2.2.4.3.
	Name string `idl:"name:pName;string" json:"name"`
	// pEnvironment: A pointer to a string that specifies the environment that the printer
	// driver supports. For rules governing environment names, see section 2.2.4.4.
	Environment string `idl:"name:pEnvironment;string" json:"environment"`
	// pDriverPath: A pointer to a string that specifies a file name or full path and file
	// name for the file that contains the printer driver. For more information on driver
	// files, see [MSDN-MPD]. For rules governing path names, see section 2.2.4.9.
	DriverPath string `idl:"name:pDriverPath;string" json:"driver_path"`
	// pDataFile: A pointer to a string that specifies a file name or a full path and file
	// name for the file that contains printer driver data. For more information on driver
	// files, see [MSDN-MPD]. For rules governing path names, see section 2.2.4.9.
	DataFile string `idl:"name:pDataFile;string" json:"data_file"`
	// pConfigFile: A pointer to a string that specifies a file name or a full path and
	// file name for the printer driver configuration module. For more information on driver
	// files, see [MSDN-MPD]. For rules governing path names, see section 2.2.4.9.
	ConfigFile string `idl:"name:pConfigFile;string" json:"config_file"`
	// pHelpFile: An optional pointer to a string that specifies a file name or a full path
	// and file name for the printer driver help file. For more information on driver files,
	// see [MSDN-MPD]. For rules governing path names, see section 2.2.4.9.
	HelpFile string `idl:"name:pHelpFile;string" json:"help_file"`
	// pMonitorName: An optional pointer to a string that specifies a language monitor.
	// For rules governing monitor names, see section 2.2.4.8.<14>
	MonitorName string `idl:"name:pMonitorName;string" json:"monitor_name"`
	// pDefaultDataType: An optional pointer to a string that specifies the default data
	// type of print jobs created with this driver (for example, enhanced metafile spool
	// format (EMFSPOOL) or RAW Format). For rules governing data type names, see section
	// 2.2.4.2.
	DefaultDataType string `idl:"name:pDefaultDataType;string" json:"default_data_type"`
	// cchDependentFiles: The number of characters in the multisz pointed to by pDependentFiles.
	DependentFilesLength uint32 `idl:"name:cchDependentFiles" json:"dependent_files_length"`
	// pDependentFiles: An optional pointer to a multisz that specifies the names of the
	// files that the printer driver is dependent on. If specified, this list MUST include
	// at least one file name and SHOULD be ordered as follows:
	//
	// * The file name of the printer driver manifest ( 831cd729-be7c-451e-b729-bd8d84ce4d24#gt_566759dc-6e10-4b36-b710-f4296c1fbc83
	// ) , if present.
	//
	// * If the printer driver is a derived printer driver ( 831cd729-be7c-451e-b729-bd8d84ce4d24#gt_3101a6be-4528-4314-afe4-ea9d26a106eb
	// ) , the names of all the files the derived printer driver depends on. If the printer
	// driver is not a derived printer driver, all of the other files the printer driver
	// depends on.
	//
	// * If the printer driver is a derived printer driver, the file name of the printer
	// driver manifest of the corresponding class printer driver ( 831cd729-be7c-451e-b729-bd8d84ce4d24#gt_f4048a04-2516-44fc-ba42-2b5bee2782d5
	// ).
	//
	// * If the printer driver is a derived printer driver, the names of all of the files
	// the corresponding class printer driver depends on. <15> ( e81cbc09-ab05-4a32-ae4a-8ec57b436c43#Appendix_A_15
	// )
	DependentFiles string `idl:"name:pDependentFiles;size_is:(cchDependentFiles);pointer:unique" json:"dependent_files"`
	// cchPreviousNames: The value of this member MUST be the number of characters in the
	// multisz pointed to by pszzPreviousNames.
	PreviousNamesLength uint32 `idl:"name:cchPreviousNames" json:"previous_names_length"`
	// pszzPreviousNames: An optional pointer to a multisz that specifies any previous printer
	// drivers that are compatible with this driver.
	PreviousNames string `idl:"name:pszzPreviousNames;size_is:(cchPreviousNames);pointer:unique" json:"previous_names"`
	// ftDriverDate: The value of this member MUST be the manufacturer build date of the
	// printer driver. The FILETIME format is specified in [MS-DTYP] section 2.3.3.
	DriverDate *dtyp.Filetime `idl:"name:ftDriverDate" json:"driver_date"`
	// dwlDriverVersion: The printer driver version number. The format of this number is
	// specified by each printer driver manufacturer. A print client can use this value
	// to determine whether a printer driver on the print server matches the version available
	// on the client.<16>
	DriverVersion uint64 `idl:"name:dwlDriverVersion" json:"driver_version"`
	// pMfgName: An optional pointer to a string that specifies the manufacturer's name.
	ManufacturerName string `idl:"name:pMfgName;string" json:"manufacturer_name"`
	// pOEMUrl: An optional pointer to a string that specifies the URL for the manufacturer
	// of the printer driver.
	OEMURL string `idl:"name:pOEMUrl;string" json:"oem_url"`
	// pHardwareID: An optional pointer to a string that specifies the hardware identifier
	// for the printer driver.
	HardwareID string `idl:"name:pHardwareID;string" json:"hardware_id"`
	// pProvider: An optional pointer to a string that specifies the publisher of the printer
	// driver.
	Provider string `idl:"name:pProvider;string" json:"provider"`
}

func (o *DriverInfo6) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if o.DependentFiles != "" && o.DependentFilesLength == 0 {
		o.DependentFilesLength = uint32(ndr.UTF16Len(o.DependentFiles))
	}
	if o.PreviousNames != "" && o.PreviousNamesLength == 0 {
		o.PreviousNamesLength = uint32(ndr.UTF16Len(o.PreviousNames))
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *DriverInfo6) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(8); err != nil {
		return err
	}
	if err := w.WriteData(o.VersionCount); err != nil {
		return err
	}
	if o.Name != "" {
		_ptr_pName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.Name); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.Name, _ptr_pName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.Environment != "" {
		_ptr_pEnvironment := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.Environment); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.Environment, _ptr_pEnvironment); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.DriverPath != "" {
		_ptr_pDriverPath := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.DriverPath); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.DriverPath, _ptr_pDriverPath); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.DataFile != "" {
		_ptr_pDataFile := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.DataFile); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.DataFile, _ptr_pDataFile); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.ConfigFile != "" {
		_ptr_pConfigFile := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.ConfigFile); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.ConfigFile, _ptr_pConfigFile); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.HelpFile != "" {
		_ptr_pHelpFile := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.HelpFile); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.HelpFile, _ptr_pHelpFile); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.MonitorName != "" {
		_ptr_pMonitorName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.MonitorName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.MonitorName, _ptr_pMonitorName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.DefaultDataType != "" {
		_ptr_pDefaultDataType := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.DefaultDataType); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.DefaultDataType, _ptr_pDefaultDataType); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if err := w.WriteData(o.DependentFilesLength); err != nil {
		return err
	}
	if o.DependentFiles != "" || o.DependentFilesLength > 0 {
		_ptr_pDependentFiles := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			dimSize1 := uint64(o.DependentFilesLength)
			if err := w.WriteSize(dimSize1); err != nil {
				return err
			}
			sizeInfo := []uint64{
				dimSize1,
			}
			_DependentFiles_buf := utf16.Encode([]rune(o.DependentFiles))
			if uint64(len(_DependentFiles_buf)) > sizeInfo[0] {
				_DependentFiles_buf = _DependentFiles_buf[:sizeInfo[0]]
			}
			for i1 := range _DependentFiles_buf {
				i1 := i1
				if uint64(i1) >= sizeInfo[0] {
					break
				}
				if err := w.WriteData(_DependentFiles_buf[i1]); err != nil {
					return err
				}
			}
			for i1 := len(_DependentFiles_buf); uint64(i1) < sizeInfo[0]; i1++ {
				if err := w.WriteData(uint16(0)); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.DependentFiles, _ptr_pDependentFiles); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if err := w.WriteData(o.PreviousNamesLength); err != nil {
		return err
	}
	if o.PreviousNames != "" || o.PreviousNamesLength > 0 {
		_ptr_pszzPreviousNames := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			dimSize1 := uint64(o.PreviousNamesLength)
			if err := w.WriteSize(dimSize1); err != nil {
				return err
			}
			sizeInfo := []uint64{
				dimSize1,
			}
			_PreviousNames_buf := utf16.Encode([]rune(o.PreviousNames))
			if uint64(len(_PreviousNames_buf)) > sizeInfo[0] {
				_PreviousNames_buf = _PreviousNames_buf[:sizeInfo[0]]
			}
			for i1 := range _PreviousNames_buf {
				i1 := i1
				if uint64(i1) >= sizeInfo[0] {
					break
				}
				if err := w.WriteData(_PreviousNames_buf[i1]); err != nil {
					return err
				}
			}
			for i1 := len(_PreviousNames_buf); uint64(i1) < sizeInfo[0]; i1++ {
				if err := w.WriteData(uint16(0)); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.PreviousNames, _ptr_pszzPreviousNames); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.DriverDate != nil {
		if err := o.DriverDate.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&dtyp.Filetime{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	if err := w.WriteData(o.DriverVersion); err != nil {
		return err
	}
	if o.ManufacturerName != "" {
		_ptr_pMfgName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.ManufacturerName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.ManufacturerName, _ptr_pMfgName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.OEMURL != "" {
		_ptr_pOEMUrl := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.OEMURL); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.OEMURL, _ptr_pOEMUrl); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.HardwareID != "" {
		_ptr_pHardwareID := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.HardwareID); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.HardwareID, _ptr_pHardwareID); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.Provider != "" {
		_ptr_pProvider := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.Provider); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.Provider, _ptr_pProvider); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if err := w.WriteTrailingGap(8); err != nil {
		return err
	}
	return nil
}
func (o *DriverInfo6) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(8); err != nil {
		return err
	}
	if err := w.ReadData(&o.VersionCount); err != nil {
		return err
	}
	_ptr_pName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.Name); err != nil {
			return err
		}
		return nil
	})
	_s_pName := func(ptr interface{}) { o.Name = *ptr.(*string) }
	if err := w.ReadPointer(&o.Name, _s_pName, _ptr_pName); err != nil {
		return err
	}
	_ptr_pEnvironment := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.Environment); err != nil {
			return err
		}
		return nil
	})
	_s_pEnvironment := func(ptr interface{}) { o.Environment = *ptr.(*string) }
	if err := w.ReadPointer(&o.Environment, _s_pEnvironment, _ptr_pEnvironment); err != nil {
		return err
	}
	_ptr_pDriverPath := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.DriverPath); err != nil {
			return err
		}
		return nil
	})
	_s_pDriverPath := func(ptr interface{}) { o.DriverPath = *ptr.(*string) }
	if err := w.ReadPointer(&o.DriverPath, _s_pDriverPath, _ptr_pDriverPath); err != nil {
		return err
	}
	_ptr_pDataFile := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.DataFile); err != nil {
			return err
		}
		return nil
	})
	_s_pDataFile := func(ptr interface{}) { o.DataFile = *ptr.(*string) }
	if err := w.ReadPointer(&o.DataFile, _s_pDataFile, _ptr_pDataFile); err != nil {
		return err
	}
	_ptr_pConfigFile := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.ConfigFile); err != nil {
			return err
		}
		return nil
	})
	_s_pConfigFile := func(ptr interface{}) { o.ConfigFile = *ptr.(*string) }
	if err := w.ReadPointer(&o.ConfigFile, _s_pConfigFile, _ptr_pConfigFile); err != nil {
		return err
	}
	_ptr_pHelpFile := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.HelpFile); err != nil {
			return err
		}
		return nil
	})
	_s_pHelpFile := func(ptr interface{}) { o.HelpFile = *ptr.(*string) }
	if err := w.ReadPointer(&o.HelpFile, _s_pHelpFile, _ptr_pHelpFile); err != nil {
		return err
	}
	_ptr_pMonitorName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.MonitorName); err != nil {
			return err
		}
		return nil
	})
	_s_pMonitorName := func(ptr interface{}) { o.MonitorName = *ptr.(*string) }
	if err := w.ReadPointer(&o.MonitorName, _s_pMonitorName, _ptr_pMonitorName); err != nil {
		return err
	}
	_ptr_pDefaultDataType := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.DefaultDataType); err != nil {
			return err
		}
		return nil
	})
	_s_pDefaultDataType := func(ptr interface{}) { o.DefaultDataType = *ptr.(*string) }
	if err := w.ReadPointer(&o.DefaultDataType, _s_pDefaultDataType, _ptr_pDefaultDataType); err != nil {
		return err
	}
	if err := w.ReadData(&o.DependentFilesLength); err != nil {
		return err
	}
	_ptr_pDependentFiles := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		// XXX: for opaque unmarshaling
		if o.DependentFilesLength > 0 && sizeInfo[0] == 0 {
			sizeInfo[0] = uint64(o.DependentFilesLength)
		}
		var _DependentFiles_buf []uint16
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array _DependentFiles_buf", sizeInfo[0])
		}
		_DependentFiles_buf = make([]uint16, sizeInfo[0])
		for i1 := range _DependentFiles_buf {
			i1 := i1
			if err := w.ReadData(&_DependentFiles_buf[i1]); err != nil {
				return err
			}
		}
		o.DependentFiles = strings.TrimRight(string(utf16.Decode(_DependentFiles_buf)), ndr.ZeroString)
		return nil
	})
	_s_pDependentFiles := func(ptr interface{}) { o.DependentFiles = *ptr.(*string) }
	if err := w.ReadPointer(&o.DependentFiles, _s_pDependentFiles, _ptr_pDependentFiles); err != nil {
		return err
	}
	if err := w.ReadData(&o.PreviousNamesLength); err != nil {
		return err
	}
	_ptr_pszzPreviousNames := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		// XXX: for opaque unmarshaling
		if o.PreviousNamesLength > 0 && sizeInfo[0] == 0 {
			sizeInfo[0] = uint64(o.PreviousNamesLength)
		}
		var _PreviousNames_buf []uint16
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array _PreviousNames_buf", sizeInfo[0])
		}
		_PreviousNames_buf = make([]uint16, sizeInfo[0])
		for i1 := range _PreviousNames_buf {
			i1 := i1
			if err := w.ReadData(&_PreviousNames_buf[i1]); err != nil {
				return err
			}
		}
		o.PreviousNames = strings.TrimRight(string(utf16.Decode(_PreviousNames_buf)), ndr.ZeroString)
		return nil
	})
	_s_pszzPreviousNames := func(ptr interface{}) { o.PreviousNames = *ptr.(*string) }
	if err := w.ReadPointer(&o.PreviousNames, _s_pszzPreviousNames, _ptr_pszzPreviousNames); err != nil {
		return err
	}
	if o.DriverDate == nil {
		o.DriverDate = &dtyp.Filetime{}
	}
	if err := o.DriverDate.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	if err := w.ReadData(&o.DriverVersion); err != nil {
		return err
	}
	_ptr_pMfgName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.ManufacturerName); err != nil {
			return err
		}
		return nil
	})
	_s_pMfgName := func(ptr interface{}) { o.ManufacturerName = *ptr.(*string) }
	if err := w.ReadPointer(&o.ManufacturerName, _s_pMfgName, _ptr_pMfgName); err != nil {
		return err
	}
	_ptr_pOEMUrl := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.OEMURL); err != nil {
			return err
		}
		return nil
	})
	_s_pOEMUrl := func(ptr interface{}) { o.OEMURL = *ptr.(*string) }
	if err := w.ReadPointer(&o.OEMURL, _s_pOEMUrl, _ptr_pOEMUrl); err != nil {
		return err
	}
	_ptr_pHardwareID := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.HardwareID); err != nil {
			return err
		}
		return nil
	})
	_s_pHardwareID := func(ptr interface{}) { o.HardwareID = *ptr.(*string) }
	if err := w.ReadPointer(&o.HardwareID, _s_pHardwareID, _ptr_pHardwareID); err != nil {
		return err
	}
	_ptr_pProvider := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.Provider); err != nil {
			return err
		}
		return nil
	})
	_s_pProvider := func(ptr interface{}) { o.Provider = *ptr.(*string) }
	if err := w.ReadPointer(&o.Provider, _s_pProvider, _ptr_pProvider); err != nil {
		return err
	}
	if err := w.ReadTrailingGap(8); err != nil {
		return err
	}
	return nil
}

// DriverInfo8 structure represents RPC_DRIVER_INFO_8 RPC structure.
//
// This section describes members commonly used in DRIVER_INFO (section 2.2.1.5) and
// RPC_DRIVER_INFO (section 2.2.1.3.1) structures.
type DriverInfo8 struct {
	// cVersion (4 bytes): A DWORD that has an implementation-specific value that identifies
	// the driver version and the operating system version for which the printer driver
	// was written. The driver version contained by each printer driver object in the "List
	// of Printer Drivers" is described in section 3.1.1.<13>
	VersionCount uint32 `idl:"name:cVersion" json:"version_count"`
	// pName: A pointer to a string that specifies the name of the printer driver; for example,
	// "QMS 810". For rules governing printer driver names, see section 2.2.4.3.
	Name string `idl:"name:pName;string" json:"name"`
	// pEnvironment: A pointer to a string that specifies the environment that the printer
	// driver supports. For rules governing environment names, see section 2.2.4.4.
	Environment string `idl:"name:pEnvironment;string" json:"environment"`
	// pDriverPath: A pointer to a string that specifies a file name or full path and file
	// name for the file that contains the printer driver. For more information on driver
	// files, see [MSDN-MPD]. For rules governing path names, see section 2.2.4.9.
	DriverPath string `idl:"name:pDriverPath;string" json:"driver_path"`
	// pDataFile: A pointer to a string that specifies a file name or a full path and file
	// name for the file that contains printer driver data. For more information on driver
	// files, see [MSDN-MPD]. For rules governing path names, see section 2.2.4.9.
	DataFile string `idl:"name:pDataFile;string" json:"data_file"`
	// pConfigFile: A pointer to a string that specifies a file name or a full path and
	// file name for the printer driver configuration module. For more information on driver
	// files, see [MSDN-MPD]. For rules governing path names, see section 2.2.4.9.
	ConfigFile string `idl:"name:pConfigFile;string" json:"config_file"`
	// pHelpFile: An optional pointer to a string that specifies a file name or a full path
	// and file name for the printer driver help file. For more information on driver files,
	// see [MSDN-MPD]. For rules governing path names, see section 2.2.4.9.
	HelpFile string `idl:"name:pHelpFile;string" json:"help_file"`
	// pMonitorName: An optional pointer to a string that specifies a language monitor.
	// For rules governing monitor names, see section 2.2.4.8.<14>
	MonitorName string `idl:"name:pMonitorName;string" json:"monitor_name"`
	// pDefaultDataType: An optional pointer to a string that specifies the default data
	// type of print jobs created with this driver (for example, enhanced metafile spool
	// format (EMFSPOOL) or RAW Format). For rules governing data type names, see section
	// 2.2.4.2.
	DefaultDataType string `idl:"name:pDefaultDataType;string" json:"default_data_type"`
	// cchDependentFiles: The number of characters in the multisz pointed to by pDependentFiles.
	DependentFilesLength uint32 `idl:"name:cchDependentFiles" json:"dependent_files_length"`
	// pDependentFiles: An optional pointer to a multisz that specifies the names of the
	// files that the printer driver is dependent on. If specified, this list MUST include
	// at least one file name and SHOULD be ordered as follows:
	//
	// * The file name of the printer driver manifest ( 831cd729-be7c-451e-b729-bd8d84ce4d24#gt_566759dc-6e10-4b36-b710-f4296c1fbc83
	// ) , if present.
	//
	// * If the printer driver is a derived printer driver ( 831cd729-be7c-451e-b729-bd8d84ce4d24#gt_3101a6be-4528-4314-afe4-ea9d26a106eb
	// ) , the names of all the files the derived printer driver depends on. If the printer
	// driver is not a derived printer driver, all of the other files the printer driver
	// depends on.
	//
	// * If the printer driver is a derived printer driver, the file name of the printer
	// driver manifest of the corresponding class printer driver ( 831cd729-be7c-451e-b729-bd8d84ce4d24#gt_f4048a04-2516-44fc-ba42-2b5bee2782d5
	// ).
	//
	// * If the printer driver is a derived printer driver, the names of all of the files
	// the corresponding class printer driver depends on. <15> ( e81cbc09-ab05-4a32-ae4a-8ec57b436c43#Appendix_A_15
	// )
	DependentFiles string `idl:"name:pDependentFiles;size_is:(cchDependentFiles);pointer:unique" json:"dependent_files"`
	// cchPreviousNames: The value of this member MUST be the number of characters in the
	// multisz pointed to by pszzPreviousNames.
	PreviousNamesLength uint32 `idl:"name:cchPreviousNames" json:"previous_names_length"`
	// pszzPreviousNames: An optional pointer to a multisz that specifies any previous printer
	// drivers that are compatible with this driver.
	PreviousNames string `idl:"name:pszzPreviousNames;size_is:(cchPreviousNames);pointer:unique" json:"previous_names"`
	// ftDriverDate: The value of this member MUST be the manufacturer build date of the
	// printer driver. The FILETIME format is specified in [MS-DTYP] section 2.3.3.
	DriverDate *dtyp.Filetime `idl:"name:ftDriverDate" json:"driver_date"`
	// dwlDriverVersion: The printer driver version number. The format of this number is
	// specified by each printer driver manufacturer. A print client can use this value
	// to determine whether a printer driver on the print server matches the version available
	// on the client.<16>
	DriverVersion uint64 `idl:"name:dwlDriverVersion" json:"driver_version"`
	// pMfgName: An optional pointer to a string that specifies the manufacturer's name.
	ManufacturerName string `idl:"name:pMfgName;string" json:"manufacturer_name"`
	// pOEMUrl: An optional pointer to a string that specifies the URL for the manufacturer
	// of the printer driver.
	OEMURL string `idl:"name:pOEMUrl;string" json:"oem_url"`
	// pHardwareID: An optional pointer to a string that specifies the hardware identifier
	// for the printer driver.
	HardwareID string `idl:"name:pHardwareID;string" json:"hardware_id"`
	// pProvider: An optional pointer to a string that specifies the publisher of the printer
	// driver.
	Provider                 string         `idl:"name:pProvider;string" json:"provider"`
	PrintProcessor           string         `idl:"name:pPrintProcessor;string" json:"print_processor"`
	VendorSetup              string         `idl:"name:pVendorSetup;string" json:"vendor_setup"`
	ColorProfilesLength      uint32         `idl:"name:cchColorProfiles" json:"color_profiles_length"`
	ColorProfiles            string         `idl:"name:pszzColorProfiles;size_is:(cchColorProfiles);pointer:unique" json:"color_profiles"`
	InfPath                  string         `idl:"name:pInfPath;string" json:"inf_path"`
	PrinterDriverAttributes  uint32         `idl:"name:dwPrinterDriverAttributes" json:"printer_driver_attributes"`
	CoreDependenciesLength   uint32         `idl:"name:cchCoreDependencies" json:"core_dependencies_length"`
	CoreDriverDependencies   string         `idl:"name:pszzCoreDriverDependencies;size_is:(cchCoreDependencies);pointer:unique" json:"core_driver_dependencies"`
	MinInboxDriverVerDate    *dtyp.Filetime `idl:"name:ftMinInboxDriverVerDate" json:"min_inbox_driver_ver_date"`
	MinInboxDriverVerVersion uint64         `idl:"name:dwlMinInboxDriverVerVersion" json:"min_inbox_driver_ver_version"`
}

func (o *DriverInfo8) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if o.DependentFiles != "" && o.DependentFilesLength == 0 {
		o.DependentFilesLength = uint32(ndr.UTF16Len(o.DependentFiles))
	}
	if o.PreviousNames != "" && o.PreviousNamesLength == 0 {
		o.PreviousNamesLength = uint32(ndr.UTF16Len(o.PreviousNames))
	}
	if o.ColorProfiles != "" && o.ColorProfilesLength == 0 {
		o.ColorProfilesLength = uint32(ndr.UTF16Len(o.ColorProfiles))
	}
	if o.CoreDriverDependencies != "" && o.CoreDependenciesLength == 0 {
		o.CoreDependenciesLength = uint32(ndr.UTF16Len(o.CoreDriverDependencies))
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *DriverInfo8) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(8); err != nil {
		return err
	}
	if err := w.WriteData(o.VersionCount); err != nil {
		return err
	}
	if o.Name != "" {
		_ptr_pName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.Name); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.Name, _ptr_pName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.Environment != "" {
		_ptr_pEnvironment := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.Environment); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.Environment, _ptr_pEnvironment); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.DriverPath != "" {
		_ptr_pDriverPath := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.DriverPath); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.DriverPath, _ptr_pDriverPath); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.DataFile != "" {
		_ptr_pDataFile := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.DataFile); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.DataFile, _ptr_pDataFile); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.ConfigFile != "" {
		_ptr_pConfigFile := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.ConfigFile); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.ConfigFile, _ptr_pConfigFile); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.HelpFile != "" {
		_ptr_pHelpFile := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.HelpFile); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.HelpFile, _ptr_pHelpFile); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.MonitorName != "" {
		_ptr_pMonitorName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.MonitorName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.MonitorName, _ptr_pMonitorName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.DefaultDataType != "" {
		_ptr_pDefaultDataType := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.DefaultDataType); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.DefaultDataType, _ptr_pDefaultDataType); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if err := w.WriteData(o.DependentFilesLength); err != nil {
		return err
	}
	if o.DependentFiles != "" || o.DependentFilesLength > 0 {
		_ptr_pDependentFiles := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			dimSize1 := uint64(o.DependentFilesLength)
			if err := w.WriteSize(dimSize1); err != nil {
				return err
			}
			sizeInfo := []uint64{
				dimSize1,
			}
			_DependentFiles_buf := utf16.Encode([]rune(o.DependentFiles))
			if uint64(len(_DependentFiles_buf)) > sizeInfo[0] {
				_DependentFiles_buf = _DependentFiles_buf[:sizeInfo[0]]
			}
			for i1 := range _DependentFiles_buf {
				i1 := i1
				if uint64(i1) >= sizeInfo[0] {
					break
				}
				if err := w.WriteData(_DependentFiles_buf[i1]); err != nil {
					return err
				}
			}
			for i1 := len(_DependentFiles_buf); uint64(i1) < sizeInfo[0]; i1++ {
				if err := w.WriteData(uint16(0)); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.DependentFiles, _ptr_pDependentFiles); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if err := w.WriteData(o.PreviousNamesLength); err != nil {
		return err
	}
	if o.PreviousNames != "" || o.PreviousNamesLength > 0 {
		_ptr_pszzPreviousNames := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			dimSize1 := uint64(o.PreviousNamesLength)
			if err := w.WriteSize(dimSize1); err != nil {
				return err
			}
			sizeInfo := []uint64{
				dimSize1,
			}
			_PreviousNames_buf := utf16.Encode([]rune(o.PreviousNames))
			if uint64(len(_PreviousNames_buf)) > sizeInfo[0] {
				_PreviousNames_buf = _PreviousNames_buf[:sizeInfo[0]]
			}
			for i1 := range _PreviousNames_buf {
				i1 := i1
				if uint64(i1) >= sizeInfo[0] {
					break
				}
				if err := w.WriteData(_PreviousNames_buf[i1]); err != nil {
					return err
				}
			}
			for i1 := len(_PreviousNames_buf); uint64(i1) < sizeInfo[0]; i1++ {
				if err := w.WriteData(uint16(0)); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.PreviousNames, _ptr_pszzPreviousNames); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.DriverDate != nil {
		if err := o.DriverDate.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&dtyp.Filetime{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	if err := w.WriteData(o.DriverVersion); err != nil {
		return err
	}
	if o.ManufacturerName != "" {
		_ptr_pMfgName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.ManufacturerName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.ManufacturerName, _ptr_pMfgName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.OEMURL != "" {
		_ptr_pOEMUrl := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.OEMURL); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.OEMURL, _ptr_pOEMUrl); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.HardwareID != "" {
		_ptr_pHardwareID := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.HardwareID); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.HardwareID, _ptr_pHardwareID); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.Provider != "" {
		_ptr_pProvider := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.Provider); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.Provider, _ptr_pProvider); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.PrintProcessor != "" {
		_ptr_pPrintProcessor := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.PrintProcessor); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.PrintProcessor, _ptr_pPrintProcessor); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.VendorSetup != "" {
		_ptr_pVendorSetup := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.VendorSetup); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.VendorSetup, _ptr_pVendorSetup); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if err := w.WriteData(o.ColorProfilesLength); err != nil {
		return err
	}
	if o.ColorProfiles != "" || o.ColorProfilesLength > 0 {
		_ptr_pszzColorProfiles := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			dimSize1 := uint64(o.ColorProfilesLength)
			if err := w.WriteSize(dimSize1); err != nil {
				return err
			}
			sizeInfo := []uint64{
				dimSize1,
			}
			_ColorProfiles_buf := utf16.Encode([]rune(o.ColorProfiles))
			if uint64(len(_ColorProfiles_buf)) > sizeInfo[0] {
				_ColorProfiles_buf = _ColorProfiles_buf[:sizeInfo[0]]
			}
			for i1 := range _ColorProfiles_buf {
				i1 := i1
				if uint64(i1) >= sizeInfo[0] {
					break
				}
				if err := w.WriteData(_ColorProfiles_buf[i1]); err != nil {
					return err
				}
			}
			for i1 := len(_ColorProfiles_buf); uint64(i1) < sizeInfo[0]; i1++ {
				if err := w.WriteData(uint16(0)); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.ColorProfiles, _ptr_pszzColorProfiles); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.InfPath != "" {
		_ptr_pInfPath := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.InfPath); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.InfPath, _ptr_pInfPath); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if err := w.WriteData(o.PrinterDriverAttributes); err != nil {
		return err
	}
	if err := w.WriteData(o.CoreDependenciesLength); err != nil {
		return err
	}
	if o.CoreDriverDependencies != "" || o.CoreDependenciesLength > 0 {
		_ptr_pszzCoreDriverDependencies := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			dimSize1 := uint64(o.CoreDependenciesLength)
			if err := w.WriteSize(dimSize1); err != nil {
				return err
			}
			sizeInfo := []uint64{
				dimSize1,
			}
			_CoreDriverDependencies_buf := utf16.Encode([]rune(o.CoreDriverDependencies))
			if uint64(len(_CoreDriverDependencies_buf)) > sizeInfo[0] {
				_CoreDriverDependencies_buf = _CoreDriverDependencies_buf[:sizeInfo[0]]
			}
			for i1 := range _CoreDriverDependencies_buf {
				i1 := i1
				if uint64(i1) >= sizeInfo[0] {
					break
				}
				if err := w.WriteData(_CoreDriverDependencies_buf[i1]); err != nil {
					return err
				}
			}
			for i1 := len(_CoreDriverDependencies_buf); uint64(i1) < sizeInfo[0]; i1++ {
				if err := w.WriteData(uint16(0)); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.CoreDriverDependencies, _ptr_pszzCoreDriverDependencies); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.MinInboxDriverVerDate != nil {
		if err := o.MinInboxDriverVerDate.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&dtyp.Filetime{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	if err := w.WriteData(o.MinInboxDriverVerVersion); err != nil {
		return err
	}
	return nil
}
func (o *DriverInfo8) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(8); err != nil {
		return err
	}
	if err := w.ReadData(&o.VersionCount); err != nil {
		return err
	}
	_ptr_pName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.Name); err != nil {
			return err
		}
		return nil
	})
	_s_pName := func(ptr interface{}) { o.Name = *ptr.(*string) }
	if err := w.ReadPointer(&o.Name, _s_pName, _ptr_pName); err != nil {
		return err
	}
	_ptr_pEnvironment := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.Environment); err != nil {
			return err
		}
		return nil
	})
	_s_pEnvironment := func(ptr interface{}) { o.Environment = *ptr.(*string) }
	if err := w.ReadPointer(&o.Environment, _s_pEnvironment, _ptr_pEnvironment); err != nil {
		return err
	}
	_ptr_pDriverPath := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.DriverPath); err != nil {
			return err
		}
		return nil
	})
	_s_pDriverPath := func(ptr interface{}) { o.DriverPath = *ptr.(*string) }
	if err := w.ReadPointer(&o.DriverPath, _s_pDriverPath, _ptr_pDriverPath); err != nil {
		return err
	}
	_ptr_pDataFile := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.DataFile); err != nil {
			return err
		}
		return nil
	})
	_s_pDataFile := func(ptr interface{}) { o.DataFile = *ptr.(*string) }
	if err := w.ReadPointer(&o.DataFile, _s_pDataFile, _ptr_pDataFile); err != nil {
		return err
	}
	_ptr_pConfigFile := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.ConfigFile); err != nil {
			return err
		}
		return nil
	})
	_s_pConfigFile := func(ptr interface{}) { o.ConfigFile = *ptr.(*string) }
	if err := w.ReadPointer(&o.ConfigFile, _s_pConfigFile, _ptr_pConfigFile); err != nil {
		return err
	}
	_ptr_pHelpFile := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.HelpFile); err != nil {
			return err
		}
		return nil
	})
	_s_pHelpFile := func(ptr interface{}) { o.HelpFile = *ptr.(*string) }
	if err := w.ReadPointer(&o.HelpFile, _s_pHelpFile, _ptr_pHelpFile); err != nil {
		return err
	}
	_ptr_pMonitorName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.MonitorName); err != nil {
			return err
		}
		return nil
	})
	_s_pMonitorName := func(ptr interface{}) { o.MonitorName = *ptr.(*string) }
	if err := w.ReadPointer(&o.MonitorName, _s_pMonitorName, _ptr_pMonitorName); err != nil {
		return err
	}
	_ptr_pDefaultDataType := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.DefaultDataType); err != nil {
			return err
		}
		return nil
	})
	_s_pDefaultDataType := func(ptr interface{}) { o.DefaultDataType = *ptr.(*string) }
	if err := w.ReadPointer(&o.DefaultDataType, _s_pDefaultDataType, _ptr_pDefaultDataType); err != nil {
		return err
	}
	if err := w.ReadData(&o.DependentFilesLength); err != nil {
		return err
	}
	_ptr_pDependentFiles := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		// XXX: for opaque unmarshaling
		if o.DependentFilesLength > 0 && sizeInfo[0] == 0 {
			sizeInfo[0] = uint64(o.DependentFilesLength)
		}
		var _DependentFiles_buf []uint16
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array _DependentFiles_buf", sizeInfo[0])
		}
		_DependentFiles_buf = make([]uint16, sizeInfo[0])
		for i1 := range _DependentFiles_buf {
			i1 := i1
			if err := w.ReadData(&_DependentFiles_buf[i1]); err != nil {
				return err
			}
		}
		o.DependentFiles = strings.TrimRight(string(utf16.Decode(_DependentFiles_buf)), ndr.ZeroString)
		return nil
	})
	_s_pDependentFiles := func(ptr interface{}) { o.DependentFiles = *ptr.(*string) }
	if err := w.ReadPointer(&o.DependentFiles, _s_pDependentFiles, _ptr_pDependentFiles); err != nil {
		return err
	}
	if err := w.ReadData(&o.PreviousNamesLength); err != nil {
		return err
	}
	_ptr_pszzPreviousNames := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		// XXX: for opaque unmarshaling
		if o.PreviousNamesLength > 0 && sizeInfo[0] == 0 {
			sizeInfo[0] = uint64(o.PreviousNamesLength)
		}
		var _PreviousNames_buf []uint16
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array _PreviousNames_buf", sizeInfo[0])
		}
		_PreviousNames_buf = make([]uint16, sizeInfo[0])
		for i1 := range _PreviousNames_buf {
			i1 := i1
			if err := w.ReadData(&_PreviousNames_buf[i1]); err != nil {
				return err
			}
		}
		o.PreviousNames = strings.TrimRight(string(utf16.Decode(_PreviousNames_buf)), ndr.ZeroString)
		return nil
	})
	_s_pszzPreviousNames := func(ptr interface{}) { o.PreviousNames = *ptr.(*string) }
	if err := w.ReadPointer(&o.PreviousNames, _s_pszzPreviousNames, _ptr_pszzPreviousNames); err != nil {
		return err
	}
	if o.DriverDate == nil {
		o.DriverDate = &dtyp.Filetime{}
	}
	if err := o.DriverDate.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	if err := w.ReadData(&o.DriverVersion); err != nil {
		return err
	}
	_ptr_pMfgName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.ManufacturerName); err != nil {
			return err
		}
		return nil
	})
	_s_pMfgName := func(ptr interface{}) { o.ManufacturerName = *ptr.(*string) }
	if err := w.ReadPointer(&o.ManufacturerName, _s_pMfgName, _ptr_pMfgName); err != nil {
		return err
	}
	_ptr_pOEMUrl := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.OEMURL); err != nil {
			return err
		}
		return nil
	})
	_s_pOEMUrl := func(ptr interface{}) { o.OEMURL = *ptr.(*string) }
	if err := w.ReadPointer(&o.OEMURL, _s_pOEMUrl, _ptr_pOEMUrl); err != nil {
		return err
	}
	_ptr_pHardwareID := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.HardwareID); err != nil {
			return err
		}
		return nil
	})
	_s_pHardwareID := func(ptr interface{}) { o.HardwareID = *ptr.(*string) }
	if err := w.ReadPointer(&o.HardwareID, _s_pHardwareID, _ptr_pHardwareID); err != nil {
		return err
	}
	_ptr_pProvider := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.Provider); err != nil {
			return err
		}
		return nil
	})
	_s_pProvider := func(ptr interface{}) { o.Provider = *ptr.(*string) }
	if err := w.ReadPointer(&o.Provider, _s_pProvider, _ptr_pProvider); err != nil {
		return err
	}
	_ptr_pPrintProcessor := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.PrintProcessor); err != nil {
			return err
		}
		return nil
	})
	_s_pPrintProcessor := func(ptr interface{}) { o.PrintProcessor = *ptr.(*string) }
	if err := w.ReadPointer(&o.PrintProcessor, _s_pPrintProcessor, _ptr_pPrintProcessor); err != nil {
		return err
	}
	_ptr_pVendorSetup := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.VendorSetup); err != nil {
			return err
		}
		return nil
	})
	_s_pVendorSetup := func(ptr interface{}) { o.VendorSetup = *ptr.(*string) }
	if err := w.ReadPointer(&o.VendorSetup, _s_pVendorSetup, _ptr_pVendorSetup); err != nil {
		return err
	}
	if err := w.ReadData(&o.ColorProfilesLength); err != nil {
		return err
	}
	_ptr_pszzColorProfiles := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		// XXX: for opaque unmarshaling
		if o.ColorProfilesLength > 0 && sizeInfo[0] == 0 {
			sizeInfo[0] = uint64(o.ColorProfilesLength)
		}
		var _ColorProfiles_buf []uint16
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array _ColorProfiles_buf", sizeInfo[0])
		}
		_ColorProfiles_buf = make([]uint16, sizeInfo[0])
		for i1 := range _ColorProfiles_buf {
			i1 := i1
			if err := w.ReadData(&_ColorProfiles_buf[i1]); err != nil {
				return err
			}
		}
		o.ColorProfiles = strings.TrimRight(string(utf16.Decode(_ColorProfiles_buf)), ndr.ZeroString)
		return nil
	})
	_s_pszzColorProfiles := func(ptr interface{}) { o.ColorProfiles = *ptr.(*string) }
	if err := w.ReadPointer(&o.ColorProfiles, _s_pszzColorProfiles, _ptr_pszzColorProfiles); err != nil {
		return err
	}
	_ptr_pInfPath := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.InfPath); err != nil {
			return err
		}
		return nil
	})
	_s_pInfPath := func(ptr interface{}) { o.InfPath = *ptr.(*string) }
	if err := w.ReadPointer(&o.InfPath, _s_pInfPath, _ptr_pInfPath); err != nil {
		return err
	}
	if err := w.ReadData(&o.PrinterDriverAttributes); err != nil {
		return err
	}
	if err := w.ReadData(&o.CoreDependenciesLength); err != nil {
		return err
	}
	_ptr_pszzCoreDriverDependencies := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		// XXX: for opaque unmarshaling
		if o.CoreDependenciesLength > 0 && sizeInfo[0] == 0 {
			sizeInfo[0] = uint64(o.CoreDependenciesLength)
		}
		var _CoreDriverDependencies_buf []uint16
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array _CoreDriverDependencies_buf", sizeInfo[0])
		}
		_CoreDriverDependencies_buf = make([]uint16, sizeInfo[0])
		for i1 := range _CoreDriverDependencies_buf {
			i1 := i1
			if err := w.ReadData(&_CoreDriverDependencies_buf[i1]); err != nil {
				return err
			}
		}
		o.CoreDriverDependencies = strings.TrimRight(string(utf16.Decode(_CoreDriverDependencies_buf)), ndr.ZeroString)
		return nil
	})
	_s_pszzCoreDriverDependencies := func(ptr interface{}) { o.CoreDriverDependencies = *ptr.(*string) }
	if err := w.ReadPointer(&o.CoreDriverDependencies, _s_pszzCoreDriverDependencies, _ptr_pszzCoreDriverDependencies); err != nil {
		return err
	}
	if o.MinInboxDriverVerDate == nil {
		o.MinInboxDriverVerDate = &dtyp.Filetime{}
	}
	if err := o.MinInboxDriverVerDate.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	if err := w.ReadData(&o.MinInboxDriverVerVersion); err != nil {
		return err
	}
	return nil
}

// FormInfo1 structure represents FORM_INFO_1 RPC structure.
type FormInfo1 struct {
	Flags         uint32     `idl:"name:Flags" json:"flags"`
	Name          string     `idl:"name:pName;string" json:"name"`
	Size          *Size      `idl:"name:Size" json:"size"`
	ImageableArea *Rectangle `idl:"name:ImageableArea" json:"imageable_area"`
}

func (o *FormInfo1) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *FormInfo1) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.Flags); err != nil {
		return err
	}
	if o.Name != "" {
		_ptr_pName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.Name); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.Name, _ptr_pName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.Size != nil {
		if err := o.Size.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&Size{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	if o.ImageableArea != nil {
		if err := o.ImageableArea.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&Rectangle{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	if err := w.WriteTrailingGap(9); err != nil {
		return err
	}
	return nil
}
func (o *FormInfo1) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.Flags); err != nil {
		return err
	}
	_ptr_pName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.Name); err != nil {
			return err
		}
		return nil
	})
	_s_pName := func(ptr interface{}) { o.Name = *ptr.(*string) }
	if err := w.ReadPointer(&o.Name, _s_pName, _ptr_pName); err != nil {
		return err
	}
	if o.Size == nil {
		o.Size = &Size{}
	}
	if err := o.Size.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	if o.ImageableArea == nil {
		o.ImageableArea = &Rectangle{}
	}
	if err := o.ImageableArea.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	if err := w.ReadTrailingGap(9); err != nil {
		return err
	}
	return nil
}

// FormInfo2 structure represents RPC_FORM_INFO_2 RPC structure.
type FormInfo2 struct {
	Flags         uint32     `idl:"name:Flags" json:"flags"`
	Name          string     `idl:"name:pName;string;pointer:unique" json:"name"`
	Size          *Size      `idl:"name:Size" json:"size"`
	ImageableArea *Rectangle `idl:"name:ImageableArea" json:"imageable_area"`
	Keyword       string     `idl:"name:pKeyword;string;pointer:unique" json:"keyword"`
	StringType    uint32     `idl:"name:StringType" json:"string_type"`
	MUIDLL        string     `idl:"name:pMuiDll;string;pointer:unique" json:"mui_dll"`
	ResourceID    uint32     `idl:"name:dwResourceId" json:"resource_id"`
	DisplayName   string     `idl:"name:pDisplayName;string;pointer:unique" json:"display_name"`
	LangID        uint16     `idl:"name:wLangID" json:"lang_id"`
}

func (o *FormInfo2) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *FormInfo2) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.Flags); err != nil {
		return err
	}
	if o.Name != "" {
		_ptr_pName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.Name); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.Name, _ptr_pName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.Size != nil {
		if err := o.Size.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&Size{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	if o.ImageableArea != nil {
		if err := o.ImageableArea.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&Rectangle{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	if o.Keyword != "" {
		_ptr_pKeyword := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteCharNString(ctx, w, o.Keyword); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.Keyword, _ptr_pKeyword); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if err := w.WriteData(o.StringType); err != nil {
		return err
	}
	if o.MUIDLL != "" {
		_ptr_pMuiDll := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.MUIDLL); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.MUIDLL, _ptr_pMuiDll); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if err := w.WriteData(o.ResourceID); err != nil {
		return err
	}
	if o.DisplayName != "" {
		_ptr_pDisplayName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.DisplayName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.DisplayName, _ptr_pDisplayName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if err := w.WriteData(o.LangID); err != nil {
		return err
	}
	if err := w.WriteTrailingGap(9); err != nil {
		return err
	}
	return nil
}
func (o *FormInfo2) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.Flags); err != nil {
		return err
	}
	_ptr_pName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.Name); err != nil {
			return err
		}
		return nil
	})
	_s_pName := func(ptr interface{}) { o.Name = *ptr.(*string) }
	if err := w.ReadPointer(&o.Name, _s_pName, _ptr_pName); err != nil {
		return err
	}
	if o.Size == nil {
		o.Size = &Size{}
	}
	if err := o.Size.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	if o.ImageableArea == nil {
		o.ImageableArea = &Rectangle{}
	}
	if err := o.ImageableArea.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	_ptr_pKeyword := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadCharNString(ctx, w, &o.Keyword); err != nil {
			return err
		}
		return nil
	})
	_s_pKeyword := func(ptr interface{}) { o.Keyword = *ptr.(*string) }
	if err := w.ReadPointer(&o.Keyword, _s_pKeyword, _ptr_pKeyword); err != nil {
		return err
	}
	if err := w.ReadData(&o.StringType); err != nil {
		return err
	}
	_ptr_pMuiDll := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.MUIDLL); err != nil {
			return err
		}
		return nil
	})
	_s_pMuiDll := func(ptr interface{}) { o.MUIDLL = *ptr.(*string) }
	if err := w.ReadPointer(&o.MUIDLL, _s_pMuiDll, _ptr_pMuiDll); err != nil {
		return err
	}
	if err := w.ReadData(&o.ResourceID); err != nil {
		return err
	}
	_ptr_pDisplayName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.DisplayName); err != nil {
			return err
		}
		return nil
	})
	_s_pDisplayName := func(ptr interface{}) { o.DisplayName = *ptr.(*string) }
	if err := w.ReadPointer(&o.DisplayName, _s_pDisplayName, _ptr_pDisplayName); err != nil {
		return err
	}
	if err := w.ReadData(&o.LangID); err != nil {
		return err
	}
	if err := w.ReadTrailingGap(9); err != nil {
		return err
	}
	return nil
}

// JobInfo1 structure represents JOB_INFO_1 RPC structure.
type JobInfo1 struct {
	JobID        uint32           `idl:"name:JobId" json:"job_id"`
	PrinterName  string           `idl:"name:pPrinterName;string" json:"printer_name"`
	MachineName  string           `idl:"name:pMachineName;string" json:"machine_name"`
	UserName     string           `idl:"name:pUserName;string" json:"user_name"`
	Document     string           `idl:"name:pDocument;string" json:"document"`
	DataType     string           `idl:"name:pDatatype;string" json:"data_type"`
	StatusString string           `idl:"name:__pStatus;string" json:"status_string"`
	Status       uint32           `idl:"name:Status" json:"status"`
	Priority     uint32           `idl:"name:Priority" json:"priority"`
	Position     uint32           `idl:"name:Position" json:"position"`
	TotalPages   uint32           `idl:"name:TotalPages" json:"total_pages"`
	PagesPrinted uint32           `idl:"name:PagesPrinted" json:"pages_printed"`
	Submitted    *dtyp.SystemTime `idl:"name:Submitted" json:"submitted"`
}

func (o *JobInfo1) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *JobInfo1) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.JobID); err != nil {
		return err
	}
	if o.PrinterName != "" {
		_ptr_pPrinterName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.PrinterName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.PrinterName, _ptr_pPrinterName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.MachineName != "" {
		_ptr_pMachineName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.MachineName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.MachineName, _ptr_pMachineName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.UserName != "" {
		_ptr_pUserName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.UserName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.UserName, _ptr_pUserName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.Document != "" {
		_ptr_pDocument := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.Document); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.Document, _ptr_pDocument); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.DataType != "" {
		_ptr_pDatatype := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.DataType); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.DataType, _ptr_pDatatype); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.StatusString != "" {
		_ptr___pStatus := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.StatusString); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.StatusString, _ptr___pStatus); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if err := w.WriteData(o.Status); err != nil {
		return err
	}
	if err := w.WriteData(o.Priority); err != nil {
		return err
	}
	if err := w.WriteData(o.Position); err != nil {
		return err
	}
	if err := w.WriteData(o.TotalPages); err != nil {
		return err
	}
	if err := w.WriteData(o.PagesPrinted); err != nil {
		return err
	}
	if o.Submitted != nil {
		if err := o.Submitted.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&dtyp.SystemTime{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	if err := w.WriteTrailingGap(9); err != nil {
		return err
	}
	return nil
}
func (o *JobInfo1) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.JobID); err != nil {
		return err
	}
	_ptr_pPrinterName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.PrinterName); err != nil {
			return err
		}
		return nil
	})
	_s_pPrinterName := func(ptr interface{}) { o.PrinterName = *ptr.(*string) }
	if err := w.ReadPointer(&o.PrinterName, _s_pPrinterName, _ptr_pPrinterName); err != nil {
		return err
	}
	_ptr_pMachineName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.MachineName); err != nil {
			return err
		}
		return nil
	})
	_s_pMachineName := func(ptr interface{}) { o.MachineName = *ptr.(*string) }
	if err := w.ReadPointer(&o.MachineName, _s_pMachineName, _ptr_pMachineName); err != nil {
		return err
	}
	_ptr_pUserName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.UserName); err != nil {
			return err
		}
		return nil
	})
	_s_pUserName := func(ptr interface{}) { o.UserName = *ptr.(*string) }
	if err := w.ReadPointer(&o.UserName, _s_pUserName, _ptr_pUserName); err != nil {
		return err
	}
	_ptr_pDocument := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.Document); err != nil {
			return err
		}
		return nil
	})
	_s_pDocument := func(ptr interface{}) { o.Document = *ptr.(*string) }
	if err := w.ReadPointer(&o.Document, _s_pDocument, _ptr_pDocument); err != nil {
		return err
	}
	_ptr_pDatatype := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.DataType); err != nil {
			return err
		}
		return nil
	})
	_s_pDatatype := func(ptr interface{}) { o.DataType = *ptr.(*string) }
	if err := w.ReadPointer(&o.DataType, _s_pDatatype, _ptr_pDatatype); err != nil {
		return err
	}
	_ptr___pStatus := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.StatusString); err != nil {
			return err
		}
		return nil
	})
	_s___pStatus := func(ptr interface{}) { o.StatusString = *ptr.(*string) }
	if err := w.ReadPointer(&o.StatusString, _s___pStatus, _ptr___pStatus); err != nil {
		return err
	}
	if err := w.ReadData(&o.Status); err != nil {
		return err
	}
	if err := w.ReadData(&o.Priority); err != nil {
		return err
	}
	if err := w.ReadData(&o.Position); err != nil {
		return err
	}
	if err := w.ReadData(&o.TotalPages); err != nil {
		return err
	}
	if err := w.ReadData(&o.PagesPrinted); err != nil {
		return err
	}
	if o.Submitted == nil {
		o.Submitted = &dtyp.SystemTime{}
	}
	if err := o.Submitted.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	if err := w.ReadTrailingGap(9); err != nil {
		return err
	}
	return nil
}

// JobInfo2 structure represents JOB_INFO_2 RPC structure.
type JobInfo2 struct {
	JobID              uint32                   `idl:"name:JobId" json:"job_id"`
	PrinterName        string                   `idl:"name:pPrinterName;string" json:"printer_name"`
	MachineName        string                   `idl:"name:pMachineName;string" json:"machine_name"`
	UserName           string                   `idl:"name:pUserName;string" json:"user_name"`
	Document           string                   `idl:"name:pDocument;string" json:"document"`
	NotifyName         string                   `idl:"name:pNotifyName;string" json:"notify_name"`
	DataType           string                   `idl:"name:pDatatype;string" json:"data_type"`
	PrintProcessor     string                   `idl:"name:pPrintProcessor;string" json:"print_processor"`
	Parameters         string                   `idl:"name:pParameters;string" json:"parameters"`
	DriverName         string                   `idl:"name:pDriverName;string" json:"driver_name"`
	DevMode            *DevMode                 `idl:"name:pDevMode" json:"dev_mode"`
	StatusString       string                   `idl:"name:__pStatus;string" json:"status_string"`
	SecurityDescriptor *dtyp.SecurityDescriptor `idl:"name:pSecurityDescriptor" json:"security_descriptor"`
	Status             uint32                   `idl:"name:Status" json:"status"`
	Priority           uint32                   `idl:"name:Priority" json:"priority"`
	Position           uint32                   `idl:"name:Position" json:"position"`
	StartTime          uint32                   `idl:"name:StartTime" json:"start_time"`
	UntilTime          uint32                   `idl:"name:UntilTime" json:"until_time"`
	TotalPages         uint32                   `idl:"name:TotalPages" json:"total_pages"`
	Size               uint32                   `idl:"name:Size" json:"size"`
	Submitted          *dtyp.SystemTime         `idl:"name:Submitted" json:"submitted"`
	Time               uint32                   `idl:"name:Time" json:"time"`
	PagesPrinted       uint32                   `idl:"name:PagesPrinted" json:"pages_printed"`
}

func (o *JobInfo2) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *JobInfo2) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.JobID); err != nil {
		return err
	}
	if o.PrinterName != "" {
		_ptr_pPrinterName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.PrinterName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.PrinterName, _ptr_pPrinterName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.MachineName != "" {
		_ptr_pMachineName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.MachineName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.MachineName, _ptr_pMachineName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.UserName != "" {
		_ptr_pUserName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.UserName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.UserName, _ptr_pUserName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.Document != "" {
		_ptr_pDocument := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.Document); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.Document, _ptr_pDocument); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.NotifyName != "" {
		_ptr_pNotifyName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.NotifyName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.NotifyName, _ptr_pNotifyName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.DataType != "" {
		_ptr_pDatatype := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.DataType); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.DataType, _ptr_pDatatype); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.PrintProcessor != "" {
		_ptr_pPrintProcessor := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.PrintProcessor); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.PrintProcessor, _ptr_pPrintProcessor); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.Parameters != "" {
		_ptr_pParameters := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.Parameters); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.Parameters, _ptr_pParameters); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.DriverName != "" {
		_ptr_pDriverName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.DriverName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.DriverName, _ptr_pDriverName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.DevMode != nil {
		_ptr_pDevMode := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.DevMode != nil {
				if err := o.DevMode.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&DevMode{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.DevMode, _ptr_pDevMode); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.StatusString != "" {
		_ptr___pStatus := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.StatusString); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.StatusString, _ptr___pStatus); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.SecurityDescriptor != nil {
		_ptr_pSecurityDescriptor := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.SecurityDescriptor != nil {
				if err := o.SecurityDescriptor.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&dtyp.SecurityDescriptor{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.SecurityDescriptor, _ptr_pSecurityDescriptor); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if err := w.WriteData(o.Status); err != nil {
		return err
	}
	if err := w.WriteData(o.Priority); err != nil {
		return err
	}
	if err := w.WriteData(o.Position); err != nil {
		return err
	}
	if err := w.WriteData(o.StartTime); err != nil {
		return err
	}
	if err := w.WriteData(o.UntilTime); err != nil {
		return err
	}
	if err := w.WriteData(o.TotalPages); err != nil {
		return err
	}
	if err := w.WriteData(o.Size); err != nil {
		return err
	}
	if o.Submitted != nil {
		if err := o.Submitted.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&dtyp.SystemTime{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	if err := w.WriteData(o.Time); err != nil {
		return err
	}
	if err := w.WriteData(o.PagesPrinted); err != nil {
		return err
	}
	if err := w.WriteTrailingGap(9); err != nil {
		return err
	}
	return nil
}
func (o *JobInfo2) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.JobID); err != nil {
		return err
	}
	_ptr_pPrinterName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.PrinterName); err != nil {
			return err
		}
		return nil
	})
	_s_pPrinterName := func(ptr interface{}) { o.PrinterName = *ptr.(*string) }
	if err := w.ReadPointer(&o.PrinterName, _s_pPrinterName, _ptr_pPrinterName); err != nil {
		return err
	}
	_ptr_pMachineName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.MachineName); err != nil {
			return err
		}
		return nil
	})
	_s_pMachineName := func(ptr interface{}) { o.MachineName = *ptr.(*string) }
	if err := w.ReadPointer(&o.MachineName, _s_pMachineName, _ptr_pMachineName); err != nil {
		return err
	}
	_ptr_pUserName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.UserName); err != nil {
			return err
		}
		return nil
	})
	_s_pUserName := func(ptr interface{}) { o.UserName = *ptr.(*string) }
	if err := w.ReadPointer(&o.UserName, _s_pUserName, _ptr_pUserName); err != nil {
		return err
	}
	_ptr_pDocument := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.Document); err != nil {
			return err
		}
		return nil
	})
	_s_pDocument := func(ptr interface{}) { o.Document = *ptr.(*string) }
	if err := w.ReadPointer(&o.Document, _s_pDocument, _ptr_pDocument); err != nil {
		return err
	}
	_ptr_pNotifyName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.NotifyName); err != nil {
			return err
		}
		return nil
	})
	_s_pNotifyName := func(ptr interface{}) { o.NotifyName = *ptr.(*string) }
	if err := w.ReadPointer(&o.NotifyName, _s_pNotifyName, _ptr_pNotifyName); err != nil {
		return err
	}
	_ptr_pDatatype := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.DataType); err != nil {
			return err
		}
		return nil
	})
	_s_pDatatype := func(ptr interface{}) { o.DataType = *ptr.(*string) }
	if err := w.ReadPointer(&o.DataType, _s_pDatatype, _ptr_pDatatype); err != nil {
		return err
	}
	_ptr_pPrintProcessor := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.PrintProcessor); err != nil {
			return err
		}
		return nil
	})
	_s_pPrintProcessor := func(ptr interface{}) { o.PrintProcessor = *ptr.(*string) }
	if err := w.ReadPointer(&o.PrintProcessor, _s_pPrintProcessor, _ptr_pPrintProcessor); err != nil {
		return err
	}
	_ptr_pParameters := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.Parameters); err != nil {
			return err
		}
		return nil
	})
	_s_pParameters := func(ptr interface{}) { o.Parameters = *ptr.(*string) }
	if err := w.ReadPointer(&o.Parameters, _s_pParameters, _ptr_pParameters); err != nil {
		return err
	}
	_ptr_pDriverName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.DriverName); err != nil {
			return err
		}
		return nil
	})
	_s_pDriverName := func(ptr interface{}) { o.DriverName = *ptr.(*string) }
	if err := w.ReadPointer(&o.DriverName, _s_pDriverName, _ptr_pDriverName); err != nil {
		return err
	}
	_ptr_pDevMode := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.DevMode == nil {
			o.DevMode = &DevMode{}
		}
		if err := o.DevMode.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_pDevMode := func(ptr interface{}) { o.DevMode = *ptr.(**DevMode) }
	if err := w.ReadPointer(&o.DevMode, _s_pDevMode, _ptr_pDevMode); err != nil {
		return err
	}
	_ptr___pStatus := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.StatusString); err != nil {
			return err
		}
		return nil
	})
	_s___pStatus := func(ptr interface{}) { o.StatusString = *ptr.(*string) }
	if err := w.ReadPointer(&o.StatusString, _s___pStatus, _ptr___pStatus); err != nil {
		return err
	}
	_ptr_pSecurityDescriptor := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.SecurityDescriptor == nil {
			o.SecurityDescriptor = &dtyp.SecurityDescriptor{}
		}
		if err := o.SecurityDescriptor.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_pSecurityDescriptor := func(ptr interface{}) { o.SecurityDescriptor = *ptr.(**dtyp.SecurityDescriptor) }
	if err := w.ReadPointer(&o.SecurityDescriptor, _s_pSecurityDescriptor, _ptr_pSecurityDescriptor); err != nil {
		return err
	}
	if err := w.ReadData(&o.Status); err != nil {
		return err
	}
	if err := w.ReadData(&o.Priority); err != nil {
		return err
	}
	if err := w.ReadData(&o.Position); err != nil {
		return err
	}
	if err := w.ReadData(&o.StartTime); err != nil {
		return err
	}
	if err := w.ReadData(&o.UntilTime); err != nil {
		return err
	}
	if err := w.ReadData(&o.TotalPages); err != nil {
		return err
	}
	if err := w.ReadData(&o.Size); err != nil {
		return err
	}
	if o.Submitted == nil {
		o.Submitted = &dtyp.SystemTime{}
	}
	if err := o.Submitted.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	if err := w.ReadData(&o.Time); err != nil {
		return err
	}
	if err := w.ReadData(&o.PagesPrinted); err != nil {
		return err
	}
	if err := w.ReadTrailingGap(9); err != nil {
		return err
	}
	return nil
}

// JobInfo3 structure represents JOB_INFO_3 RPC structure.
type JobInfo3 struct {
	JobID     uint32 `idl:"name:JobId" json:"job_id"`
	NextJobID uint32 `idl:"name:NextJobId" json:"next_job_id"`
	_         uint32 `idl:"name:Reserved"`
}

func (o *JobInfo3) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *JobInfo3) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(4); err != nil {
		return err
	}
	if err := w.WriteData(o.JobID); err != nil {
		return err
	}
	if err := w.WriteData(o.NextJobID); err != nil {
		return err
	}
	// reserved Reserved
	if err := w.WriteData(uint32(0)); err != nil {
		return err
	}
	return nil
}
func (o *JobInfo3) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(4); err != nil {
		return err
	}
	if err := w.ReadData(&o.JobID); err != nil {
		return err
	}
	if err := w.ReadData(&o.NextJobID); err != nil {
		return err
	}
	// reserved Reserved
	var _Reserved uint32
	if err := w.ReadData(&_Reserved); err != nil {
		return err
	}
	return nil
}

// JobInfo4 structure represents JOB_INFO_4 RPC structure.
type JobInfo4 struct {
	JobID              uint32                   `idl:"name:JobId" json:"job_id"`
	PrinterName        string                   `idl:"name:pPrinterName;string" json:"printer_name"`
	MachineName        string                   `idl:"name:pMachineName;string" json:"machine_name"`
	UserName           string                   `idl:"name:pUserName;string" json:"user_name"`
	Document           string                   `idl:"name:pDocument;string" json:"document"`
	NotifyName         string                   `idl:"name:pNotifyName;string" json:"notify_name"`
	DataType           string                   `idl:"name:pDatatype;string" json:"data_type"`
	PrintProcessor     string                   `idl:"name:pPrintProcessor;string" json:"print_processor"`
	Parameters         string                   `idl:"name:pParameters;string" json:"parameters"`
	DriverName         string                   `idl:"name:pDriverName;string" json:"driver_name"`
	DevMode            *DevMode                 `idl:"name:pDevMode" json:"dev_mode"`
	StatusString       string                   `idl:"name:__pStatus;string" json:"status_string"`
	SecurityDescriptor *dtyp.SecurityDescriptor `idl:"name:pSecurityDescriptor" json:"security_descriptor"`
	Status             uint32                   `idl:"name:Status" json:"status"`
	Priority           uint32                   `idl:"name:Priority" json:"priority"`
	Position           uint32                   `idl:"name:Position" json:"position"`
	StartTime          uint32                   `idl:"name:StartTime" json:"start_time"`
	UntilTime          uint32                   `idl:"name:UntilTime" json:"until_time"`
	TotalPages         uint32                   `idl:"name:TotalPages" json:"total_pages"`
	Size               uint32                   `idl:"name:Size" json:"size"`
	Submitted          *dtyp.SystemTime         `idl:"name:Submitted" json:"submitted"`
	Time               uint32                   `idl:"name:Time" json:"time"`
	PagesPrinted       uint32                   `idl:"name:PagesPrinted" json:"pages_printed"`
	SizeHigh           int32                    `idl:"name:SizeHigh" json:"size_high"`
}

func (o *JobInfo4) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *JobInfo4) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.JobID); err != nil {
		return err
	}
	if o.PrinterName != "" {
		_ptr_pPrinterName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.PrinterName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.PrinterName, _ptr_pPrinterName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.MachineName != "" {
		_ptr_pMachineName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.MachineName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.MachineName, _ptr_pMachineName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.UserName != "" {
		_ptr_pUserName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.UserName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.UserName, _ptr_pUserName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.Document != "" {
		_ptr_pDocument := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.Document); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.Document, _ptr_pDocument); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.NotifyName != "" {
		_ptr_pNotifyName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.NotifyName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.NotifyName, _ptr_pNotifyName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.DataType != "" {
		_ptr_pDatatype := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.DataType); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.DataType, _ptr_pDatatype); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.PrintProcessor != "" {
		_ptr_pPrintProcessor := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.PrintProcessor); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.PrintProcessor, _ptr_pPrintProcessor); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.Parameters != "" {
		_ptr_pParameters := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.Parameters); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.Parameters, _ptr_pParameters); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.DriverName != "" {
		_ptr_pDriverName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.DriverName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.DriverName, _ptr_pDriverName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.DevMode != nil {
		_ptr_pDevMode := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.DevMode != nil {
				if err := o.DevMode.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&DevMode{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.DevMode, _ptr_pDevMode); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.StatusString != "" {
		_ptr___pStatus := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.StatusString); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.StatusString, _ptr___pStatus); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.SecurityDescriptor != nil {
		_ptr_pSecurityDescriptor := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.SecurityDescriptor != nil {
				if err := o.SecurityDescriptor.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&dtyp.SecurityDescriptor{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.SecurityDescriptor, _ptr_pSecurityDescriptor); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if err := w.WriteData(o.Status); err != nil {
		return err
	}
	if err := w.WriteData(o.Priority); err != nil {
		return err
	}
	if err := w.WriteData(o.Position); err != nil {
		return err
	}
	if err := w.WriteData(o.StartTime); err != nil {
		return err
	}
	if err := w.WriteData(o.UntilTime); err != nil {
		return err
	}
	if err := w.WriteData(o.TotalPages); err != nil {
		return err
	}
	if err := w.WriteData(o.Size); err != nil {
		return err
	}
	if o.Submitted != nil {
		if err := o.Submitted.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&dtyp.SystemTime{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	if err := w.WriteData(o.Time); err != nil {
		return err
	}
	if err := w.WriteData(o.PagesPrinted); err != nil {
		return err
	}
	if err := w.WriteData(o.SizeHigh); err != nil {
		return err
	}
	if err := w.WriteTrailingGap(9); err != nil {
		return err
	}
	return nil
}
func (o *JobInfo4) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.JobID); err != nil {
		return err
	}
	_ptr_pPrinterName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.PrinterName); err != nil {
			return err
		}
		return nil
	})
	_s_pPrinterName := func(ptr interface{}) { o.PrinterName = *ptr.(*string) }
	if err := w.ReadPointer(&o.PrinterName, _s_pPrinterName, _ptr_pPrinterName); err != nil {
		return err
	}
	_ptr_pMachineName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.MachineName); err != nil {
			return err
		}
		return nil
	})
	_s_pMachineName := func(ptr interface{}) { o.MachineName = *ptr.(*string) }
	if err := w.ReadPointer(&o.MachineName, _s_pMachineName, _ptr_pMachineName); err != nil {
		return err
	}
	_ptr_pUserName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.UserName); err != nil {
			return err
		}
		return nil
	})
	_s_pUserName := func(ptr interface{}) { o.UserName = *ptr.(*string) }
	if err := w.ReadPointer(&o.UserName, _s_pUserName, _ptr_pUserName); err != nil {
		return err
	}
	_ptr_pDocument := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.Document); err != nil {
			return err
		}
		return nil
	})
	_s_pDocument := func(ptr interface{}) { o.Document = *ptr.(*string) }
	if err := w.ReadPointer(&o.Document, _s_pDocument, _ptr_pDocument); err != nil {
		return err
	}
	_ptr_pNotifyName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.NotifyName); err != nil {
			return err
		}
		return nil
	})
	_s_pNotifyName := func(ptr interface{}) { o.NotifyName = *ptr.(*string) }
	if err := w.ReadPointer(&o.NotifyName, _s_pNotifyName, _ptr_pNotifyName); err != nil {
		return err
	}
	_ptr_pDatatype := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.DataType); err != nil {
			return err
		}
		return nil
	})
	_s_pDatatype := func(ptr interface{}) { o.DataType = *ptr.(*string) }
	if err := w.ReadPointer(&o.DataType, _s_pDatatype, _ptr_pDatatype); err != nil {
		return err
	}
	_ptr_pPrintProcessor := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.PrintProcessor); err != nil {
			return err
		}
		return nil
	})
	_s_pPrintProcessor := func(ptr interface{}) { o.PrintProcessor = *ptr.(*string) }
	if err := w.ReadPointer(&o.PrintProcessor, _s_pPrintProcessor, _ptr_pPrintProcessor); err != nil {
		return err
	}
	_ptr_pParameters := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.Parameters); err != nil {
			return err
		}
		return nil
	})
	_s_pParameters := func(ptr interface{}) { o.Parameters = *ptr.(*string) }
	if err := w.ReadPointer(&o.Parameters, _s_pParameters, _ptr_pParameters); err != nil {
		return err
	}
	_ptr_pDriverName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.DriverName); err != nil {
			return err
		}
		return nil
	})
	_s_pDriverName := func(ptr interface{}) { o.DriverName = *ptr.(*string) }
	if err := w.ReadPointer(&o.DriverName, _s_pDriverName, _ptr_pDriverName); err != nil {
		return err
	}
	_ptr_pDevMode := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.DevMode == nil {
			o.DevMode = &DevMode{}
		}
		if err := o.DevMode.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_pDevMode := func(ptr interface{}) { o.DevMode = *ptr.(**DevMode) }
	if err := w.ReadPointer(&o.DevMode, _s_pDevMode, _ptr_pDevMode); err != nil {
		return err
	}
	_ptr___pStatus := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.StatusString); err != nil {
			return err
		}
		return nil
	})
	_s___pStatus := func(ptr interface{}) { o.StatusString = *ptr.(*string) }
	if err := w.ReadPointer(&o.StatusString, _s___pStatus, _ptr___pStatus); err != nil {
		return err
	}
	_ptr_pSecurityDescriptor := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.SecurityDescriptor == nil {
			o.SecurityDescriptor = &dtyp.SecurityDescriptor{}
		}
		if err := o.SecurityDescriptor.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_pSecurityDescriptor := func(ptr interface{}) { o.SecurityDescriptor = *ptr.(**dtyp.SecurityDescriptor) }
	if err := w.ReadPointer(&o.SecurityDescriptor, _s_pSecurityDescriptor, _ptr_pSecurityDescriptor); err != nil {
		return err
	}
	if err := w.ReadData(&o.Status); err != nil {
		return err
	}
	if err := w.ReadData(&o.Priority); err != nil {
		return err
	}
	if err := w.ReadData(&o.Position); err != nil {
		return err
	}
	if err := w.ReadData(&o.StartTime); err != nil {
		return err
	}
	if err := w.ReadData(&o.UntilTime); err != nil {
		return err
	}
	if err := w.ReadData(&o.TotalPages); err != nil {
		return err
	}
	if err := w.ReadData(&o.Size); err != nil {
		return err
	}
	if o.Submitted == nil {
		o.Submitted = &dtyp.SystemTime{}
	}
	if err := o.Submitted.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	if err := w.ReadData(&o.Time); err != nil {
		return err
	}
	if err := w.ReadData(&o.PagesPrinted); err != nil {
		return err
	}
	if err := w.ReadData(&o.SizeHigh); err != nil {
		return err
	}
	if err := w.ReadTrailingGap(9); err != nil {
		return err
	}
	return nil
}

// MonitorInfo1 structure represents MONITOR_INFO_1 RPC structure.
type MonitorInfo1 struct {
	Name string `idl:"name:pName;string" json:"name"`
}

func (o *MonitorInfo1) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *MonitorInfo1) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(6); err != nil {
		return err
	}
	if o.Name != "" {
		_ptr_pName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.Name); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.Name, _ptr_pName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *MonitorInfo1) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(6); err != nil {
		return err
	}
	_ptr_pName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.Name); err != nil {
			return err
		}
		return nil
	})
	_s_pName := func(ptr interface{}) { o.Name = *ptr.(*string) }
	if err := w.ReadPointer(&o.Name, _s_pName, _ptr_pName); err != nil {
		return err
	}
	return nil
}

// MonitorInfo2 structure represents MONITOR_INFO_2 RPC structure.
type MonitorInfo2 struct {
	Name        string `idl:"name:pName;string" json:"name"`
	Environment string `idl:"name:pEnvironment;string" json:"environment"`
	DLLName     string `idl:"name:pDLLName;string" json:"dll_name"`
}

func (o *MonitorInfo2) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *MonitorInfo2) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(6); err != nil {
		return err
	}
	if o.Name != "" {
		_ptr_pName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.Name); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.Name, _ptr_pName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.Environment != "" {
		_ptr_pEnvironment := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.Environment); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.Environment, _ptr_pEnvironment); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.DLLName != "" {
		_ptr_pDLLName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.DLLName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.DLLName, _ptr_pDLLName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *MonitorInfo2) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(6); err != nil {
		return err
	}
	_ptr_pName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.Name); err != nil {
			return err
		}
		return nil
	})
	_s_pName := func(ptr interface{}) { o.Name = *ptr.(*string) }
	if err := w.ReadPointer(&o.Name, _s_pName, _ptr_pName); err != nil {
		return err
	}
	_ptr_pEnvironment := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.Environment); err != nil {
			return err
		}
		return nil
	})
	_s_pEnvironment := func(ptr interface{}) { o.Environment = *ptr.(*string) }
	if err := w.ReadPointer(&o.Environment, _s_pEnvironment, _ptr_pEnvironment); err != nil {
		return err
	}
	_ptr_pDLLName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.DLLName); err != nil {
			return err
		}
		return nil
	})
	_s_pDLLName := func(ptr interface{}) { o.DLLName = *ptr.(*string) }
	if err := w.ReadPointer(&o.DLLName, _s_pDLLName, _ptr_pDLLName); err != nil {
		return err
	}
	return nil
}

// PortInfo1 structure represents PORT_INFO_1 RPC structure.
type PortInfo1 struct {
	PortName string `idl:"name:pPortName;string" json:"port_name"`
}

func (o *PortInfo1) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *PortInfo1) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(6); err != nil {
		return err
	}
	if o.PortName != "" {
		_ptr_pPortName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.PortName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.PortName, _ptr_pPortName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *PortInfo1) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(6); err != nil {
		return err
	}
	_ptr_pPortName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.PortName); err != nil {
			return err
		}
		return nil
	})
	_s_pPortName := func(ptr interface{}) { o.PortName = *ptr.(*string) }
	if err := w.ReadPointer(&o.PortName, _s_pPortName, _ptr_pPortName); err != nil {
		return err
	}
	return nil
}

// PortInfo2 structure represents PORT_INFO_2 RPC structure.
type PortInfo2 struct {
	PortName    string `idl:"name:pPortName;string" json:"port_name"`
	MonitorName string `idl:"name:pMonitorName;string" json:"monitor_name"`
	Description string `idl:"name:pDescription;string" json:"description"`
	PortType    uint32 `idl:"name:fPortType" json:"port_type"`
	_           uint32 `idl:"name:Reserved"`
}

func (o *PortInfo2) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *PortInfo2) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if o.PortName != "" {
		_ptr_pPortName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.PortName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.PortName, _ptr_pPortName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.MonitorName != "" {
		_ptr_pMonitorName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.MonitorName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.MonitorName, _ptr_pMonitorName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.Description != "" {
		_ptr_pDescription := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.Description); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.Description, _ptr_pDescription); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if err := w.WriteData(o.PortType); err != nil {
		return err
	}
	// reserved Reserved
	if err := w.WriteData(uint32(0)); err != nil {
		return err
	}
	if err := w.WriteTrailingGap(9); err != nil {
		return err
	}
	return nil
}
func (o *PortInfo2) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	_ptr_pPortName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.PortName); err != nil {
			return err
		}
		return nil
	})
	_s_pPortName := func(ptr interface{}) { o.PortName = *ptr.(*string) }
	if err := w.ReadPointer(&o.PortName, _s_pPortName, _ptr_pPortName); err != nil {
		return err
	}
	_ptr_pMonitorName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.MonitorName); err != nil {
			return err
		}
		return nil
	})
	_s_pMonitorName := func(ptr interface{}) { o.MonitorName = *ptr.(*string) }
	if err := w.ReadPointer(&o.MonitorName, _s_pMonitorName, _ptr_pMonitorName); err != nil {
		return err
	}
	_ptr_pDescription := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.Description); err != nil {
			return err
		}
		return nil
	})
	_s_pDescription := func(ptr interface{}) { o.Description = *ptr.(*string) }
	if err := w.ReadPointer(&o.Description, _s_pDescription, _ptr_pDescription); err != nil {
		return err
	}
	if err := w.ReadData(&o.PortType); err != nil {
		return err
	}
	// reserved Reserved
	var _Reserved uint32
	if err := w.ReadData(&_Reserved); err != nil {
		return err
	}
	if err := w.ReadTrailingGap(9); err != nil {
		return err
	}
	return nil
}

// PortInfo3 structure represents PORT_INFO_3 RPC structure.
type PortInfo3 struct {
	Status       uint32 `idl:"name:dwStatus" json:"status"`
	StatusString string `idl:"name:pszStatus;string" json:"status_string"`
	Severity     uint32 `idl:"name:dwSeverity" json:"severity"`
}

func (o *PortInfo3) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *PortInfo3) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.Status); err != nil {
		return err
	}
	if o.StatusString != "" {
		_ptr_pszStatus := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.StatusString); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.StatusString, _ptr_pszStatus); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if err := w.WriteData(o.Severity); err != nil {
		return err
	}
	if err := w.WriteTrailingGap(9); err != nil {
		return err
	}
	return nil
}
func (o *PortInfo3) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.Status); err != nil {
		return err
	}
	_ptr_pszStatus := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.StatusString); err != nil {
			return err
		}
		return nil
	})
	_s_pszStatus := func(ptr interface{}) { o.StatusString = *ptr.(*string) }
	if err := w.ReadPointer(&o.StatusString, _s_pszStatus, _ptr_pszStatus); err != nil {
		return err
	}
	if err := w.ReadData(&o.Severity); err != nil {
		return err
	}
	if err := w.ReadTrailingGap(9); err != nil {
		return err
	}
	return nil
}

// PortInfo255 structure represents PORT_INFO_FF RPC structure.
type PortInfo255 struct {
	PortName          string `idl:"name:pPortName;string" json:"port_name"`
	MonitorDataLength uint32 `idl:"name:cbMonitorData" json:"monitor_data_length"`
	MonitorData       uint8  `idl:"name:pMonitorData" json:"monitor_data"`
}

func (o *PortInfo255) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *PortInfo255) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if o.PortName != "" {
		_ptr_pPortName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.PortName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.PortName, _ptr_pPortName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if err := w.WriteData(o.MonitorDataLength); err != nil {
		return err
	}
	// XXX pointer to primitive type, default behavior is to write non-null pointer.
	// if this behavior is not desired, use goext_default_null([cond]) attribute.
	_ptr_pMonitorData := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
		if err := w.WriteData(o.MonitorData); err != nil {
			return err
		}
		return nil
	})
	if err := w.WritePointer(&o.MonitorData, _ptr_pMonitorData); err != nil {
		return err
	}
	return nil
}
func (o *PortInfo255) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	_ptr_pPortName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.PortName); err != nil {
			return err
		}
		return nil
	})
	_s_pPortName := func(ptr interface{}) { o.PortName = *ptr.(*string) }
	if err := w.ReadPointer(&o.PortName, _s_pPortName, _ptr_pPortName); err != nil {
		return err
	}
	if err := w.ReadData(&o.MonitorDataLength); err != nil {
		return err
	}
	_ptr_pMonitorData := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := w.ReadData(&o.MonitorData); err != nil {
			return err
		}
		return nil
	})
	_s_pMonitorData := func(ptr interface{}) { o.MonitorData = *ptr.(*uint8) }
	if err := w.ReadPointer(&o.MonitorData, _s_pMonitorData, _ptr_pMonitorData); err != nil {
		return err
	}
	return nil
}

// PrinterInfoStress structure represents PRINTER_INFO_STRESS RPC structure.
type PrinterInfoStress struct {
	PrinterName                   string           `idl:"name:pPrinterName;string" json:"printer_name"`
	ServerName                    string           `idl:"name:pServerName;string" json:"server_name"`
	JobsCount                     uint32           `idl:"name:cJobs" json:"jobs_count"`
	TotalJobsCount                uint32           `idl:"name:cTotalJobs" json:"total_jobs_count"`
	TotalBytesCount               uint32           `idl:"name:cTotalBytes" json:"total_bytes_count"`
	UpTime                        *dtyp.SystemTime `idl:"name:stUpTime" json:"up_time"`
	MaxcReference                 uint32           `idl:"name:MaxcRef" json:"maxc_reference"`
	TotalPagesPrintedCount        uint32           `idl:"name:cTotalPagesPrinted" json:"total_pages_printed_count"`
	GetVersion                    uint32           `idl:"name:dwGetVersion" json:"get_version"`
	FreeBuild                     uint32           `idl:"name:fFreeBuild" json:"free_build"`
	SpoolingCount                 uint32           `idl:"name:cSpooling" json:"spooling_count"`
	MaxSpoolingCount              uint32           `idl:"name:cMaxSpooling" json:"max_spooling_count"`
	ReferenceCount                uint32           `idl:"name:cRef" json:"reference_count"`
	ErrorOutOfPaperCount          uint32           `idl:"name:cErrorOutOfPaper" json:"error_out_of_paper_count"`
	ErrorNotReadyCount            uint32           `idl:"name:cErrorNotReady" json:"error_not_ready_count"`
	JobErrorCount                 uint32           `idl:"name:cJobError" json:"job_error_count"`
	NumberOfProcessors            uint32           `idl:"name:dwNumberOfProcessors" json:"number_of_processors"`
	ProcessorType                 uint32           `idl:"name:dwProcessorType" json:"processor_type"`
	HighPartTotalBytes            uint32           `idl:"name:dwHighPartTotalBytes" json:"high_part_total_bytes"`
	ChangeIDCount                 uint32           `idl:"name:cChangeID" json:"change_id_count"`
	LastError                     uint32           `idl:"name:dwLastError" json:"last_error"`
	Status                        uint32           `idl:"name:Status" json:"status"`
	EnumerateNetworkPrintersCount uint32           `idl:"name:cEnumerateNetworkPrinters" json:"enumerate_network_printers_count"`
	AddNetPrintersCount           uint32           `idl:"name:cAddNetPrinters" json:"add_net_printers_count"`
	ProcessorArchitecture         uint16           `idl:"name:wProcessorArchitecture" json:"processor_architecture"`
	ProcessorLevel                uint16           `idl:"name:wProcessorLevel" json:"processor_level"`
	ReferenceICCount              uint32           `idl:"name:cRefIC" json:"reference_ic_count"`
	_                             uint32           `idl:"name:dwReserved2"`
	_                             uint32           `idl:"name:dwReserved3"`
}

func (o *PrinterInfoStress) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *PrinterInfoStress) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if o.PrinterName != "" {
		_ptr_pPrinterName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.PrinterName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.PrinterName, _ptr_pPrinterName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.ServerName != "" {
		_ptr_pServerName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.ServerName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.ServerName, _ptr_pServerName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if err := w.WriteData(o.JobsCount); err != nil {
		return err
	}
	if err := w.WriteData(o.TotalJobsCount); err != nil {
		return err
	}
	if err := w.WriteData(o.TotalBytesCount); err != nil {
		return err
	}
	if o.UpTime != nil {
		if err := o.UpTime.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&dtyp.SystemTime{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	if err := w.WriteData(o.MaxcReference); err != nil {
		return err
	}
	if err := w.WriteData(o.TotalPagesPrintedCount); err != nil {
		return err
	}
	if err := w.WriteData(o.GetVersion); err != nil {
		return err
	}
	if err := w.WriteData(o.FreeBuild); err != nil {
		return err
	}
	if err := w.WriteData(o.SpoolingCount); err != nil {
		return err
	}
	if err := w.WriteData(o.MaxSpoolingCount); err != nil {
		return err
	}
	if err := w.WriteData(o.ReferenceCount); err != nil {
		return err
	}
	if err := w.WriteData(o.ErrorOutOfPaperCount); err != nil {
		return err
	}
	if err := w.WriteData(o.ErrorNotReadyCount); err != nil {
		return err
	}
	if err := w.WriteData(o.JobErrorCount); err != nil {
		return err
	}
	if err := w.WriteData(o.NumberOfProcessors); err != nil {
		return err
	}
	if err := w.WriteData(o.ProcessorType); err != nil {
		return err
	}
	if err := w.WriteData(o.HighPartTotalBytes); err != nil {
		return err
	}
	if err := w.WriteData(o.ChangeIDCount); err != nil {
		return err
	}
	if err := w.WriteData(o.LastError); err != nil {
		return err
	}
	if err := w.WriteData(o.Status); err != nil {
		return err
	}
	if err := w.WriteData(o.EnumerateNetworkPrintersCount); err != nil {
		return err
	}
	if err := w.WriteData(o.AddNetPrintersCount); err != nil {
		return err
	}
	if err := w.WriteData(o.ProcessorArchitecture); err != nil {
		return err
	}
	if err := w.WriteData(o.ProcessorLevel); err != nil {
		return err
	}
	if err := w.WriteData(o.ReferenceICCount); err != nil {
		return err
	}
	// reserved dwReserved2
	if err := w.WriteData(uint32(0)); err != nil {
		return err
	}
	// reserved dwReserved3
	if err := w.WriteData(uint32(0)); err != nil {
		return err
	}
	if err := w.WriteTrailingGap(9); err != nil {
		return err
	}
	return nil
}
func (o *PrinterInfoStress) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	_ptr_pPrinterName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.PrinterName); err != nil {
			return err
		}
		return nil
	})
	_s_pPrinterName := func(ptr interface{}) { o.PrinterName = *ptr.(*string) }
	if err := w.ReadPointer(&o.PrinterName, _s_pPrinterName, _ptr_pPrinterName); err != nil {
		return err
	}
	_ptr_pServerName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.ServerName); err != nil {
			return err
		}
		return nil
	})
	_s_pServerName := func(ptr interface{}) { o.ServerName = *ptr.(*string) }
	if err := w.ReadPointer(&o.ServerName, _s_pServerName, _ptr_pServerName); err != nil {
		return err
	}
	if err := w.ReadData(&o.JobsCount); err != nil {
		return err
	}
	if err := w.ReadData(&o.TotalJobsCount); err != nil {
		return err
	}
	if err := w.ReadData(&o.TotalBytesCount); err != nil {
		return err
	}
	if o.UpTime == nil {
		o.UpTime = &dtyp.SystemTime{}
	}
	if err := o.UpTime.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	if err := w.ReadData(&o.MaxcReference); err != nil {
		return err
	}
	if err := w.ReadData(&o.TotalPagesPrintedCount); err != nil {
		return err
	}
	if err := w.ReadData(&o.GetVersion); err != nil {
		return err
	}
	if err := w.ReadData(&o.FreeBuild); err != nil {
		return err
	}
	if err := w.ReadData(&o.SpoolingCount); err != nil {
		return err
	}
	if err := w.ReadData(&o.MaxSpoolingCount); err != nil {
		return err
	}
	if err := w.ReadData(&o.ReferenceCount); err != nil {
		return err
	}
	if err := w.ReadData(&o.ErrorOutOfPaperCount); err != nil {
		return err
	}
	if err := w.ReadData(&o.ErrorNotReadyCount); err != nil {
		return err
	}
	if err := w.ReadData(&o.JobErrorCount); err != nil {
		return err
	}
	if err := w.ReadData(&o.NumberOfProcessors); err != nil {
		return err
	}
	if err := w.ReadData(&o.ProcessorType); err != nil {
		return err
	}
	if err := w.ReadData(&o.HighPartTotalBytes); err != nil {
		return err
	}
	if err := w.ReadData(&o.ChangeIDCount); err != nil {
		return err
	}
	if err := w.ReadData(&o.LastError); err != nil {
		return err
	}
	if err := w.ReadData(&o.Status); err != nil {
		return err
	}
	if err := w.ReadData(&o.EnumerateNetworkPrintersCount); err != nil {
		return err
	}
	if err := w.ReadData(&o.AddNetPrintersCount); err != nil {
		return err
	}
	if err := w.ReadData(&o.ProcessorArchitecture); err != nil {
		return err
	}
	if err := w.ReadData(&o.ProcessorLevel); err != nil {
		return err
	}
	if err := w.ReadData(&o.ReferenceICCount); err != nil {
		return err
	}
	// reserved dwReserved2
	var _dwReserved2 uint32
	if err := w.ReadData(&_dwReserved2); err != nil {
		return err
	}
	// reserved dwReserved3
	var _dwReserved3 uint32
	if err := w.ReadData(&_dwReserved3); err != nil {
		return err
	}
	if err := w.ReadTrailingGap(9); err != nil {
		return err
	}
	return nil
}

// PrinterInfo1 structure represents PRINTER_INFO_1 RPC structure.
type PrinterInfo1 struct {
	Flags       uint32 `idl:"name:Flags" json:"flags"`
	Description string `idl:"name:pDescription;string" json:"description"`
	Name        string `idl:"name:pName;string" json:"name"`
	Comment     string `idl:"name:pComment;string" json:"comment"`
}

func (o *PrinterInfo1) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *PrinterInfo1) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.Flags); err != nil {
		return err
	}
	if o.Description != "" {
		_ptr_pDescription := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.Description); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.Description, _ptr_pDescription); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.Name != "" {
		_ptr_pName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.Name); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.Name, _ptr_pName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.Comment != "" {
		_ptr_pComment := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.Comment); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.Comment, _ptr_pComment); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *PrinterInfo1) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.Flags); err != nil {
		return err
	}
	_ptr_pDescription := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.Description); err != nil {
			return err
		}
		return nil
	})
	_s_pDescription := func(ptr interface{}) { o.Description = *ptr.(*string) }
	if err := w.ReadPointer(&o.Description, _s_pDescription, _ptr_pDescription); err != nil {
		return err
	}
	_ptr_pName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.Name); err != nil {
			return err
		}
		return nil
	})
	_s_pName := func(ptr interface{}) { o.Name = *ptr.(*string) }
	if err := w.ReadPointer(&o.Name, _s_pName, _ptr_pName); err != nil {
		return err
	}
	_ptr_pComment := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.Comment); err != nil {
			return err
		}
		return nil
	})
	_s_pComment := func(ptr interface{}) { o.Comment = *ptr.(*string) }
	if err := w.ReadPointer(&o.Comment, _s_pComment, _ptr_pComment); err != nil {
		return err
	}
	return nil
}

// PrinterInfo2 structure represents PRINTER_INFO_2 RPC structure.
type PrinterInfo2 struct {
	ServerName         string                   `idl:"name:pServerName;string" json:"server_name"`
	PrinterName        string                   `idl:"name:pPrinterName;string" json:"printer_name"`
	ShareName          string                   `idl:"name:pShareName;string" json:"share_name"`
	PortName           string                   `idl:"name:pPortName;string" json:"port_name"`
	DriverName         string                   `idl:"name:pDriverName;string" json:"driver_name"`
	Comment            string                   `idl:"name:pComment;string" json:"comment"`
	Location           string                   `idl:"name:pLocation;string" json:"location"`
	DevMode            *DevMode                 `idl:"name:pDevMode" json:"dev_mode"`
	SepFile            string                   `idl:"name:pSepFile;string" json:"sep_file"`
	PrintProcessor     string                   `idl:"name:pPrintProcessor;string" json:"print_processor"`
	DataType           string                   `idl:"name:pDatatype;string" json:"data_type"`
	Parameters         string                   `idl:"name:pParameters;string" json:"parameters"`
	SecurityDescriptor *dtyp.SecurityDescriptor `idl:"name:pSecurityDescriptor" json:"security_descriptor"`
	Attributes         uint32                   `idl:"name:Attributes" json:"attributes"`
	Priority           uint32                   `idl:"name:Priority" json:"priority"`
	DefaultPriority    uint32                   `idl:"name:DefaultPriority" json:"default_priority"`
	StartTime          uint32                   `idl:"name:StartTime" json:"start_time"`
	UntilTime          uint32                   `idl:"name:UntilTime" json:"until_time"`
	Status             uint32                   `idl:"name:Status" json:"status"`
	JobsCount          uint32                   `idl:"name:cJobs" json:"jobs_count"`
	AveragePpm         uint32                   `idl:"name:AveragePPM" json:"average_ppm"`
}

func (o *PrinterInfo2) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *PrinterInfo2) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if o.ServerName != "" {
		_ptr_pServerName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.ServerName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.ServerName, _ptr_pServerName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.PrinterName != "" {
		_ptr_pPrinterName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.PrinterName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.PrinterName, _ptr_pPrinterName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.ShareName != "" {
		_ptr_pShareName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.ShareName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.ShareName, _ptr_pShareName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.PortName != "" {
		_ptr_pPortName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.PortName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.PortName, _ptr_pPortName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.DriverName != "" {
		_ptr_pDriverName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.DriverName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.DriverName, _ptr_pDriverName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.Comment != "" {
		_ptr_pComment := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.Comment); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.Comment, _ptr_pComment); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.Location != "" {
		_ptr_pLocation := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.Location); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.Location, _ptr_pLocation); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.DevMode != nil {
		_ptr_pDevMode := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.DevMode != nil {
				if err := o.DevMode.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&DevMode{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.DevMode, _ptr_pDevMode); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.SepFile != "" {
		_ptr_pSepFile := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.SepFile); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.SepFile, _ptr_pSepFile); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.PrintProcessor != "" {
		_ptr_pPrintProcessor := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.PrintProcessor); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.PrintProcessor, _ptr_pPrintProcessor); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.DataType != "" {
		_ptr_pDatatype := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.DataType); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.DataType, _ptr_pDatatype); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.Parameters != "" {
		_ptr_pParameters := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.Parameters); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.Parameters, _ptr_pParameters); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.SecurityDescriptor != nil {
		_ptr_pSecurityDescriptor := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.SecurityDescriptor != nil {
				if err := o.SecurityDescriptor.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&dtyp.SecurityDescriptor{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.SecurityDescriptor, _ptr_pSecurityDescriptor); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if err := w.WriteData(o.Attributes); err != nil {
		return err
	}
	if err := w.WriteData(o.Priority); err != nil {
		return err
	}
	if err := w.WriteData(o.DefaultPriority); err != nil {
		return err
	}
	if err := w.WriteData(o.StartTime); err != nil {
		return err
	}
	if err := w.WriteData(o.UntilTime); err != nil {
		return err
	}
	if err := w.WriteData(o.Status); err != nil {
		return err
	}
	if err := w.WriteData(o.JobsCount); err != nil {
		return err
	}
	if err := w.WriteData(o.AveragePpm); err != nil {
		return err
	}
	if err := w.WriteTrailingGap(9); err != nil {
		return err
	}
	return nil
}
func (o *PrinterInfo2) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	_ptr_pServerName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.ServerName); err != nil {
			return err
		}
		return nil
	})
	_s_pServerName := func(ptr interface{}) { o.ServerName = *ptr.(*string) }
	if err := w.ReadPointer(&o.ServerName, _s_pServerName, _ptr_pServerName); err != nil {
		return err
	}
	_ptr_pPrinterName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.PrinterName); err != nil {
			return err
		}
		return nil
	})
	_s_pPrinterName := func(ptr interface{}) { o.PrinterName = *ptr.(*string) }
	if err := w.ReadPointer(&o.PrinterName, _s_pPrinterName, _ptr_pPrinterName); err != nil {
		return err
	}
	_ptr_pShareName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.ShareName); err != nil {
			return err
		}
		return nil
	})
	_s_pShareName := func(ptr interface{}) { o.ShareName = *ptr.(*string) }
	if err := w.ReadPointer(&o.ShareName, _s_pShareName, _ptr_pShareName); err != nil {
		return err
	}
	_ptr_pPortName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.PortName); err != nil {
			return err
		}
		return nil
	})
	_s_pPortName := func(ptr interface{}) { o.PortName = *ptr.(*string) }
	if err := w.ReadPointer(&o.PortName, _s_pPortName, _ptr_pPortName); err != nil {
		return err
	}
	_ptr_pDriverName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.DriverName); err != nil {
			return err
		}
		return nil
	})
	_s_pDriverName := func(ptr interface{}) { o.DriverName = *ptr.(*string) }
	if err := w.ReadPointer(&o.DriverName, _s_pDriverName, _ptr_pDriverName); err != nil {
		return err
	}
	_ptr_pComment := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.Comment); err != nil {
			return err
		}
		return nil
	})
	_s_pComment := func(ptr interface{}) { o.Comment = *ptr.(*string) }
	if err := w.ReadPointer(&o.Comment, _s_pComment, _ptr_pComment); err != nil {
		return err
	}
	_ptr_pLocation := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.Location); err != nil {
			return err
		}
		return nil
	})
	_s_pLocation := func(ptr interface{}) { o.Location = *ptr.(*string) }
	if err := w.ReadPointer(&o.Location, _s_pLocation, _ptr_pLocation); err != nil {
		return err
	}
	_ptr_pDevMode := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.DevMode == nil {
			o.DevMode = &DevMode{}
		}
		if err := o.DevMode.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_pDevMode := func(ptr interface{}) { o.DevMode = *ptr.(**DevMode) }
	if err := w.ReadPointer(&o.DevMode, _s_pDevMode, _ptr_pDevMode); err != nil {
		return err
	}
	_ptr_pSepFile := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.SepFile); err != nil {
			return err
		}
		return nil
	})
	_s_pSepFile := func(ptr interface{}) { o.SepFile = *ptr.(*string) }
	if err := w.ReadPointer(&o.SepFile, _s_pSepFile, _ptr_pSepFile); err != nil {
		return err
	}
	_ptr_pPrintProcessor := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.PrintProcessor); err != nil {
			return err
		}
		return nil
	})
	_s_pPrintProcessor := func(ptr interface{}) { o.PrintProcessor = *ptr.(*string) }
	if err := w.ReadPointer(&o.PrintProcessor, _s_pPrintProcessor, _ptr_pPrintProcessor); err != nil {
		return err
	}
	_ptr_pDatatype := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.DataType); err != nil {
			return err
		}
		return nil
	})
	_s_pDatatype := func(ptr interface{}) { o.DataType = *ptr.(*string) }
	if err := w.ReadPointer(&o.DataType, _s_pDatatype, _ptr_pDatatype); err != nil {
		return err
	}
	_ptr_pParameters := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.Parameters); err != nil {
			return err
		}
		return nil
	})
	_s_pParameters := func(ptr interface{}) { o.Parameters = *ptr.(*string) }
	if err := w.ReadPointer(&o.Parameters, _s_pParameters, _ptr_pParameters); err != nil {
		return err
	}
	_ptr_pSecurityDescriptor := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.SecurityDescriptor == nil {
			o.SecurityDescriptor = &dtyp.SecurityDescriptor{}
		}
		if err := o.SecurityDescriptor.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_pSecurityDescriptor := func(ptr interface{}) { o.SecurityDescriptor = *ptr.(**dtyp.SecurityDescriptor) }
	if err := w.ReadPointer(&o.SecurityDescriptor, _s_pSecurityDescriptor, _ptr_pSecurityDescriptor); err != nil {
		return err
	}
	if err := w.ReadData(&o.Attributes); err != nil {
		return err
	}
	if err := w.ReadData(&o.Priority); err != nil {
		return err
	}
	if err := w.ReadData(&o.DefaultPriority); err != nil {
		return err
	}
	if err := w.ReadData(&o.StartTime); err != nil {
		return err
	}
	if err := w.ReadData(&o.UntilTime); err != nil {
		return err
	}
	if err := w.ReadData(&o.Status); err != nil {
		return err
	}
	if err := w.ReadData(&o.JobsCount); err != nil {
		return err
	}
	if err := w.ReadData(&o.AveragePpm); err != nil {
		return err
	}
	if err := w.ReadTrailingGap(9); err != nil {
		return err
	}
	return nil
}

// PrinterInfo3 structure represents PRINTER_INFO_3 RPC structure.
type PrinterInfo3 struct {
	SecurityDescriptor *dtyp.SecurityDescriptor `idl:"name:pSecurityDescriptor" json:"security_descriptor"`
}

func (o *PrinterInfo3) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *PrinterInfo3) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(6); err != nil {
		return err
	}
	if o.SecurityDescriptor != nil {
		_ptr_pSecurityDescriptor := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.SecurityDescriptor != nil {
				if err := o.SecurityDescriptor.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&dtyp.SecurityDescriptor{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.SecurityDescriptor, _ptr_pSecurityDescriptor); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *PrinterInfo3) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(6); err != nil {
		return err
	}
	_ptr_pSecurityDescriptor := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.SecurityDescriptor == nil {
			o.SecurityDescriptor = &dtyp.SecurityDescriptor{}
		}
		if err := o.SecurityDescriptor.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_pSecurityDescriptor := func(ptr interface{}) { o.SecurityDescriptor = *ptr.(**dtyp.SecurityDescriptor) }
	if err := w.ReadPointer(&o.SecurityDescriptor, _s_pSecurityDescriptor, _ptr_pSecurityDescriptor); err != nil {
		return err
	}
	return nil
}

// PrinterInfo4 structure represents PRINTER_INFO_4 RPC structure.
type PrinterInfo4 struct {
	PrinterName string `idl:"name:pPrinterName;string" json:"printer_name"`
	ServerName  string `idl:"name:pServerName;string" json:"server_name"`
	Attributes  uint32 `idl:"name:Attributes" json:"attributes"`
}

func (o *PrinterInfo4) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *PrinterInfo4) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if o.PrinterName != "" {
		_ptr_pPrinterName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.PrinterName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.PrinterName, _ptr_pPrinterName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.ServerName != "" {
		_ptr_pServerName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.ServerName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.ServerName, _ptr_pServerName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if err := w.WriteData(o.Attributes); err != nil {
		return err
	}
	if err := w.WriteTrailingGap(9); err != nil {
		return err
	}
	return nil
}
func (o *PrinterInfo4) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	_ptr_pPrinterName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.PrinterName); err != nil {
			return err
		}
		return nil
	})
	_s_pPrinterName := func(ptr interface{}) { o.PrinterName = *ptr.(*string) }
	if err := w.ReadPointer(&o.PrinterName, _s_pPrinterName, _ptr_pPrinterName); err != nil {
		return err
	}
	_ptr_pServerName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.ServerName); err != nil {
			return err
		}
		return nil
	})
	_s_pServerName := func(ptr interface{}) { o.ServerName = *ptr.(*string) }
	if err := w.ReadPointer(&o.ServerName, _s_pServerName, _ptr_pServerName); err != nil {
		return err
	}
	if err := w.ReadData(&o.Attributes); err != nil {
		return err
	}
	if err := w.ReadTrailingGap(9); err != nil {
		return err
	}
	return nil
}

// PrinterInfo5 structure represents PRINTER_INFO_5 RPC structure.
type PrinterInfo5 struct {
	PrinterName              string `idl:"name:pPrinterName;string" json:"printer_name"`
	PortName                 string `idl:"name:pPortName;string" json:"port_name"`
	Attributes               uint32 `idl:"name:Attributes" json:"attributes"`
	DeviceNotSelectedTimeout uint32 `idl:"name:DeviceNotSelectedTimeout" json:"device_not_selected_timeout"`
	TransmissionRetryTimeout uint32 `idl:"name:TransmissionRetryTimeout" json:"transmission_retry_timeout"`
}

func (o *PrinterInfo5) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *PrinterInfo5) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if o.PrinterName != "" {
		_ptr_pPrinterName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.PrinterName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.PrinterName, _ptr_pPrinterName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.PortName != "" {
		_ptr_pPortName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.PortName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.PortName, _ptr_pPortName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if err := w.WriteData(o.Attributes); err != nil {
		return err
	}
	if err := w.WriteData(o.DeviceNotSelectedTimeout); err != nil {
		return err
	}
	if err := w.WriteData(o.TransmissionRetryTimeout); err != nil {
		return err
	}
	if err := w.WriteTrailingGap(9); err != nil {
		return err
	}
	return nil
}
func (o *PrinterInfo5) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	_ptr_pPrinterName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.PrinterName); err != nil {
			return err
		}
		return nil
	})
	_s_pPrinterName := func(ptr interface{}) { o.PrinterName = *ptr.(*string) }
	if err := w.ReadPointer(&o.PrinterName, _s_pPrinterName, _ptr_pPrinterName); err != nil {
		return err
	}
	_ptr_pPortName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.PortName); err != nil {
			return err
		}
		return nil
	})
	_s_pPortName := func(ptr interface{}) { o.PortName = *ptr.(*string) }
	if err := w.ReadPointer(&o.PortName, _s_pPortName, _ptr_pPortName); err != nil {
		return err
	}
	if err := w.ReadData(&o.Attributes); err != nil {
		return err
	}
	if err := w.ReadData(&o.DeviceNotSelectedTimeout); err != nil {
		return err
	}
	if err := w.ReadData(&o.TransmissionRetryTimeout); err != nil {
		return err
	}
	if err := w.ReadTrailingGap(9); err != nil {
		return err
	}
	return nil
}

// PrinterInfo6 structure represents PRINTER_INFO_6 RPC structure.
type PrinterInfo6 struct {
	Status uint32 `idl:"name:dwStatus" json:"status"`
}

func (o *PrinterInfo6) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *PrinterInfo6) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(4); err != nil {
		return err
	}
	if err := w.WriteData(o.Status); err != nil {
		return err
	}
	return nil
}
func (o *PrinterInfo6) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(4); err != nil {
		return err
	}
	if err := w.ReadData(&o.Status); err != nil {
		return err
	}
	return nil
}

// PrinterInfo7 structure represents PRINTER_INFO_7 RPC structure.
type PrinterInfo7 struct {
	ObjectGUID string `idl:"name:pszObjectGUID;string" json:"object_guid"`
	Action     uint32 `idl:"name:dwAction" json:"action"`
}

func (o *PrinterInfo7) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *PrinterInfo7) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if o.ObjectGUID != "" {
		_ptr_pszObjectGUID := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.ObjectGUID); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.ObjectGUID, _ptr_pszObjectGUID); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if err := w.WriteData(o.Action); err != nil {
		return err
	}
	if err := w.WriteTrailingGap(9); err != nil {
		return err
	}
	return nil
}
func (o *PrinterInfo7) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	_ptr_pszObjectGUID := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.ObjectGUID); err != nil {
			return err
		}
		return nil
	})
	_s_pszObjectGUID := func(ptr interface{}) { o.ObjectGUID = *ptr.(*string) }
	if err := w.ReadPointer(&o.ObjectGUID, _s_pszObjectGUID, _ptr_pszObjectGUID); err != nil {
		return err
	}
	if err := w.ReadData(&o.Action); err != nil {
		return err
	}
	if err := w.ReadTrailingGap(9); err != nil {
		return err
	}
	return nil
}

// PrinterInfo8 structure represents PRINTER_INFO_8 RPC structure.
type PrinterInfo8 struct {
	DevMode *DevMode `idl:"name:pDevMode" json:"dev_mode"`
}

func (o *PrinterInfo8) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *PrinterInfo8) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(6); err != nil {
		return err
	}
	if o.DevMode != nil {
		_ptr_pDevMode := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.DevMode != nil {
				if err := o.DevMode.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&DevMode{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.DevMode, _ptr_pDevMode); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *PrinterInfo8) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(6); err != nil {
		return err
	}
	_ptr_pDevMode := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.DevMode == nil {
			o.DevMode = &DevMode{}
		}
		if err := o.DevMode.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_pDevMode := func(ptr interface{}) { o.DevMode = *ptr.(**DevMode) }
	if err := w.ReadPointer(&o.DevMode, _s_pDevMode, _ptr_pDevMode); err != nil {
		return err
	}
	return nil
}

// PrinterInfo9 structure represents PRINTER_INFO_9 RPC structure.
type PrinterInfo9 struct {
	DevMode *DevMode `idl:"name:pDevMode" json:"dev_mode"`
}

func (o *PrinterInfo9) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *PrinterInfo9) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(6); err != nil {
		return err
	}
	if o.DevMode != nil {
		_ptr_pDevMode := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.DevMode != nil {
				if err := o.DevMode.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&DevMode{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.DevMode, _ptr_pDevMode); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *PrinterInfo9) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(6); err != nil {
		return err
	}
	_ptr_pDevMode := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.DevMode == nil {
			o.DevMode = &DevMode{}
		}
		if err := o.DevMode.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_pDevMode := func(ptr interface{}) { o.DevMode = *ptr.(**DevMode) }
	if err := w.ReadPointer(&o.DevMode, _s_pDevMode, _ptr_pDevMode); err != nil {
		return err
	}
	return nil
}

// ClientInfo1 structure represents SPLCLIENT_INFO_1 RPC structure.
type ClientInfo1 struct {
	Size                  uint32 `idl:"name:dwSize" json:"size"`
	MachineName           string `idl:"name:pMachineName;string" json:"machine_name"`
	UserName              string `idl:"name:pUserName;string" json:"user_name"`
	BuildNum              uint32 `idl:"name:dwBuildNum" json:"build_num"`
	MajorVersion          uint32 `idl:"name:dwMajorVersion" json:"major_version"`
	MinorVersion          uint32 `idl:"name:dwMinorVersion" json:"minor_version"`
	ProcessorArchitecture uint16 `idl:"name:wProcessorArchitecture" json:"processor_architecture"`
}

func (o *ClientInfo1) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *ClientInfo1) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.Size); err != nil {
		return err
	}
	if o.MachineName != "" {
		_ptr_pMachineName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.MachineName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.MachineName, _ptr_pMachineName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.UserName != "" {
		_ptr_pUserName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.UserName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.UserName, _ptr_pUserName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if err := w.WriteData(o.BuildNum); err != nil {
		return err
	}
	if err := w.WriteData(o.MajorVersion); err != nil {
		return err
	}
	if err := w.WriteData(o.MinorVersion); err != nil {
		return err
	}
	if err := w.WriteData(o.ProcessorArchitecture); err != nil {
		return err
	}
	if err := w.WriteTrailingGap(9); err != nil {
		return err
	}
	return nil
}
func (o *ClientInfo1) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.Size); err != nil {
		return err
	}
	_ptr_pMachineName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.MachineName); err != nil {
			return err
		}
		return nil
	})
	_s_pMachineName := func(ptr interface{}) { o.MachineName = *ptr.(*string) }
	if err := w.ReadPointer(&o.MachineName, _s_pMachineName, _ptr_pMachineName); err != nil {
		return err
	}
	_ptr_pUserName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.UserName); err != nil {
			return err
		}
		return nil
	})
	_s_pUserName := func(ptr interface{}) { o.UserName = *ptr.(*string) }
	if err := w.ReadPointer(&o.UserName, _s_pUserName, _ptr_pUserName); err != nil {
		return err
	}
	if err := w.ReadData(&o.BuildNum); err != nil {
		return err
	}
	if err := w.ReadData(&o.MajorVersion); err != nil {
		return err
	}
	if err := w.ReadData(&o.MinorVersion); err != nil {
		return err
	}
	if err := w.ReadData(&o.ProcessorArchitecture); err != nil {
		return err
	}
	if err := w.ReadTrailingGap(9); err != nil {
		return err
	}
	return nil
}

// ClientInfo2 structure represents SPLCLIENT_INFO_2 RPC structure.
type ClientInfo2 struct {
	NotUsed int64 `idl:"name:notUsed" json:"not_used"`
}

func (o *ClientInfo2) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *ClientInfo2) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(4); err != nil {
		return err
	}
	if err := w.WriteData(ndr.Int3264(o.NotUsed)); err != nil {
		return err
	}
	return nil
}
func (o *ClientInfo2) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(4); err != nil {
		return err
	}
	if err := w.ReadData((*ndr.Int3264)(&o.NotUsed)); err != nil {
		return err
	}
	return nil
}

// ClientInfo3 structure represents SPLCLIENT_INFO_3 RPC structure.
type ClientInfo3 struct {
	Length                uint32 `idl:"name:cbSize" json:"length"`
	Flags                 uint32 `idl:"name:dwFlags" json:"flags"`
	Size                  uint32 `idl:"name:dwSize" json:"size"`
	MachineName           string `idl:"name:pMachineName;string" json:"machine_name"`
	UserName              string `idl:"name:pUserName;string" json:"user_name"`
	BuildNum              uint32 `idl:"name:dwBuildNum" json:"build_num"`
	MajorVersion          uint32 `idl:"name:dwMajorVersion" json:"major_version"`
	MinorVersion          uint32 `idl:"name:dwMinorVersion" json:"minor_version"`
	ProcessorArchitecture uint16 `idl:"name:wProcessorArchitecture" json:"processor_architecture"`
	Printer               uint64 `idl:"name:hSplPrinter" json:"printer"`
}

func (o *ClientInfo3) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *ClientInfo3) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(8); err != nil {
		return err
	}
	if err := w.WriteData(o.Length); err != nil {
		return err
	}
	if err := w.WriteData(o.Flags); err != nil {
		return err
	}
	if err := w.WriteData(o.Size); err != nil {
		return err
	}
	if o.MachineName != "" {
		_ptr_pMachineName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.MachineName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.MachineName, _ptr_pMachineName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.UserName != "" {
		_ptr_pUserName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.UserName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.UserName, _ptr_pUserName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if err := w.WriteData(o.BuildNum); err != nil {
		return err
	}
	if err := w.WriteData(o.MajorVersion); err != nil {
		return err
	}
	if err := w.WriteData(o.MinorVersion); err != nil {
		return err
	}
	if err := w.WriteData(o.ProcessorArchitecture); err != nil {
		return err
	}
	if err := w.WriteData(o.Printer); err != nil {
		return err
	}
	return nil
}
func (o *ClientInfo3) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(8); err != nil {
		return err
	}
	if err := w.ReadData(&o.Length); err != nil {
		return err
	}
	if err := w.ReadData(&o.Flags); err != nil {
		return err
	}
	if err := w.ReadData(&o.Size); err != nil {
		return err
	}
	_ptr_pMachineName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.MachineName); err != nil {
			return err
		}
		return nil
	})
	_s_pMachineName := func(ptr interface{}) { o.MachineName = *ptr.(*string) }
	if err := w.ReadPointer(&o.MachineName, _s_pMachineName, _ptr_pMachineName); err != nil {
		return err
	}
	_ptr_pUserName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.UserName); err != nil {
			return err
		}
		return nil
	})
	_s_pUserName := func(ptr interface{}) { o.UserName = *ptr.(*string) }
	if err := w.ReadPointer(&o.UserName, _s_pUserName, _ptr_pUserName); err != nil {
		return err
	}
	if err := w.ReadData(&o.BuildNum); err != nil {
		return err
	}
	if err := w.ReadData(&o.MajorVersion); err != nil {
		return err
	}
	if err := w.ReadData(&o.MinorVersion); err != nil {
		return err
	}
	if err := w.ReadData(&o.ProcessorArchitecture); err != nil {
		return err
	}
	if err := w.ReadData(&o.Printer); err != nil {
		return err
	}
	return nil
}

// DevModeContainer structure represents DEVMODE_CONTAINER RPC structure.
type DevModeContainer struct {
	BufferLength uint32 `idl:"name:cbBuf" json:"buffer_length"`
	DevMode      []byte `idl:"name:pDevMode;size_is:(cbBuf);pointer:unique" json:"dev_mode"`
}

func (o *DevModeContainer) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if o.DevMode != nil && o.BufferLength == 0 {
		o.BufferLength = uint32(len(o.DevMode))
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *DevModeContainer) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.BufferLength); err != nil {
		return err
	}
	if o.DevMode != nil || o.BufferLength > 0 {
		_ptr_pDevMode := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			dimSize1 := uint64(o.BufferLength)
			if err := w.WriteSize(dimSize1); err != nil {
				return err
			}
			sizeInfo := []uint64{
				dimSize1,
			}
			for i1 := range o.DevMode {
				i1 := i1
				if uint64(i1) >= sizeInfo[0] {
					break
				}
				if err := w.WriteData(o.DevMode[i1]); err != nil {
					return err
				}
			}
			for i1 := len(o.DevMode); uint64(i1) < sizeInfo[0]; i1++ {
				if err := w.WriteData(uint8(0)); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.DevMode, _ptr_pDevMode); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *DevModeContainer) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.BufferLength); err != nil {
		return err
	}
	_ptr_pDevMode := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		// XXX: for opaque unmarshaling
		if o.BufferLength > 0 && sizeInfo[0] == 0 {
			sizeInfo[0] = uint64(o.BufferLength)
		}
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array o.DevMode", sizeInfo[0])
		}
		o.DevMode = make([]byte, sizeInfo[0])
		for i1 := range o.DevMode {
			i1 := i1
			if err := w.ReadData(&o.DevMode[i1]); err != nil {
				return err
			}
		}
		return nil
	})
	_s_pDevMode := func(ptr interface{}) { o.DevMode = *ptr.(*[]byte) }
	if err := w.ReadPointer(&o.DevMode, _s_pDevMode, _ptr_pDevMode); err != nil {
		return err
	}
	return nil
}

// DocInfoContainer structure represents DOC_INFO_CONTAINER RPC structure.
type DocInfoContainer struct {
	Level   uint32                    `idl:"name:Level" json:"level"`
	DocInfo *DocInfoContainer_DocInfo `idl:"name:DocInfo;switch_is:Level" json:"doc_info"`
}

func (o *DocInfoContainer) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *DocInfoContainer) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.Level); err != nil {
		return err
	}
	_swDocInfo := uint32(o.Level)
	if o.DocInfo != nil {
		if err := o.DocInfo.MarshalUnionNDR(ctx, w, _swDocInfo); err != nil {
			return err
		}
	} else {
		if err := (&DocInfoContainer_DocInfo{}).MarshalUnionNDR(ctx, w, _swDocInfo); err != nil {
			return err
		}
	}
	return nil
}
func (o *DocInfoContainer) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.Level); err != nil {
		return err
	}
	if o.DocInfo == nil {
		o.DocInfo = &DocInfoContainer_DocInfo{}
	}
	_swDocInfo := uint32(o.Level)
	if err := o.DocInfo.UnmarshalUnionNDR(ctx, w, _swDocInfo); err != nil {
		return err
	}
	return nil
}

// DocInfoContainer_DocInfo structure represents DOC_INFO_CONTAINER union anonymous member.
type DocInfoContainer_DocInfo struct {
	// Types that are assignable to Value
	//
	// *DocInfoContainer_DocInfo1
	Value is_DocInfoContainer_DocInfo `json:"value"`
}

func (o *DocInfoContainer_DocInfo) GetValue() any {
	if o == nil {
		return nil
	}
	switch value := (interface{})(o.Value).(type) {
	case *DocInfoContainer_DocInfo1:
		if value != nil {
			return value.DocInfo1
		}
	}
	return nil
}

type is_DocInfoContainer_DocInfo interface {
	ndr.Marshaler
	ndr.Unmarshaler
	is_DocInfoContainer_DocInfo()
}

func (o *DocInfoContainer_DocInfo) NDRSwitchValue(sw uint32) uint32 {
	if o == nil {
		return uint32(0)
	}
	switch (interface{})(o.Value).(type) {
	case *DocInfoContainer_DocInfo1:
		return uint32(1)
	}
	return uint32(0)
}

func (o *DocInfoContainer_DocInfo) MarshalUnionNDR(ctx context.Context, w ndr.Writer, sw uint32) error {
	if err := w.WriteUnionAlign(9); err != nil {
		return err
	}
	if err := w.WriteSwitch(uint32(sw)); err != nil {
		return err
	}
	// ms_union
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	switch sw {
	case uint32(1):
		_o, _ := o.Value.(*DocInfoContainer_DocInfo1)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&DocInfoContainer_DocInfo1{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	default:
		return fmt.Errorf("unsupported switch case value %v", sw)
	}
	return nil
}

func (o *DocInfoContainer_DocInfo) UnmarshalUnionNDR(ctx context.Context, w ndr.Reader, sw uint32) error {
	if err := w.ReadUnionAlign(9); err != nil {
		return err
	}
	if err := w.ReadSwitch((*uint32)(&sw)); err != nil {
		return err
	}
	// ms_union
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	switch sw {
	case uint32(1):
		o.Value = &DocInfoContainer_DocInfo1{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	default:
		return fmt.Errorf("unsupported switch case value %v", sw)
	}
	return nil
}

// DocInfoContainer_DocInfo1 structure represents DocInfoContainer_DocInfo RPC union arm.
//
// It has following labels: 1
type DocInfoContainer_DocInfo1 struct {
	DocInfo1 *DocInfo1 `idl:"name:pDocInfo1" json:"doc_info1"`
}

func (*DocInfoContainer_DocInfo1) is_DocInfoContainer_DocInfo() {}

func (o *DocInfoContainer_DocInfo1) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.DocInfo1 != nil {
		_ptr_pDocInfo1 := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.DocInfo1 != nil {
				if err := o.DocInfo1.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&DocInfo1{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.DocInfo1, _ptr_pDocInfo1); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *DocInfoContainer_DocInfo1) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_pDocInfo1 := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.DocInfo1 == nil {
			o.DocInfo1 = &DocInfo1{}
		}
		if err := o.DocInfo1.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_pDocInfo1 := func(ptr interface{}) { o.DocInfo1 = *ptr.(**DocInfo1) }
	if err := w.ReadPointer(&o.DocInfo1, _s_pDocInfo1, _ptr_pDocInfo1); err != nil {
		return err
	}
	return nil
}

// DriverContainer structure represents DRIVER_CONTAINER RPC structure.
type DriverContainer struct {
	Level      uint32                      `idl:"name:Level" json:"level"`
	DriverInfo *DriverContainer_DriverInfo `idl:"name:DriverInfo;switch_is:Level" json:"driver_info"`
}

func (o *DriverContainer) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *DriverContainer) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.Level); err != nil {
		return err
	}
	_swDriverInfo := uint32(o.Level)
	if o.DriverInfo != nil {
		if err := o.DriverInfo.MarshalUnionNDR(ctx, w, _swDriverInfo); err != nil {
			return err
		}
	} else {
		if err := (&DriverContainer_DriverInfo{}).MarshalUnionNDR(ctx, w, _swDriverInfo); err != nil {
			return err
		}
	}
	return nil
}
func (o *DriverContainer) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.Level); err != nil {
		return err
	}
	if o.DriverInfo == nil {
		o.DriverInfo = &DriverContainer_DriverInfo{}
	}
	_swDriverInfo := uint32(o.Level)
	if err := o.DriverInfo.UnmarshalUnionNDR(ctx, w, _swDriverInfo); err != nil {
		return err
	}
	return nil
}

// DriverContainer_DriverInfo structure represents DRIVER_CONTAINER union anonymous member.
type DriverContainer_DriverInfo struct {
	// Types that are assignable to Value
	//
	// *DriverContainer_DriverInfo_Level1
	// *DriverContainer_DriverInfo_Level2
	// *DriverContainer_DriverInfo_Level3
	// *DriverContainer_DriverInfo_Level4
	// *DriverContainer_DriverInfo_Level6
	// *DriverContainer_DriverInfo_Level8
	Value is_DriverContainer_DriverInfo `json:"value"`
}

func (o *DriverContainer_DriverInfo) GetValue() any {
	if o == nil {
		return nil
	}
	switch value := (interface{})(o.Value).(type) {
	case *DriverContainer_DriverInfo_Level1:
		if value != nil {
			return value.Level1
		}
	case *DriverContainer_DriverInfo_Level2:
		if value != nil {
			return value.Level2
		}
	case *DriverContainer_DriverInfo_Level3:
		if value != nil {
			return value.Level3
		}
	case *DriverContainer_DriverInfo_Level4:
		if value != nil {
			return value.Level4
		}
	case *DriverContainer_DriverInfo_Level6:
		if value != nil {
			return value.Level6
		}
	case *DriverContainer_DriverInfo_Level8:
		if value != nil {
			return value.Level8
		}
	}
	return nil
}

type is_DriverContainer_DriverInfo interface {
	ndr.Marshaler
	ndr.Unmarshaler
	is_DriverContainer_DriverInfo()
}

func (o *DriverContainer_DriverInfo) NDRSwitchValue(sw uint32) uint32 {
	if o == nil {
		return uint32(0)
	}
	switch (interface{})(o.Value).(type) {
	case *DriverContainer_DriverInfo_Level1:
		return uint32(1)
	case *DriverContainer_DriverInfo_Level2:
		return uint32(2)
	case *DriverContainer_DriverInfo_Level3:
		return uint32(3)
	case *DriverContainer_DriverInfo_Level4:
		return uint32(4)
	case *DriverContainer_DriverInfo_Level6:
		return uint32(6)
	case *DriverContainer_DriverInfo_Level8:
		return uint32(8)
	}
	return uint32(0)
}

func (o *DriverContainer_DriverInfo) MarshalUnionNDR(ctx context.Context, w ndr.Writer, sw uint32) error {
	if err := w.WriteUnionAlign(9); err != nil {
		return err
	}
	if err := w.WriteSwitch(uint32(sw)); err != nil {
		return err
	}
	// ms_union
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	switch sw {
	case uint32(1):
		_o, _ := o.Value.(*DriverContainer_DriverInfo_Level1)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&DriverContainer_DriverInfo_Level1{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint32(2):
		_o, _ := o.Value.(*DriverContainer_DriverInfo_Level2)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&DriverContainer_DriverInfo_Level2{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint32(3):
		_o, _ := o.Value.(*DriverContainer_DriverInfo_Level3)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&DriverContainer_DriverInfo_Level3{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint32(4):
		_o, _ := o.Value.(*DriverContainer_DriverInfo_Level4)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&DriverContainer_DriverInfo_Level4{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint32(6):
		_o, _ := o.Value.(*DriverContainer_DriverInfo_Level6)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&DriverContainer_DriverInfo_Level6{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint32(8):
		_o, _ := o.Value.(*DriverContainer_DriverInfo_Level8)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&DriverContainer_DriverInfo_Level8{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	default:
		return fmt.Errorf("unsupported switch case value %v", sw)
	}
	return nil
}

func (o *DriverContainer_DriverInfo) UnmarshalUnionNDR(ctx context.Context, w ndr.Reader, sw uint32) error {
	if err := w.ReadUnionAlign(9); err != nil {
		return err
	}
	if err := w.ReadSwitch((*uint32)(&sw)); err != nil {
		return err
	}
	// ms_union
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	switch sw {
	case uint32(1):
		o.Value = &DriverContainer_DriverInfo_Level1{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint32(2):
		o.Value = &DriverContainer_DriverInfo_Level2{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint32(3):
		o.Value = &DriverContainer_DriverInfo_Level3{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint32(4):
		o.Value = &DriverContainer_DriverInfo_Level4{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint32(6):
		o.Value = &DriverContainer_DriverInfo_Level6{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint32(8):
		o.Value = &DriverContainer_DriverInfo_Level8{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	default:
		return fmt.Errorf("unsupported switch case value %v", sw)
	}
	return nil
}

// DriverContainer_DriverInfo_Level1 structure represents DriverContainer_DriverInfo RPC union arm.
//
// It has following labels: 1
type DriverContainer_DriverInfo_Level1 struct {
	Level1 *DriverInfo1 `idl:"name:Level1" json:"level1"`
}

func (*DriverContainer_DriverInfo_Level1) is_DriverContainer_DriverInfo() {}

func (o *DriverContainer_DriverInfo_Level1) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.Level1 != nil {
		_ptr_Level1 := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.Level1 != nil {
				if err := o.Level1.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&DriverInfo1{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.Level1, _ptr_Level1); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *DriverContainer_DriverInfo_Level1) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_Level1 := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.Level1 == nil {
			o.Level1 = &DriverInfo1{}
		}
		if err := o.Level1.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_Level1 := func(ptr interface{}) { o.Level1 = *ptr.(**DriverInfo1) }
	if err := w.ReadPointer(&o.Level1, _s_Level1, _ptr_Level1); err != nil {
		return err
	}
	return nil
}

// DriverContainer_DriverInfo_Level2 structure represents DriverContainer_DriverInfo RPC union arm.
//
// It has following labels: 2
type DriverContainer_DriverInfo_Level2 struct {
	Level2 *DriverInfo2 `idl:"name:Level2" json:"level2"`
}

func (*DriverContainer_DriverInfo_Level2) is_DriverContainer_DriverInfo() {}

func (o *DriverContainer_DriverInfo_Level2) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.Level2 != nil {
		_ptr_Level2 := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.Level2 != nil {
				if err := o.Level2.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&DriverInfo2{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.Level2, _ptr_Level2); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *DriverContainer_DriverInfo_Level2) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_Level2 := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.Level2 == nil {
			o.Level2 = &DriverInfo2{}
		}
		if err := o.Level2.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_Level2 := func(ptr interface{}) { o.Level2 = *ptr.(**DriverInfo2) }
	if err := w.ReadPointer(&o.Level2, _s_Level2, _ptr_Level2); err != nil {
		return err
	}
	return nil
}

// DriverContainer_DriverInfo_Level3 structure represents DriverContainer_DriverInfo RPC union arm.
//
// It has following labels: 3
type DriverContainer_DriverInfo_Level3 struct {
	Level3 *DriverInfo3 `idl:"name:Level3" json:"level3"`
}

func (*DriverContainer_DriverInfo_Level3) is_DriverContainer_DriverInfo() {}

func (o *DriverContainer_DriverInfo_Level3) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.Level3 != nil {
		_ptr_Level3 := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.Level3 != nil {
				if err := o.Level3.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&DriverInfo3{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.Level3, _ptr_Level3); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *DriverContainer_DriverInfo_Level3) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_Level3 := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.Level3 == nil {
			o.Level3 = &DriverInfo3{}
		}
		if err := o.Level3.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_Level3 := func(ptr interface{}) { o.Level3 = *ptr.(**DriverInfo3) }
	if err := w.ReadPointer(&o.Level3, _s_Level3, _ptr_Level3); err != nil {
		return err
	}
	return nil
}

// DriverContainer_DriverInfo_Level4 structure represents DriverContainer_DriverInfo RPC union arm.
//
// It has following labels: 4
type DriverContainer_DriverInfo_Level4 struct {
	Level4 *DriverInfo4 `idl:"name:Level4" json:"level4"`
}

func (*DriverContainer_DriverInfo_Level4) is_DriverContainer_DriverInfo() {}

func (o *DriverContainer_DriverInfo_Level4) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.Level4 != nil {
		_ptr_Level4 := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.Level4 != nil {
				if err := o.Level4.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&DriverInfo4{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.Level4, _ptr_Level4); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *DriverContainer_DriverInfo_Level4) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_Level4 := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.Level4 == nil {
			o.Level4 = &DriverInfo4{}
		}
		if err := o.Level4.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_Level4 := func(ptr interface{}) { o.Level4 = *ptr.(**DriverInfo4) }
	if err := w.ReadPointer(&o.Level4, _s_Level4, _ptr_Level4); err != nil {
		return err
	}
	return nil
}

// DriverContainer_DriverInfo_Level6 structure represents DriverContainer_DriverInfo RPC union arm.
//
// It has following labels: 6
type DriverContainer_DriverInfo_Level6 struct {
	Level6 *DriverInfo6 `idl:"name:Level6" json:"level6"`
}

func (*DriverContainer_DriverInfo_Level6) is_DriverContainer_DriverInfo() {}

func (o *DriverContainer_DriverInfo_Level6) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.Level6 != nil {
		_ptr_Level6 := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.Level6 != nil {
				if err := o.Level6.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&DriverInfo6{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.Level6, _ptr_Level6); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *DriverContainer_DriverInfo_Level6) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_Level6 := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.Level6 == nil {
			o.Level6 = &DriverInfo6{}
		}
		if err := o.Level6.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_Level6 := func(ptr interface{}) { o.Level6 = *ptr.(**DriverInfo6) }
	if err := w.ReadPointer(&o.Level6, _s_Level6, _ptr_Level6); err != nil {
		return err
	}
	return nil
}

// DriverContainer_DriverInfo_Level8 structure represents DriverContainer_DriverInfo RPC union arm.
//
// It has following labels: 8
type DriverContainer_DriverInfo_Level8 struct {
	Level8 *DriverInfo8 `idl:"name:Level8" json:"level8"`
}

func (*DriverContainer_DriverInfo_Level8) is_DriverContainer_DriverInfo() {}

func (o *DriverContainer_DriverInfo_Level8) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.Level8 != nil {
		_ptr_Level8 := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.Level8 != nil {
				if err := o.Level8.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&DriverInfo8{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.Level8, _ptr_Level8); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *DriverContainer_DriverInfo_Level8) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_Level8 := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.Level8 == nil {
			o.Level8 = &DriverInfo8{}
		}
		if err := o.Level8.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_Level8 := func(ptr interface{}) { o.Level8 = *ptr.(**DriverInfo8) }
	if err := w.ReadPointer(&o.Level8, _s_Level8, _ptr_Level8); err != nil {
		return err
	}
	return nil
}

// FormContainer structure represents FORM_CONTAINER RPC structure.
type FormContainer struct {
	Level    uint32                  `idl:"name:Level" json:"level"`
	FormInfo *FormContainer_FormInfo `idl:"name:FormInfo;switch_is:Level" json:"form_info"`
}

func (o *FormContainer) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *FormContainer) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.Level); err != nil {
		return err
	}
	_swFormInfo := uint32(o.Level)
	if o.FormInfo != nil {
		if err := o.FormInfo.MarshalUnionNDR(ctx, w, _swFormInfo); err != nil {
			return err
		}
	} else {
		if err := (&FormContainer_FormInfo{}).MarshalUnionNDR(ctx, w, _swFormInfo); err != nil {
			return err
		}
	}
	return nil
}
func (o *FormContainer) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.Level); err != nil {
		return err
	}
	if o.FormInfo == nil {
		o.FormInfo = &FormContainer_FormInfo{}
	}
	_swFormInfo := uint32(o.Level)
	if err := o.FormInfo.UnmarshalUnionNDR(ctx, w, _swFormInfo); err != nil {
		return err
	}
	return nil
}

// FormContainer_FormInfo structure represents FORM_CONTAINER union anonymous member.
type FormContainer_FormInfo struct {
	// Types that are assignable to Value
	//
	// *FormContainer_FormInfo_FormInfo1
	// *FormContainer_FormInfo_FormInfo2
	Value is_FormContainer_FormInfo `json:"value"`
}

func (o *FormContainer_FormInfo) GetValue() any {
	if o == nil {
		return nil
	}
	switch value := (interface{})(o.Value).(type) {
	case *FormContainer_FormInfo_FormInfo1:
		if value != nil {
			return value.FormInfo1
		}
	case *FormContainer_FormInfo_FormInfo2:
		if value != nil {
			return value.FormInfo2
		}
	}
	return nil
}

type is_FormContainer_FormInfo interface {
	ndr.Marshaler
	ndr.Unmarshaler
	is_FormContainer_FormInfo()
}

func (o *FormContainer_FormInfo) NDRSwitchValue(sw uint32) uint32 {
	if o == nil {
		return uint32(0)
	}
	switch (interface{})(o.Value).(type) {
	case *FormContainer_FormInfo_FormInfo1:
		return uint32(1)
	case *FormContainer_FormInfo_FormInfo2:
		return uint32(2)
	}
	return uint32(0)
}

func (o *FormContainer_FormInfo) MarshalUnionNDR(ctx context.Context, w ndr.Writer, sw uint32) error {
	if err := w.WriteUnionAlign(9); err != nil {
		return err
	}
	if err := w.WriteSwitch(uint32(sw)); err != nil {
		return err
	}
	// ms_union
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	switch sw {
	case uint32(1):
		_o, _ := o.Value.(*FormContainer_FormInfo_FormInfo1)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&FormContainer_FormInfo_FormInfo1{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint32(2):
		_o, _ := o.Value.(*FormContainer_FormInfo_FormInfo2)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&FormContainer_FormInfo_FormInfo2{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	default:
		return fmt.Errorf("unsupported switch case value %v", sw)
	}
	return nil
}

func (o *FormContainer_FormInfo) UnmarshalUnionNDR(ctx context.Context, w ndr.Reader, sw uint32) error {
	if err := w.ReadUnionAlign(9); err != nil {
		return err
	}
	if err := w.ReadSwitch((*uint32)(&sw)); err != nil {
		return err
	}
	// ms_union
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	switch sw {
	case uint32(1):
		o.Value = &FormContainer_FormInfo_FormInfo1{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint32(2):
		o.Value = &FormContainer_FormInfo_FormInfo2{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	default:
		return fmt.Errorf("unsupported switch case value %v", sw)
	}
	return nil
}

// FormContainer_FormInfo_FormInfo1 structure represents FormContainer_FormInfo RPC union arm.
//
// It has following labels: 1
type FormContainer_FormInfo_FormInfo1 struct {
	FormInfo1 *FormInfo1 `idl:"name:pFormInfo1" json:"form_info1"`
}

func (*FormContainer_FormInfo_FormInfo1) is_FormContainer_FormInfo() {}

func (o *FormContainer_FormInfo_FormInfo1) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.FormInfo1 != nil {
		_ptr_pFormInfo1 := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.FormInfo1 != nil {
				if err := o.FormInfo1.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&FormInfo1{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.FormInfo1, _ptr_pFormInfo1); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *FormContainer_FormInfo_FormInfo1) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_pFormInfo1 := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.FormInfo1 == nil {
			o.FormInfo1 = &FormInfo1{}
		}
		if err := o.FormInfo1.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_pFormInfo1 := func(ptr interface{}) { o.FormInfo1 = *ptr.(**FormInfo1) }
	if err := w.ReadPointer(&o.FormInfo1, _s_pFormInfo1, _ptr_pFormInfo1); err != nil {
		return err
	}
	return nil
}

// FormContainer_FormInfo_FormInfo2 structure represents FormContainer_FormInfo RPC union arm.
//
// It has following labels: 2
type FormContainer_FormInfo_FormInfo2 struct {
	FormInfo2 *FormInfo2 `idl:"name:pFormInfo2" json:"form_info2"`
}

func (*FormContainer_FormInfo_FormInfo2) is_FormContainer_FormInfo() {}

func (o *FormContainer_FormInfo_FormInfo2) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.FormInfo2 != nil {
		_ptr_pFormInfo2 := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.FormInfo2 != nil {
				if err := o.FormInfo2.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&FormInfo2{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.FormInfo2, _ptr_pFormInfo2); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *FormContainer_FormInfo_FormInfo2) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_pFormInfo2 := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.FormInfo2 == nil {
			o.FormInfo2 = &FormInfo2{}
		}
		if err := o.FormInfo2.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_pFormInfo2 := func(ptr interface{}) { o.FormInfo2 = *ptr.(**FormInfo2) }
	if err := w.ReadPointer(&o.FormInfo2, _s_pFormInfo2, _ptr_pFormInfo2); err != nil {
		return err
	}
	return nil
}

// JobContainer structure represents JOB_CONTAINER RPC structure.
type JobContainer struct {
	Level   uint32                `idl:"name:Level" json:"level"`
	JobInfo *JobContainer_JobInfo `idl:"name:JobInfo;switch_is:Level" json:"job_info"`
}

func (o *JobContainer) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *JobContainer) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.Level); err != nil {
		return err
	}
	_swJobInfo := uint32(o.Level)
	if o.JobInfo != nil {
		if err := o.JobInfo.MarshalUnionNDR(ctx, w, _swJobInfo); err != nil {
			return err
		}
	} else {
		if err := (&JobContainer_JobInfo{}).MarshalUnionNDR(ctx, w, _swJobInfo); err != nil {
			return err
		}
	}
	return nil
}
func (o *JobContainer) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.Level); err != nil {
		return err
	}
	if o.JobInfo == nil {
		o.JobInfo = &JobContainer_JobInfo{}
	}
	_swJobInfo := uint32(o.Level)
	if err := o.JobInfo.UnmarshalUnionNDR(ctx, w, _swJobInfo); err != nil {
		return err
	}
	return nil
}

// JobContainer_JobInfo structure represents JOB_CONTAINER union anonymous member.
type JobContainer_JobInfo struct {
	// Types that are assignable to Value
	//
	// *JobContainer_JobInfo_Level1
	// *JobContainer_JobInfo_Level2
	// *JobContainer_JobInfo_Level3
	// *JobContainer_JobInfo_Level4
	Value is_JobContainer_JobInfo `json:"value"`
}

func (o *JobContainer_JobInfo) GetValue() any {
	if o == nil {
		return nil
	}
	switch value := (interface{})(o.Value).(type) {
	case *JobContainer_JobInfo_Level1:
		if value != nil {
			return value.Level1
		}
	case *JobContainer_JobInfo_Level2:
		if value != nil {
			return value.Level2
		}
	case *JobContainer_JobInfo_Level3:
		if value != nil {
			return value.Level3
		}
	case *JobContainer_JobInfo_Level4:
		if value != nil {
			return value.Level4
		}
	}
	return nil
}

type is_JobContainer_JobInfo interface {
	ndr.Marshaler
	ndr.Unmarshaler
	is_JobContainer_JobInfo()
}

func (o *JobContainer_JobInfo) NDRSwitchValue(sw uint32) uint32 {
	if o == nil {
		return uint32(0)
	}
	switch (interface{})(o.Value).(type) {
	case *JobContainer_JobInfo_Level1:
		return uint32(1)
	case *JobContainer_JobInfo_Level2:
		return uint32(2)
	case *JobContainer_JobInfo_Level3:
		return uint32(3)
	case *JobContainer_JobInfo_Level4:
		return uint32(4)
	}
	return uint32(0)
}

func (o *JobContainer_JobInfo) MarshalUnionNDR(ctx context.Context, w ndr.Writer, sw uint32) error {
	if err := w.WriteUnionAlign(9); err != nil {
		return err
	}
	if err := w.WriteSwitch(uint32(sw)); err != nil {
		return err
	}
	// ms_union
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	switch sw {
	case uint32(1):
		_o, _ := o.Value.(*JobContainer_JobInfo_Level1)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&JobContainer_JobInfo_Level1{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint32(2):
		_o, _ := o.Value.(*JobContainer_JobInfo_Level2)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&JobContainer_JobInfo_Level2{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint32(3):
		_o, _ := o.Value.(*JobContainer_JobInfo_Level3)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&JobContainer_JobInfo_Level3{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint32(4):
		_o, _ := o.Value.(*JobContainer_JobInfo_Level4)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&JobContainer_JobInfo_Level4{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	default:
		return fmt.Errorf("unsupported switch case value %v", sw)
	}
	return nil
}

func (o *JobContainer_JobInfo) UnmarshalUnionNDR(ctx context.Context, w ndr.Reader, sw uint32) error {
	if err := w.ReadUnionAlign(9); err != nil {
		return err
	}
	if err := w.ReadSwitch((*uint32)(&sw)); err != nil {
		return err
	}
	// ms_union
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	switch sw {
	case uint32(1):
		o.Value = &JobContainer_JobInfo_Level1{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint32(2):
		o.Value = &JobContainer_JobInfo_Level2{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint32(3):
		o.Value = &JobContainer_JobInfo_Level3{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint32(4):
		o.Value = &JobContainer_JobInfo_Level4{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	default:
		return fmt.Errorf("unsupported switch case value %v", sw)
	}
	return nil
}

// JobContainer_JobInfo_Level1 structure represents JobContainer_JobInfo RPC union arm.
//
// It has following labels: 1
type JobContainer_JobInfo_Level1 struct {
	Level1 *JobInfo1 `idl:"name:Level1" json:"level1"`
}

func (*JobContainer_JobInfo_Level1) is_JobContainer_JobInfo() {}

func (o *JobContainer_JobInfo_Level1) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.Level1 != nil {
		_ptr_Level1 := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.Level1 != nil {
				if err := o.Level1.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&JobInfo1{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.Level1, _ptr_Level1); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *JobContainer_JobInfo_Level1) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_Level1 := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.Level1 == nil {
			o.Level1 = &JobInfo1{}
		}
		if err := o.Level1.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_Level1 := func(ptr interface{}) { o.Level1 = *ptr.(**JobInfo1) }
	if err := w.ReadPointer(&o.Level1, _s_Level1, _ptr_Level1); err != nil {
		return err
	}
	return nil
}

// JobContainer_JobInfo_Level2 structure represents JobContainer_JobInfo RPC union arm.
//
// It has following labels: 2
type JobContainer_JobInfo_Level2 struct {
	Level2 *JobInfo2 `idl:"name:Level2" json:"level2"`
}

func (*JobContainer_JobInfo_Level2) is_JobContainer_JobInfo() {}

func (o *JobContainer_JobInfo_Level2) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.Level2 != nil {
		_ptr_Level2 := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.Level2 != nil {
				if err := o.Level2.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&JobInfo2{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.Level2, _ptr_Level2); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *JobContainer_JobInfo_Level2) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_Level2 := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.Level2 == nil {
			o.Level2 = &JobInfo2{}
		}
		if err := o.Level2.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_Level2 := func(ptr interface{}) { o.Level2 = *ptr.(**JobInfo2) }
	if err := w.ReadPointer(&o.Level2, _s_Level2, _ptr_Level2); err != nil {
		return err
	}
	return nil
}

// JobContainer_JobInfo_Level3 structure represents JobContainer_JobInfo RPC union arm.
//
// It has following labels: 3
type JobContainer_JobInfo_Level3 struct {
	Level3 *JobInfo3 `idl:"name:Level3" json:"level3"`
}

func (*JobContainer_JobInfo_Level3) is_JobContainer_JobInfo() {}

func (o *JobContainer_JobInfo_Level3) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.Level3 != nil {
		_ptr_Level3 := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.Level3 != nil {
				if err := o.Level3.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&JobInfo3{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.Level3, _ptr_Level3); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *JobContainer_JobInfo_Level3) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_Level3 := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.Level3 == nil {
			o.Level3 = &JobInfo3{}
		}
		if err := o.Level3.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_Level3 := func(ptr interface{}) { o.Level3 = *ptr.(**JobInfo3) }
	if err := w.ReadPointer(&o.Level3, _s_Level3, _ptr_Level3); err != nil {
		return err
	}
	return nil
}

// JobContainer_JobInfo_Level4 structure represents JobContainer_JobInfo RPC union arm.
//
// It has following labels: 4
type JobContainer_JobInfo_Level4 struct {
	Level4 *JobInfo4 `idl:"name:Level4" json:"level4"`
}

func (*JobContainer_JobInfo_Level4) is_JobContainer_JobInfo() {}

func (o *JobContainer_JobInfo_Level4) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.Level4 != nil {
		_ptr_Level4 := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.Level4 != nil {
				if err := o.Level4.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&JobInfo4{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.Level4, _ptr_Level4); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *JobContainer_JobInfo_Level4) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_Level4 := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.Level4 == nil {
			o.Level4 = &JobInfo4{}
		}
		if err := o.Level4.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_Level4 := func(ptr interface{}) { o.Level4 = *ptr.(**JobInfo4) }
	if err := w.ReadPointer(&o.Level4, _s_Level4, _ptr_Level4); err != nil {
		return err
	}
	return nil
}

// MonitorContainer structure represents MONITOR_CONTAINER RPC structure.
type MonitorContainer struct {
	Level       uint32                        `idl:"name:Level" json:"level"`
	MonitorInfo *MonitorContainer_MonitorInfo `idl:"name:MonitorInfo;switch_is:Level" json:"monitor_info"`
}

func (o *MonitorContainer) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *MonitorContainer) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.Level); err != nil {
		return err
	}
	_swMonitorInfo := uint32(o.Level)
	if o.MonitorInfo != nil {
		if err := o.MonitorInfo.MarshalUnionNDR(ctx, w, _swMonitorInfo); err != nil {
			return err
		}
	} else {
		if err := (&MonitorContainer_MonitorInfo{}).MarshalUnionNDR(ctx, w, _swMonitorInfo); err != nil {
			return err
		}
	}
	return nil
}
func (o *MonitorContainer) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.Level); err != nil {
		return err
	}
	if o.MonitorInfo == nil {
		o.MonitorInfo = &MonitorContainer_MonitorInfo{}
	}
	_swMonitorInfo := uint32(o.Level)
	if err := o.MonitorInfo.UnmarshalUnionNDR(ctx, w, _swMonitorInfo); err != nil {
		return err
	}
	return nil
}

// MonitorContainer_MonitorInfo structure represents MONITOR_CONTAINER union anonymous member.
type MonitorContainer_MonitorInfo struct {
	// Types that are assignable to Value
	//
	// *MonitorContainer_MonitorInfo_MonitorInfo1
	// *MonitorContainer_MonitorInfo_MonitorInfo2
	Value is_MonitorContainer_MonitorInfo `json:"value"`
}

func (o *MonitorContainer_MonitorInfo) GetValue() any {
	if o == nil {
		return nil
	}
	switch value := (interface{})(o.Value).(type) {
	case *MonitorContainer_MonitorInfo_MonitorInfo1:
		if value != nil {
			return value.MonitorInfo1
		}
	case *MonitorContainer_MonitorInfo_MonitorInfo2:
		if value != nil {
			return value.MonitorInfo2
		}
	}
	return nil
}

type is_MonitorContainer_MonitorInfo interface {
	ndr.Marshaler
	ndr.Unmarshaler
	is_MonitorContainer_MonitorInfo()
}

func (o *MonitorContainer_MonitorInfo) NDRSwitchValue(sw uint32) uint32 {
	if o == nil {
		return uint32(0)
	}
	switch (interface{})(o.Value).(type) {
	case *MonitorContainer_MonitorInfo_MonitorInfo1:
		return uint32(1)
	case *MonitorContainer_MonitorInfo_MonitorInfo2:
		return uint32(2)
	}
	return uint32(0)
}

func (o *MonitorContainer_MonitorInfo) MarshalUnionNDR(ctx context.Context, w ndr.Writer, sw uint32) error {
	if err := w.WriteUnionAlign(9); err != nil {
		return err
	}
	if err := w.WriteSwitch(uint32(sw)); err != nil {
		return err
	}
	// ms_union
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	switch sw {
	case uint32(1):
		_o, _ := o.Value.(*MonitorContainer_MonitorInfo_MonitorInfo1)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&MonitorContainer_MonitorInfo_MonitorInfo1{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint32(2):
		_o, _ := o.Value.(*MonitorContainer_MonitorInfo_MonitorInfo2)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&MonitorContainer_MonitorInfo_MonitorInfo2{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	default:
		return fmt.Errorf("unsupported switch case value %v", sw)
	}
	return nil
}

func (o *MonitorContainer_MonitorInfo) UnmarshalUnionNDR(ctx context.Context, w ndr.Reader, sw uint32) error {
	if err := w.ReadUnionAlign(9); err != nil {
		return err
	}
	if err := w.ReadSwitch((*uint32)(&sw)); err != nil {
		return err
	}
	// ms_union
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	switch sw {
	case uint32(1):
		o.Value = &MonitorContainer_MonitorInfo_MonitorInfo1{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint32(2):
		o.Value = &MonitorContainer_MonitorInfo_MonitorInfo2{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	default:
		return fmt.Errorf("unsupported switch case value %v", sw)
	}
	return nil
}

// MonitorContainer_MonitorInfo_MonitorInfo1 structure represents MonitorContainer_MonitorInfo RPC union arm.
//
// It has following labels: 1
type MonitorContainer_MonitorInfo_MonitorInfo1 struct {
	MonitorInfo1 *MonitorInfo1 `idl:"name:pMonitorInfo1" json:"monitor_info1"`
}

func (*MonitorContainer_MonitorInfo_MonitorInfo1) is_MonitorContainer_MonitorInfo() {}

func (o *MonitorContainer_MonitorInfo_MonitorInfo1) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.MonitorInfo1 != nil {
		_ptr_pMonitorInfo1 := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.MonitorInfo1 != nil {
				if err := o.MonitorInfo1.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&MonitorInfo1{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.MonitorInfo1, _ptr_pMonitorInfo1); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *MonitorContainer_MonitorInfo_MonitorInfo1) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_pMonitorInfo1 := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.MonitorInfo1 == nil {
			o.MonitorInfo1 = &MonitorInfo1{}
		}
		if err := o.MonitorInfo1.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_pMonitorInfo1 := func(ptr interface{}) { o.MonitorInfo1 = *ptr.(**MonitorInfo1) }
	if err := w.ReadPointer(&o.MonitorInfo1, _s_pMonitorInfo1, _ptr_pMonitorInfo1); err != nil {
		return err
	}
	return nil
}

// MonitorContainer_MonitorInfo_MonitorInfo2 structure represents MonitorContainer_MonitorInfo RPC union arm.
//
// It has following labels: 2
type MonitorContainer_MonitorInfo_MonitorInfo2 struct {
	MonitorInfo2 *MonitorInfo2 `idl:"name:pMonitorInfo2" json:"monitor_info2"`
}

func (*MonitorContainer_MonitorInfo_MonitorInfo2) is_MonitorContainer_MonitorInfo() {}

func (o *MonitorContainer_MonitorInfo_MonitorInfo2) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.MonitorInfo2 != nil {
		_ptr_pMonitorInfo2 := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.MonitorInfo2 != nil {
				if err := o.MonitorInfo2.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&MonitorInfo2{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.MonitorInfo2, _ptr_pMonitorInfo2); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *MonitorContainer_MonitorInfo_MonitorInfo2) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_pMonitorInfo2 := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.MonitorInfo2 == nil {
			o.MonitorInfo2 = &MonitorInfo2{}
		}
		if err := o.MonitorInfo2.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_pMonitorInfo2 := func(ptr interface{}) { o.MonitorInfo2 = *ptr.(**MonitorInfo2) }
	if err := w.ReadPointer(&o.MonitorInfo2, _s_pMonitorInfo2, _ptr_pMonitorInfo2); err != nil {
		return err
	}
	return nil
}

// PortContainer structure represents PORT_CONTAINER RPC structure.
type PortContainer struct {
	Level    uint32                  `idl:"name:Level" json:"level"`
	PortInfo *PortContainer_PortInfo `idl:"name:PortInfo;switch_is:(16777215 Level &)" json:"port_info"`
}

func (o *PortContainer) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *PortContainer) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.Level); err != nil {
		return err
	}
	_swPortInfo := uint32((16777215 & o.Level))
	if o.PortInfo != nil {
		if err := o.PortInfo.MarshalUnionNDR(ctx, w, _swPortInfo); err != nil {
			return err
		}
	} else {
		if err := (&PortContainer_PortInfo{}).MarshalUnionNDR(ctx, w, _swPortInfo); err != nil {
			return err
		}
	}
	return nil
}
func (o *PortContainer) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.Level); err != nil {
		return err
	}
	if o.PortInfo == nil {
		o.PortInfo = &PortContainer_PortInfo{}
	}
	_swPortInfo := uint32((16777215 & o.Level))
	if err := o.PortInfo.UnmarshalUnionNDR(ctx, w, _swPortInfo); err != nil {
		return err
	}
	return nil
}

// PortContainer_PortInfo structure represents PORT_CONTAINER union anonymous member.
type PortContainer_PortInfo struct {
	// Types that are assignable to Value
	//
	// *PortContainer_PortInfo_PortInfo1
	// *PortContainer_PortInfo_PortInfo2
	// *PortContainer_PortInfo_PortInfo3
	// *PortContainer_PortInfo_PortInfo255
	Value is_PortContainer_PortInfo `json:"value"`
}

func (o *PortContainer_PortInfo) GetValue() any {
	if o == nil {
		return nil
	}
	switch value := (interface{})(o.Value).(type) {
	case *PortContainer_PortInfo_PortInfo1:
		if value != nil {
			return value.PortInfo1
		}
	case *PortContainer_PortInfo_PortInfo2:
		if value != nil {
			return value.PortInfo2
		}
	case *PortContainer_PortInfo_PortInfo3:
		if value != nil {
			return value.PortInfo3
		}
	case *PortContainer_PortInfo_PortInfo255:
		if value != nil {
			return value.PortInfo255
		}
	}
	return nil
}

type is_PortContainer_PortInfo interface {
	ndr.Marshaler
	ndr.Unmarshaler
	is_PortContainer_PortInfo()
}

func (o *PortContainer_PortInfo) NDRSwitchValue(sw uint32) uint32 {
	if o == nil {
		return uint32(0)
	}
	switch (interface{})(o.Value).(type) {
	case *PortContainer_PortInfo_PortInfo1:
		return uint32(1)
	case *PortContainer_PortInfo_PortInfo2:
		return uint32(2)
	case *PortContainer_PortInfo_PortInfo3:
		return uint32(3)
	case *PortContainer_PortInfo_PortInfo255:
		return uint32(16777215)
	}
	return uint32(0)
}

func (o *PortContainer_PortInfo) MarshalUnionNDR(ctx context.Context, w ndr.Writer, sw uint32) error {
	if err := w.WriteUnionAlign(9); err != nil {
		return err
	}
	if err := w.WriteSwitch(uint32(sw)); err != nil {
		return err
	}
	// ms_union
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	switch sw {
	case uint32(1):
		_o, _ := o.Value.(*PortContainer_PortInfo_PortInfo1)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PortContainer_PortInfo_PortInfo1{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint32(2):
		_o, _ := o.Value.(*PortContainer_PortInfo_PortInfo2)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PortContainer_PortInfo_PortInfo2{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint32(3):
		_o, _ := o.Value.(*PortContainer_PortInfo_PortInfo3)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PortContainer_PortInfo_PortInfo3{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint32(16777215):
		_o, _ := o.Value.(*PortContainer_PortInfo_PortInfo255)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PortContainer_PortInfo_PortInfo255{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	default:
		return fmt.Errorf("unsupported switch case value %v", sw)
	}
	return nil
}

func (o *PortContainer_PortInfo) UnmarshalUnionNDR(ctx context.Context, w ndr.Reader, sw uint32) error {
	if err := w.ReadUnionAlign(9); err != nil {
		return err
	}
	if err := w.ReadSwitch((*uint32)(&sw)); err != nil {
		return err
	}
	// ms_union
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	switch sw {
	case uint32(1):
		o.Value = &PortContainer_PortInfo_PortInfo1{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint32(2):
		o.Value = &PortContainer_PortInfo_PortInfo2{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint32(3):
		o.Value = &PortContainer_PortInfo_PortInfo3{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint32(16777215):
		o.Value = &PortContainer_PortInfo_PortInfo255{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	default:
		return fmt.Errorf("unsupported switch case value %v", sw)
	}
	return nil
}

// PortContainer_PortInfo_PortInfo1 structure represents PortContainer_PortInfo RPC union arm.
//
// It has following labels: 1
type PortContainer_PortInfo_PortInfo1 struct {
	PortInfo1 *PortInfo1 `idl:"name:pPortInfo1" json:"port_info1"`
}

func (*PortContainer_PortInfo_PortInfo1) is_PortContainer_PortInfo() {}

func (o *PortContainer_PortInfo_PortInfo1) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.PortInfo1 != nil {
		_ptr_pPortInfo1 := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.PortInfo1 != nil {
				if err := o.PortInfo1.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&PortInfo1{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.PortInfo1, _ptr_pPortInfo1); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *PortContainer_PortInfo_PortInfo1) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_pPortInfo1 := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.PortInfo1 == nil {
			o.PortInfo1 = &PortInfo1{}
		}
		if err := o.PortInfo1.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_pPortInfo1 := func(ptr interface{}) { o.PortInfo1 = *ptr.(**PortInfo1) }
	if err := w.ReadPointer(&o.PortInfo1, _s_pPortInfo1, _ptr_pPortInfo1); err != nil {
		return err
	}
	return nil
}

// PortContainer_PortInfo_PortInfo2 structure represents PortContainer_PortInfo RPC union arm.
//
// It has following labels: 2
type PortContainer_PortInfo_PortInfo2 struct {
	PortInfo2 *PortInfo2 `idl:"name:pPortInfo2" json:"port_info2"`
}

func (*PortContainer_PortInfo_PortInfo2) is_PortContainer_PortInfo() {}

func (o *PortContainer_PortInfo_PortInfo2) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.PortInfo2 != nil {
		_ptr_pPortInfo2 := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.PortInfo2 != nil {
				if err := o.PortInfo2.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&PortInfo2{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.PortInfo2, _ptr_pPortInfo2); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *PortContainer_PortInfo_PortInfo2) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_pPortInfo2 := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.PortInfo2 == nil {
			o.PortInfo2 = &PortInfo2{}
		}
		if err := o.PortInfo2.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_pPortInfo2 := func(ptr interface{}) { o.PortInfo2 = *ptr.(**PortInfo2) }
	if err := w.ReadPointer(&o.PortInfo2, _s_pPortInfo2, _ptr_pPortInfo2); err != nil {
		return err
	}
	return nil
}

// PortContainer_PortInfo_PortInfo3 structure represents PortContainer_PortInfo RPC union arm.
//
// It has following labels: 3
type PortContainer_PortInfo_PortInfo3 struct {
	PortInfo3 *PortInfo3 `idl:"name:pPortInfo3" json:"port_info3"`
}

func (*PortContainer_PortInfo_PortInfo3) is_PortContainer_PortInfo() {}

func (o *PortContainer_PortInfo_PortInfo3) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.PortInfo3 != nil {
		_ptr_pPortInfo3 := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.PortInfo3 != nil {
				if err := o.PortInfo3.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&PortInfo3{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.PortInfo3, _ptr_pPortInfo3); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *PortContainer_PortInfo_PortInfo3) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_pPortInfo3 := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.PortInfo3 == nil {
			o.PortInfo3 = &PortInfo3{}
		}
		if err := o.PortInfo3.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_pPortInfo3 := func(ptr interface{}) { o.PortInfo3 = *ptr.(**PortInfo3) }
	if err := w.ReadPointer(&o.PortInfo3, _s_pPortInfo3, _ptr_pPortInfo3); err != nil {
		return err
	}
	return nil
}

// PortContainer_PortInfo_PortInfo255 structure represents PortContainer_PortInfo RPC union arm.
//
// It has following labels: 16777215
type PortContainer_PortInfo_PortInfo255 struct {
	PortInfo255 *PortInfo255 `idl:"name:pPortInfoFF" json:"port_info255"`
}

func (*PortContainer_PortInfo_PortInfo255) is_PortContainer_PortInfo() {}

func (o *PortContainer_PortInfo_PortInfo255) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.PortInfo255 != nil {
		_ptr_pPortInfoFF := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.PortInfo255 != nil {
				if err := o.PortInfo255.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&PortInfo255{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.PortInfo255, _ptr_pPortInfoFF); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *PortContainer_PortInfo_PortInfo255) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_pPortInfoFF := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.PortInfo255 == nil {
			o.PortInfo255 = &PortInfo255{}
		}
		if err := o.PortInfo255.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_pPortInfoFF := func(ptr interface{}) { o.PortInfo255 = *ptr.(**PortInfo255) }
	if err := w.ReadPointer(&o.PortInfo255, _s_pPortInfoFF, _ptr_pPortInfoFF); err != nil {
		return err
	}
	return nil
}

// PortVarContainer structure represents PORT_VAR_CONTAINER RPC structure.
type PortVarContainer struct {
	MonitorDataLength uint32 `idl:"name:cbMonitorData" json:"monitor_data_length"`
	MonitorData       []byte `idl:"name:pMonitorData;size_is:(cbMonitorData);pointer:unique" json:"monitor_data"`
}

func (o *PortVarContainer) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if o.MonitorData != nil && o.MonitorDataLength == 0 {
		o.MonitorDataLength = uint32(len(o.MonitorData))
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *PortVarContainer) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.MonitorDataLength); err != nil {
		return err
	}
	if o.MonitorData != nil || o.MonitorDataLength > 0 {
		_ptr_pMonitorData := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			dimSize1 := uint64(o.MonitorDataLength)
			if err := w.WriteSize(dimSize1); err != nil {
				return err
			}
			sizeInfo := []uint64{
				dimSize1,
			}
			for i1 := range o.MonitorData {
				i1 := i1
				if uint64(i1) >= sizeInfo[0] {
					break
				}
				if err := w.WriteData(o.MonitorData[i1]); err != nil {
					return err
				}
			}
			for i1 := len(o.MonitorData); uint64(i1) < sizeInfo[0]; i1++ {
				if err := w.WriteData(uint8(0)); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.MonitorData, _ptr_pMonitorData); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *PortVarContainer) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.MonitorDataLength); err != nil {
		return err
	}
	_ptr_pMonitorData := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		// XXX: for opaque unmarshaling
		if o.MonitorDataLength > 0 && sizeInfo[0] == 0 {
			sizeInfo[0] = uint64(o.MonitorDataLength)
		}
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array o.MonitorData", sizeInfo[0])
		}
		o.MonitorData = make([]byte, sizeInfo[0])
		for i1 := range o.MonitorData {
			i1 := i1
			if err := w.ReadData(&o.MonitorData[i1]); err != nil {
				return err
			}
		}
		return nil
	})
	_s_pMonitorData := func(ptr interface{}) { o.MonitorData = *ptr.(*[]byte) }
	if err := w.ReadPointer(&o.MonitorData, _s_pMonitorData, _ptr_pMonitorData); err != nil {
		return err
	}
	return nil
}

// PrinterContainer structure represents PRINTER_CONTAINER RPC structure.
type PrinterContainer struct {
	Level       uint32                        `idl:"name:Level" json:"level"`
	PrinterInfo *PrinterContainer_PrinterInfo `idl:"name:PrinterInfo;switch_is:Level" json:"printer_info"`
}

func (o *PrinterContainer) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *PrinterContainer) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.Level); err != nil {
		return err
	}
	_swPrinterInfo := uint32(o.Level)
	if o.PrinterInfo != nil {
		if err := o.PrinterInfo.MarshalUnionNDR(ctx, w, _swPrinterInfo); err != nil {
			return err
		}
	} else {
		if err := (&PrinterContainer_PrinterInfo{}).MarshalUnionNDR(ctx, w, _swPrinterInfo); err != nil {
			return err
		}
	}
	return nil
}
func (o *PrinterContainer) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.Level); err != nil {
		return err
	}
	if o.PrinterInfo == nil {
		o.PrinterInfo = &PrinterContainer_PrinterInfo{}
	}
	_swPrinterInfo := uint32(o.Level)
	if err := o.PrinterInfo.UnmarshalUnionNDR(ctx, w, _swPrinterInfo); err != nil {
		return err
	}
	return nil
}

// PrinterContainer_PrinterInfo structure represents PRINTER_CONTAINER union anonymous member.
type PrinterContainer_PrinterInfo struct {
	// Types that are assignable to Value
	//
	// *PrinterContainer_PrinterInfo_PrinterInfoStress
	// *PrinterContainer_PrinterInfo_PrinterInfo1
	// *PrinterContainer_PrinterInfo_PrinterInfo2
	// *PrinterContainer_PrinterInfo_PrinterInfo3
	// *PrinterContainer_PrinterInfo_PrinterInfo4
	// *PrinterContainer_PrinterInfo_PrinterInfo5
	// *PrinterContainer_PrinterInfo_PrinterInfo6
	// *PrinterContainer_PrinterInfo_PrinterInfo7
	// *PrinterContainer_PrinterInfo_PrinterInfo8
	// *PrinterContainer_PrinterInfo_PrinterInfo9
	Value is_PrinterContainer_PrinterInfo `json:"value"`
}

func (o *PrinterContainer_PrinterInfo) GetValue() any {
	if o == nil {
		return nil
	}
	switch value := (interface{})(o.Value).(type) {
	case *PrinterContainer_PrinterInfo_PrinterInfoStress:
		if value != nil {
			return value.PrinterInfoStress
		}
	case *PrinterContainer_PrinterInfo_PrinterInfo1:
		if value != nil {
			return value.PrinterInfo1
		}
	case *PrinterContainer_PrinterInfo_PrinterInfo2:
		if value != nil {
			return value.PrinterInfo2
		}
	case *PrinterContainer_PrinterInfo_PrinterInfo3:
		if value != nil {
			return value.PrinterInfo3
		}
	case *PrinterContainer_PrinterInfo_PrinterInfo4:
		if value != nil {
			return value.PrinterInfo4
		}
	case *PrinterContainer_PrinterInfo_PrinterInfo5:
		if value != nil {
			return value.PrinterInfo5
		}
	case *PrinterContainer_PrinterInfo_PrinterInfo6:
		if value != nil {
			return value.PrinterInfo6
		}
	case *PrinterContainer_PrinterInfo_PrinterInfo7:
		if value != nil {
			return value.PrinterInfo7
		}
	case *PrinterContainer_PrinterInfo_PrinterInfo8:
		if value != nil {
			return value.PrinterInfo8
		}
	case *PrinterContainer_PrinterInfo_PrinterInfo9:
		if value != nil {
			return value.PrinterInfo9
		}
	}
	return nil
}

type is_PrinterContainer_PrinterInfo interface {
	ndr.Marshaler
	ndr.Unmarshaler
	is_PrinterContainer_PrinterInfo()
}

func (o *PrinterContainer_PrinterInfo) NDRSwitchValue(sw uint32) uint32 {
	if o == nil {
		return uint32(0)
	}
	switch (interface{})(o.Value).(type) {
	case *PrinterContainer_PrinterInfo_PrinterInfoStress:
		return uint32(0)
	case *PrinterContainer_PrinterInfo_PrinterInfo1:
		return uint32(1)
	case *PrinterContainer_PrinterInfo_PrinterInfo2:
		return uint32(2)
	case *PrinterContainer_PrinterInfo_PrinterInfo3:
		return uint32(3)
	case *PrinterContainer_PrinterInfo_PrinterInfo4:
		return uint32(4)
	case *PrinterContainer_PrinterInfo_PrinterInfo5:
		return uint32(5)
	case *PrinterContainer_PrinterInfo_PrinterInfo6:
		return uint32(6)
	case *PrinterContainer_PrinterInfo_PrinterInfo7:
		return uint32(7)
	case *PrinterContainer_PrinterInfo_PrinterInfo8:
		return uint32(8)
	case *PrinterContainer_PrinterInfo_PrinterInfo9:
		return uint32(9)
	}
	return uint32(0)
}

func (o *PrinterContainer_PrinterInfo) MarshalUnionNDR(ctx context.Context, w ndr.Writer, sw uint32) error {
	if err := w.WriteUnionAlign(9); err != nil {
		return err
	}
	if err := w.WriteSwitch(uint32(sw)); err != nil {
		return err
	}
	// ms_union
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	switch sw {
	case uint32(0):
		_o, _ := o.Value.(*PrinterContainer_PrinterInfo_PrinterInfoStress)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PrinterContainer_PrinterInfo_PrinterInfoStress{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint32(1):
		_o, _ := o.Value.(*PrinterContainer_PrinterInfo_PrinterInfo1)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PrinterContainer_PrinterInfo_PrinterInfo1{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint32(2):
		_o, _ := o.Value.(*PrinterContainer_PrinterInfo_PrinterInfo2)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PrinterContainer_PrinterInfo_PrinterInfo2{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint32(3):
		_o, _ := o.Value.(*PrinterContainer_PrinterInfo_PrinterInfo3)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PrinterContainer_PrinterInfo_PrinterInfo3{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint32(4):
		_o, _ := o.Value.(*PrinterContainer_PrinterInfo_PrinterInfo4)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PrinterContainer_PrinterInfo_PrinterInfo4{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint32(5):
		_o, _ := o.Value.(*PrinterContainer_PrinterInfo_PrinterInfo5)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PrinterContainer_PrinterInfo_PrinterInfo5{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint32(6):
		_o, _ := o.Value.(*PrinterContainer_PrinterInfo_PrinterInfo6)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PrinterContainer_PrinterInfo_PrinterInfo6{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint32(7):
		_o, _ := o.Value.(*PrinterContainer_PrinterInfo_PrinterInfo7)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PrinterContainer_PrinterInfo_PrinterInfo7{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint32(8):
		_o, _ := o.Value.(*PrinterContainer_PrinterInfo_PrinterInfo8)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PrinterContainer_PrinterInfo_PrinterInfo8{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint32(9):
		_o, _ := o.Value.(*PrinterContainer_PrinterInfo_PrinterInfo9)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PrinterContainer_PrinterInfo_PrinterInfo9{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	default:
		return fmt.Errorf("unsupported switch case value %v", sw)
	}
	return nil
}

func (o *PrinterContainer_PrinterInfo) UnmarshalUnionNDR(ctx context.Context, w ndr.Reader, sw uint32) error {
	if err := w.ReadUnionAlign(9); err != nil {
		return err
	}
	if err := w.ReadSwitch((*uint32)(&sw)); err != nil {
		return err
	}
	// ms_union
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	switch sw {
	case uint32(0):
		o.Value = &PrinterContainer_PrinterInfo_PrinterInfoStress{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint32(1):
		o.Value = &PrinterContainer_PrinterInfo_PrinterInfo1{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint32(2):
		o.Value = &PrinterContainer_PrinterInfo_PrinterInfo2{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint32(3):
		o.Value = &PrinterContainer_PrinterInfo_PrinterInfo3{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint32(4):
		o.Value = &PrinterContainer_PrinterInfo_PrinterInfo4{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint32(5):
		o.Value = &PrinterContainer_PrinterInfo_PrinterInfo5{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint32(6):
		o.Value = &PrinterContainer_PrinterInfo_PrinterInfo6{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint32(7):
		o.Value = &PrinterContainer_PrinterInfo_PrinterInfo7{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint32(8):
		o.Value = &PrinterContainer_PrinterInfo_PrinterInfo8{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint32(9):
		o.Value = &PrinterContainer_PrinterInfo_PrinterInfo9{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	default:
		return fmt.Errorf("unsupported switch case value %v", sw)
	}
	return nil
}

// PrinterContainer_PrinterInfo_PrinterInfoStress structure represents PrinterContainer_PrinterInfo RPC union arm.
//
// It has following labels: 0
type PrinterContainer_PrinterInfo_PrinterInfoStress struct {
	PrinterInfoStress *PrinterInfoStress `idl:"name:pPrinterInfoStress" json:"printer_info_stress"`
}

func (*PrinterContainer_PrinterInfo_PrinterInfoStress) is_PrinterContainer_PrinterInfo() {}

func (o *PrinterContainer_PrinterInfo_PrinterInfoStress) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.PrinterInfoStress != nil {
		_ptr_pPrinterInfoStress := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.PrinterInfoStress != nil {
				if err := o.PrinterInfoStress.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&PrinterInfoStress{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.PrinterInfoStress, _ptr_pPrinterInfoStress); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *PrinterContainer_PrinterInfo_PrinterInfoStress) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_pPrinterInfoStress := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.PrinterInfoStress == nil {
			o.PrinterInfoStress = &PrinterInfoStress{}
		}
		if err := o.PrinterInfoStress.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_pPrinterInfoStress := func(ptr interface{}) { o.PrinterInfoStress = *ptr.(**PrinterInfoStress) }
	if err := w.ReadPointer(&o.PrinterInfoStress, _s_pPrinterInfoStress, _ptr_pPrinterInfoStress); err != nil {
		return err
	}
	return nil
}

// PrinterContainer_PrinterInfo_PrinterInfo1 structure represents PrinterContainer_PrinterInfo RPC union arm.
//
// It has following labels: 1
type PrinterContainer_PrinterInfo_PrinterInfo1 struct {
	PrinterInfo1 *PrinterInfo1 `idl:"name:pPrinterInfo1" json:"printer_info1"`
}

func (*PrinterContainer_PrinterInfo_PrinterInfo1) is_PrinterContainer_PrinterInfo() {}

func (o *PrinterContainer_PrinterInfo_PrinterInfo1) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.PrinterInfo1 != nil {
		_ptr_pPrinterInfo1 := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.PrinterInfo1 != nil {
				if err := o.PrinterInfo1.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&PrinterInfo1{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.PrinterInfo1, _ptr_pPrinterInfo1); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *PrinterContainer_PrinterInfo_PrinterInfo1) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_pPrinterInfo1 := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.PrinterInfo1 == nil {
			o.PrinterInfo1 = &PrinterInfo1{}
		}
		if err := o.PrinterInfo1.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_pPrinterInfo1 := func(ptr interface{}) { o.PrinterInfo1 = *ptr.(**PrinterInfo1) }
	if err := w.ReadPointer(&o.PrinterInfo1, _s_pPrinterInfo1, _ptr_pPrinterInfo1); err != nil {
		return err
	}
	return nil
}

// PrinterContainer_PrinterInfo_PrinterInfo2 structure represents PrinterContainer_PrinterInfo RPC union arm.
//
// It has following labels: 2
type PrinterContainer_PrinterInfo_PrinterInfo2 struct {
	PrinterInfo2 *PrinterInfo2 `idl:"name:pPrinterInfo2" json:"printer_info2"`
}

func (*PrinterContainer_PrinterInfo_PrinterInfo2) is_PrinterContainer_PrinterInfo() {}

func (o *PrinterContainer_PrinterInfo_PrinterInfo2) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.PrinterInfo2 != nil {
		_ptr_pPrinterInfo2 := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.PrinterInfo2 != nil {
				if err := o.PrinterInfo2.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&PrinterInfo2{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.PrinterInfo2, _ptr_pPrinterInfo2); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *PrinterContainer_PrinterInfo_PrinterInfo2) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_pPrinterInfo2 := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.PrinterInfo2 == nil {
			o.PrinterInfo2 = &PrinterInfo2{}
		}
		if err := o.PrinterInfo2.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_pPrinterInfo2 := func(ptr interface{}) { o.PrinterInfo2 = *ptr.(**PrinterInfo2) }
	if err := w.ReadPointer(&o.PrinterInfo2, _s_pPrinterInfo2, _ptr_pPrinterInfo2); err != nil {
		return err
	}
	return nil
}

// PrinterContainer_PrinterInfo_PrinterInfo3 structure represents PrinterContainer_PrinterInfo RPC union arm.
//
// It has following labels: 3
type PrinterContainer_PrinterInfo_PrinterInfo3 struct {
	PrinterInfo3 *PrinterInfo3 `idl:"name:pPrinterInfo3" json:"printer_info3"`
}

func (*PrinterContainer_PrinterInfo_PrinterInfo3) is_PrinterContainer_PrinterInfo() {}

func (o *PrinterContainer_PrinterInfo_PrinterInfo3) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.PrinterInfo3 != nil {
		_ptr_pPrinterInfo3 := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.PrinterInfo3 != nil {
				if err := o.PrinterInfo3.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&PrinterInfo3{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.PrinterInfo3, _ptr_pPrinterInfo3); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *PrinterContainer_PrinterInfo_PrinterInfo3) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_pPrinterInfo3 := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.PrinterInfo3 == nil {
			o.PrinterInfo3 = &PrinterInfo3{}
		}
		if err := o.PrinterInfo3.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_pPrinterInfo3 := func(ptr interface{}) { o.PrinterInfo3 = *ptr.(**PrinterInfo3) }
	if err := w.ReadPointer(&o.PrinterInfo3, _s_pPrinterInfo3, _ptr_pPrinterInfo3); err != nil {
		return err
	}
	return nil
}

// PrinterContainer_PrinterInfo_PrinterInfo4 structure represents PrinterContainer_PrinterInfo RPC union arm.
//
// It has following labels: 4
type PrinterContainer_PrinterInfo_PrinterInfo4 struct {
	PrinterInfo4 *PrinterInfo4 `idl:"name:pPrinterInfo4" json:"printer_info4"`
}

func (*PrinterContainer_PrinterInfo_PrinterInfo4) is_PrinterContainer_PrinterInfo() {}

func (o *PrinterContainer_PrinterInfo_PrinterInfo4) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.PrinterInfo4 != nil {
		_ptr_pPrinterInfo4 := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.PrinterInfo4 != nil {
				if err := o.PrinterInfo4.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&PrinterInfo4{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.PrinterInfo4, _ptr_pPrinterInfo4); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *PrinterContainer_PrinterInfo_PrinterInfo4) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_pPrinterInfo4 := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.PrinterInfo4 == nil {
			o.PrinterInfo4 = &PrinterInfo4{}
		}
		if err := o.PrinterInfo4.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_pPrinterInfo4 := func(ptr interface{}) { o.PrinterInfo4 = *ptr.(**PrinterInfo4) }
	if err := w.ReadPointer(&o.PrinterInfo4, _s_pPrinterInfo4, _ptr_pPrinterInfo4); err != nil {
		return err
	}
	return nil
}

// PrinterContainer_PrinterInfo_PrinterInfo5 structure represents PrinterContainer_PrinterInfo RPC union arm.
//
// It has following labels: 5
type PrinterContainer_PrinterInfo_PrinterInfo5 struct {
	PrinterInfo5 *PrinterInfo5 `idl:"name:pPrinterInfo5" json:"printer_info5"`
}

func (*PrinterContainer_PrinterInfo_PrinterInfo5) is_PrinterContainer_PrinterInfo() {}

func (o *PrinterContainer_PrinterInfo_PrinterInfo5) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.PrinterInfo5 != nil {
		_ptr_pPrinterInfo5 := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.PrinterInfo5 != nil {
				if err := o.PrinterInfo5.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&PrinterInfo5{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.PrinterInfo5, _ptr_pPrinterInfo5); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *PrinterContainer_PrinterInfo_PrinterInfo5) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_pPrinterInfo5 := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.PrinterInfo5 == nil {
			o.PrinterInfo5 = &PrinterInfo5{}
		}
		if err := o.PrinterInfo5.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_pPrinterInfo5 := func(ptr interface{}) { o.PrinterInfo5 = *ptr.(**PrinterInfo5) }
	if err := w.ReadPointer(&o.PrinterInfo5, _s_pPrinterInfo5, _ptr_pPrinterInfo5); err != nil {
		return err
	}
	return nil
}

// PrinterContainer_PrinterInfo_PrinterInfo6 structure represents PrinterContainer_PrinterInfo RPC union arm.
//
// It has following labels: 6
type PrinterContainer_PrinterInfo_PrinterInfo6 struct {
	PrinterInfo6 *PrinterInfo6 `idl:"name:pPrinterInfo6" json:"printer_info6"`
}

func (*PrinterContainer_PrinterInfo_PrinterInfo6) is_PrinterContainer_PrinterInfo() {}

func (o *PrinterContainer_PrinterInfo_PrinterInfo6) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.PrinterInfo6 != nil {
		_ptr_pPrinterInfo6 := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.PrinterInfo6 != nil {
				if err := o.PrinterInfo6.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&PrinterInfo6{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.PrinterInfo6, _ptr_pPrinterInfo6); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *PrinterContainer_PrinterInfo_PrinterInfo6) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_pPrinterInfo6 := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.PrinterInfo6 == nil {
			o.PrinterInfo6 = &PrinterInfo6{}
		}
		if err := o.PrinterInfo6.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_pPrinterInfo6 := func(ptr interface{}) { o.PrinterInfo6 = *ptr.(**PrinterInfo6) }
	if err := w.ReadPointer(&o.PrinterInfo6, _s_pPrinterInfo6, _ptr_pPrinterInfo6); err != nil {
		return err
	}
	return nil
}

// PrinterContainer_PrinterInfo_PrinterInfo7 structure represents PrinterContainer_PrinterInfo RPC union arm.
//
// It has following labels: 7
type PrinterContainer_PrinterInfo_PrinterInfo7 struct {
	PrinterInfo7 *PrinterInfo7 `idl:"name:pPrinterInfo7" json:"printer_info7"`
}

func (*PrinterContainer_PrinterInfo_PrinterInfo7) is_PrinterContainer_PrinterInfo() {}

func (o *PrinterContainer_PrinterInfo_PrinterInfo7) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.PrinterInfo7 != nil {
		_ptr_pPrinterInfo7 := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.PrinterInfo7 != nil {
				if err := o.PrinterInfo7.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&PrinterInfo7{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.PrinterInfo7, _ptr_pPrinterInfo7); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *PrinterContainer_PrinterInfo_PrinterInfo7) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_pPrinterInfo7 := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.PrinterInfo7 == nil {
			o.PrinterInfo7 = &PrinterInfo7{}
		}
		if err := o.PrinterInfo7.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_pPrinterInfo7 := func(ptr interface{}) { o.PrinterInfo7 = *ptr.(**PrinterInfo7) }
	if err := w.ReadPointer(&o.PrinterInfo7, _s_pPrinterInfo7, _ptr_pPrinterInfo7); err != nil {
		return err
	}
	return nil
}

// PrinterContainer_PrinterInfo_PrinterInfo8 structure represents PrinterContainer_PrinterInfo RPC union arm.
//
// It has following labels: 8
type PrinterContainer_PrinterInfo_PrinterInfo8 struct {
	PrinterInfo8 *PrinterInfo8 `idl:"name:pPrinterInfo8" json:"printer_info8"`
}

func (*PrinterContainer_PrinterInfo_PrinterInfo8) is_PrinterContainer_PrinterInfo() {}

func (o *PrinterContainer_PrinterInfo_PrinterInfo8) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.PrinterInfo8 != nil {
		_ptr_pPrinterInfo8 := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.PrinterInfo8 != nil {
				if err := o.PrinterInfo8.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&PrinterInfo8{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.PrinterInfo8, _ptr_pPrinterInfo8); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *PrinterContainer_PrinterInfo_PrinterInfo8) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_pPrinterInfo8 := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.PrinterInfo8 == nil {
			o.PrinterInfo8 = &PrinterInfo8{}
		}
		if err := o.PrinterInfo8.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_pPrinterInfo8 := func(ptr interface{}) { o.PrinterInfo8 = *ptr.(**PrinterInfo8) }
	if err := w.ReadPointer(&o.PrinterInfo8, _s_pPrinterInfo8, _ptr_pPrinterInfo8); err != nil {
		return err
	}
	return nil
}

// PrinterContainer_PrinterInfo_PrinterInfo9 structure represents PrinterContainer_PrinterInfo RPC union arm.
//
// It has following labels: 9
type PrinterContainer_PrinterInfo_PrinterInfo9 struct {
	PrinterInfo9 *PrinterInfo9 `idl:"name:pPrinterInfo9" json:"printer_info9"`
}

func (*PrinterContainer_PrinterInfo_PrinterInfo9) is_PrinterContainer_PrinterInfo() {}

func (o *PrinterContainer_PrinterInfo_PrinterInfo9) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.PrinterInfo9 != nil {
		_ptr_pPrinterInfo9 := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.PrinterInfo9 != nil {
				if err := o.PrinterInfo9.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&PrinterInfo9{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.PrinterInfo9, _ptr_pPrinterInfo9); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *PrinterContainer_PrinterInfo_PrinterInfo9) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_pPrinterInfo9 := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.PrinterInfo9 == nil {
			o.PrinterInfo9 = &PrinterInfo9{}
		}
		if err := o.PrinterInfo9.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_pPrinterInfo9 := func(ptr interface{}) { o.PrinterInfo9 = *ptr.(**PrinterInfo9) }
	if err := w.ReadPointer(&o.PrinterInfo9, _s_pPrinterInfo9, _ptr_pPrinterInfo9); err != nil {
		return err
	}
	return nil
}

// BinaryContainer structure represents RPC_BINARY_CONTAINER RPC structure.
type BinaryContainer struct {
	BufferLength uint32 `idl:"name:cbBuf" json:"buffer_length"`
	String       []byte `idl:"name:pszString;size_is:(cbBuf);pointer:unique" json:"string"`
}

func (o *BinaryContainer) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if o.String != nil && o.BufferLength == 0 {
		o.BufferLength = uint32(len(o.String))
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *BinaryContainer) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.BufferLength); err != nil {
		return err
	}
	if o.String != nil || o.BufferLength > 0 {
		_ptr_pszString := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			dimSize1 := uint64(o.BufferLength)
			if err := w.WriteSize(dimSize1); err != nil {
				return err
			}
			sizeInfo := []uint64{
				dimSize1,
			}
			for i1 := range o.String {
				i1 := i1
				if uint64(i1) >= sizeInfo[0] {
					break
				}
				if err := w.WriteData(o.String[i1]); err != nil {
					return err
				}
			}
			for i1 := len(o.String); uint64(i1) < sizeInfo[0]; i1++ {
				if err := w.WriteData(uint8(0)); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.String, _ptr_pszString); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *BinaryContainer) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.BufferLength); err != nil {
		return err
	}
	_ptr_pszString := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		// XXX: for opaque unmarshaling
		if o.BufferLength > 0 && sizeInfo[0] == 0 {
			sizeInfo[0] = uint64(o.BufferLength)
		}
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array o.String", sizeInfo[0])
		}
		o.String = make([]byte, sizeInfo[0])
		for i1 := range o.String {
			i1 := i1
			if err := w.ReadData(&o.String[i1]); err != nil {
				return err
			}
		}
		return nil
	})
	_s_pszString := func(ptr interface{}) { o.String = *ptr.(*[]byte) }
	if err := w.ReadPointer(&o.String, _s_pszString, _ptr_pszString); err != nil {
		return err
	}
	return nil
}

// BIDIData structure represents RPC_BIDI_DATA RPC structure.
type BIDIData struct {
	BIDIType uint32          `idl:"name:dwBidiType" json:"bidi_type"`
	Union    *BIDIData_Union `idl:"name:u;switch_is:dwBidiType" json:"union"`
}

func (o *BIDIData) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *BIDIData) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.BIDIType); err != nil {
		return err
	}
	_swUnion := uint32(o.BIDIType)
	if o.Union != nil {
		if err := o.Union.MarshalUnionNDR(ctx, w, _swUnion); err != nil {
			return err
		}
	} else {
		if err := (&BIDIData_Union{}).MarshalUnionNDR(ctx, w, _swUnion); err != nil {
			return err
		}
	}
	return nil
}
func (o *BIDIData) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.BIDIType); err != nil {
		return err
	}
	if o.Union == nil {
		o.Union = &BIDIData_Union{}
	}
	_swUnion := uint32(o.BIDIType)
	if err := o.Union.UnmarshalUnionNDR(ctx, w, _swUnion); err != nil {
		return err
	}
	return nil
}

// BIDIData_Union structure represents RPC_BIDI_DATA union anonymous member.
type BIDIData_Union struct {
	// Types that are assignable to Value
	//
	// *BIDIData_Union_BoolData
	// *BIDIData_Union_IntData
	// *BIDIData_Union_StringData
	// *BIDIData_Union_FloatData
	// *BIDIData_Union_BinaryData
	Value is_BIDIData_Union `json:"value"`
}

func (o *BIDIData_Union) GetValue() any {
	if o == nil {
		return nil
	}
	switch value := (interface{})(o.Value).(type) {
	case *BIDIData_Union_BoolData:
		if value != nil {
			return value.BoolData
		}
	case *BIDIData_Union_IntData:
		if value != nil {
			return value.IntData
		}
	case *BIDIData_Union_StringData:
		if value != nil {
			return value.StringData
		}
	case *BIDIData_Union_FloatData:
		if value != nil {
			return value.FloatData
		}
	case *BIDIData_Union_BinaryData:
		if value != nil {
			return value.BinaryData
		}
	}
	return nil
}

type is_BIDIData_Union interface {
	ndr.Marshaler
	ndr.Unmarshaler
	is_BIDIData_Union()
}

func (o *BIDIData_Union) NDRSwitchValue(sw uint32) uint32 {
	if o == nil {
		return uint32(0)
	}
	switch (interface{})(o.Value).(type) {
	case *BIDIData_Union_BoolData:
		switch sw {
		case uint32(0),
			uint32(3):
			return sw
		}
		return uint32(0)
	case *BIDIData_Union_IntData:
		return uint32(1)
	case *BIDIData_Union_StringData:
		switch sw {
		case uint32(4),
			uint32(5),
			uint32(6):
			return sw
		}
		return uint32(4)
	case *BIDIData_Union_FloatData:
		return uint32(2)
	case *BIDIData_Union_BinaryData:
		return uint32(7)
	}
	return uint32(0)
}

func (o *BIDIData_Union) MarshalUnionNDR(ctx context.Context, w ndr.Writer, sw uint32) error {
	if err := w.WriteUnionAlign(9); err != nil {
		return err
	}
	if err := w.WriteSwitch(uint32(sw)); err != nil {
		return err
	}
	// ms_union
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	switch sw {
	case uint32(0),
		uint32(3):
		_o, _ := o.Value.(*BIDIData_Union_BoolData)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&BIDIData_Union_BoolData{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint32(1):
		_o, _ := o.Value.(*BIDIData_Union_IntData)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&BIDIData_Union_IntData{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint32(4),
		uint32(5),
		uint32(6):
		_o, _ := o.Value.(*BIDIData_Union_StringData)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&BIDIData_Union_StringData{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint32(2):
		_o, _ := o.Value.(*BIDIData_Union_FloatData)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&BIDIData_Union_FloatData{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint32(7):
		_o, _ := o.Value.(*BIDIData_Union_BinaryData)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&BIDIData_Union_BinaryData{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	default:
		return fmt.Errorf("unsupported switch case value %v", sw)
	}
	return nil
}

func (o *BIDIData_Union) UnmarshalUnionNDR(ctx context.Context, w ndr.Reader, sw uint32) error {
	if err := w.ReadUnionAlign(9); err != nil {
		return err
	}
	if err := w.ReadSwitch((*uint32)(&sw)); err != nil {
		return err
	}
	// ms_union
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	switch sw {
	case uint32(0),
		uint32(3):
		o.Value = &BIDIData_Union_BoolData{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint32(1):
		o.Value = &BIDIData_Union_IntData{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint32(4),
		uint32(5),
		uint32(6):
		o.Value = &BIDIData_Union_StringData{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint32(2):
		o.Value = &BIDIData_Union_FloatData{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint32(7):
		o.Value = &BIDIData_Union_BinaryData{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	default:
		return fmt.Errorf("unsupported switch case value %v", sw)
	}
	return nil
}

// BIDIData_Union_BoolData structure represents BIDIData_Union RPC union arm.
//
// It has following labels: 0, 3
type BIDIData_Union_BoolData struct {
	BoolData int32 `idl:"name:boolData" json:"bool_data"`
}

func (*BIDIData_Union_BoolData) is_BIDIData_Union() {}

func (o *BIDIData_Union_BoolData) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := w.WriteData(o.BoolData); err != nil {
		return err
	}
	return nil
}
func (o *BIDIData_Union_BoolData) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadData(&o.BoolData); err != nil {
		return err
	}
	return nil
}

// BIDIData_Union_IntData structure represents BIDIData_Union RPC union arm.
//
// It has following labels: 1
type BIDIData_Union_IntData struct {
	IntData int32 `idl:"name:intData" json:"int_data"`
}

func (*BIDIData_Union_IntData) is_BIDIData_Union() {}

func (o *BIDIData_Union_IntData) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := w.WriteData(o.IntData); err != nil {
		return err
	}
	return nil
}
func (o *BIDIData_Union_IntData) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadData(&o.IntData); err != nil {
		return err
	}
	return nil
}

// BIDIData_Union_StringData structure represents BIDIData_Union RPC union arm.
//
// It has following labels: 4, 5, 6
type BIDIData_Union_StringData struct {
	StringData string `idl:"name:stringData;string;pointer:unique" json:"string_data"`
}

func (*BIDIData_Union_StringData) is_BIDIData_Union() {}

func (o *BIDIData_Union_StringData) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.StringData != "" {
		_ptr_stringData := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.StringData); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.StringData, _ptr_stringData); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *BIDIData_Union_StringData) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_stringData := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.StringData); err != nil {
			return err
		}
		return nil
	})
	_s_stringData := func(ptr interface{}) { o.StringData = *ptr.(*string) }
	if err := w.ReadPointer(&o.StringData, _s_stringData, _ptr_stringData); err != nil {
		return err
	}
	return nil
}

// BIDIData_Union_FloatData structure represents BIDIData_Union RPC union arm.
//
// It has following labels: 2
type BIDIData_Union_FloatData struct {
	FloatData float32 `idl:"name:floatData" json:"float_data"`
}

func (*BIDIData_Union_FloatData) is_BIDIData_Union() {}

func (o *BIDIData_Union_FloatData) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := w.WriteData(o.FloatData); err != nil {
		return err
	}
	return nil
}
func (o *BIDIData_Union_FloatData) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadData(&o.FloatData); err != nil {
		return err
	}
	return nil
}

// BIDIData_Union_BinaryData structure represents BIDIData_Union RPC union arm.
//
// It has following labels: 7
type BIDIData_Union_BinaryData struct {
	BinaryData *BinaryContainer `idl:"name:binaryData" json:"binary_data"`
}

func (*BIDIData_Union_BinaryData) is_BIDIData_Union() {}

func (o *BIDIData_Union_BinaryData) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.BinaryData != nil {
		if err := o.BinaryData.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&BinaryContainer{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	return nil
}
func (o *BIDIData_Union_BinaryData) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if o.BinaryData == nil {
		o.BinaryData = &BinaryContainer{}
	}
	if err := o.BinaryData.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	return nil
}

// BIDIRequestData structure represents RPC_BIDI_REQUEST_DATA RPC structure.
type BIDIRequestData struct {
	RequestNumber uint32    `idl:"name:dwReqNumber" json:"request_number"`
	Schema        string    `idl:"name:pSchema;string;pointer:unique" json:"schema"`
	Data          *BIDIData `idl:"name:data" json:"data"`
}

func (o *BIDIRequestData) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *BIDIRequestData) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.RequestNumber); err != nil {
		return err
	}
	if o.Schema != "" {
		_ptr_pSchema := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.Schema); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.Schema, _ptr_pSchema); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.Data != nil {
		if err := o.Data.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&BIDIData{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	return nil
}
func (o *BIDIRequestData) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.RequestNumber); err != nil {
		return err
	}
	_ptr_pSchema := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.Schema); err != nil {
			return err
		}
		return nil
	})
	_s_pSchema := func(ptr interface{}) { o.Schema = *ptr.(*string) }
	if err := w.ReadPointer(&o.Schema, _s_pSchema, _ptr_pSchema); err != nil {
		return err
	}
	if o.Data == nil {
		o.Data = &BIDIData{}
	}
	if err := o.Data.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	return nil
}

// BIDIResponseData structure represents RPC_BIDI_RESPONSE_DATA RPC structure.
type BIDIResponseData struct {
	Result        uint32    `idl:"name:dwResult" json:"result"`
	RequestNumber uint32    `idl:"name:dwReqNumber" json:"request_number"`
	Schema        string    `idl:"name:pSchema;string;pointer:unique" json:"schema"`
	Data          *BIDIData `idl:"name:data" json:"data"`
}

func (o *BIDIResponseData) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *BIDIResponseData) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.Result); err != nil {
		return err
	}
	if err := w.WriteData(o.RequestNumber); err != nil {
		return err
	}
	if o.Schema != "" {
		_ptr_pSchema := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.Schema); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.Schema, _ptr_pSchema); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.Data != nil {
		if err := o.Data.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&BIDIData{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	return nil
}
func (o *BIDIResponseData) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.Result); err != nil {
		return err
	}
	if err := w.ReadData(&o.RequestNumber); err != nil {
		return err
	}
	_ptr_pSchema := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.Schema); err != nil {
			return err
		}
		return nil
	})
	_s_pSchema := func(ptr interface{}) { o.Schema = *ptr.(*string) }
	if err := w.ReadPointer(&o.Schema, _s_pSchema, _ptr_pSchema); err != nil {
		return err
	}
	if o.Data == nil {
		o.Data = &BIDIData{}
	}
	if err := o.Data.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	return nil
}

// BIDIRequestContainer structure represents RPC_BIDI_REQUEST_CONTAINER RPC structure.
type BIDIRequestContainer struct {
	Version uint32             `idl:"name:Version" json:"version"`
	Flags   uint32             `idl:"name:Flags" json:"flags"`
	Count   uint32             `idl:"name:Count" json:"count"`
	Data    []*BIDIRequestData `idl:"name:aData;size_is:(Count);pointer:unique" json:"data"`
}

func (o *BIDIRequestContainer) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if o.Data != nil && o.Count == 0 {
		o.Count = uint32(len(o.Data))
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *BIDIRequestContainer) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.Version); err != nil {
		return err
	}
	if err := w.WriteData(o.Flags); err != nil {
		return err
	}
	if err := w.WriteData(o.Count); err != nil {
		return err
	}
	if o.Data != nil || o.Count > 0 {
		_ptr_aData := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			dimSize1 := uint64(o.Count)
			if err := w.WriteSize(dimSize1); err != nil {
				return err
			}
			sizeInfo := []uint64{
				dimSize1,
			}
			for i1 := range o.Data {
				i1 := i1
				if uint64(i1) >= sizeInfo[0] {
					break
				}
				if o.Data[i1] != nil {
					if err := o.Data[i1].MarshalNDR(ctx, w); err != nil {
						return err
					}
				} else {
					if err := (&BIDIRequestData{}).MarshalNDR(ctx, w); err != nil {
						return err
					}
				}
			}
			for i1 := len(o.Data); uint64(i1) < sizeInfo[0]; i1++ {
				if err := (&BIDIRequestData{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.Data, _ptr_aData); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *BIDIRequestContainer) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.Version); err != nil {
		return err
	}
	if err := w.ReadData(&o.Flags); err != nil {
		return err
	}
	if err := w.ReadData(&o.Count); err != nil {
		return err
	}
	_ptr_aData := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		// XXX: for opaque unmarshaling
		if o.Count > 0 && sizeInfo[0] == 0 {
			sizeInfo[0] = uint64(o.Count)
		}
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array o.Data", sizeInfo[0])
		}
		o.Data = make([]*BIDIRequestData, sizeInfo[0])
		for i1 := range o.Data {
			i1 := i1
			if o.Data[i1] == nil {
				o.Data[i1] = &BIDIRequestData{}
			}
			if err := o.Data[i1].UnmarshalNDR(ctx, w); err != nil {
				return err
			}
		}
		return nil
	})
	_s_aData := func(ptr interface{}) { o.Data = *ptr.(*[]*BIDIRequestData) }
	if err := w.ReadPointer(&o.Data, _s_aData, _ptr_aData); err != nil {
		return err
	}
	return nil
}

// BIDIResponseContainer structure represents RPC_BIDI_RESPONSE_CONTAINER RPC structure.
type BIDIResponseContainer struct {
	Version uint32              `idl:"name:Version" json:"version"`
	Flags   uint32              `idl:"name:Flags" json:"flags"`
	Count   uint32              `idl:"name:Count" json:"count"`
	Data    []*BIDIResponseData `idl:"name:aData;size_is:(Count);pointer:unique" json:"data"`
}

func (o *BIDIResponseContainer) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if o.Data != nil && o.Count == 0 {
		o.Count = uint32(len(o.Data))
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *BIDIResponseContainer) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.Version); err != nil {
		return err
	}
	if err := w.WriteData(o.Flags); err != nil {
		return err
	}
	if err := w.WriteData(o.Count); err != nil {
		return err
	}
	if o.Data != nil || o.Count > 0 {
		_ptr_aData := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			dimSize1 := uint64(o.Count)
			if err := w.WriteSize(dimSize1); err != nil {
				return err
			}
			sizeInfo := []uint64{
				dimSize1,
			}
			for i1 := range o.Data {
				i1 := i1
				if uint64(i1) >= sizeInfo[0] {
					break
				}
				if o.Data[i1] != nil {
					if err := o.Data[i1].MarshalNDR(ctx, w); err != nil {
						return err
					}
				} else {
					if err := (&BIDIResponseData{}).MarshalNDR(ctx, w); err != nil {
						return err
					}
				}
			}
			for i1 := len(o.Data); uint64(i1) < sizeInfo[0]; i1++ {
				if err := (&BIDIResponseData{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.Data, _ptr_aData); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *BIDIResponseContainer) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.Version); err != nil {
		return err
	}
	if err := w.ReadData(&o.Flags); err != nil {
		return err
	}
	if err := w.ReadData(&o.Count); err != nil {
		return err
	}
	_ptr_aData := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		// XXX: for opaque unmarshaling
		if o.Count > 0 && sizeInfo[0] == 0 {
			sizeInfo[0] = uint64(o.Count)
		}
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array o.Data", sizeInfo[0])
		}
		o.Data = make([]*BIDIResponseData, sizeInfo[0])
		for i1 := range o.Data {
			i1 := i1
			if o.Data[i1] == nil {
				o.Data[i1] = &BIDIResponseData{}
			}
			if err := o.Data[i1].UnmarshalNDR(ctx, w); err != nil {
				return err
			}
		}
		return nil
	})
	_s_aData := func(ptr interface{}) { o.Data = *ptr.(*[]*BIDIResponseData) }
	if err := w.ReadPointer(&o.Data, _s_aData, _ptr_aData); err != nil {
		return err
	}
	return nil
}

// SecurityContainer structure represents SECURITY_CONTAINER RPC structure.
type SecurityContainer struct {
	BufferLength uint32 `idl:"name:cbBuf" json:"buffer_length"`
	Security     []byte `idl:"name:pSecurity;size_is:(cbBuf);pointer:unique" json:"security"`
}

func (o *SecurityContainer) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if o.Security != nil && o.BufferLength == 0 {
		o.BufferLength = uint32(len(o.Security))
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *SecurityContainer) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.BufferLength); err != nil {
		return err
	}
	if o.Security != nil || o.BufferLength > 0 {
		_ptr_pSecurity := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			dimSize1 := uint64(o.BufferLength)
			if err := w.WriteSize(dimSize1); err != nil {
				return err
			}
			sizeInfo := []uint64{
				dimSize1,
			}
			for i1 := range o.Security {
				i1 := i1
				if uint64(i1) >= sizeInfo[0] {
					break
				}
				if err := w.WriteData(o.Security[i1]); err != nil {
					return err
				}
			}
			for i1 := len(o.Security); uint64(i1) < sizeInfo[0]; i1++ {
				if err := w.WriteData(uint8(0)); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.Security, _ptr_pSecurity); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *SecurityContainer) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.BufferLength); err != nil {
		return err
	}
	_ptr_pSecurity := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		// XXX: for opaque unmarshaling
		if o.BufferLength > 0 && sizeInfo[0] == 0 {
			sizeInfo[0] = uint64(o.BufferLength)
		}
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array o.Security", sizeInfo[0])
		}
		o.Security = make([]byte, sizeInfo[0])
		for i1 := range o.Security {
			i1 := i1
			if err := w.ReadData(&o.Security[i1]); err != nil {
				return err
			}
		}
		return nil
	})
	_s_pSecurity := func(ptr interface{}) { o.Security = *ptr.(*[]byte) }
	if err := w.ReadPointer(&o.Security, _s_pSecurity, _ptr_pSecurity); err != nil {
		return err
	}
	return nil
}

// ClientContainer structure represents SPLCLIENT_CONTAINER RPC structure.
type ClientContainer struct {
	Level      uint32                      `idl:"name:Level" json:"level"`
	ClientInfo *ClientContainer_ClientInfo `idl:"name:ClientInfo;switch_is:Level" json:"client_info"`
}

func (o *ClientContainer) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *ClientContainer) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.Level); err != nil {
		return err
	}
	_swClientInfo := uint32(o.Level)
	if o.ClientInfo != nil {
		if err := o.ClientInfo.MarshalUnionNDR(ctx, w, _swClientInfo); err != nil {
			return err
		}
	} else {
		if err := (&ClientContainer_ClientInfo{}).MarshalUnionNDR(ctx, w, _swClientInfo); err != nil {
			return err
		}
	}
	return nil
}
func (o *ClientContainer) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.Level); err != nil {
		return err
	}
	if o.ClientInfo == nil {
		o.ClientInfo = &ClientContainer_ClientInfo{}
	}
	_swClientInfo := uint32(o.Level)
	if err := o.ClientInfo.UnmarshalUnionNDR(ctx, w, _swClientInfo); err != nil {
		return err
	}
	return nil
}

// ClientContainer_ClientInfo structure represents SPLCLIENT_CONTAINER union anonymous member.
type ClientContainer_ClientInfo struct {
	// Types that are assignable to Value
	//
	// *ClientContainer_ClientInfo_ClientInfo1
	// *ClientContainer_ClientInfo_NotUsed
	// *ClientContainer_ClientInfo_ClientInfo3
	Value is_ClientContainer_ClientInfo `json:"value"`
}

func (o *ClientContainer_ClientInfo) GetValue() any {
	if o == nil {
		return nil
	}
	switch value := (interface{})(o.Value).(type) {
	case *ClientContainer_ClientInfo_ClientInfo1:
		if value != nil {
			return value.ClientInfo1
		}
	case *ClientContainer_ClientInfo_NotUsed:
		if value != nil {
			return value.NotUsed
		}
	case *ClientContainer_ClientInfo_ClientInfo3:
		if value != nil {
			return value.ClientInfo3
		}
	}
	return nil
}

type is_ClientContainer_ClientInfo interface {
	ndr.Marshaler
	ndr.Unmarshaler
	is_ClientContainer_ClientInfo()
}

func (o *ClientContainer_ClientInfo) NDRSwitchValue(sw uint32) uint32 {
	if o == nil {
		return uint32(0)
	}
	switch (interface{})(o.Value).(type) {
	case *ClientContainer_ClientInfo_ClientInfo1:
		return uint32(1)
	case *ClientContainer_ClientInfo_NotUsed:
		return uint32(2)
	case *ClientContainer_ClientInfo_ClientInfo3:
		return uint32(3)
	}
	return uint32(0)
}

func (o *ClientContainer_ClientInfo) MarshalUnionNDR(ctx context.Context, w ndr.Writer, sw uint32) error {
	if err := w.WriteUnionAlign(9); err != nil {
		return err
	}
	if err := w.WriteSwitch(uint32(sw)); err != nil {
		return err
	}
	// ms_union
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	switch sw {
	case uint32(1):
		_o, _ := o.Value.(*ClientContainer_ClientInfo_ClientInfo1)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&ClientContainer_ClientInfo_ClientInfo1{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint32(2):
		_o, _ := o.Value.(*ClientContainer_ClientInfo_NotUsed)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&ClientContainer_ClientInfo_NotUsed{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint32(3):
		_o, _ := o.Value.(*ClientContainer_ClientInfo_ClientInfo3)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&ClientContainer_ClientInfo_ClientInfo3{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	default:
		return fmt.Errorf("unsupported switch case value %v", sw)
	}
	return nil
}

func (o *ClientContainer_ClientInfo) UnmarshalUnionNDR(ctx context.Context, w ndr.Reader, sw uint32) error {
	if err := w.ReadUnionAlign(9); err != nil {
		return err
	}
	if err := w.ReadSwitch((*uint32)(&sw)); err != nil {
		return err
	}
	// ms_union
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	switch sw {
	case uint32(1):
		o.Value = &ClientContainer_ClientInfo_ClientInfo1{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint32(2):
		o.Value = &ClientContainer_ClientInfo_NotUsed{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint32(3):
		o.Value = &ClientContainer_ClientInfo_ClientInfo3{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	default:
		return fmt.Errorf("unsupported switch case value %v", sw)
	}
	return nil
}

// ClientContainer_ClientInfo_ClientInfo1 structure represents ClientContainer_ClientInfo RPC union arm.
//
// It has following labels: 1
type ClientContainer_ClientInfo_ClientInfo1 struct {
	ClientInfo1 *ClientInfo1 `idl:"name:pClientInfo1" json:"client_info1"`
}

func (*ClientContainer_ClientInfo_ClientInfo1) is_ClientContainer_ClientInfo() {}

func (o *ClientContainer_ClientInfo_ClientInfo1) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.ClientInfo1 != nil {
		_ptr_pClientInfo1 := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.ClientInfo1 != nil {
				if err := o.ClientInfo1.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&ClientInfo1{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.ClientInfo1, _ptr_pClientInfo1); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *ClientContainer_ClientInfo_ClientInfo1) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_pClientInfo1 := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.ClientInfo1 == nil {
			o.ClientInfo1 = &ClientInfo1{}
		}
		if err := o.ClientInfo1.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_pClientInfo1 := func(ptr interface{}) { o.ClientInfo1 = *ptr.(**ClientInfo1) }
	if err := w.ReadPointer(&o.ClientInfo1, _s_pClientInfo1, _ptr_pClientInfo1); err != nil {
		return err
	}
	return nil
}

// ClientContainer_ClientInfo_NotUsed structure represents ClientContainer_ClientInfo RPC union arm.
//
// It has following labels: 2
type ClientContainer_ClientInfo_NotUsed struct {
	NotUsed *ClientInfo2 `idl:"name:pNotUsed" json:"not_used"`
}

func (*ClientContainer_ClientInfo_NotUsed) is_ClientContainer_ClientInfo() {}

func (o *ClientContainer_ClientInfo_NotUsed) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.NotUsed != nil {
		_ptr_pNotUsed := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.NotUsed != nil {
				if err := o.NotUsed.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&ClientInfo2{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.NotUsed, _ptr_pNotUsed); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *ClientContainer_ClientInfo_NotUsed) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_pNotUsed := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.NotUsed == nil {
			o.NotUsed = &ClientInfo2{}
		}
		if err := o.NotUsed.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_pNotUsed := func(ptr interface{}) { o.NotUsed = *ptr.(**ClientInfo2) }
	if err := w.ReadPointer(&o.NotUsed, _s_pNotUsed, _ptr_pNotUsed); err != nil {
		return err
	}
	return nil
}

// ClientContainer_ClientInfo_ClientInfo3 structure represents ClientContainer_ClientInfo RPC union arm.
//
// It has following labels: 3
type ClientContainer_ClientInfo_ClientInfo3 struct {
	ClientInfo3 *ClientInfo3 `idl:"name:pClientInfo3" json:"client_info3"`
}

func (*ClientContainer_ClientInfo_ClientInfo3) is_ClientContainer_ClientInfo() {}

func (o *ClientContainer_ClientInfo_ClientInfo3) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.ClientInfo3 != nil {
		_ptr_pClientInfo3 := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.ClientInfo3 != nil {
				if err := o.ClientInfo3.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&ClientInfo3{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.ClientInfo3, _ptr_pClientInfo3); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *ClientContainer_ClientInfo_ClientInfo3) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_pClientInfo3 := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.ClientInfo3 == nil {
			o.ClientInfo3 = &ClientInfo3{}
		}
		if err := o.ClientInfo3.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_pClientInfo3 := func(ptr interface{}) { o.ClientInfo3 = *ptr.(**ClientInfo3) }
	if err := w.ReadPointer(&o.ClientInfo3, _s_pClientInfo3, _ptr_pClientInfo3); err != nil {
		return err
	}
	return nil
}

// StringContainer structure represents STRING_CONTAINER RPC structure.
type StringContainer struct {
	BufferLength uint32 `idl:"name:cbBuf" json:"buffer_length"`
	String       string `idl:"name:pszString;size_is:((cbBuf/2));pointer:unique" json:"string"`
}

func (o *StringContainer) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if o.String != "" && o.BufferLength == 0 {
		o.BufferLength = uint32((ndr.UTF16Len(o.String) * 2))
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *StringContainer) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.BufferLength); err != nil {
		return err
	}
	if o.String != "" || (o.BufferLength/2) > 0 {
		_ptr_pszString := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			dimSize1 := uint64((o.BufferLength / 2))
			if err := w.WriteSize(dimSize1); err != nil {
				return err
			}
			sizeInfo := []uint64{
				dimSize1,
			}
			_String_buf := utf16.Encode([]rune(o.String))
			if uint64(len(_String_buf)) > sizeInfo[0] {
				_String_buf = _String_buf[:sizeInfo[0]]
			}
			for i1 := range _String_buf {
				i1 := i1
				if uint64(i1) >= sizeInfo[0] {
					break
				}
				if err := w.WriteData(_String_buf[i1]); err != nil {
					return err
				}
			}
			for i1 := len(_String_buf); uint64(i1) < sizeInfo[0]; i1++ {
				if err := w.WriteData(uint16(0)); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.String, _ptr_pszString); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *StringContainer) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.BufferLength); err != nil {
		return err
	}
	_ptr_pszString := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		// XXX: for opaque unmarshaling
		if (o.BufferLength/2) > 0 && sizeInfo[0] == 0 {
			sizeInfo[0] = uint64((o.BufferLength / 2))
		}
		var _String_buf []uint16
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array _String_buf", sizeInfo[0])
		}
		_String_buf = make([]uint16, sizeInfo[0])
		for i1 := range _String_buf {
			i1 := i1
			if err := w.ReadData(&_String_buf[i1]); err != nil {
				return err
			}
		}
		o.String = strings.TrimRight(string(utf16.Decode(_String_buf)), ndr.ZeroString)
		return nil
	})
	_s_pszString := func(ptr interface{}) { o.String = *ptr.(*string) }
	if err := w.ReadPointer(&o.String, _s_pszString, _ptr_pszString); err != nil {
		return err
	}
	return nil
}

// SystemTimeContainer structure represents SYSTEMTIME_CONTAINER RPC structure.
type SystemTimeContainer struct {
	BufferLength uint32           `idl:"name:cbBuf" json:"buffer_length"`
	SystemTime   *dtyp.SystemTime `idl:"name:pSystemTime" json:"system_time"`
}

func (o *SystemTimeContainer) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *SystemTimeContainer) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.BufferLength); err != nil {
		return err
	}
	if o.SystemTime != nil {
		_ptr_pSystemTime := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.SystemTime != nil {
				if err := o.SystemTime.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&dtyp.SystemTime{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.SystemTime, _ptr_pSystemTime); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *SystemTimeContainer) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.BufferLength); err != nil {
		return err
	}
	_ptr_pSystemTime := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.SystemTime == nil {
			o.SystemTime = &dtyp.SystemTime{}
		}
		if err := o.SystemTime.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_pSystemTime := func(ptr interface{}) { o.SystemTime = *ptr.(**dtyp.SystemTime) }
	if err := w.ReadPointer(&o.SystemTime, _s_pSystemTime, _ptr_pSystemTime); err != nil {
		return err
	}
	return nil
}

// V2NotifyOptionsType structure represents RPC_V2_NOTIFY_OPTIONS_TYPE RPC structure.
type V2NotifyOptionsType struct {
	Type   uint16   `idl:"name:Type" json:"type"`
	_      uint16   `idl:"name:Reserved0"`
	_      uint32   `idl:"name:Reserved1"`
	_      uint32   `idl:"name:Reserved2"`
	Count  uint32   `idl:"name:Count" json:"count"`
	Fields []uint16 `idl:"name:pFields;size_is:(Count);pointer:unique" json:"fields"`
}

func (o *V2NotifyOptionsType) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if o.Fields != nil && o.Count == 0 {
		o.Count = uint32(len(o.Fields))
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *V2NotifyOptionsType) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.Type); err != nil {
		return err
	}
	// reserved Reserved0
	if err := w.WriteData(uint16(0)); err != nil {
		return err
	}
	// reserved Reserved1
	if err := w.WriteData(uint32(0)); err != nil {
		return err
	}
	// reserved Reserved2
	if err := w.WriteData(uint32(0)); err != nil {
		return err
	}
	if err := w.WriteData(o.Count); err != nil {
		return err
	}
	if o.Fields != nil || o.Count > 0 {
		_ptr_pFields := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			dimSize1 := uint64(o.Count)
			if err := w.WriteSize(dimSize1); err != nil {
				return err
			}
			sizeInfo := []uint64{
				dimSize1,
			}
			for i1 := range o.Fields {
				i1 := i1
				if uint64(i1) >= sizeInfo[0] {
					break
				}
				if err := w.WriteData(o.Fields[i1]); err != nil {
					return err
				}
			}
			for i1 := len(o.Fields); uint64(i1) < sizeInfo[0]; i1++ {
				if err := w.WriteData(uint16(0)); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.Fields, _ptr_pFields); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *V2NotifyOptionsType) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.Type); err != nil {
		return err
	}
	// reserved Reserved0
	var _Reserved0 uint16
	if err := w.ReadData(&_Reserved0); err != nil {
		return err
	}
	// reserved Reserved1
	var _Reserved1 uint32
	if err := w.ReadData(&_Reserved1); err != nil {
		return err
	}
	// reserved Reserved2
	var _Reserved2 uint32
	if err := w.ReadData(&_Reserved2); err != nil {
		return err
	}
	if err := w.ReadData(&o.Count); err != nil {
		return err
	}
	_ptr_pFields := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		// XXX: for opaque unmarshaling
		if o.Count > 0 && sizeInfo[0] == 0 {
			sizeInfo[0] = uint64(o.Count)
		}
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array o.Fields", sizeInfo[0])
		}
		o.Fields = make([]uint16, sizeInfo[0])
		for i1 := range o.Fields {
			i1 := i1
			if err := w.ReadData(&o.Fields[i1]); err != nil {
				return err
			}
		}
		return nil
	})
	_s_pFields := func(ptr interface{}) { o.Fields = *ptr.(*[]uint16) }
	if err := w.ReadPointer(&o.Fields, _s_pFields, _ptr_pFields); err != nil {
		return err
	}
	return nil
}

// V2NotifyOptions structure represents RPC_V2_NOTIFY_OPTIONS RPC structure.
type V2NotifyOptions struct {
	Version uint32                 `idl:"name:Version" json:"version"`
	_       uint32                 `idl:"name:Reserved"`
	Count   uint32                 `idl:"name:Count" json:"count"`
	Types   []*V2NotifyOptionsType `idl:"name:pTypes;size_is:(Count);pointer:unique" json:"types"`
}

func (o *V2NotifyOptions) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if o.Types != nil && o.Count == 0 {
		o.Count = uint32(len(o.Types))
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *V2NotifyOptions) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.Version); err != nil {
		return err
	}
	// reserved Reserved
	if err := w.WriteData(uint32(0)); err != nil {
		return err
	}
	if err := w.WriteData(o.Count); err != nil {
		return err
	}
	if o.Types != nil || o.Count > 0 {
		_ptr_pTypes := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			dimSize1 := uint64(o.Count)
			if err := w.WriteSize(dimSize1); err != nil {
				return err
			}
			sizeInfo := []uint64{
				dimSize1,
			}
			for i1 := range o.Types {
				i1 := i1
				if uint64(i1) >= sizeInfo[0] {
					break
				}
				if o.Types[i1] != nil {
					if err := o.Types[i1].MarshalNDR(ctx, w); err != nil {
						return err
					}
				} else {
					if err := (&V2NotifyOptionsType{}).MarshalNDR(ctx, w); err != nil {
						return err
					}
				}
			}
			for i1 := len(o.Types); uint64(i1) < sizeInfo[0]; i1++ {
				if err := (&V2NotifyOptionsType{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.Types, _ptr_pTypes); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *V2NotifyOptions) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.Version); err != nil {
		return err
	}
	// reserved Reserved
	var _Reserved uint32
	if err := w.ReadData(&_Reserved); err != nil {
		return err
	}
	if err := w.ReadData(&o.Count); err != nil {
		return err
	}
	_ptr_pTypes := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		// XXX: for opaque unmarshaling
		if o.Count > 0 && sizeInfo[0] == 0 {
			sizeInfo[0] = uint64(o.Count)
		}
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array o.Types", sizeInfo[0])
		}
		o.Types = make([]*V2NotifyOptionsType, sizeInfo[0])
		for i1 := range o.Types {
			i1 := i1
			if o.Types[i1] == nil {
				o.Types[i1] = &V2NotifyOptionsType{}
			}
			if err := o.Types[i1].UnmarshalNDR(ctx, w); err != nil {
				return err
			}
		}
		return nil
	})
	_s_pTypes := func(ptr interface{}) { o.Types = *ptr.(*[]*V2NotifyOptionsType) }
	if err := w.ReadPointer(&o.Types, _s_pTypes, _ptr_pTypes); err != nil {
		return err
	}
	return nil
}

// V2NotifyInfoDataData structure represents RPC_V2_NOTIFY_INFO_DATA_DATA RPC union.
type V2NotifyInfoDataData struct {
	// Types that are assignable to Value
	//
	// *V2NotifyInfoDataData_String
	// *V2NotifyInfoDataData_Data
	// *V2NotifyInfoDataData_SystemTime
	// *V2NotifyInfoDataData_DevMode
	// *V2NotifyInfoDataData_SecurityDescriptor
	Value is_V2NotifyInfoDataData `json:"value"`
}

func (o *V2NotifyInfoDataData) GetValue() any {
	if o == nil {
		return nil
	}
	switch value := (interface{})(o.Value).(type) {
	case *V2NotifyInfoDataData_String:
		if value != nil {
			return value.String
		}
	case *V2NotifyInfoDataData_Data:
		if value != nil {
			return value.Data
		}
	case *V2NotifyInfoDataData_SystemTime:
		if value != nil {
			return value.SystemTime
		}
	case *V2NotifyInfoDataData_DevMode:
		if value != nil {
			return value.DevMode
		}
	case *V2NotifyInfoDataData_SecurityDescriptor:
		if value != nil {
			return value.SecurityDescriptor
		}
	}
	return nil
}

type is_V2NotifyInfoDataData interface {
	ndr.Marshaler
	ndr.Unmarshaler
	is_V2NotifyInfoDataData()
}

func (o *V2NotifyInfoDataData) NDRSwitchValue(sw uint32) uint32 {
	if o == nil {
		return uint32(0)
	}
	switch (interface{})(o.Value).(type) {
	case *V2NotifyInfoDataData_String:
		return uint32(2)
	case *V2NotifyInfoDataData_Data:
		return uint32(1)
	case *V2NotifyInfoDataData_SystemTime:
		return uint32(4)
	case *V2NotifyInfoDataData_DevMode:
		return uint32(3)
	case *V2NotifyInfoDataData_SecurityDescriptor:
		return uint32(5)
	}
	return uint32(0)
}

func (o *V2NotifyInfoDataData) MarshalUnionNDR(ctx context.Context, w ndr.Writer, sw uint32) error {
	if err := w.WriteUnionAlign(9); err != nil {
		return err
	}
	if err := w.WriteSwitch(uint32(sw)); err != nil {
		return err
	}
	// ms_union
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	switch sw {
	case uint32(2):
		_o, _ := o.Value.(*V2NotifyInfoDataData_String)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&V2NotifyInfoDataData_String{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint32(1):
		_o, _ := o.Value.(*V2NotifyInfoDataData_Data)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&V2NotifyInfoDataData_Data{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint32(4):
		_o, _ := o.Value.(*V2NotifyInfoDataData_SystemTime)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&V2NotifyInfoDataData_SystemTime{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint32(3):
		_o, _ := o.Value.(*V2NotifyInfoDataData_DevMode)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&V2NotifyInfoDataData_DevMode{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint32(5):
		_o, _ := o.Value.(*V2NotifyInfoDataData_SecurityDescriptor)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&V2NotifyInfoDataData_SecurityDescriptor{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	default:
		return fmt.Errorf("unsupported switch case value %v", sw)
	}
	return nil
}

func (o *V2NotifyInfoDataData) UnmarshalUnionNDR(ctx context.Context, w ndr.Reader, sw uint32) error {
	if err := w.ReadUnionAlign(9); err != nil {
		return err
	}
	if err := w.ReadSwitch((*uint32)(&sw)); err != nil {
		return err
	}
	// ms_union
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	switch sw {
	case uint32(2):
		o.Value = &V2NotifyInfoDataData_String{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint32(1):
		o.Value = &V2NotifyInfoDataData_Data{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint32(4):
		o.Value = &V2NotifyInfoDataData_SystemTime{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint32(3):
		o.Value = &V2NotifyInfoDataData_DevMode{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint32(5):
		o.Value = &V2NotifyInfoDataData_SecurityDescriptor{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	default:
		return fmt.Errorf("unsupported switch case value %v", sw)
	}
	return nil
}

// V2NotifyInfoDataData_String structure represents RPC_V2_NOTIFY_INFO_DATA_DATA RPC union arm.
//
// It has following labels: 2
type V2NotifyInfoDataData_String struct {
	String *StringContainer `idl:"name:String" json:"string"`
}

func (*V2NotifyInfoDataData_String) is_V2NotifyInfoDataData() {}

func (o *V2NotifyInfoDataData_String) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.String != nil {
		if err := o.String.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&StringContainer{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	return nil
}
func (o *V2NotifyInfoDataData_String) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if o.String == nil {
		o.String = &StringContainer{}
	}
	if err := o.String.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	return nil
}

// V2NotifyInfoDataData_Data structure represents RPC_V2_NOTIFY_INFO_DATA_DATA RPC union arm.
//
// It has following labels: 1
type V2NotifyInfoDataData_Data struct {
	Data []uint32 `idl:"name:dwData" json:"data"`
}

func (*V2NotifyInfoDataData_Data) is_V2NotifyInfoDataData() {}

func (o *V2NotifyInfoDataData_Data) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	for i1 := range o.Data {
		i1 := i1
		if uint64(i1) >= 2 {
			break
		}
		if err := w.WriteData(o.Data[i1]); err != nil {
			return err
		}
	}
	for i1 := len(o.Data); uint64(i1) < 2; i1++ {
		if err := w.WriteData(uint32(0)); err != nil {
			return err
		}
	}
	return nil
}
func (o *V2NotifyInfoDataData_Data) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	o.Data = make([]uint32, 2)
	for i1 := range o.Data {
		i1 := i1
		if err := w.ReadData(&o.Data[i1]); err != nil {
			return err
		}
	}
	return nil
}

// V2NotifyInfoDataData_SystemTime structure represents RPC_V2_NOTIFY_INFO_DATA_DATA RPC union arm.
//
// It has following labels: 4
type V2NotifyInfoDataData_SystemTime struct {
	SystemTime *SystemTimeContainer `idl:"name:SystemTime" json:"system_time"`
}

func (*V2NotifyInfoDataData_SystemTime) is_V2NotifyInfoDataData() {}

func (o *V2NotifyInfoDataData_SystemTime) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.SystemTime != nil {
		if err := o.SystemTime.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&SystemTimeContainer{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	return nil
}
func (o *V2NotifyInfoDataData_SystemTime) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if o.SystemTime == nil {
		o.SystemTime = &SystemTimeContainer{}
	}
	if err := o.SystemTime.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	return nil
}

// V2NotifyInfoDataData_DevMode structure represents RPC_V2_NOTIFY_INFO_DATA_DATA RPC union arm.
//
// It has following labels: 3
type V2NotifyInfoDataData_DevMode struct {
	DevMode *DevModeContainer `idl:"name:DevMode" json:"dev_mode"`
}

func (*V2NotifyInfoDataData_DevMode) is_V2NotifyInfoDataData() {}

func (o *V2NotifyInfoDataData_DevMode) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.DevMode != nil {
		if err := o.DevMode.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&DevModeContainer{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	return nil
}
func (o *V2NotifyInfoDataData_DevMode) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if o.DevMode == nil {
		o.DevMode = &DevModeContainer{}
	}
	if err := o.DevMode.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	return nil
}

// V2NotifyInfoDataData_SecurityDescriptor structure represents RPC_V2_NOTIFY_INFO_DATA_DATA RPC union arm.
//
// It has following labels: 5
type V2NotifyInfoDataData_SecurityDescriptor struct {
	SecurityDescriptor *SecurityContainer `idl:"name:SecurityDescriptor" json:"security_descriptor"`
}

func (*V2NotifyInfoDataData_SecurityDescriptor) is_V2NotifyInfoDataData() {}

func (o *V2NotifyInfoDataData_SecurityDescriptor) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.SecurityDescriptor != nil {
		if err := o.SecurityDescriptor.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&SecurityContainer{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	return nil
}
func (o *V2NotifyInfoDataData_SecurityDescriptor) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if o.SecurityDescriptor == nil {
		o.SecurityDescriptor = &SecurityContainer{}
	}
	if err := o.SecurityDescriptor.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	return nil
}

// V2NotifyInfoData structure represents RPC_V2_NOTIFY_INFO_DATA RPC structure.
type V2NotifyInfoData struct {
	Type               uint16                `idl:"name:Type" json:"type"`
	Field              uint16                `idl:"name:Field" json:"field"`
	NotifyInfoDataType uint32                `idl:"name:NotifyInfoDataType" json:"notify_info_data_type"`
	ID                 uint32                `idl:"name:Id" json:"id"`
	Data               *V2NotifyInfoDataData `idl:"name:Data;switch_is:(NotifyInfoDataType 65535 &)" json:"data"`
}

func (o *V2NotifyInfoData) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *V2NotifyInfoData) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.Type); err != nil {
		return err
	}
	if err := w.WriteData(o.Field); err != nil {
		return err
	}
	if err := w.WriteData(o.NotifyInfoDataType); err != nil {
		return err
	}
	if err := w.WriteData(o.ID); err != nil {
		return err
	}
	_swData := uint32((o.NotifyInfoDataType & 65535))
	if o.Data != nil {
		if err := o.Data.MarshalUnionNDR(ctx, w, _swData); err != nil {
			return err
		}
	} else {
		if err := (&V2NotifyInfoDataData{}).MarshalUnionNDR(ctx, w, _swData); err != nil {
			return err
		}
	}
	return nil
}
func (o *V2NotifyInfoData) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.Type); err != nil {
		return err
	}
	if err := w.ReadData(&o.Field); err != nil {
		return err
	}
	if err := w.ReadData(&o.NotifyInfoDataType); err != nil {
		return err
	}
	if err := w.ReadData(&o.ID); err != nil {
		return err
	}
	if o.Data == nil {
		o.Data = &V2NotifyInfoDataData{}
	}
	_swData := uint32((o.NotifyInfoDataType & 65535))
	if err := o.Data.UnmarshalUnionNDR(ctx, w, _swData); err != nil {
		return err
	}
	return nil
}

// V2NotifyInfo structure represents RPC_V2_NOTIFY_INFO RPC structure.
type V2NotifyInfo struct {
	Version uint32              `idl:"name:Version" json:"version"`
	Flags   uint32              `idl:"name:Flags" json:"flags"`
	Count   uint32              `idl:"name:Count" json:"count"`
	Data    []*V2NotifyInfoData `idl:"name:aData;size_is:(Count);pointer:unique" json:"data"`
}

func (o *V2NotifyInfo) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if o.Data != nil && o.Count == 0 {
		o.Count = uint32(len(o.Data))
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *V2NotifyInfo) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.Version); err != nil {
		return err
	}
	if err := w.WriteData(o.Flags); err != nil {
		return err
	}
	if err := w.WriteData(o.Count); err != nil {
		return err
	}
	if o.Data != nil || o.Count > 0 {
		_ptr_aData := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			dimSize1 := uint64(o.Count)
			if err := w.WriteSize(dimSize1); err != nil {
				return err
			}
			sizeInfo := []uint64{
				dimSize1,
			}
			for i1 := range o.Data {
				i1 := i1
				if uint64(i1) >= sizeInfo[0] {
					break
				}
				if o.Data[i1] != nil {
					if err := o.Data[i1].MarshalNDR(ctx, w); err != nil {
						return err
					}
				} else {
					if err := (&V2NotifyInfoData{}).MarshalNDR(ctx, w); err != nil {
						return err
					}
				}
			}
			for i1 := len(o.Data); uint64(i1) < sizeInfo[0]; i1++ {
				if err := (&V2NotifyInfoData{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.Data, _ptr_aData); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *V2NotifyInfo) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.Version); err != nil {
		return err
	}
	if err := w.ReadData(&o.Flags); err != nil {
		return err
	}
	if err := w.ReadData(&o.Count); err != nil {
		return err
	}
	_ptr_aData := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		// XXX: for opaque unmarshaling
		if o.Count > 0 && sizeInfo[0] == 0 {
			sizeInfo[0] = uint64(o.Count)
		}
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array o.Data", sizeInfo[0])
		}
		o.Data = make([]*V2NotifyInfoData, sizeInfo[0])
		for i1 := range o.Data {
			i1 := i1
			if o.Data[i1] == nil {
				o.Data[i1] = &V2NotifyInfoData{}
			}
			if err := o.Data[i1].UnmarshalNDR(ctx, w); err != nil {
				return err
			}
		}
		return nil
	})
	_s_aData := func(ptr interface{}) { o.Data = *ptr.(*[]*V2NotifyInfoData) }
	if err := w.ReadPointer(&o.Data, _s_aData, _ptr_aData); err != nil {
		return err
	}
	return nil
}

// V2ReplyPrinter structure represents RPC_V2_UREPLY_PRINTER RPC union.
type V2ReplyPrinter struct {
	// Types that are assignable to Value
	//
	// *V2ReplyPrinter_Info
	Value is_V2ReplyPrinter `json:"value"`
}

func (o *V2ReplyPrinter) GetValue() any {
	if o == nil {
		return nil
	}
	switch value := (interface{})(o.Value).(type) {
	case *V2ReplyPrinter_Info:
		if value != nil {
			return value.Info
		}
	}
	return nil
}

type is_V2ReplyPrinter interface {
	ndr.Marshaler
	ndr.Unmarshaler
	is_V2ReplyPrinter()
}

func (o *V2ReplyPrinter) NDRSwitchValue(sw uint32) uint32 {
	if o == nil {
		return uint32(0)
	}
	switch (interface{})(o.Value).(type) {
	case *V2ReplyPrinter_Info:
		return uint32(0)
	}
	return uint32(0)
}

func (o *V2ReplyPrinter) MarshalUnionNDR(ctx context.Context, w ndr.Writer, sw uint32) error {
	if err := w.WriteUnionAlign(9); err != nil {
		return err
	}
	if err := w.WriteSwitch(uint32(sw)); err != nil {
		return err
	}
	// ms_union
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	switch sw {
	case uint32(0):
		_o, _ := o.Value.(*V2ReplyPrinter_Info)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&V2ReplyPrinter_Info{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	default:
		return fmt.Errorf("unsupported switch case value %v", sw)
	}
	return nil
}

func (o *V2ReplyPrinter) UnmarshalUnionNDR(ctx context.Context, w ndr.Reader, sw uint32) error {
	if err := w.ReadUnionAlign(9); err != nil {
		return err
	}
	if err := w.ReadSwitch((*uint32)(&sw)); err != nil {
		return err
	}
	// ms_union
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	switch sw {
	case uint32(0):
		o.Value = &V2ReplyPrinter_Info{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	default:
		return fmt.Errorf("unsupported switch case value %v", sw)
	}
	return nil
}

// V2ReplyPrinter_Info structure represents RPC_V2_UREPLY_PRINTER RPC union arm.
//
// It has following labels: 0
type V2ReplyPrinter_Info struct {
	Info *V2NotifyInfo `idl:"name:pInfo" json:"info"`
}

func (*V2ReplyPrinter_Info) is_V2ReplyPrinter() {}

func (o *V2ReplyPrinter_Info) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.Info != nil {
		_ptr_pInfo := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.Info != nil {
				if err := o.Info.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&V2NotifyInfo{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.Info, _ptr_pInfo); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *V2ReplyPrinter_Info) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_pInfo := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.Info == nil {
			o.Info = &V2NotifyInfo{}
		}
		if err := o.Info.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_pInfo := func(ptr interface{}) { o.Info = *ptr.(**V2NotifyInfo) }
	if err := w.ReadPointer(&o.Info, _s_pInfo, _ptr_pInfo); err != nil {
		return err
	}
	return nil
}

// BranchOfficeJobDataPrinted structure represents RPC_BranchOfficeJobDataPrinted RPC structure.
type BranchOfficeJobDataPrinted struct {
	Status       uint32 `idl:"name:Status" json:"status"`
	DocumentName string `idl:"name:pDocumentName;string" json:"document_name"`
	UserName     string `idl:"name:pUserName;string" json:"user_name"`
	MachineName  string `idl:"name:pMachineName;string" json:"machine_name"`
	PrinterName  string `idl:"name:pPrinterName;string" json:"printer_name"`
	PortName     string `idl:"name:pPortName;string" json:"port_name"`
	Size         int64  `idl:"name:Size" json:"size"`
	TotalPages   uint32 `idl:"name:TotalPages" json:"total_pages"`
}

func (o *BranchOfficeJobDataPrinted) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *BranchOfficeJobDataPrinted) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(8); err != nil {
		return err
	}
	if err := w.WriteData(o.Status); err != nil {
		return err
	}
	if o.DocumentName != "" {
		_ptr_pDocumentName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.DocumentName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.DocumentName, _ptr_pDocumentName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.UserName != "" {
		_ptr_pUserName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.UserName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.UserName, _ptr_pUserName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.MachineName != "" {
		_ptr_pMachineName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.MachineName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.MachineName, _ptr_pMachineName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.PrinterName != "" {
		_ptr_pPrinterName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.PrinterName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.PrinterName, _ptr_pPrinterName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.PortName != "" {
		_ptr_pPortName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.PortName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.PortName, _ptr_pPortName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if err := w.WriteData(o.Size); err != nil {
		return err
	}
	if err := w.WriteData(o.TotalPages); err != nil {
		return err
	}
	if err := w.WriteTrailingGap(8); err != nil {
		return err
	}
	return nil
}
func (o *BranchOfficeJobDataPrinted) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(8); err != nil {
		return err
	}
	if err := w.ReadData(&o.Status); err != nil {
		return err
	}
	_ptr_pDocumentName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.DocumentName); err != nil {
			return err
		}
		return nil
	})
	_s_pDocumentName := func(ptr interface{}) { o.DocumentName = *ptr.(*string) }
	if err := w.ReadPointer(&o.DocumentName, _s_pDocumentName, _ptr_pDocumentName); err != nil {
		return err
	}
	_ptr_pUserName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.UserName); err != nil {
			return err
		}
		return nil
	})
	_s_pUserName := func(ptr interface{}) { o.UserName = *ptr.(*string) }
	if err := w.ReadPointer(&o.UserName, _s_pUserName, _ptr_pUserName); err != nil {
		return err
	}
	_ptr_pMachineName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.MachineName); err != nil {
			return err
		}
		return nil
	})
	_s_pMachineName := func(ptr interface{}) { o.MachineName = *ptr.(*string) }
	if err := w.ReadPointer(&o.MachineName, _s_pMachineName, _ptr_pMachineName); err != nil {
		return err
	}
	_ptr_pPrinterName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.PrinterName); err != nil {
			return err
		}
		return nil
	})
	_s_pPrinterName := func(ptr interface{}) { o.PrinterName = *ptr.(*string) }
	if err := w.ReadPointer(&o.PrinterName, _s_pPrinterName, _ptr_pPrinterName); err != nil {
		return err
	}
	_ptr_pPortName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.PortName); err != nil {
			return err
		}
		return nil
	})
	_s_pPortName := func(ptr interface{}) { o.PortName = *ptr.(*string) }
	if err := w.ReadPointer(&o.PortName, _s_pPortName, _ptr_pPortName); err != nil {
		return err
	}
	if err := w.ReadData(&o.Size); err != nil {
		return err
	}
	if err := w.ReadData(&o.TotalPages); err != nil {
		return err
	}
	if err := w.ReadTrailingGap(8); err != nil {
		return err
	}
	return nil
}

// BranchOfficeJobDataRendered structure represents RPC_BranchOfficeJobDataRendered RPC structure.
type BranchOfficeJobDataRendered struct {
	Size         int64  `idl:"name:Size" json:"size"`
	ICMMethod    uint32 `idl:"name:ICMMethod" json:"icm_method"`
	Color        int16  `idl:"name:Color" json:"color"`
	PrintQuality int16  `idl:"name:PrintQuality" json:"print_quality"`
	YResolution  int16  `idl:"name:YResolution" json:"y_resolution"`
	Copies       int16  `idl:"name:Copies" json:"copies"`
	TTOption     int16  `idl:"name:TTOption" json:"tt_option"`
}

func (o *BranchOfficeJobDataRendered) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *BranchOfficeJobDataRendered) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(8); err != nil {
		return err
	}
	if err := w.WriteData(o.Size); err != nil {
		return err
	}
	if err := w.WriteData(o.ICMMethod); err != nil {
		return err
	}
	if err := w.WriteData(o.Color); err != nil {
		return err
	}
	if err := w.WriteData(o.PrintQuality); err != nil {
		return err
	}
	if err := w.WriteData(o.YResolution); err != nil {
		return err
	}
	if err := w.WriteData(o.Copies); err != nil {
		return err
	}
	if err := w.WriteData(o.TTOption); err != nil {
		return err
	}
	if err := w.WriteTrailingGap(8); err != nil {
		return err
	}
	return nil
}
func (o *BranchOfficeJobDataRendered) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(8); err != nil {
		return err
	}
	if err := w.ReadData(&o.Size); err != nil {
		return err
	}
	if err := w.ReadData(&o.ICMMethod); err != nil {
		return err
	}
	if err := w.ReadData(&o.Color); err != nil {
		return err
	}
	if err := w.ReadData(&o.PrintQuality); err != nil {
		return err
	}
	if err := w.ReadData(&o.YResolution); err != nil {
		return err
	}
	if err := w.ReadData(&o.Copies); err != nil {
		return err
	}
	if err := w.ReadData(&o.TTOption); err != nil {
		return err
	}
	if err := w.ReadTrailingGap(8); err != nil {
		return err
	}
	return nil
}

// BranchOfficeJobDataError structure represents RPC_BranchOfficeJobDataError RPC structure.
type BranchOfficeJobDataError struct {
	LastError        uint32 `idl:"name:LastError" json:"last_error"`
	DocumentName     string `idl:"name:pDocumentName;string" json:"document_name"`
	UserName         string `idl:"name:pUserName;string" json:"user_name"`
	PrinterName      string `idl:"name:pPrinterName;string" json:"printer_name"`
	DataType         string `idl:"name:pDataType;string" json:"data_type"`
	TotalSize        int64  `idl:"name:TotalSize" json:"total_size"`
	PrintedSize      int64  `idl:"name:PrintedSize" json:"printed_size"`
	TotalPages       uint32 `idl:"name:TotalPages" json:"total_pages"`
	PrintedPages     uint32 `idl:"name:PrintedPages" json:"printed_pages"`
	MachineName      string `idl:"name:pMachineName;string" json:"machine_name"`
	JobError         string `idl:"name:pJobError;string" json:"job_error"`
	ErrorDescription string `idl:"name:pErrorDescription;string" json:"error_description"`
}

func (o *BranchOfficeJobDataError) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *BranchOfficeJobDataError) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(8); err != nil {
		return err
	}
	if err := w.WriteData(o.LastError); err != nil {
		return err
	}
	if o.DocumentName != "" {
		_ptr_pDocumentName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.DocumentName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.DocumentName, _ptr_pDocumentName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.UserName != "" {
		_ptr_pUserName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.UserName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.UserName, _ptr_pUserName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.PrinterName != "" {
		_ptr_pPrinterName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.PrinterName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.PrinterName, _ptr_pPrinterName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.DataType != "" {
		_ptr_pDataType := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.DataType); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.DataType, _ptr_pDataType); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if err := w.WriteData(o.TotalSize); err != nil {
		return err
	}
	if err := w.WriteData(o.PrintedSize); err != nil {
		return err
	}
	if err := w.WriteData(o.TotalPages); err != nil {
		return err
	}
	if err := w.WriteData(o.PrintedPages); err != nil {
		return err
	}
	if o.MachineName != "" {
		_ptr_pMachineName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.MachineName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.MachineName, _ptr_pMachineName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.JobError != "" {
		_ptr_pJobError := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.JobError); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.JobError, _ptr_pJobError); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.ErrorDescription != "" {
		_ptr_pErrorDescription := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.ErrorDescription); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.ErrorDescription, _ptr_pErrorDescription); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if err := w.WriteTrailingGap(8); err != nil {
		return err
	}
	return nil
}
func (o *BranchOfficeJobDataError) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(8); err != nil {
		return err
	}
	if err := w.ReadData(&o.LastError); err != nil {
		return err
	}
	_ptr_pDocumentName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.DocumentName); err != nil {
			return err
		}
		return nil
	})
	_s_pDocumentName := func(ptr interface{}) { o.DocumentName = *ptr.(*string) }
	if err := w.ReadPointer(&o.DocumentName, _s_pDocumentName, _ptr_pDocumentName); err != nil {
		return err
	}
	_ptr_pUserName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.UserName); err != nil {
			return err
		}
		return nil
	})
	_s_pUserName := func(ptr interface{}) { o.UserName = *ptr.(*string) }
	if err := w.ReadPointer(&o.UserName, _s_pUserName, _ptr_pUserName); err != nil {
		return err
	}
	_ptr_pPrinterName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.PrinterName); err != nil {
			return err
		}
		return nil
	})
	_s_pPrinterName := func(ptr interface{}) { o.PrinterName = *ptr.(*string) }
	if err := w.ReadPointer(&o.PrinterName, _s_pPrinterName, _ptr_pPrinterName); err != nil {
		return err
	}
	_ptr_pDataType := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.DataType); err != nil {
			return err
		}
		return nil
	})
	_s_pDataType := func(ptr interface{}) { o.DataType = *ptr.(*string) }
	if err := w.ReadPointer(&o.DataType, _s_pDataType, _ptr_pDataType); err != nil {
		return err
	}
	if err := w.ReadData(&o.TotalSize); err != nil {
		return err
	}
	if err := w.ReadData(&o.PrintedSize); err != nil {
		return err
	}
	if err := w.ReadData(&o.TotalPages); err != nil {
		return err
	}
	if err := w.ReadData(&o.PrintedPages); err != nil {
		return err
	}
	_ptr_pMachineName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.MachineName); err != nil {
			return err
		}
		return nil
	})
	_s_pMachineName := func(ptr interface{}) { o.MachineName = *ptr.(*string) }
	if err := w.ReadPointer(&o.MachineName, _s_pMachineName, _ptr_pMachineName); err != nil {
		return err
	}
	_ptr_pJobError := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.JobError); err != nil {
			return err
		}
		return nil
	})
	_s_pJobError := func(ptr interface{}) { o.JobError = *ptr.(*string) }
	if err := w.ReadPointer(&o.JobError, _s_pJobError, _ptr_pJobError); err != nil {
		return err
	}
	_ptr_pErrorDescription := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.ErrorDescription); err != nil {
			return err
		}
		return nil
	})
	_s_pErrorDescription := func(ptr interface{}) { o.ErrorDescription = *ptr.(*string) }
	if err := w.ReadPointer(&o.ErrorDescription, _s_pErrorDescription, _ptr_pErrorDescription); err != nil {
		return err
	}
	if err := w.ReadTrailingGap(8); err != nil {
		return err
	}
	return nil
}

// BranchOfficeJobDataPipelineFailed structure represents RPC_BranchOfficeJobDataPipelineFailed RPC structure.
type BranchOfficeJobDataPipelineFailed struct {
	DocumentName   string `idl:"name:pDocumentName;string" json:"document_name"`
	PrinterName    string `idl:"name:pPrinterName;string" json:"printer_name"`
	ExtraErrorInfo string `idl:"name:pExtraErrorInfo;string" json:"extra_error_info"`
}

func (o *BranchOfficeJobDataPipelineFailed) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *BranchOfficeJobDataPipelineFailed) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(6); err != nil {
		return err
	}
	if o.DocumentName != "" {
		_ptr_pDocumentName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.DocumentName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.DocumentName, _ptr_pDocumentName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.PrinterName != "" {
		_ptr_pPrinterName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.PrinterName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.PrinterName, _ptr_pPrinterName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.ExtraErrorInfo != "" {
		_ptr_pExtraErrorInfo := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.ExtraErrorInfo); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.ExtraErrorInfo, _ptr_pExtraErrorInfo); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *BranchOfficeJobDataPipelineFailed) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(6); err != nil {
		return err
	}
	_ptr_pDocumentName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.DocumentName); err != nil {
			return err
		}
		return nil
	})
	_s_pDocumentName := func(ptr interface{}) { o.DocumentName = *ptr.(*string) }
	if err := w.ReadPointer(&o.DocumentName, _s_pDocumentName, _ptr_pDocumentName); err != nil {
		return err
	}
	_ptr_pPrinterName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.PrinterName); err != nil {
			return err
		}
		return nil
	})
	_s_pPrinterName := func(ptr interface{}) { o.PrinterName = *ptr.(*string) }
	if err := w.ReadPointer(&o.PrinterName, _s_pPrinterName, _ptr_pPrinterName); err != nil {
		return err
	}
	_ptr_pExtraErrorInfo := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.ExtraErrorInfo); err != nil {
			return err
		}
		return nil
	})
	_s_pExtraErrorInfo := func(ptr interface{}) { o.ExtraErrorInfo = *ptr.(*string) }
	if err := w.ReadPointer(&o.ExtraErrorInfo, _s_pExtraErrorInfo, _ptr_pExtraErrorInfo); err != nil {
		return err
	}
	return nil
}

// BranchOfficeLogOfflineFileFull structure represents RPC_BranchOfficeLogOfflineFileFull RPC structure.
type BranchOfficeLogOfflineFileFull struct {
	MachineName string `idl:"name:pMachineName;string" json:"machine_name"`
}

func (o *BranchOfficeLogOfflineFileFull) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *BranchOfficeLogOfflineFileFull) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(6); err != nil {
		return err
	}
	if o.MachineName != "" {
		_ptr_pMachineName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.MachineName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.MachineName, _ptr_pMachineName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *BranchOfficeLogOfflineFileFull) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(6); err != nil {
		return err
	}
	_ptr_pMachineName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.MachineName); err != nil {
			return err
		}
		return nil
	})
	_s_pMachineName := func(ptr interface{}) { o.MachineName = *ptr.(*string) }
	if err := w.ReadPointer(&o.MachineName, _s_pMachineName, _ptr_pMachineName); err != nil {
		return err
	}
	return nil
}

// BranchOfficeJobData structure represents RPC_BranchOfficeJobData RPC structure.
type BranchOfficeJobData struct {
	EventType BranchOfficeJobEventType     `idl:"name:eEventType" json:"event_type"`
	JobID     uint32                       `idl:"name:JobId" json:"job_id"`
	JobInfo   *BranchOfficeJobData_JobInfo `idl:"name:JobInfo;switch_is:eEventType" json:"job_info"`
}

func (o *BranchOfficeJobData) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *BranchOfficeJobData) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(8); err != nil {
		return err
	}
	if err := w.WriteEnum(uint16(o.EventType)); err != nil {
		return err
	}
	if err := w.WriteData(o.JobID); err != nil {
		return err
	}
	_swJobInfo := uint16(o.EventType)
	if o.JobInfo != nil {
		if err := o.JobInfo.MarshalUnionNDR(ctx, w, _swJobInfo); err != nil {
			return err
		}
	} else {
		if err := (&BranchOfficeJobData_JobInfo{}).MarshalUnionNDR(ctx, w, _swJobInfo); err != nil {
			return err
		}
	}
	return nil
}
func (o *BranchOfficeJobData) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(8); err != nil {
		return err
	}
	if err := w.ReadEnum((*uint16)(&o.EventType)); err != nil {
		return err
	}
	if err := w.ReadData(&o.JobID); err != nil {
		return err
	}
	if o.JobInfo == nil {
		o.JobInfo = &BranchOfficeJobData_JobInfo{}
	}
	_swJobInfo := uint16(o.EventType)
	if err := o.JobInfo.UnmarshalUnionNDR(ctx, w, _swJobInfo); err != nil {
		return err
	}
	return nil
}

// BranchOfficeJobData_JobInfo structure represents RPC_BranchOfficeJobData union anonymous member.
type BranchOfficeJobData_JobInfo struct {
	// Types that are assignable to Value
	//
	// *BranchOfficeJobData_JobInfo_LogJobPrinted
	// *BranchOfficeJobData_JobInfo_LogJobRendered
	// *BranchOfficeJobData_JobInfo_LogJobError
	// *BranchOfficeJobData_JobInfo_LogPipelineFailed
	// *BranchOfficeJobData_JobInfo_LogOfflineFileFull
	Value is_BranchOfficeJobData_JobInfo `json:"value"`
}

func (o *BranchOfficeJobData_JobInfo) GetValue() any {
	if o == nil {
		return nil
	}
	switch value := (interface{})(o.Value).(type) {
	case *BranchOfficeJobData_JobInfo_LogJobPrinted:
		if value != nil {
			return value.LogJobPrinted
		}
	case *BranchOfficeJobData_JobInfo_LogJobRendered:
		if value != nil {
			return value.LogJobRendered
		}
	case *BranchOfficeJobData_JobInfo_LogJobError:
		if value != nil {
			return value.LogJobError
		}
	case *BranchOfficeJobData_JobInfo_LogPipelineFailed:
		if value != nil {
			return value.LogPipelineFailed
		}
	case *BranchOfficeJobData_JobInfo_LogOfflineFileFull:
		if value != nil {
			return value.LogOfflineFileFull
		}
	}
	return nil
}

type is_BranchOfficeJobData_JobInfo interface {
	ndr.Marshaler
	ndr.Unmarshaler
	is_BranchOfficeJobData_JobInfo()
}

func (o *BranchOfficeJobData_JobInfo) NDRSwitchValue(sw uint16) uint16 {
	if o == nil {
		return uint16(0)
	}
	switch (interface{})(o.Value).(type) {
	case *BranchOfficeJobData_JobInfo_LogJobPrinted:
		return uint16(1)
	case *BranchOfficeJobData_JobInfo_LogJobRendered:
		return uint16(2)
	case *BranchOfficeJobData_JobInfo_LogJobError:
		return uint16(3)
	case *BranchOfficeJobData_JobInfo_LogPipelineFailed:
		return uint16(4)
	case *BranchOfficeJobData_JobInfo_LogOfflineFileFull:
		return uint16(5)
	}
	return uint16(0)
}

func (o *BranchOfficeJobData_JobInfo) MarshalUnionNDR(ctx context.Context, w ndr.Writer, sw uint16) error {
	if err := w.WriteUnionAlign(8); err != nil {
		return err
	}
	if err := w.WriteSwitch(ndr.Enum(uint16(sw))); err != nil {
		return err
	}
	// ms_union
	if err := w.WriteAlign(8); err != nil {
		return err
	}
	switch sw {
	case uint16(1):
		_o, _ := o.Value.(*BranchOfficeJobData_JobInfo_LogJobPrinted)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&BranchOfficeJobData_JobInfo_LogJobPrinted{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint16(2):
		_o, _ := o.Value.(*BranchOfficeJobData_JobInfo_LogJobRendered)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&BranchOfficeJobData_JobInfo_LogJobRendered{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint16(3):
		_o, _ := o.Value.(*BranchOfficeJobData_JobInfo_LogJobError)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&BranchOfficeJobData_JobInfo_LogJobError{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint16(4):
		_o, _ := o.Value.(*BranchOfficeJobData_JobInfo_LogPipelineFailed)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&BranchOfficeJobData_JobInfo_LogPipelineFailed{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint16(5):
		_o, _ := o.Value.(*BranchOfficeJobData_JobInfo_LogOfflineFileFull)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&BranchOfficeJobData_JobInfo_LogOfflineFileFull{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	default:
		return fmt.Errorf("unsupported switch case value %v", sw)
	}
	return nil
}

func (o *BranchOfficeJobData_JobInfo) UnmarshalUnionNDR(ctx context.Context, w ndr.Reader, sw uint16) error {
	if err := w.ReadUnionAlign(8); err != nil {
		return err
	}
	if err := w.ReadSwitch(ndr.Enum((*uint16)(&sw))); err != nil {
		return err
	}
	// ms_union
	if err := w.ReadAlign(8); err != nil {
		return err
	}
	switch sw {
	case uint16(1):
		o.Value = &BranchOfficeJobData_JobInfo_LogJobPrinted{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint16(2):
		o.Value = &BranchOfficeJobData_JobInfo_LogJobRendered{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint16(3):
		o.Value = &BranchOfficeJobData_JobInfo_LogJobError{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint16(4):
		o.Value = &BranchOfficeJobData_JobInfo_LogPipelineFailed{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint16(5):
		o.Value = &BranchOfficeJobData_JobInfo_LogOfflineFileFull{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	default:
		return fmt.Errorf("unsupported switch case value %v", sw)
	}
	return nil
}

// BranchOfficeJobData_JobInfo_LogJobPrinted structure represents BranchOfficeJobData_JobInfo RPC union arm.
//
// It has following labels: 1
type BranchOfficeJobData_JobInfo_LogJobPrinted struct {
	LogJobPrinted *BranchOfficeJobDataPrinted `idl:"name:LogJobPrinted" json:"log_job_printed"`
}

func (*BranchOfficeJobData_JobInfo_LogJobPrinted) is_BranchOfficeJobData_JobInfo() {}

func (o *BranchOfficeJobData_JobInfo_LogJobPrinted) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.LogJobPrinted != nil {
		if err := o.LogJobPrinted.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&BranchOfficeJobDataPrinted{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	return nil
}
func (o *BranchOfficeJobData_JobInfo_LogJobPrinted) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if o.LogJobPrinted == nil {
		o.LogJobPrinted = &BranchOfficeJobDataPrinted{}
	}
	if err := o.LogJobPrinted.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	return nil
}

// BranchOfficeJobData_JobInfo_LogJobRendered structure represents BranchOfficeJobData_JobInfo RPC union arm.
//
// It has following labels: 2
type BranchOfficeJobData_JobInfo_LogJobRendered struct {
	LogJobRendered *BranchOfficeJobDataRendered `idl:"name:LogJobRendered" json:"log_job_rendered"`
}

func (*BranchOfficeJobData_JobInfo_LogJobRendered) is_BranchOfficeJobData_JobInfo() {}

func (o *BranchOfficeJobData_JobInfo_LogJobRendered) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.LogJobRendered != nil {
		if err := o.LogJobRendered.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&BranchOfficeJobDataRendered{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	return nil
}
func (o *BranchOfficeJobData_JobInfo_LogJobRendered) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if o.LogJobRendered == nil {
		o.LogJobRendered = &BranchOfficeJobDataRendered{}
	}
	if err := o.LogJobRendered.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	return nil
}

// BranchOfficeJobData_JobInfo_LogJobError structure represents BranchOfficeJobData_JobInfo RPC union arm.
//
// It has following labels: 3
type BranchOfficeJobData_JobInfo_LogJobError struct {
	LogJobError *BranchOfficeJobDataError `idl:"name:LogJobError" json:"log_job_error"`
}

func (*BranchOfficeJobData_JobInfo_LogJobError) is_BranchOfficeJobData_JobInfo() {}

func (o *BranchOfficeJobData_JobInfo_LogJobError) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.LogJobError != nil {
		if err := o.LogJobError.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&BranchOfficeJobDataError{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	return nil
}
func (o *BranchOfficeJobData_JobInfo_LogJobError) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if o.LogJobError == nil {
		o.LogJobError = &BranchOfficeJobDataError{}
	}
	if err := o.LogJobError.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	return nil
}

// BranchOfficeJobData_JobInfo_LogPipelineFailed structure represents BranchOfficeJobData_JobInfo RPC union arm.
//
// It has following labels: 4
type BranchOfficeJobData_JobInfo_LogPipelineFailed struct {
	LogPipelineFailed *BranchOfficeJobDataPipelineFailed `idl:"name:LogPipelineFailed" json:"log_pipeline_failed"`
}

func (*BranchOfficeJobData_JobInfo_LogPipelineFailed) is_BranchOfficeJobData_JobInfo() {}

func (o *BranchOfficeJobData_JobInfo_LogPipelineFailed) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.LogPipelineFailed != nil {
		if err := o.LogPipelineFailed.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&BranchOfficeJobDataPipelineFailed{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	return nil
}
func (o *BranchOfficeJobData_JobInfo_LogPipelineFailed) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if o.LogPipelineFailed == nil {
		o.LogPipelineFailed = &BranchOfficeJobDataPipelineFailed{}
	}
	if err := o.LogPipelineFailed.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	return nil
}

// BranchOfficeJobData_JobInfo_LogOfflineFileFull structure represents BranchOfficeJobData_JobInfo RPC union arm.
//
// It has following labels: 5
type BranchOfficeJobData_JobInfo_LogOfflineFileFull struct {
	LogOfflineFileFull *BranchOfficeLogOfflineFileFull `idl:"name:LogOfflineFileFull" json:"log_offline_file_full"`
}

func (*BranchOfficeJobData_JobInfo_LogOfflineFileFull) is_BranchOfficeJobData_JobInfo() {}

func (o *BranchOfficeJobData_JobInfo_LogOfflineFileFull) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.LogOfflineFileFull != nil {
		if err := o.LogOfflineFileFull.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&BranchOfficeLogOfflineFileFull{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	return nil
}
func (o *BranchOfficeJobData_JobInfo_LogOfflineFileFull) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if o.LogOfflineFileFull == nil {
		o.LogOfflineFileFull = &BranchOfficeLogOfflineFileFull{}
	}
	if err := o.LogOfflineFileFull.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	return nil
}

// BranchOfficeJobDataContainer structure represents RPC_BranchOfficeJobDataContainer RPC structure.
type BranchOfficeJobDataContainer struct {
	JobDataEntriesCount uint32                 `idl:"name:cJobDataEntries" json:"job_data_entries_count"`
	JobData             []*BranchOfficeJobData `idl:"name:JobData;size_is:(cJobDataEntries);pointer:unique" json:"job_data"`
}

func (o *BranchOfficeJobDataContainer) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if o.JobData != nil && o.JobDataEntriesCount == 0 {
		o.JobDataEntriesCount = uint32(len(o.JobData))
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *BranchOfficeJobDataContainer) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.JobDataEntriesCount); err != nil {
		return err
	}
	if o.JobData != nil || o.JobDataEntriesCount > 0 {
		_ptr_JobData := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			dimSize1 := uint64(o.JobDataEntriesCount)
			if err := w.WriteSize(dimSize1); err != nil {
				return err
			}
			sizeInfo := []uint64{
				dimSize1,
			}
			for i1 := range o.JobData {
				i1 := i1
				if uint64(i1) >= sizeInfo[0] {
					break
				}
				if o.JobData[i1] != nil {
					if err := o.JobData[i1].MarshalNDR(ctx, w); err != nil {
						return err
					}
				} else {
					if err := (&BranchOfficeJobData{}).MarshalNDR(ctx, w); err != nil {
						return err
					}
				}
			}
			for i1 := len(o.JobData); uint64(i1) < sizeInfo[0]; i1++ {
				if err := (&BranchOfficeJobData{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.JobData, _ptr_JobData); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *BranchOfficeJobDataContainer) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.JobDataEntriesCount); err != nil {
		return err
	}
	_ptr_JobData := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		// XXX: for opaque unmarshaling
		if o.JobDataEntriesCount > 0 && sizeInfo[0] == 0 {
			sizeInfo[0] = uint64(o.JobDataEntriesCount)
		}
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array o.JobData", sizeInfo[0])
		}
		o.JobData = make([]*BranchOfficeJobData, sizeInfo[0])
		for i1 := range o.JobData {
			i1 := i1
			if o.JobData[i1] == nil {
				o.JobData[i1] = &BranchOfficeJobData{}
			}
			if err := o.JobData[i1].UnmarshalNDR(ctx, w); err != nil {
				return err
			}
		}
		return nil
	})
	_s_JobData := func(ptr interface{}) { o.JobData = *ptr.(*[]*BranchOfficeJobData) }
	if err := w.ReadPointer(&o.JobData, _s_JobData, _ptr_JobData); err != nil {
		return err
	}
	return nil
}

// PrintPropertyType type represents EPrintPropertyType RPC enumeration.
//
// The EPrintPropertyType enumeration defines the data types for different printing
// properties.
type PrintPropertyType uint16

var (
	// kPropertyTypeString: A string data type.
	PrintPropertyTypeString PrintPropertyType = 1
	// kPropertyTypeInt32: A 32-bit signed integer.
	PrintPropertyTypeInt32 PrintPropertyType = 2
	// kPropertyTypeInt64: A 64-bit signed integer.
	PrintPropertyTypeInt64 PrintPropertyType = 3
	// kPropertyTypeByte: A BYTE.
	PrintPropertyTypeByte PrintPropertyType = 4
	// kPropertyTypeTime: The SYSTEMTIME_CONTAINER data type, as specified in [MS-RPRN]
	// section 2.2.1.2.16.
	PrintPropertyTypeTime PrintPropertyType = 5
	// kPropertyTypeDevMode: The DEVMODE_CONTAINER data type, as specified in [MS-RPRN]
	// section 2.2.1.2.1.
	PrintPropertyTypeDevMode PrintPropertyType = 6
	// kPropertyTypeSD: The SECURITY_CONTAINER data type, as specified in [MS-RPRN] section
	// 2.2.1.2.13.
	PrintPropertyTypeSD PrintPropertyType = 7
	// kPropertyTypeNotificationReply: The NOTIFY_REPLY_CONTAINER data type, as specified
	// in section 2.2.7.
	PrintPropertyTypeNotificationReply PrintPropertyType = 8
	// kPropertyTypeNotificationOptions: The NOTIFY_OPTIONS_CONTAINER data type, as specified
	// in section 2.2.6.
	PrintPropertyTypeNotificationOptions PrintPropertyType = 9
)

func (o PrintPropertyType) String() string {
	switch o {
	case PrintPropertyTypeString:
		return "PrintPropertyTypeString"
	case PrintPropertyTypeInt32:
		return "PrintPropertyTypeInt32"
	case PrintPropertyTypeInt64:
		return "PrintPropertyTypeInt64"
	case PrintPropertyTypeByte:
		return "PrintPropertyTypeByte"
	case PrintPropertyTypeTime:
		return "PrintPropertyTypeTime"
	case PrintPropertyTypeDevMode:
		return "PrintPropertyTypeDevMode"
	case PrintPropertyTypeSD:
		return "PrintPropertyTypeSD"
	case PrintPropertyTypeNotificationReply:
		return "PrintPropertyTypeNotificationReply"
	case PrintPropertyTypeNotificationOptions:
		return "PrintPropertyTypeNotificationOptions"
	}
	return "Invalid"
}

// RemoteNotify structure represents RMTNTFY_HANDLE RPC structure.
type RemoteNotify dcetypes.ContextHandle

func (o *RemoteNotify) ContextHandle() *dcetypes.ContextHandle { return (*dcetypes.ContextHandle)(o) }

func (o *RemoteNotify) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *RemoteNotify) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(4); err != nil {
		return err
	}
	if err := w.WriteData(o.Attributes); err != nil {
		return err
	}
	if o.UUID != nil {
		if err := o.UUID.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&dtyp.GUID{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	return nil
}
func (o *RemoteNotify) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(4); err != nil {
		return err
	}
	if err := w.ReadData(&o.Attributes); err != nil {
		return err
	}
	if o.UUID == nil {
		o.UUID = &dtyp.GUID{}
	}
	if err := o.UUID.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	return nil
}

// NotifyReplyContainer structure represents NOTIFY_REPLY_CONTAINER RPC structure.
//
// The NOTIFY_REPLY_CONTAINER structure encapsulates an RPC_V2_NOTIFY_INFO structure
// ([MS-RPRN] section 2.2.1.13.3), which provides printer information members and current
// data for those members.
type NotifyReplyContainer struct {
	// pInfo: A pointer to an RPC_V2_NOTIFY_INFO.
	Info *V2NotifyInfo `idl:"name:pInfo" json:"info"`
}

func (o *NotifyReplyContainer) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *NotifyReplyContainer) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(6); err != nil {
		return err
	}
	if o.Info != nil {
		_ptr_pInfo := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.Info != nil {
				if err := o.Info.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&V2NotifyInfo{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.Info, _ptr_pInfo); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *NotifyReplyContainer) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(6); err != nil {
		return err
	}
	_ptr_pInfo := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.Info == nil {
			o.Info = &V2NotifyInfo{}
		}
		if err := o.Info.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_pInfo := func(ptr interface{}) { o.Info = *ptr.(**V2NotifyInfo) }
	if err := w.ReadPointer(&o.Info, _s_pInfo, _ptr_pInfo); err != nil {
		return err
	}
	return nil
}

// NotifyOptionsContainer structure represents NOTIFY_OPTIONS_CONTAINER RPC structure.
//
// The NOTIFY_OPTIONS_CONTAINER structure encapsulates an RPC_V2_NOTIFY_OPTIONS structure
// ([MS-RPRN] section 2.2.1.13.1), which specifies options for a change notification
// object that monitors a printer or print server for changes in state.
type NotifyOptionsContainer struct {
	// pOptions: A pointer to an RPC_V2_NOTIFY_OPTIONS.
	Options *V2NotifyOptions `idl:"name:pOptions" json:"options"`
}

func (o *NotifyOptionsContainer) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *NotifyOptionsContainer) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(6); err != nil {
		return err
	}
	if o.Options != nil {
		_ptr_pOptions := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if o.Options != nil {
				if err := o.Options.MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&V2NotifyOptions{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.Options, _ptr_pOptions); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *NotifyOptionsContainer) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(6); err != nil {
		return err
	}
	_ptr_pOptions := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if o.Options == nil {
			o.Options = &V2NotifyOptions{}
		}
		if err := o.Options.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		return nil
	})
	_s_pOptions := func(ptr interface{}) { o.Options = *ptr.(**V2NotifyOptions) }
	if err := w.ReadPointer(&o.Options, _s_pOptions, _ptr_pOptions); err != nil {
		return err
	}
	return nil
}

// PrintPropertyValue structure represents RpcPrintPropertyValue RPC structure.
//
// The RpcPrintPropertyValue structure specifies a data type and its value. Data types
// are members of the enumeration EPrintPropertyType, specified in section 2.2.1.
type PrintPropertyValue struct {
	// ePropertyType: A value from the EPrintPropertyType enumeration that specifies the
	// data type of the variable.
	PropertyType PrintPropertyType `idl:"name:ePropertyType" json:"property_type"`
	// value: An information structure that corresponds to the type of property specified
	// by the ePropertyType member. Information containers and structures are defined in
	// [MS-RPRN] sections 2.2.1 and 2.2.2.
	Value *PrintPropertyValue_Value `idl:"name:value;switch_is:ePropertyType" json:"value"`
}

func (o *PrintPropertyValue) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *PrintPropertyValue) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(8); err != nil {
		return err
	}
	if err := w.WriteEnum(uint16(o.PropertyType)); err != nil {
		return err
	}
	_swValue := uint16(o.PropertyType)
	if o.Value != nil {
		if err := o.Value.MarshalUnionNDR(ctx, w, _swValue); err != nil {
			return err
		}
	} else {
		if err := (&PrintPropertyValue_Value{}).MarshalUnionNDR(ctx, w, _swValue); err != nil {
			return err
		}
	}
	return nil
}
func (o *PrintPropertyValue) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(8); err != nil {
		return err
	}
	if err := w.ReadEnum((*uint16)(&o.PropertyType)); err != nil {
		return err
	}
	if o.Value == nil {
		o.Value = &PrintPropertyValue_Value{}
	}
	_swValue := uint16(o.PropertyType)
	if err := o.Value.UnmarshalUnionNDR(ctx, w, _swValue); err != nil {
		return err
	}
	return nil
}

// PrintPropertyValue_Value structure represents RpcPrintPropertyValue union anonymous member.
//
// The RpcPrintPropertyValue structure specifies a data type and its value. Data types
// are members of the enumeration EPrintPropertyType, specified in section 2.2.1.
type PrintPropertyValue_Value struct {
	// Types that are assignable to Value
	//
	// *PrintPropertyValue_PropertyString
	// *PrintPropertyValue_PropertyInt32
	// *PrintPropertyValue_PropertyInt64
	// *PrintPropertyValue_PropertyByte
	// *PrintPropertyValue_PropertyTimeContainer
	// *PrintPropertyValue_PropertyDevModeContainer
	// *PrintPropertyValue_PropertySDContainer
	// *PrintPropertyValue_PropertyReplyContainer
	// *PrintPropertyValue_PropertyOptionsContainer
	Value is_PrintPropertyValue_Value `json:"value"`
}

func (o *PrintPropertyValue_Value) GetValue() any {
	if o == nil {
		return nil
	}
	switch value := (interface{})(o.Value).(type) {
	case *PrintPropertyValue_PropertyString:
		if value != nil {
			return value.PropertyString
		}
	case *PrintPropertyValue_PropertyInt32:
		if value != nil {
			return value.PropertyInt32
		}
	case *PrintPropertyValue_PropertyInt64:
		if value != nil {
			return value.PropertyInt64
		}
	case *PrintPropertyValue_PropertyByte:
		if value != nil {
			return value.PropertyByte
		}
	case *PrintPropertyValue_PropertyTimeContainer:
		if value != nil {
			return value.PropertyTimeContainer
		}
	case *PrintPropertyValue_PropertyDevModeContainer:
		if value != nil {
			return value.PropertyDevModeContainer
		}
	case *PrintPropertyValue_PropertySDContainer:
		if value != nil {
			return value.PropertySDContainer
		}
	case *PrintPropertyValue_PropertyReplyContainer:
		if value != nil {
			return value.PropertyReplyContainer
		}
	case *PrintPropertyValue_PropertyOptionsContainer:
		if value != nil {
			return value.PropertyOptionsContainer
		}
	}
	return nil
}

type is_PrintPropertyValue_Value interface {
	ndr.Marshaler
	ndr.Unmarshaler
	is_PrintPropertyValue_Value()
}

func (o *PrintPropertyValue_Value) NDRSwitchValue(sw uint16) uint16 {
	if o == nil {
		return uint16(0)
	}
	switch (interface{})(o.Value).(type) {
	case *PrintPropertyValue_PropertyString:
		return uint16(1)
	case *PrintPropertyValue_PropertyInt32:
		return uint16(2)
	case *PrintPropertyValue_PropertyInt64:
		return uint16(3)
	case *PrintPropertyValue_PropertyByte:
		return uint16(4)
	case *PrintPropertyValue_PropertyTimeContainer:
		return uint16(5)
	case *PrintPropertyValue_PropertyDevModeContainer:
		return uint16(6)
	case *PrintPropertyValue_PropertySDContainer:
		return uint16(7)
	case *PrintPropertyValue_PropertyReplyContainer:
		return uint16(8)
	case *PrintPropertyValue_PropertyOptionsContainer:
		return uint16(9)
	}
	return uint16(0)
}

func (o *PrintPropertyValue_Value) MarshalUnionNDR(ctx context.Context, w ndr.Writer, sw uint16) error {
	if err := w.WriteUnionAlign(8); err != nil {
		return err
	}
	if err := w.WriteSwitch(ndr.Enum(uint16(sw))); err != nil {
		return err
	}
	// ms_union
	if err := w.WriteAlign(8); err != nil {
		return err
	}
	switch sw {
	case uint16(1):
		_o, _ := o.Value.(*PrintPropertyValue_PropertyString)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PrintPropertyValue_PropertyString{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint16(2):
		_o, _ := o.Value.(*PrintPropertyValue_PropertyInt32)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PrintPropertyValue_PropertyInt32{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint16(3):
		_o, _ := o.Value.(*PrintPropertyValue_PropertyInt64)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PrintPropertyValue_PropertyInt64{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint16(4):
		_o, _ := o.Value.(*PrintPropertyValue_PropertyByte)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PrintPropertyValue_PropertyByte{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint16(5):
		_o, _ := o.Value.(*PrintPropertyValue_PropertyTimeContainer)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PrintPropertyValue_PropertyTimeContainer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint16(6):
		_o, _ := o.Value.(*PrintPropertyValue_PropertyDevModeContainer)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PrintPropertyValue_PropertyDevModeContainer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint16(7):
		_o, _ := o.Value.(*PrintPropertyValue_PropertySDContainer)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PrintPropertyValue_PropertySDContainer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint16(8):
		_o, _ := o.Value.(*PrintPropertyValue_PropertyReplyContainer)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PrintPropertyValue_PropertyReplyContainer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint16(9):
		_o, _ := o.Value.(*PrintPropertyValue_PropertyOptionsContainer)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PrintPropertyValue_PropertyOptionsContainer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	default:
		return fmt.Errorf("unsupported switch case value %v", sw)
	}
	return nil
}

func (o *PrintPropertyValue_Value) UnmarshalUnionNDR(ctx context.Context, w ndr.Reader, sw uint16) error {
	if err := w.ReadUnionAlign(8); err != nil {
		return err
	}
	if err := w.ReadSwitch(ndr.Enum((*uint16)(&sw))); err != nil {
		return err
	}
	// ms_union
	if err := w.ReadAlign(8); err != nil {
		return err
	}
	switch sw {
	case uint16(1):
		o.Value = &PrintPropertyValue_PropertyString{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint16(2):
		o.Value = &PrintPropertyValue_PropertyInt32{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint16(3):
		o.Value = &PrintPropertyValue_PropertyInt64{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint16(4):
		o.Value = &PrintPropertyValue_PropertyByte{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint16(5):
		o.Value = &PrintPropertyValue_PropertyTimeContainer{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint16(6):
		o.Value = &PrintPropertyValue_PropertyDevModeContainer{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint16(7):
		o.Value = &PrintPropertyValue_PropertySDContainer{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint16(8):
		o.Value = &PrintPropertyValue_PropertyReplyContainer{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint16(9):
		o.Value = &PrintPropertyValue_PropertyOptionsContainer{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	default:
		return fmt.Errorf("unsupported switch case value %v", sw)
	}
	return nil
}

// PrintPropertyValue_PropertyString structure represents PrintPropertyValue_Value RPC union arm.
//
// It has following labels: 1
type PrintPropertyValue_PropertyString struct {
	// propertyString: A string.
	PropertyString string `idl:"name:propertyString;string" json:"property_string"`
}

func (*PrintPropertyValue_PropertyString) is_PrintPropertyValue_Value() {}

func (o *PrintPropertyValue_PropertyString) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.PropertyString != "" {
		_ptr_propertyString := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.PropertyString); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.PropertyString, _ptr_propertyString); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *PrintPropertyValue_PropertyString) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_propertyString := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.PropertyString); err != nil {
			return err
		}
		return nil
	})
	_s_propertyString := func(ptr interface{}) { o.PropertyString = *ptr.(*string) }
	if err := w.ReadPointer(&o.PropertyString, _s_propertyString, _ptr_propertyString); err != nil {
		return err
	}
	return nil
}

// PrintPropertyValue_PropertyInt32 structure represents PrintPropertyValue_Value RPC union arm.
//
// It has following labels: 2
type PrintPropertyValue_PropertyInt32 struct {
	// propertyInt32: A 32-bit signed integer.
	PropertyInt32 int32 `idl:"name:propertyInt32" json:"property_int32"`
}

func (*PrintPropertyValue_PropertyInt32) is_PrintPropertyValue_Value() {}

func (o *PrintPropertyValue_PropertyInt32) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := w.WriteData(o.PropertyInt32); err != nil {
		return err
	}
	return nil
}
func (o *PrintPropertyValue_PropertyInt32) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadData(&o.PropertyInt32); err != nil {
		return err
	}
	return nil
}

// PrintPropertyValue_PropertyInt64 structure represents PrintPropertyValue_Value RPC union arm.
//
// It has following labels: 3
type PrintPropertyValue_PropertyInt64 struct {
	// propertyInt64: A 64-bit signed integer.
	PropertyInt64 int64 `idl:"name:propertyInt64" json:"property_int64"`
}

func (*PrintPropertyValue_PropertyInt64) is_PrintPropertyValue_Value() {}

func (o *PrintPropertyValue_PropertyInt64) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := w.WriteData(o.PropertyInt64); err != nil {
		return err
	}
	return nil
}
func (o *PrintPropertyValue_PropertyInt64) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadData(&o.PropertyInt64); err != nil {
		return err
	}
	return nil
}

// PrintPropertyValue_PropertyByte structure represents PrintPropertyValue_Value RPC union arm.
//
// It has following labels: 4
type PrintPropertyValue_PropertyByte struct {
	// propertyByte: A BYTE.
	PropertyByte uint8 `idl:"name:propertyByte" json:"property_byte"`
}

func (*PrintPropertyValue_PropertyByte) is_PrintPropertyValue_Value() {}

func (o *PrintPropertyValue_PropertyByte) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := w.WriteData(o.PropertyByte); err != nil {
		return err
	}
	return nil
}
func (o *PrintPropertyValue_PropertyByte) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadData(&o.PropertyByte); err != nil {
		return err
	}
	return nil
}

// PrintPropertyValue_PropertyTimeContainer structure represents PrintPropertyValue_Value RPC union arm.
//
// It has following labels: 5
type PrintPropertyValue_PropertyTimeContainer struct {
	// propertyTimeContainer: A SYSTEMTIME_CONTAINER, specified in [MS-RPRN] section 2.2.1.2.16.
	PropertyTimeContainer *SystemTimeContainer `idl:"name:propertyTimeContainer" json:"property_time_container"`
}

func (*PrintPropertyValue_PropertyTimeContainer) is_PrintPropertyValue_Value() {}

func (o *PrintPropertyValue_PropertyTimeContainer) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.PropertyTimeContainer != nil {
		if err := o.PropertyTimeContainer.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&SystemTimeContainer{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	return nil
}
func (o *PrintPropertyValue_PropertyTimeContainer) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if o.PropertyTimeContainer == nil {
		o.PropertyTimeContainer = &SystemTimeContainer{}
	}
	if err := o.PropertyTimeContainer.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	return nil
}

// PrintPropertyValue_PropertyDevModeContainer structure represents PrintPropertyValue_Value RPC union arm.
//
// It has following labels: 6
type PrintPropertyValue_PropertyDevModeContainer struct {
	// propertyDevModeContainer: A DEVMODE_CONTAINER, specified in [MS-RPRN] section 2.2.1.2.1.
	PropertyDevModeContainer *DevModeContainer `idl:"name:propertyDevModeContainer" json:"property_dev_mode_container"`
}

func (*PrintPropertyValue_PropertyDevModeContainer) is_PrintPropertyValue_Value() {}

func (o *PrintPropertyValue_PropertyDevModeContainer) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.PropertyDevModeContainer != nil {
		if err := o.PropertyDevModeContainer.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&DevModeContainer{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	return nil
}
func (o *PrintPropertyValue_PropertyDevModeContainer) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if o.PropertyDevModeContainer == nil {
		o.PropertyDevModeContainer = &DevModeContainer{}
	}
	if err := o.PropertyDevModeContainer.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	return nil
}

// PrintPropertyValue_PropertySDContainer structure represents PrintPropertyValue_Value RPC union arm.
//
// It has following labels: 7
type PrintPropertyValue_PropertySDContainer struct {
	// propertySDContainer: A SECURITY_CONTAINER, specified in [MS-RPRN] section 2.2.1.2.13.
	PropertySDContainer *SecurityContainer `idl:"name:propertySDContainer" json:"property_sd_container"`
}

func (*PrintPropertyValue_PropertySDContainer) is_PrintPropertyValue_Value() {}

func (o *PrintPropertyValue_PropertySDContainer) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.PropertySDContainer != nil {
		if err := o.PropertySDContainer.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&SecurityContainer{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	return nil
}
func (o *PrintPropertyValue_PropertySDContainer) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if o.PropertySDContainer == nil {
		o.PropertySDContainer = &SecurityContainer{}
	}
	if err := o.PropertySDContainer.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	return nil
}

// PrintPropertyValue_PropertyReplyContainer structure represents PrintPropertyValue_Value RPC union arm.
//
// It has following labels: 8
type PrintPropertyValue_PropertyReplyContainer struct {
	// propertyReplyContainer: A NOTIFY_REPLY_CONTAINER, specified in section 2.2.7.
	PropertyReplyContainer *NotifyReplyContainer `idl:"name:propertyReplyContainer" json:"property_reply_container"`
}

func (*PrintPropertyValue_PropertyReplyContainer) is_PrintPropertyValue_Value() {}

func (o *PrintPropertyValue_PropertyReplyContainer) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.PropertyReplyContainer != nil {
		if err := o.PropertyReplyContainer.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&NotifyReplyContainer{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	return nil
}
func (o *PrintPropertyValue_PropertyReplyContainer) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if o.PropertyReplyContainer == nil {
		o.PropertyReplyContainer = &NotifyReplyContainer{}
	}
	if err := o.PropertyReplyContainer.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	return nil
}

// PrintPropertyValue_PropertyOptionsContainer structure represents PrintPropertyValue_Value RPC union arm.
//
// It has following labels: 9
type PrintPropertyValue_PropertyOptionsContainer struct {
	// propertyOptionsContainer: A NOTIFY_OPTIONS_CONTAINER, specified in section 2.2.6.
	PropertyOptionsContainer *NotifyOptionsContainer `idl:"name:propertyOptionsContainer" json:"property_options_container"`
}

func (*PrintPropertyValue_PropertyOptionsContainer) is_PrintPropertyValue_Value() {}

func (o *PrintPropertyValue_PropertyOptionsContainer) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.PropertyOptionsContainer != nil {
		if err := o.PropertyOptionsContainer.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&NotifyOptionsContainer{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	return nil
}
func (o *PrintPropertyValue_PropertyOptionsContainer) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if o.PropertyOptionsContainer == nil {
		o.PropertyOptionsContainer = &NotifyOptionsContainer{}
	}
	if err := o.PropertyOptionsContainer.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	return nil
}

// PrintNamedProperty structure represents RpcPrintNamedProperty RPC structure.
//
// The RpcPrintNamedProperty structure specifies a name/typed-value pair that defines
// a single property.
type PrintNamedProperty struct {
	// propertyName: A pointer to a string that specifies the name of the property.
	PropertyName string `idl:"name:propertyName;string" json:"property_name"`
	// propertyValue: An RpcPrintPropertyValue structure (section 2.2.2).
	//
	// When used as an input value, the propertyName member and the ePropertyType member
	// of propertyValue MUST be one of the following pairs:
	//
	//	+--------------+---------------+
	//	|              |               |
	//	| PROPERTYNAME | PROPERTYVALUE |
	//	|              |               |
	//	+--------------+---------------+
	//	+--------------+---------------+
	//	|
	//	+--------------+---------------+
	//	|
	//	+--------------+---------------+
	//	|
	//	+--------------+---------------+
	//	|
	//	+--------------+---------------+
	//	|
	//	+--------------+---------------+
	//
	// When used as an output value, the propertyName and the ePropertyType member of propertyValue
	// MUST be one of the following pairs:
	//
	//	+--------------+---------------+
	//	|              |               |
	//	| PROPERTYNAME | PROPERTYVALUE |
	//	|              |               |
	//	+--------------+---------------+
	//	+--------------+---------------+
	//	|
	//	+--------------+---------------+
	//	|
	//	+--------------+---------------+
	//	|
	//	+--------------+---------------+
	//	|
	//	+--------------+---------------+
	PropertyValue *PrintPropertyValue `idl:"name:propertyValue" json:"property_value"`
}

func (o *PrintNamedProperty) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *PrintNamedProperty) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(8); err != nil {
		return err
	}
	if o.PropertyName != "" {
		_ptr_propertyName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.PropertyName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.PropertyName, _ptr_propertyName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.PropertyValue != nil {
		if err := o.PropertyValue.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&PrintPropertyValue{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	return nil
}
func (o *PrintNamedProperty) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(8); err != nil {
		return err
	}
	_ptr_propertyName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.PropertyName); err != nil {
			return err
		}
		return nil
	})
	_s_propertyName := func(ptr interface{}) { o.PropertyName = *ptr.(*string) }
	if err := w.ReadPointer(&o.PropertyName, _s_propertyName, _ptr_propertyName); err != nil {
		return err
	}
	if o.PropertyValue == nil {
		o.PropertyValue = &PrintPropertyValue{}
	}
	if err := o.PropertyValue.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	return nil
}

// PrintPropertiesCollection structure represents RpcPrintPropertiesCollection RPC structure.
//
// The RpcPrintPropertiesCollection structure holds a collection of name/typed-value
// pairs.
type PrintPropertiesCollection struct {
	// numberOfProperties: The number of properties in the collection, which MUST be between
	// zero and 50, inclusive.
	NumberOfProperties uint32 `idl:"name:numberOfProperties" json:"number_of_properties"`
	// propertiesCollection: A pointer to an array of RpcPrintNamedProperty structures (section
	// 2.2.3).
	//
	// When used as input to specify notification filter settings, the following properties
	// MUST be present in the collection pointed to by the propertiesCollection member:
	//
	// * "RemoteNotifyFilter Flags"
	//
	// * "RemoteNotifyFilter Options"
	//
	// * "RemoteNotifyFilter NotifyOptions"
	//
	// * "RemoteNotifyFilter Color"
	//
	// When used as output to return notification data, the following properties MUST be
	// present in the collection pointed to by the propertiesCollection member:
	//
	// * "RemoteNotifyData Flags"
	//
	// * "RemoteNotifyData Info"
	//
	// * "RemoteNotifyData Color"
	PropertiesCollection []*PrintNamedProperty `idl:"name:propertiesCollection;size_is:(numberOfProperties);pointer:unique" json:"properties_collection"`
}

func (o *PrintPropertiesCollection) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if o.PropertiesCollection != nil && o.NumberOfProperties == 0 {
		o.NumberOfProperties = uint32(len(o.PropertiesCollection))
	}
	if o.NumberOfProperties > uint32(50) {
		return fmt.Errorf("NumberOfProperties is out of range")
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *PrintPropertiesCollection) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.NumberOfProperties); err != nil {
		return err
	}
	if o.PropertiesCollection != nil || o.NumberOfProperties > 0 {
		_ptr_propertiesCollection := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			dimSize1 := uint64(o.NumberOfProperties)
			if err := w.WriteSize(dimSize1); err != nil {
				return err
			}
			sizeInfo := []uint64{
				dimSize1,
			}
			for i1 := range o.PropertiesCollection {
				i1 := i1
				if uint64(i1) >= sizeInfo[0] {
					break
				}
				if o.PropertiesCollection[i1] != nil {
					if err := o.PropertiesCollection[i1].MarshalNDR(ctx, w); err != nil {
						return err
					}
				} else {
					if err := (&PrintNamedProperty{}).MarshalNDR(ctx, w); err != nil {
						return err
					}
				}
			}
			for i1 := len(o.PropertiesCollection); uint64(i1) < sizeInfo[0]; i1++ {
				if err := (&PrintNamedProperty{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.PropertiesCollection, _ptr_propertiesCollection); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *PrintPropertiesCollection) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.NumberOfProperties); err != nil {
		return err
	}
	_ptr_propertiesCollection := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		// XXX: for opaque unmarshaling
		if o.NumberOfProperties > 0 && sizeInfo[0] == 0 {
			sizeInfo[0] = uint64(o.NumberOfProperties)
		}
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array o.PropertiesCollection", sizeInfo[0])
		}
		o.PropertiesCollection = make([]*PrintNamedProperty, sizeInfo[0])
		for i1 := range o.PropertiesCollection {
			i1 := i1
			if o.PropertiesCollection[i1] == nil {
				o.PropertiesCollection[i1] = &PrintNamedProperty{}
			}
			if err := o.PropertiesCollection[i1].UnmarshalNDR(ctx, w); err != nil {
				return err
			}
		}
		return nil
	})
	_s_propertiesCollection := func(ptr interface{}) { o.PropertiesCollection = *ptr.(*[]*PrintNamedProperty) }
	if err := w.ReadPointer(&o.PropertiesCollection, _s_propertiesCollection, _ptr_propertiesCollection); err != nil {
		return err
	}
	return nil
}

// CorePrinterDriver structure represents CORE_PRINTER_DRIVER RPC structure.
//
// The CORE_PRINTER_DRIVER structure specifies information that identifies a specific
// core printer driver. See the RpcAsyncGetCorePrinterDrivers method (section 3.1.4.2.9)
// for an example of its use.
type CorePrinterDriver struct {
	// CoreDriverGUID: A GUID value ([MS-DTYP] sections 2.3.4, 2.3.4.2, and 2.3.4.3) that
	// uniquely identifies the package.
	CoreDriverGUID *dtyp.GUID `idl:"name:CoreDriverGUID" json:"core_driver_guid"`
	// ftDriverDate: A FILETIME value ([MS-DTYP] section 2.3.3) that specifies the date
	// this package was published.
	DriverDate *dtyp.Filetime `idl:"name:ftDriverDate" json:"driver_date"`
	// dwlDriverVersion: A 64-bit value that specifies the version of the core printer driver.
	// This version number MAY be used to match the driver version in the driver installation
	// control file.<5>
	DriverVersion uint64 `idl:"name:dwlDriverVersion" json:"driver_version"`
	// szPackageID: A string that specifies the package name. The server MUST generate a
	// unique package name when the package is uploaded using the RpcAsyncUploadPrinterDriverPackage
	// method (section 3.1.4.2.8). The length of the string MUST not exceed the maximum
	// path size, which is 260 characters, including a null-terminated character.
	PackageID []uint16 `idl:"name:szPackageID" json:"package_id"`
}

func (o *CorePrinterDriver) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *CorePrinterDriver) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(8); err != nil {
		return err
	}
	if o.CoreDriverGUID != nil {
		if err := o.CoreDriverGUID.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&dtyp.GUID{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	if o.DriverDate != nil {
		if err := o.DriverDate.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&dtyp.Filetime{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	if err := w.WriteData(o.DriverVersion); err != nil {
		return err
	}
	for i1 := range o.PackageID {
		i1 := i1
		if uint64(i1) >= 260 {
			break
		}
		if err := w.WriteData(o.PackageID[i1]); err != nil {
			return err
		}
	}
	for i1 := len(o.PackageID); uint64(i1) < 260; i1++ {
		if err := w.WriteData(uint16(0)); err != nil {
			return err
		}
	}
	if err := w.WriteTrailingGap(8); err != nil {
		return err
	}
	return nil
}
func (o *CorePrinterDriver) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(8); err != nil {
		return err
	}
	if o.CoreDriverGUID == nil {
		o.CoreDriverGUID = &dtyp.GUID{}
	}
	if err := o.CoreDriverGUID.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	if o.DriverDate == nil {
		o.DriverDate = &dtyp.Filetime{}
	}
	if err := o.DriverDate.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	if err := w.ReadData(&o.DriverVersion); err != nil {
		return err
	}
	o.PackageID = make([]uint16, 260)
	for i1 := range o.PackageID {
		i1 := i1
		if err := w.ReadData(&o.PackageID[i1]); err != nil {
			return err
		}
	}
	if err := w.ReadTrailingGap(8); err != nil {
		return err
	}
	return nil
}

// PrintJobPropertyValue structure represents RPC_PrintJobPropertyValue RPC structure.
type PrintJobPropertyValue struct {
	PropertyType PrintJobPropertyType         `idl:"name:ePropertyType" json:"property_type"`
	Value        *PrintJobPropertyValue_Value `idl:"name:value;switch_is:ePropertyType" json:"value"`
}

func (o *PrintJobPropertyValue) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *PrintJobPropertyValue) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(8); err != nil {
		return err
	}
	if err := w.WriteEnum(uint16(o.PropertyType)); err != nil {
		return err
	}
	_swValue := uint16(o.PropertyType)
	if o.Value != nil {
		if err := o.Value.MarshalUnionNDR(ctx, w, _swValue); err != nil {
			return err
		}
	} else {
		if err := (&PrintJobPropertyValue_Value{}).MarshalUnionNDR(ctx, w, _swValue); err != nil {
			return err
		}
	}
	return nil
}
func (o *PrintJobPropertyValue) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(8); err != nil {
		return err
	}
	if err := w.ReadEnum((*uint16)(&o.PropertyType)); err != nil {
		return err
	}
	if o.Value == nil {
		o.Value = &PrintJobPropertyValue_Value{}
	}
	_swValue := uint16(o.PropertyType)
	if err := o.Value.UnmarshalUnionNDR(ctx, w, _swValue); err != nil {
		return err
	}
	return nil
}

// PrintJobPropertyValue_Value structure represents RPC_PrintJobPropertyValue union anonymous member.
type PrintJobPropertyValue_Value struct {
	// Types that are assignable to Value
	//
	// *PrintJobPropertyValue_PropertyString
	// *PrintJobPropertyValue_PropertyInt32
	// *PrintJobPropertyValue_PropertyInt64
	// *PrintJobPropertyValue_PropertyByte
	// *PrintJobPropertyValue_PropertyBlob
	Value is_PrintJobPropertyValue_Value `json:"value"`
}

func (o *PrintJobPropertyValue_Value) GetValue() any {
	if o == nil {
		return nil
	}
	switch value := (interface{})(o.Value).(type) {
	case *PrintJobPropertyValue_PropertyString:
		if value != nil {
			return value.PropertyString
		}
	case *PrintJobPropertyValue_PropertyInt32:
		if value != nil {
			return value.PropertyInt32
		}
	case *PrintJobPropertyValue_PropertyInt64:
		if value != nil {
			return value.PropertyInt64
		}
	case *PrintJobPropertyValue_PropertyByte:
		if value != nil {
			return value.PropertyByte
		}
	case *PrintJobPropertyValue_PropertyBlob:
		if value != nil {
			return value.PropertyBlob
		}
	}
	return nil
}

type is_PrintJobPropertyValue_Value interface {
	ndr.Marshaler
	ndr.Unmarshaler
	is_PrintJobPropertyValue_Value()
}

func (o *PrintJobPropertyValue_Value) NDRSwitchValue(sw uint16) uint16 {
	if o == nil {
		return uint16(0)
	}
	switch (interface{})(o.Value).(type) {
	case *PrintJobPropertyValue_PropertyString:
		return uint16(1)
	case *PrintJobPropertyValue_PropertyInt32:
		return uint16(2)
	case *PrintJobPropertyValue_PropertyInt64:
		return uint16(3)
	case *PrintJobPropertyValue_PropertyByte:
		return uint16(4)
	case *PrintJobPropertyValue_PropertyBlob:
		return uint16(5)
	}
	return uint16(0)
}

func (o *PrintJobPropertyValue_Value) MarshalUnionNDR(ctx context.Context, w ndr.Writer, sw uint16) error {
	if err := w.WriteUnionAlign(8); err != nil {
		return err
	}
	if err := w.WriteSwitch(ndr.Enum(uint16(sw))); err != nil {
		return err
	}
	// ms_union
	if err := w.WriteAlign(8); err != nil {
		return err
	}
	switch sw {
	case uint16(1):
		_o, _ := o.Value.(*PrintJobPropertyValue_PropertyString)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PrintJobPropertyValue_PropertyString{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint16(2):
		_o, _ := o.Value.(*PrintJobPropertyValue_PropertyInt32)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PrintJobPropertyValue_PropertyInt32{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint16(3):
		_o, _ := o.Value.(*PrintJobPropertyValue_PropertyInt64)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PrintJobPropertyValue_PropertyInt64{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint16(4):
		_o, _ := o.Value.(*PrintJobPropertyValue_PropertyByte)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PrintJobPropertyValue_PropertyByte{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	case uint16(5):
		_o, _ := o.Value.(*PrintJobPropertyValue_PropertyBlob)
		if _o != nil {
			if err := _o.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PrintJobPropertyValue_PropertyBlob{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	default:
		return fmt.Errorf("unsupported switch case value %v", sw)
	}
	return nil
}

func (o *PrintJobPropertyValue_Value) UnmarshalUnionNDR(ctx context.Context, w ndr.Reader, sw uint16) error {
	if err := w.ReadUnionAlign(8); err != nil {
		return err
	}
	if err := w.ReadSwitch(ndr.Enum((*uint16)(&sw))); err != nil {
		return err
	}
	// ms_union
	if err := w.ReadAlign(8); err != nil {
		return err
	}
	switch sw {
	case uint16(1):
		o.Value = &PrintJobPropertyValue_PropertyString{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint16(2):
		o.Value = &PrintJobPropertyValue_PropertyInt32{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint16(3):
		o.Value = &PrintJobPropertyValue_PropertyInt64{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint16(4):
		o.Value = &PrintJobPropertyValue_PropertyByte{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	case uint16(5):
		o.Value = &PrintJobPropertyValue_PropertyBlob{}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	default:
		return fmt.Errorf("unsupported switch case value %v", sw)
	}
	return nil
}

// PrintJobPropertyValue_PropertyString structure represents PrintJobPropertyValue_Value RPC union arm.
//
// It has following labels: 1
type PrintJobPropertyValue_PropertyString struct {
	PropertyString string `idl:"name:propertyString;string" json:"property_string"`
}

func (*PrintJobPropertyValue_PropertyString) is_PrintJobPropertyValue_Value() {}

func (o *PrintJobPropertyValue_PropertyString) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.PropertyString != "" {
		_ptr_propertyString := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.PropertyString); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.PropertyString, _ptr_propertyString); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *PrintJobPropertyValue_PropertyString) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	_ptr_propertyString := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.PropertyString); err != nil {
			return err
		}
		return nil
	})
	_s_propertyString := func(ptr interface{}) { o.PropertyString = *ptr.(*string) }
	if err := w.ReadPointer(&o.PropertyString, _s_propertyString, _ptr_propertyString); err != nil {
		return err
	}
	return nil
}

// PrintJobPropertyValue_PropertyInt32 structure represents PrintJobPropertyValue_Value RPC union arm.
//
// It has following labels: 2
type PrintJobPropertyValue_PropertyInt32 struct {
	PropertyInt32 int32 `idl:"name:propertyInt32" json:"property_int32"`
}

func (*PrintJobPropertyValue_PropertyInt32) is_PrintJobPropertyValue_Value() {}

func (o *PrintJobPropertyValue_PropertyInt32) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := w.WriteData(o.PropertyInt32); err != nil {
		return err
	}
	return nil
}
func (o *PrintJobPropertyValue_PropertyInt32) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadData(&o.PropertyInt32); err != nil {
		return err
	}
	return nil
}

// PrintJobPropertyValue_PropertyInt64 structure represents PrintJobPropertyValue_Value RPC union arm.
//
// It has following labels: 3
type PrintJobPropertyValue_PropertyInt64 struct {
	PropertyInt64 int64 `idl:"name:propertyInt64" json:"property_int64"`
}

func (*PrintJobPropertyValue_PropertyInt64) is_PrintJobPropertyValue_Value() {}

func (o *PrintJobPropertyValue_PropertyInt64) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := w.WriteData(o.PropertyInt64); err != nil {
		return err
	}
	return nil
}
func (o *PrintJobPropertyValue_PropertyInt64) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadData(&o.PropertyInt64); err != nil {
		return err
	}
	return nil
}

// PrintJobPropertyValue_PropertyByte structure represents PrintJobPropertyValue_Value RPC union arm.
//
// It has following labels: 4
type PrintJobPropertyValue_PropertyByte struct {
	PropertyByte uint8 `idl:"name:propertyByte" json:"property_byte"`
}

func (*PrintJobPropertyValue_PropertyByte) is_PrintJobPropertyValue_Value() {}

func (o *PrintJobPropertyValue_PropertyByte) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := w.WriteData(o.PropertyByte); err != nil {
		return err
	}
	return nil
}
func (o *PrintJobPropertyValue_PropertyByte) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadData(&o.PropertyByte); err != nil {
		return err
	}
	return nil
}

// PrintJobPropertyValue_PropertyBlob structure represents PrintJobPropertyValue_Value RPC union arm.
//
// It has following labels: 5
type PrintJobPropertyValue_PropertyBlob struct {
	PropertyBlob *PrintJobPropertyValue_Value_PropertyBlob `idl:"name:propertyBlob" json:"property_blob"`
}

func (*PrintJobPropertyValue_PropertyBlob) is_PrintJobPropertyValue_Value() {}

func (o *PrintJobPropertyValue_PropertyBlob) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if o.PropertyBlob != nil {
		if err := o.PropertyBlob.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&PrintJobPropertyValue_Value_PropertyBlob{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	return nil
}
func (o *PrintJobPropertyValue_PropertyBlob) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if o.PropertyBlob == nil {
		o.PropertyBlob = &PrintJobPropertyValue_Value_PropertyBlob{}
	}
	if err := o.PropertyBlob.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	return nil
}

// PrintJobPropertyValue_Value_PropertyBlob structure represents RPC_PrintJobPropertyValue structure anonymous member.
type PrintJobPropertyValue_Value_PropertyBlob struct {
	BufferLength uint32 `idl:"name:cbBuf" json:"buffer_length"`
	Buffer       []byte `idl:"name:pBuf;size_is:(cbBuf)" json:"buffer"`
}

func (o *PrintJobPropertyValue_Value_PropertyBlob) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if o.Buffer != nil && o.BufferLength == 0 {
		o.BufferLength = uint32(len(o.Buffer))
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *PrintJobPropertyValue_Value_PropertyBlob) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(9); err != nil {
		return err
	}
	if err := w.WriteData(o.BufferLength); err != nil {
		return err
	}
	if o.Buffer != nil || o.BufferLength > 0 {
		_ptr_pBuf := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			dimSize1 := uint64(o.BufferLength)
			if err := w.WriteSize(dimSize1); err != nil {
				return err
			}
			sizeInfo := []uint64{
				dimSize1,
			}
			for i1 := range o.Buffer {
				i1 := i1
				if uint64(i1) >= sizeInfo[0] {
					break
				}
				if err := w.WriteData(o.Buffer[i1]); err != nil {
					return err
				}
			}
			for i1 := len(o.Buffer); uint64(i1) < sizeInfo[0]; i1++ {
				if err := w.WriteData(uint8(0)); err != nil {
					return err
				}
			}
			return nil
		})
		if err := w.WritePointer(&o.Buffer, _ptr_pBuf); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	return nil
}
func (o *PrintJobPropertyValue_Value_PropertyBlob) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(9); err != nil {
		return err
	}
	if err := w.ReadData(&o.BufferLength); err != nil {
		return err
	}
	_ptr_pBuf := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		// XXX: for opaque unmarshaling
		if o.BufferLength > 0 && sizeInfo[0] == 0 {
			sizeInfo[0] = uint64(o.BufferLength)
		}
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array o.Buffer", sizeInfo[0])
		}
		o.Buffer = make([]byte, sizeInfo[0])
		for i1 := range o.Buffer {
			i1 := i1
			if err := w.ReadData(&o.Buffer[i1]); err != nil {
				return err
			}
		}
		return nil
	})
	_s_pBuf := func(ptr interface{}) { o.Buffer = *ptr.(*[]byte) }
	if err := w.ReadPointer(&o.Buffer, _s_pBuf, _ptr_pBuf); err != nil {
		return err
	}
	return nil
}

// PrintJobNamedProperty structure represents RPC_PrintJobNamedProperty RPC structure.
type PrintJobNamedProperty struct {
	PropertyName  string                 `idl:"name:propertyName;string" json:"property_name"`
	PropertyValue *PrintJobPropertyValue `idl:"name:propertyValue" json:"property_value"`
}

func (o *PrintJobNamedProperty) xxx_PreparePayload(ctx context.Context) error {
	if err := ndr.BeforePreparePayload(ctx, o); err != nil {
		return err
	}
	if err := ndr.AfterPreparePayload(ctx, o); err != nil {
		return err
	}
	return nil
}
func (o *PrintJobNamedProperty) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PreparePayload(ctx); err != nil {
		return err
	}
	if err := w.WriteAlign(8); err != nil {
		return err
	}
	if o.PropertyName != "" {
		_ptr_propertyName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
			if err := ndr.WriteUTF16NString(ctx, w, o.PropertyName); err != nil {
				return err
			}
			return nil
		})
		if err := w.WritePointer(&o.PropertyName, _ptr_propertyName); err != nil {
			return err
		}
	} else {
		if err := w.WritePointer(nil); err != nil {
			return err
		}
	}
	if o.PropertyValue != nil {
		if err := o.PropertyValue.MarshalNDR(ctx, w); err != nil {
			return err
		}
	} else {
		if err := (&PrintJobPropertyValue{}).MarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	return nil
}
func (o *PrintJobNamedProperty) UnmarshalNDR(ctx context.Context, w ndr.Reader) error {
	if err := w.ReadAlign(8); err != nil {
		return err
	}
	_ptr_propertyName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
		if err := ndr.ReadUTF16NString(ctx, w, &o.PropertyName); err != nil {
			return err
		}
		return nil
	})
	_s_propertyName := func(ptr interface{}) { o.PropertyName = *ptr.(*string) }
	if err := w.ReadPointer(&o.PropertyName, _s_propertyName, _ptr_propertyName); err != nil {
		return err
	}
	if o.PropertyValue == nil {
		o.PropertyValue = &PrintJobPropertyValue{}
	}
	if err := o.PropertyValue.UnmarshalNDR(ctx, w); err != nil {
		return err
	}
	return nil
}

type xxx_DefaultRemoteWinspoolClient struct {
	cc dcerpc.Conn
}

func (o *xxx_DefaultRemoteWinspoolClient) OpenPrinter(ctx context.Context, in *OpenPrinterRequest, opts ...dcerpc.CallOption) (*OpenPrinterResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &OpenPrinterResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) AddPrinter(ctx context.Context, in *AddPrinterRequest, opts ...dcerpc.CallOption) (*AddPrinterResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &AddPrinterResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) SetJob(ctx context.Context, in *SetJobRequest, opts ...dcerpc.CallOption) (*SetJobResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &SetJobResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) GetJob(ctx context.Context, in *GetJobRequest, opts ...dcerpc.CallOption) (*GetJobResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &GetJobResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) EnumJobs(ctx context.Context, in *EnumJobsRequest, opts ...dcerpc.CallOption) (*EnumJobsResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &EnumJobsResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) AddJob(ctx context.Context, in *AddJobRequest, opts ...dcerpc.CallOption) (*AddJobResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &AddJobResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) ScheduleJob(ctx context.Context, in *ScheduleJobRequest, opts ...dcerpc.CallOption) (*ScheduleJobResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &ScheduleJobResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) DeletePrinter(ctx context.Context, in *DeletePrinterRequest, opts ...dcerpc.CallOption) (*DeletePrinterResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &DeletePrinterResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) SetPrinter(ctx context.Context, in *SetPrinterRequest, opts ...dcerpc.CallOption) (*SetPrinterResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &SetPrinterResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) GetPrinter(ctx context.Context, in *GetPrinterRequest, opts ...dcerpc.CallOption) (*GetPrinterResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &GetPrinterResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) StartDocPrinter(ctx context.Context, in *StartDocPrinterRequest, opts ...dcerpc.CallOption) (*StartDocPrinterResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &StartDocPrinterResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) StartPagePrinter(ctx context.Context, in *StartPagePrinterRequest, opts ...dcerpc.CallOption) (*StartPagePrinterResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &StartPagePrinterResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) WritePrinter(ctx context.Context, in *WritePrinterRequest, opts ...dcerpc.CallOption) (*WritePrinterResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &WritePrinterResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) EndPagePrinter(ctx context.Context, in *EndPagePrinterRequest, opts ...dcerpc.CallOption) (*EndPagePrinterResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &EndPagePrinterResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) EndDocPrinter(ctx context.Context, in *EndDocPrinterRequest, opts ...dcerpc.CallOption) (*EndDocPrinterResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &EndDocPrinterResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) AbortPrinter(ctx context.Context, in *AbortPrinterRequest, opts ...dcerpc.CallOption) (*AbortPrinterResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &AbortPrinterResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) GetPrinterData(ctx context.Context, in *GetPrinterDataRequest, opts ...dcerpc.CallOption) (*GetPrinterDataResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &GetPrinterDataResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) GetPrinterDataEx(ctx context.Context, in *GetPrinterDataExRequest, opts ...dcerpc.CallOption) (*GetPrinterDataExResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &GetPrinterDataExResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) SetPrinterData(ctx context.Context, in *SetPrinterDataRequest, opts ...dcerpc.CallOption) (*SetPrinterDataResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &SetPrinterDataResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) SetPrinterDataEx(ctx context.Context, in *SetPrinterDataExRequest, opts ...dcerpc.CallOption) (*SetPrinterDataExResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &SetPrinterDataExResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) ClosePrinter(ctx context.Context, in *ClosePrinterRequest, opts ...dcerpc.CallOption) (*ClosePrinterResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &ClosePrinterResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) AddForm(ctx context.Context, in *AddFormRequest, opts ...dcerpc.CallOption) (*AddFormResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &AddFormResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) DeleteForm(ctx context.Context, in *DeleteFormRequest, opts ...dcerpc.CallOption) (*DeleteFormResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &DeleteFormResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) GetForm(ctx context.Context, in *GetFormRequest, opts ...dcerpc.CallOption) (*GetFormResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &GetFormResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) SetForm(ctx context.Context, in *SetFormRequest, opts ...dcerpc.CallOption) (*SetFormResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &SetFormResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) EnumForms(ctx context.Context, in *EnumFormsRequest, opts ...dcerpc.CallOption) (*EnumFormsResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &EnumFormsResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) GetPrinterDriver(ctx context.Context, in *GetPrinterDriverRequest, opts ...dcerpc.CallOption) (*GetPrinterDriverResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &GetPrinterDriverResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) EnumPrinterData(ctx context.Context, in *EnumPrinterDataRequest, opts ...dcerpc.CallOption) (*EnumPrinterDataResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &EnumPrinterDataResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) EnumPrinterDataEx(ctx context.Context, in *EnumPrinterDataExRequest, opts ...dcerpc.CallOption) (*EnumPrinterDataExResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &EnumPrinterDataExResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) EnumPrinterKey(ctx context.Context, in *EnumPrinterKeyRequest, opts ...dcerpc.CallOption) (*EnumPrinterKeyResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &EnumPrinterKeyResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) DeletePrinterData(ctx context.Context, in *DeletePrinterDataRequest, opts ...dcerpc.CallOption) (*DeletePrinterDataResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &DeletePrinterDataResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) DeletePrinterDataEx(ctx context.Context, in *DeletePrinterDataExRequest, opts ...dcerpc.CallOption) (*DeletePrinterDataExResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &DeletePrinterDataExResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) DeletePrinterKey(ctx context.Context, in *DeletePrinterKeyRequest, opts ...dcerpc.CallOption) (*DeletePrinterKeyResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &DeletePrinterKeyResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) XcvData(ctx context.Context, in *XcvDataRequest, opts ...dcerpc.CallOption) (*XcvDataResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &XcvDataResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) SendRecvBIDIData(ctx context.Context, in *SendRecvBIDIDataRequest, opts ...dcerpc.CallOption) (*SendRecvBIDIDataResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &SendRecvBIDIDataResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) CreatePrinterIC(ctx context.Context, in *CreatePrinterICRequest, opts ...dcerpc.CallOption) (*CreatePrinterICResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &CreatePrinterICResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) PlayGDIScriptOnPrinterIC(ctx context.Context, in *PlayGDIScriptOnPrinterICRequest, opts ...dcerpc.CallOption) (*PlayGDIScriptOnPrinterICResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &PlayGDIScriptOnPrinterICResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) DeletePrinterIC(ctx context.Context, in *DeletePrinterICRequest, opts ...dcerpc.CallOption) (*DeletePrinterICResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &DeletePrinterICResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) EnumPrinters(ctx context.Context, in *EnumPrintersRequest, opts ...dcerpc.CallOption) (*EnumPrintersResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &EnumPrintersResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) AddPrinterDriver(ctx context.Context, in *AddPrinterDriverRequest, opts ...dcerpc.CallOption) (*AddPrinterDriverResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &AddPrinterDriverResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) EnumPrinterDrivers(ctx context.Context, in *EnumPrinterDriversRequest, opts ...dcerpc.CallOption) (*EnumPrinterDriversResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &EnumPrinterDriversResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) GetPrinterDriverDirectory(ctx context.Context, in *GetPrinterDriverDirectoryRequest, opts ...dcerpc.CallOption) (*GetPrinterDriverDirectoryResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &GetPrinterDriverDirectoryResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) DeletePrinterDriver(ctx context.Context, in *DeletePrinterDriverRequest, opts ...dcerpc.CallOption) (*DeletePrinterDriverResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &DeletePrinterDriverResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) DeletePrinterDriverEx(ctx context.Context, in *DeletePrinterDriverExRequest, opts ...dcerpc.CallOption) (*DeletePrinterDriverExResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &DeletePrinterDriverExResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) AddPrintProcessor(ctx context.Context, in *AddPrintProcessorRequest, opts ...dcerpc.CallOption) (*AddPrintProcessorResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &AddPrintProcessorResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) EnumPrintProcessors(ctx context.Context, in *EnumPrintProcessorsRequest, opts ...dcerpc.CallOption) (*EnumPrintProcessorsResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &EnumPrintProcessorsResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) GetPrintProcessorDirectory(ctx context.Context, in *GetPrintProcessorDirectoryRequest, opts ...dcerpc.CallOption) (*GetPrintProcessorDirectoryResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &GetPrintProcessorDirectoryResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) EnumPorts(ctx context.Context, in *EnumPortsRequest, opts ...dcerpc.CallOption) (*EnumPortsResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &EnumPortsResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) EnumMonitors(ctx context.Context, in *EnumMonitorsRequest, opts ...dcerpc.CallOption) (*EnumMonitorsResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &EnumMonitorsResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) AddPort(ctx context.Context, in *AddPortRequest, opts ...dcerpc.CallOption) (*AddPortResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &AddPortResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) SetPort(ctx context.Context, in *SetPortRequest, opts ...dcerpc.CallOption) (*SetPortResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &SetPortResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) AddMonitor(ctx context.Context, in *AddMonitorRequest, opts ...dcerpc.CallOption) (*AddMonitorResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &AddMonitorResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) DeleteMonitor(ctx context.Context, in *DeleteMonitorRequest, opts ...dcerpc.CallOption) (*DeleteMonitorResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &DeleteMonitorResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) DeletePrintProcessor(ctx context.Context, in *DeletePrintProcessorRequest, opts ...dcerpc.CallOption) (*DeletePrintProcessorResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &DeletePrintProcessorResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) EnumPrintProcessorDataTypes(ctx context.Context, in *EnumPrintProcessorDataTypesRequest, opts ...dcerpc.CallOption) (*EnumPrintProcessorDataTypesResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &EnumPrintProcessorDataTypesResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) AddPerMachineConnection(ctx context.Context, in *AddPerMachineConnectionRequest, opts ...dcerpc.CallOption) (*AddPerMachineConnectionResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &AddPerMachineConnectionResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) DeletePerMachineConnection(ctx context.Context, in *DeletePerMachineConnectionRequest, opts ...dcerpc.CallOption) (*DeletePerMachineConnectionResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &DeletePerMachineConnectionResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) EnumPerMachineConnections(ctx context.Context, in *EnumPerMachineConnectionsRequest, opts ...dcerpc.CallOption) (*EnumPerMachineConnectionsResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &EnumPerMachineConnectionsResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) SyncRegisterForRemoteNotifications(ctx context.Context, in *SyncRegisterForRemoteNotificationsRequest, opts ...dcerpc.CallOption) (*SyncRegisterForRemoteNotificationsResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &SyncRegisterForRemoteNotificationsResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != int32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) SyncUnregisterForRemoteNotifications(ctx context.Context, in *SyncUnregisterForRemoteNotificationsRequest, opts ...dcerpc.CallOption) (*SyncUnregisterForRemoteNotificationsResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &SyncUnregisterForRemoteNotificationsResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != int32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) SyncRefreshRemoteNotifications(ctx context.Context, in *SyncRefreshRemoteNotificationsRequest, opts ...dcerpc.CallOption) (*SyncRefreshRemoteNotificationsResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &SyncRefreshRemoteNotificationsResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != int32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) GetRemoteNotifications(ctx context.Context, in *GetRemoteNotificationsRequest, opts ...dcerpc.CallOption) (*GetRemoteNotificationsResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &GetRemoteNotificationsResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != int32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) InstallPrinterDriverFromPackage(ctx context.Context, in *InstallPrinterDriverFromPackageRequest, opts ...dcerpc.CallOption) (*InstallPrinterDriverFromPackageResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &InstallPrinterDriverFromPackageResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != int32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) UploadPrinterDriverPackage(ctx context.Context, in *UploadPrinterDriverPackageRequest, opts ...dcerpc.CallOption) (*UploadPrinterDriverPackageResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &UploadPrinterDriverPackageResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != int32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) GetCorePrinterDrivers(ctx context.Context, in *GetCorePrinterDriversRequest, opts ...dcerpc.CallOption) (*GetCorePrinterDriversResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &GetCorePrinterDriversResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != int32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) CorePrinterDriverInstalled(ctx context.Context, in *CorePrinterDriverInstalledRequest, opts ...dcerpc.CallOption) (*CorePrinterDriverInstalledResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &CorePrinterDriverInstalledResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != int32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) GetPrinterDriverPackagePath(ctx context.Context, in *GetPrinterDriverPackagePathRequest, opts ...dcerpc.CallOption) (*GetPrinterDriverPackagePathResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &GetPrinterDriverPackagePathResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != int32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) DeletePrinterDriverPackage(ctx context.Context, in *DeletePrinterDriverPackageRequest, opts ...dcerpc.CallOption) (*DeletePrinterDriverPackageResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &DeletePrinterDriverPackageResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != int32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) ReadPrinter(ctx context.Context, in *ReadPrinterRequest, opts ...dcerpc.CallOption) (*ReadPrinterResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &ReadPrinterResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) ResetPrinter(ctx context.Context, in *ResetPrinterRequest, opts ...dcerpc.CallOption) (*ResetPrinterResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &ResetPrinterResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) GetJobNamedPropertyValue(ctx context.Context, in *GetJobNamedPropertyValueRequest, opts ...dcerpc.CallOption) (*GetJobNamedPropertyValueResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &GetJobNamedPropertyValueResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) SetJobNamedProperty(ctx context.Context, in *SetJobNamedPropertyRequest, opts ...dcerpc.CallOption) (*SetJobNamedPropertyResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &SetJobNamedPropertyResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) DeleteJobNamedProperty(ctx context.Context, in *DeleteJobNamedPropertyRequest, opts ...dcerpc.CallOption) (*DeleteJobNamedPropertyResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &DeleteJobNamedPropertyResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) EnumJobNamedProperties(ctx context.Context, in *EnumJobNamedPropertiesRequest, opts ...dcerpc.CallOption) (*EnumJobNamedPropertiesResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &EnumJobNamedPropertiesResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) LogJobInfoForBranchOffice(ctx context.Context, in *LogJobInfoForBranchOfficeRequest, opts ...dcerpc.CallOption) (*LogJobInfoForBranchOfficeResponse, error) {
	op := in.xxx_ToOp(ctx, nil)
	if err := o.cc.Invoke(ctx, op, opts...); err != nil {
		return nil, err
	}
	out := &LogJobInfoForBranchOfficeResponse{}
	out.xxx_FromOp(ctx, op)
	if op.Return != uint32(0) {
		return out, fmt.Errorf("%s: %w", op.OpName(), errors.New(ctx, op.Return))
	}
	return out, nil
}

func (o *xxx_DefaultRemoteWinspoolClient) AlterContext(ctx context.Context, opts ...dcerpc.Option) error {
	return o.cc.AlterContext(ctx, opts...)
}

func (o *xxx_DefaultRemoteWinspoolClient) Conn() dcerpc.Conn {
	return o.cc
}

func NewRemoteWinspoolClient(ctx context.Context, cc dcerpc.Conn, opts ...dcerpc.Option) (RemoteWinspoolClient, error) {
	cc, err := cc.Bind(ctx, append(opts, dcerpc.WithAbstractSyntax(RemoteWinspoolSyntaxV1_0))...)
	if err != nil {
		return nil, err
	}
	return &xxx_DefaultRemoteWinspoolClient{cc: cc}, nil
}

// xxx_OpenPrinterOperation structure represents the RpcAsyncOpenPrinter operation
type xxx_OpenPrinterOperation struct {
	PrinterName      string            `idl:"name:pPrinterName;string;pointer:unique" json:"printer_name"`
	Handle           *Printer          `idl:"name:pHandle" json:"handle"`
	DataType         string            `idl:"name:pDatatype;string;pointer:unique" json:"data_type"`
	DevModeContainer *DevModeContainer `idl:"name:pDevModeContainer" json:"dev_mode_container"`
	AccessRequired   uint32            `idl:"name:AccessRequired" json:"access_required"`
	ClientInfo       *ClientContainer  `idl:"name:pClientInfo" json:"client_info"`
	Return           uint32            `idl:"name:Return" json:"return"`
}

func (o *xxx_OpenPrinterOperation) OpNum() int { return 0 }

func (o *xxx_OpenPrinterOperation) OpName() string { return "/IRemoteWinspool/v1/RpcAsyncOpenPrinter" }

func (o *xxx_OpenPrinterOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_OpenPrinterOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// pPrinterName {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.PrinterName != "" {
			_ptr_pPrinterName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.PrinterName); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.PrinterName, _ptr_pPrinterName); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pDatatype {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.DataType != "" {
			_ptr_pDatatype := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.DataType); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.DataType, _ptr_pDatatype); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pDevModeContainer {in} (1:{pointer=ref}*(1))(2:{alias=DEVMODE_CONTAINER}(struct))
	{
		if o.DevModeContainer != nil {
			if err := o.DevModeContainer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&DevModeContainer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// AccessRequired {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.AccessRequired); err != nil {
			return err
		}
	}
	// pClientInfo {in} (1:{pointer=ref}*(1))(2:{alias=SPLCLIENT_CONTAINER}(struct))
	{
		if o.ClientInfo != nil {
			if err := o.ClientInfo.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&ClientContainer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_OpenPrinterOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// pPrinterName {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pPrinterName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.PrinterName); err != nil {
				return err
			}
			return nil
		})
		_s_pPrinterName := func(ptr interface{}) { o.PrinterName = *ptr.(*string) }
		if err := w.ReadPointer(&o.PrinterName, _s_pPrinterName, _ptr_pPrinterName); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pDatatype {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pDatatype := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.DataType); err != nil {
				return err
			}
			return nil
		})
		_s_pDatatype := func(ptr interface{}) { o.DataType = *ptr.(*string) }
		if err := w.ReadPointer(&o.DataType, _s_pDatatype, _ptr_pDatatype); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pDevModeContainer {in} (1:{pointer=ref}*(1))(2:{alias=DEVMODE_CONTAINER}(struct))
	{
		if o.DevModeContainer == nil {
			o.DevModeContainer = &DevModeContainer{}
		}
		if err := o.DevModeContainer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// AccessRequired {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.AccessRequired); err != nil {
			return err
		}
	}
	// pClientInfo {in} (1:{pointer=ref}*(1))(2:{alias=SPLCLIENT_CONTAINER}(struct))
	{
		if o.ClientInfo == nil {
			o.ClientInfo = &ClientContainer{}
		}
		if err := o.ClientInfo.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_OpenPrinterOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_OpenPrinterOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// pHandle {out} (1:{pointer=ref}*(1))(2:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Handle != nil {
			if err := o.Handle.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_OpenPrinterOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// pHandle {out} (1:{pointer=ref}*(1))(2:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Handle == nil {
			o.Handle = &Printer{}
		}
		if err := o.Handle.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// OpenPrinterRequest structure represents the RpcAsyncOpenPrinter operation request
type OpenPrinterRequest struct {
	PrinterName      string            `idl:"name:pPrinterName;string;pointer:unique" json:"printer_name"`
	DataType         string            `idl:"name:pDatatype;string;pointer:unique" json:"data_type"`
	DevModeContainer *DevModeContainer `idl:"name:pDevModeContainer" json:"dev_mode_container"`
	AccessRequired   uint32            `idl:"name:AccessRequired" json:"access_required"`
	ClientInfo       *ClientContainer  `idl:"name:pClientInfo" json:"client_info"`
}

func (o *OpenPrinterRequest) xxx_ToOp(ctx context.Context, op *xxx_OpenPrinterOperation) *xxx_OpenPrinterOperation {
	if op == nil {
		op = &xxx_OpenPrinterOperation{}
	}
	if o == nil {
		return op
	}
	op.PrinterName = o.PrinterName
	op.DataType = o.DataType
	op.DevModeContainer = o.DevModeContainer
	op.AccessRequired = o.AccessRequired
	op.ClientInfo = o.ClientInfo
	return op
}

func (o *OpenPrinterRequest) xxx_FromOp(ctx context.Context, op *xxx_OpenPrinterOperation) {
	if o == nil {
		return
	}
	o.PrinterName = op.PrinterName
	o.DataType = op.DataType
	o.DevModeContainer = op.DevModeContainer
	o.AccessRequired = op.AccessRequired
	o.ClientInfo = op.ClientInfo
}
func (o *OpenPrinterRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *OpenPrinterRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_OpenPrinterOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// OpenPrinterResponse structure represents the RpcAsyncOpenPrinter operation response
type OpenPrinterResponse struct {
	Handle *Printer `idl:"name:pHandle" json:"handle"`
	// Return: The RpcAsyncOpenPrinter return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *OpenPrinterResponse) xxx_ToOp(ctx context.Context, op *xxx_OpenPrinterOperation) *xxx_OpenPrinterOperation {
	if op == nil {
		op = &xxx_OpenPrinterOperation{}
	}
	if o == nil {
		return op
	}
	op.Handle = o.Handle
	op.Return = o.Return
	return op
}

func (o *OpenPrinterResponse) xxx_FromOp(ctx context.Context, op *xxx_OpenPrinterOperation) {
	if o == nil {
		return
	}
	o.Handle = op.Handle
	o.Return = op.Return
}
func (o *OpenPrinterResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *OpenPrinterResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_OpenPrinterOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_AddPrinterOperation structure represents the RpcAsyncAddPrinter operation
type xxx_AddPrinterOperation struct {
	Name              string             `idl:"name:pName;string;pointer:unique" json:"name"`
	PrinterContainer  *PrinterContainer  `idl:"name:pPrinterContainer" json:"printer_container"`
	DevModeContainer  *DevModeContainer  `idl:"name:pDevModeContainer" json:"dev_mode_container"`
	SecurityContainer *SecurityContainer `idl:"name:pSecurityContainer" json:"security_container"`
	ClientInfo        *ClientContainer   `idl:"name:pClientInfo" json:"client_info"`
	Handle            *Printer           `idl:"name:pHandle" json:"handle"`
	Return            uint32             `idl:"name:Return" json:"return"`
}

func (o *xxx_AddPrinterOperation) OpNum() int { return 1 }

func (o *xxx_AddPrinterOperation) OpName() string { return "/IRemoteWinspool/v1/RpcAsyncAddPrinter" }

func (o *xxx_AddPrinterOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddPrinterOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// pName {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Name != "" {
			_ptr_pName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Name); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Name, _ptr_pName); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pPrinterContainer {in} (1:{pointer=ref}*(1))(2:{alias=PRINTER_CONTAINER}(struct))
	{
		if o.PrinterContainer != nil {
			if err := o.PrinterContainer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PrinterContainer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pDevModeContainer {in} (1:{pointer=ref}*(1))(2:{alias=DEVMODE_CONTAINER}(struct))
	{
		if o.DevModeContainer != nil {
			if err := o.DevModeContainer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&DevModeContainer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pSecurityContainer {in} (1:{pointer=ref}*(1))(2:{alias=SECURITY_CONTAINER}(struct))
	{
		if o.SecurityContainer != nil {
			if err := o.SecurityContainer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&SecurityContainer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pClientInfo {in} (1:{pointer=ref}*(1))(2:{alias=SPLCLIENT_CONTAINER}(struct))
	{
		if o.ClientInfo != nil {
			if err := o.ClientInfo.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&ClientContainer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddPrinterOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// pName {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Name); err != nil {
				return err
			}
			return nil
		})
		_s_pName := func(ptr interface{}) { o.Name = *ptr.(*string) }
		if err := w.ReadPointer(&o.Name, _s_pName, _ptr_pName); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pPrinterContainer {in} (1:{pointer=ref}*(1))(2:{alias=PRINTER_CONTAINER}(struct))
	{
		if o.PrinterContainer == nil {
			o.PrinterContainer = &PrinterContainer{}
		}
		if err := o.PrinterContainer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pDevModeContainer {in} (1:{pointer=ref}*(1))(2:{alias=DEVMODE_CONTAINER}(struct))
	{
		if o.DevModeContainer == nil {
			o.DevModeContainer = &DevModeContainer{}
		}
		if err := o.DevModeContainer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pSecurityContainer {in} (1:{pointer=ref}*(1))(2:{alias=SECURITY_CONTAINER}(struct))
	{
		if o.SecurityContainer == nil {
			o.SecurityContainer = &SecurityContainer{}
		}
		if err := o.SecurityContainer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pClientInfo {in} (1:{pointer=ref}*(1))(2:{alias=SPLCLIENT_CONTAINER}(struct))
	{
		if o.ClientInfo == nil {
			o.ClientInfo = &ClientContainer{}
		}
		if err := o.ClientInfo.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddPrinterOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddPrinterOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// pHandle {out} (1:{pointer=ref}*(1))(2:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Handle != nil {
			if err := o.Handle.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddPrinterOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// pHandle {out} (1:{pointer=ref}*(1))(2:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Handle == nil {
			o.Handle = &Printer{}
		}
		if err := o.Handle.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// AddPrinterRequest structure represents the RpcAsyncAddPrinter operation request
type AddPrinterRequest struct {
	Name              string             `idl:"name:pName;string;pointer:unique" json:"name"`
	PrinterContainer  *PrinterContainer  `idl:"name:pPrinterContainer" json:"printer_container"`
	DevModeContainer  *DevModeContainer  `idl:"name:pDevModeContainer" json:"dev_mode_container"`
	SecurityContainer *SecurityContainer `idl:"name:pSecurityContainer" json:"security_container"`
	ClientInfo        *ClientContainer   `idl:"name:pClientInfo" json:"client_info"`
}

func (o *AddPrinterRequest) xxx_ToOp(ctx context.Context, op *xxx_AddPrinterOperation) *xxx_AddPrinterOperation {
	if op == nil {
		op = &xxx_AddPrinterOperation{}
	}
	if o == nil {
		return op
	}
	op.Name = o.Name
	op.PrinterContainer = o.PrinterContainer
	op.DevModeContainer = o.DevModeContainer
	op.SecurityContainer = o.SecurityContainer
	op.ClientInfo = o.ClientInfo
	return op
}

func (o *AddPrinterRequest) xxx_FromOp(ctx context.Context, op *xxx_AddPrinterOperation) {
	if o == nil {
		return
	}
	o.Name = op.Name
	o.PrinterContainer = op.PrinterContainer
	o.DevModeContainer = op.DevModeContainer
	o.SecurityContainer = op.SecurityContainer
	o.ClientInfo = op.ClientInfo
}
func (o *AddPrinterRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *AddPrinterRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_AddPrinterOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// AddPrinterResponse structure represents the RpcAsyncAddPrinter operation response
type AddPrinterResponse struct {
	Handle *Printer `idl:"name:pHandle" json:"handle"`
	// Return: The RpcAsyncAddPrinter return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *AddPrinterResponse) xxx_ToOp(ctx context.Context, op *xxx_AddPrinterOperation) *xxx_AddPrinterOperation {
	if op == nil {
		op = &xxx_AddPrinterOperation{}
	}
	if o == nil {
		return op
	}
	op.Handle = o.Handle
	op.Return = o.Return
	return op
}

func (o *AddPrinterResponse) xxx_FromOp(ctx context.Context, op *xxx_AddPrinterOperation) {
	if o == nil {
		return
	}
	o.Handle = op.Handle
	o.Return = op.Return
}
func (o *AddPrinterResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *AddPrinterResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_AddPrinterOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_SetJobOperation structure represents the RpcAsyncSetJob operation
type xxx_SetJobOperation struct {
	Printer      *Printer      `idl:"name:hPrinter" json:"printer"`
	JobID        uint32        `idl:"name:JobId" json:"job_id"`
	JobContainer *JobContainer `idl:"name:pJobContainer;pointer:unique" json:"job_container"`
	Command      uint32        `idl:"name:Command" json:"command"`
	Return       uint32        `idl:"name:Return" json:"return"`
}

func (o *xxx_SetJobOperation) OpNum() int { return 2 }

func (o *xxx_SetJobOperation) OpName() string { return "/IRemoteWinspool/v1/RpcAsyncSetJob" }

func (o *xxx_SetJobOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SetJobOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// JobId {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.JobID); err != nil {
			return err
		}
	}
	// pJobContainer {in} (1:{pointer=unique}*(1))(2:{alias=JOB_CONTAINER}(struct))
	{
		if o.JobContainer != nil {
			_ptr_pJobContainer := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if o.JobContainer != nil {
					if err := o.JobContainer.MarshalNDR(ctx, w); err != nil {
						return err
					}
				} else {
					if err := (&JobContainer{}).MarshalNDR(ctx, w); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.JobContainer, _ptr_pJobContainer); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// Command {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Command); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SetJobOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// JobId {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.JobID); err != nil {
			return err
		}
	}
	// pJobContainer {in} (1:{pointer=unique}*(1))(2:{alias=JOB_CONTAINER}(struct))
	{
		_ptr_pJobContainer := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if o.JobContainer == nil {
				o.JobContainer = &JobContainer{}
			}
			if err := o.JobContainer.UnmarshalNDR(ctx, w); err != nil {
				return err
			}
			return nil
		})
		_s_pJobContainer := func(ptr interface{}) { o.JobContainer = *ptr.(**JobContainer) }
		if err := w.ReadPointer(&o.JobContainer, _s_pJobContainer, _ptr_pJobContainer); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// Command {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Command); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SetJobOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SetJobOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SetJobOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// SetJobRequest structure represents the RpcAsyncSetJob operation request
type SetJobRequest struct {
	// hPrinter: A handle to a printer object that has been opened by using either RpcAsyncOpenPrinter
	// (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer      *Printer      `idl:"name:hPrinter" json:"printer"`
	JobID        uint32        `idl:"name:JobId" json:"job_id"`
	JobContainer *JobContainer `idl:"name:pJobContainer;pointer:unique" json:"job_container"`
	Command      uint32        `idl:"name:Command" json:"command"`
}

func (o *SetJobRequest) xxx_ToOp(ctx context.Context, op *xxx_SetJobOperation) *xxx_SetJobOperation {
	if op == nil {
		op = &xxx_SetJobOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.JobID = o.JobID
	op.JobContainer = o.JobContainer
	op.Command = o.Command
	return op
}

func (o *SetJobRequest) xxx_FromOp(ctx context.Context, op *xxx_SetJobOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.JobID = op.JobID
	o.JobContainer = op.JobContainer
	o.Command = op.Command
}
func (o *SetJobRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *SetJobRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_SetJobOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// SetJobResponse structure represents the RpcAsyncSetJob operation response
type SetJobResponse struct {
	// Return: The RpcAsyncSetJob return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *SetJobResponse) xxx_ToOp(ctx context.Context, op *xxx_SetJobOperation) *xxx_SetJobOperation {
	if op == nil {
		op = &xxx_SetJobOperation{}
	}
	if o == nil {
		return op
	}
	op.Return = o.Return
	return op
}

func (o *SetJobResponse) xxx_FromOp(ctx context.Context, op *xxx_SetJobOperation) {
	if o == nil {
		return
	}
	o.Return = op.Return
}
func (o *SetJobResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *SetJobResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_SetJobOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_GetJobOperation structure represents the RpcAsyncGetJob operation
type xxx_GetJobOperation struct {
	Printer      *Printer `idl:"name:hPrinter" json:"printer"`
	JobID        uint32   `idl:"name:JobId" json:"job_id"`
	Level        uint32   `idl:"name:Level" json:"level"`
	Job          []byte   `idl:"name:pJob;size_is:(cbBuf);pointer:unique" json:"job"`
	BufferLength uint32   `idl:"name:cbBuf" json:"buffer_length"`
	NeededLength uint32   `idl:"name:pcbNeeded" json:"needed_length"`
	Return       uint32   `idl:"name:Return" json:"return"`
}

func (o *xxx_GetJobOperation) OpNum() int { return 3 }

func (o *xxx_GetJobOperation) OpName() string { return "/IRemoteWinspool/v1/RpcAsyncGetJob" }

func (o *xxx_GetJobOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if o.Job != nil && o.BufferLength == 0 {
		o.BufferLength = uint32(len(o.Job))
	}
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetJobOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// JobId {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.JobID); err != nil {
			return err
		}
	}
	// Level {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Level); err != nil {
			return err
		}
	}
	// pJob {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		if o.Job != nil || o.BufferLength > 0 {
			_ptr_pJob := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.BufferLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				for i1 := range o.Job {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(o.Job[i1]); err != nil {
						return err
					}
				}
				for i1 := len(o.Job); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint8(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.Job, _ptr_pJob); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.BufferLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetJobOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// JobId {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.JobID); err != nil {
			return err
		}
	}
	// Level {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Level); err != nil {
			return err
		}
	}
	// pJob {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		_ptr_pJob := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array o.Job", sizeInfo[0])
			}
			o.Job = make([]byte, sizeInfo[0])
			for i1 := range o.Job {
				i1 := i1
				if err := w.ReadData(&o.Job[i1]); err != nil {
					return err
				}
			}
			return nil
		})
		_s_pJob := func(ptr interface{}) { o.Job = *ptr.(*[]byte) }
		if err := w.ReadPointer(&o.Job, _s_pJob, _ptr_pJob); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.BufferLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetJobOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetJobOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// pJob {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		if o.Job != nil || o.BufferLength > 0 {
			_ptr_pJob := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.BufferLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				for i1 := range o.Job {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(o.Job[i1]); err != nil {
						return err
					}
				}
				for i1 := len(o.Job); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint8(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.Job, _ptr_pJob); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.NeededLength); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetJobOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// pJob {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		_ptr_pJob := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array o.Job", sizeInfo[0])
			}
			o.Job = make([]byte, sizeInfo[0])
			for i1 := range o.Job {
				i1 := i1
				if err := w.ReadData(&o.Job[i1]); err != nil {
					return err
				}
			}
			return nil
		})
		_s_pJob := func(ptr interface{}) { o.Job = *ptr.(*[]byte) }
		if err := w.ReadPointer(&o.Job, _s_pJob, _ptr_pJob); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.NeededLength); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// GetJobRequest structure represents the RpcAsyncGetJob operation request
type GetJobRequest struct {
	// hPrinter: A handle to a printer object that has been opened by using either RpcAsyncOpenPrinter
	// (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer      *Printer `idl:"name:hPrinter" json:"printer"`
	JobID        uint32   `idl:"name:JobId" json:"job_id"`
	Level        uint32   `idl:"name:Level" json:"level"`
	Job          []byte   `idl:"name:pJob;size_is:(cbBuf);pointer:unique" json:"job"`
	BufferLength uint32   `idl:"name:cbBuf" json:"buffer_length"`
}

func (o *GetJobRequest) xxx_ToOp(ctx context.Context, op *xxx_GetJobOperation) *xxx_GetJobOperation {
	if op == nil {
		op = &xxx_GetJobOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.JobID = o.JobID
	op.Level = o.Level
	op.Job = o.Job
	op.BufferLength = o.BufferLength
	return op
}

func (o *GetJobRequest) xxx_FromOp(ctx context.Context, op *xxx_GetJobOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.JobID = op.JobID
	o.Level = op.Level
	o.Job = op.Job
	o.BufferLength = op.BufferLength
}
func (o *GetJobRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *GetJobRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_GetJobOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// GetJobResponse structure represents the RpcAsyncGetJob operation response
type GetJobResponse struct {
	// XXX: cbBuf is an implicit input depedency for output parameters
	BufferLength uint32 `idl:"name:cbBuf" json:"buffer_length"`

	Job          []byte `idl:"name:pJob;size_is:(cbBuf);pointer:unique" json:"job"`
	NeededLength uint32 `idl:"name:pcbNeeded" json:"needed_length"`
	// Return: The RpcAsyncGetJob return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *GetJobResponse) xxx_ToOp(ctx context.Context, op *xxx_GetJobOperation) *xxx_GetJobOperation {
	if op == nil {
		op = &xxx_GetJobOperation{}
	}
	if o == nil {
		return op
	}
	// XXX: implicit input dependencies for output parameters
	if op.BufferLength == uint32(0) {
		op.BufferLength = o.BufferLength
	}

	op.Job = o.Job
	op.NeededLength = o.NeededLength
	op.Return = o.Return
	return op
}

func (o *GetJobResponse) xxx_FromOp(ctx context.Context, op *xxx_GetJobOperation) {
	if o == nil {
		return
	}
	// XXX: implicit input dependencies for output parameters
	o.BufferLength = op.BufferLength

	o.Job = op.Job
	o.NeededLength = op.NeededLength
	o.Return = op.Return
}
func (o *GetJobResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *GetJobResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_GetJobOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_EnumJobsOperation structure represents the RpcAsyncEnumJobs operation
type xxx_EnumJobsOperation struct {
	Printer       *Printer `idl:"name:hPrinter" json:"printer"`
	FirstJob      uint32   `idl:"name:FirstJob" json:"first_job"`
	NoJobs        uint32   `idl:"name:NoJobs" json:"no_jobs"`
	Level         uint32   `idl:"name:Level" json:"level"`
	Job           []byte   `idl:"name:pJob;size_is:(cbBuf);pointer:unique" json:"job"`
	BufferLength  uint32   `idl:"name:cbBuf" json:"buffer_length"`
	NeededLength  uint32   `idl:"name:pcbNeeded" json:"needed_length"`
	ReturnedCount uint32   `idl:"name:pcReturned" json:"returned_count"`
	Return        uint32   `idl:"name:Return" json:"return"`
}

func (o *xxx_EnumJobsOperation) OpNum() int { return 4 }

func (o *xxx_EnumJobsOperation) OpName() string { return "/IRemoteWinspool/v1/RpcAsyncEnumJobs" }

func (o *xxx_EnumJobsOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if o.Job != nil && o.BufferLength == 0 {
		o.BufferLength = uint32(len(o.Job))
	}
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumJobsOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// FirstJob {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.FirstJob); err != nil {
			return err
		}
	}
	// NoJobs {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.NoJobs); err != nil {
			return err
		}
	}
	// Level {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Level); err != nil {
			return err
		}
	}
	// pJob {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		if o.Job != nil || o.BufferLength > 0 {
			_ptr_pJob := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.BufferLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				for i1 := range o.Job {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(o.Job[i1]); err != nil {
						return err
					}
				}
				for i1 := len(o.Job); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint8(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.Job, _ptr_pJob); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.BufferLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumJobsOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// FirstJob {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.FirstJob); err != nil {
			return err
		}
	}
	// NoJobs {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.NoJobs); err != nil {
			return err
		}
	}
	// Level {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Level); err != nil {
			return err
		}
	}
	// pJob {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		_ptr_pJob := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array o.Job", sizeInfo[0])
			}
			o.Job = make([]byte, sizeInfo[0])
			for i1 := range o.Job {
				i1 := i1
				if err := w.ReadData(&o.Job[i1]); err != nil {
					return err
				}
			}
			return nil
		})
		_s_pJob := func(ptr interface{}) { o.Job = *ptr.(*[]byte) }
		if err := w.ReadPointer(&o.Job, _s_pJob, _ptr_pJob); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.BufferLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumJobsOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumJobsOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// pJob {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		if o.Job != nil || o.BufferLength > 0 {
			_ptr_pJob := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.BufferLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				for i1 := range o.Job {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(o.Job[i1]); err != nil {
						return err
					}
				}
				for i1 := len(o.Job); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint8(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.Job, _ptr_pJob); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.NeededLength); err != nil {
			return err
		}
	}
	// pcReturned {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.ReturnedCount); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumJobsOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// pJob {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		_ptr_pJob := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array o.Job", sizeInfo[0])
			}
			o.Job = make([]byte, sizeInfo[0])
			for i1 := range o.Job {
				i1 := i1
				if err := w.ReadData(&o.Job[i1]); err != nil {
					return err
				}
			}
			return nil
		})
		_s_pJob := func(ptr interface{}) { o.Job = *ptr.(*[]byte) }
		if err := w.ReadPointer(&o.Job, _s_pJob, _ptr_pJob); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.NeededLength); err != nil {
			return err
		}
	}
	// pcReturned {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.ReturnedCount); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// EnumJobsRequest structure represents the RpcAsyncEnumJobs operation request
type EnumJobsRequest struct {
	// hPrinter: A handle to a printer object that has been opened by using either RpcAsyncOpenPrinter
	// (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer      *Printer `idl:"name:hPrinter" json:"printer"`
	FirstJob     uint32   `idl:"name:FirstJob" json:"first_job"`
	NoJobs       uint32   `idl:"name:NoJobs" json:"no_jobs"`
	Level        uint32   `idl:"name:Level" json:"level"`
	Job          []byte   `idl:"name:pJob;size_is:(cbBuf);pointer:unique" json:"job"`
	BufferLength uint32   `idl:"name:cbBuf" json:"buffer_length"`
}

func (o *EnumJobsRequest) xxx_ToOp(ctx context.Context, op *xxx_EnumJobsOperation) *xxx_EnumJobsOperation {
	if op == nil {
		op = &xxx_EnumJobsOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.FirstJob = o.FirstJob
	op.NoJobs = o.NoJobs
	op.Level = o.Level
	op.Job = o.Job
	op.BufferLength = o.BufferLength
	return op
}

func (o *EnumJobsRequest) xxx_FromOp(ctx context.Context, op *xxx_EnumJobsOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.FirstJob = op.FirstJob
	o.NoJobs = op.NoJobs
	o.Level = op.Level
	o.Job = op.Job
	o.BufferLength = op.BufferLength
}
func (o *EnumJobsRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *EnumJobsRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_EnumJobsOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// EnumJobsResponse structure represents the RpcAsyncEnumJobs operation response
type EnumJobsResponse struct {
	// XXX: cbBuf is an implicit input depedency for output parameters
	BufferLength uint32 `idl:"name:cbBuf" json:"buffer_length"`

	Job           []byte `idl:"name:pJob;size_is:(cbBuf);pointer:unique" json:"job"`
	NeededLength  uint32 `idl:"name:pcbNeeded" json:"needed_length"`
	ReturnedCount uint32 `idl:"name:pcReturned" json:"returned_count"`
	// Return: The RpcAsyncEnumJobs return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *EnumJobsResponse) xxx_ToOp(ctx context.Context, op *xxx_EnumJobsOperation) *xxx_EnumJobsOperation {
	if op == nil {
		op = &xxx_EnumJobsOperation{}
	}
	if o == nil {
		return op
	}
	// XXX: implicit input dependencies for output parameters
	if op.BufferLength == uint32(0) {
		op.BufferLength = o.BufferLength
	}

	op.Job = o.Job
	op.NeededLength = o.NeededLength
	op.ReturnedCount = o.ReturnedCount
	op.Return = o.Return
	return op
}

func (o *EnumJobsResponse) xxx_FromOp(ctx context.Context, op *xxx_EnumJobsOperation) {
	if o == nil {
		return
	}
	// XXX: implicit input dependencies for output parameters
	o.BufferLength = op.BufferLength

	o.Job = op.Job
	o.NeededLength = op.NeededLength
	o.ReturnedCount = op.ReturnedCount
	o.Return = op.Return
}
func (o *EnumJobsResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *EnumJobsResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_EnumJobsOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_AddJobOperation structure represents the RpcAsyncAddJob operation
type xxx_AddJobOperation struct {
	Printer      *Printer `idl:"name:hPrinter" json:"printer"`
	Level        uint32   `idl:"name:Level" json:"level"`
	AddJob       []byte   `idl:"name:pAddJob;size_is:(cbBuf);pointer:unique" json:"add_job"`
	BufferLength uint32   `idl:"name:cbBuf" json:"buffer_length"`
	NeededLength uint32   `idl:"name:pcbNeeded" json:"needed_length"`
	Return       uint32   `idl:"name:Return" json:"return"`
}

func (o *xxx_AddJobOperation) OpNum() int { return 5 }

func (o *xxx_AddJobOperation) OpName() string { return "/IRemoteWinspool/v1/RpcAsyncAddJob" }

func (o *xxx_AddJobOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if o.AddJob != nil && o.BufferLength == 0 {
		o.BufferLength = uint32(len(o.AddJob))
	}
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddJobOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// Level {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Level); err != nil {
			return err
		}
	}
	// pAddJob {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		if o.AddJob != nil || o.BufferLength > 0 {
			_ptr_pAddJob := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.BufferLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				for i1 := range o.AddJob {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(o.AddJob[i1]); err != nil {
						return err
					}
				}
				for i1 := len(o.AddJob); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint8(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.AddJob, _ptr_pAddJob); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.BufferLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddJobOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// Level {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Level); err != nil {
			return err
		}
	}
	// pAddJob {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		_ptr_pAddJob := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array o.AddJob", sizeInfo[0])
			}
			o.AddJob = make([]byte, sizeInfo[0])
			for i1 := range o.AddJob {
				i1 := i1
				if err := w.ReadData(&o.AddJob[i1]); err != nil {
					return err
				}
			}
			return nil
		})
		_s_pAddJob := func(ptr interface{}) { o.AddJob = *ptr.(*[]byte) }
		if err := w.ReadPointer(&o.AddJob, _s_pAddJob, _ptr_pAddJob); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.BufferLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddJobOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddJobOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// pAddJob {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		if o.AddJob != nil || o.BufferLength > 0 {
			_ptr_pAddJob := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.BufferLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				for i1 := range o.AddJob {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(o.AddJob[i1]); err != nil {
						return err
					}
				}
				for i1 := len(o.AddJob); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint8(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.AddJob, _ptr_pAddJob); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.NeededLength); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddJobOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// pAddJob {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		_ptr_pAddJob := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array o.AddJob", sizeInfo[0])
			}
			o.AddJob = make([]byte, sizeInfo[0])
			for i1 := range o.AddJob {
				i1 := i1
				if err := w.ReadData(&o.AddJob[i1]); err != nil {
					return err
				}
			}
			return nil
		})
		_s_pAddJob := func(ptr interface{}) { o.AddJob = *ptr.(*[]byte) }
		if err := w.ReadPointer(&o.AddJob, _s_pAddJob, _ptr_pAddJob); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.NeededLength); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// AddJobRequest structure represents the RpcAsyncAddJob operation request
type AddJobRequest struct {
	// hPrinter: A handle to a printer object that was opened using either RpcAsyncOpenPrinter
	// (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer      *Printer `idl:"name:hPrinter" json:"printer"`
	Level        uint32   `idl:"name:Level" json:"level"`
	AddJob       []byte   `idl:"name:pAddJob;size_is:(cbBuf);pointer:unique" json:"add_job"`
	BufferLength uint32   `idl:"name:cbBuf" json:"buffer_length"`
}

func (o *AddJobRequest) xxx_ToOp(ctx context.Context, op *xxx_AddJobOperation) *xxx_AddJobOperation {
	if op == nil {
		op = &xxx_AddJobOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.Level = o.Level
	op.AddJob = o.AddJob
	op.BufferLength = o.BufferLength
	return op
}

func (o *AddJobRequest) xxx_FromOp(ctx context.Context, op *xxx_AddJobOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.Level = op.Level
	o.AddJob = op.AddJob
	o.BufferLength = op.BufferLength
}
func (o *AddJobRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *AddJobRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_AddJobOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// AddJobResponse structure represents the RpcAsyncAddJob operation response
type AddJobResponse struct {
	// XXX: cbBuf is an implicit input depedency for output parameters
	BufferLength uint32 `idl:"name:cbBuf" json:"buffer_length"`

	AddJob       []byte `idl:"name:pAddJob;size_is:(cbBuf);pointer:unique" json:"add_job"`
	NeededLength uint32 `idl:"name:pcbNeeded" json:"needed_length"`
	// Return: The RpcAsyncAddJob return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *AddJobResponse) xxx_ToOp(ctx context.Context, op *xxx_AddJobOperation) *xxx_AddJobOperation {
	if op == nil {
		op = &xxx_AddJobOperation{}
	}
	if o == nil {
		return op
	}
	// XXX: implicit input dependencies for output parameters
	if op.BufferLength == uint32(0) {
		op.BufferLength = o.BufferLength
	}

	op.AddJob = o.AddJob
	op.NeededLength = o.NeededLength
	op.Return = o.Return
	return op
}

func (o *AddJobResponse) xxx_FromOp(ctx context.Context, op *xxx_AddJobOperation) {
	if o == nil {
		return
	}
	// XXX: implicit input dependencies for output parameters
	o.BufferLength = op.BufferLength

	o.AddJob = op.AddJob
	o.NeededLength = op.NeededLength
	o.Return = op.Return
}
func (o *AddJobResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *AddJobResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_AddJobOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_ScheduleJobOperation structure represents the RpcAsyncScheduleJob operation
type xxx_ScheduleJobOperation struct {
	Printer *Printer `idl:"name:hPrinter" json:"printer"`
	JobID   uint32   `idl:"name:JobId" json:"job_id"`
	Return  uint32   `idl:"name:Return" json:"return"`
}

func (o *xxx_ScheduleJobOperation) OpNum() int { return 6 }

func (o *xxx_ScheduleJobOperation) OpName() string { return "/IRemoteWinspool/v1/RpcAsyncScheduleJob" }

func (o *xxx_ScheduleJobOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_ScheduleJobOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// JobId {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.JobID); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_ScheduleJobOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// JobId {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.JobID); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_ScheduleJobOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_ScheduleJobOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_ScheduleJobOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// ScheduleJobRequest structure represents the RpcAsyncScheduleJob operation request
type ScheduleJobRequest struct {
	// hPrinter: A handle to a printer object that was opened using either RpcAsyncOpenPrinter
	// (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer *Printer `idl:"name:hPrinter" json:"printer"`
	JobID   uint32   `idl:"name:JobId" json:"job_id"`
}

func (o *ScheduleJobRequest) xxx_ToOp(ctx context.Context, op *xxx_ScheduleJobOperation) *xxx_ScheduleJobOperation {
	if op == nil {
		op = &xxx_ScheduleJobOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.JobID = o.JobID
	return op
}

func (o *ScheduleJobRequest) xxx_FromOp(ctx context.Context, op *xxx_ScheduleJobOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.JobID = op.JobID
}
func (o *ScheduleJobRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *ScheduleJobRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_ScheduleJobOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// ScheduleJobResponse structure represents the RpcAsyncScheduleJob operation response
type ScheduleJobResponse struct {
	// Return: The RpcAsyncScheduleJob return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *ScheduleJobResponse) xxx_ToOp(ctx context.Context, op *xxx_ScheduleJobOperation) *xxx_ScheduleJobOperation {
	if op == nil {
		op = &xxx_ScheduleJobOperation{}
	}
	if o == nil {
		return op
	}
	op.Return = o.Return
	return op
}

func (o *ScheduleJobResponse) xxx_FromOp(ctx context.Context, op *xxx_ScheduleJobOperation) {
	if o == nil {
		return
	}
	o.Return = op.Return
}
func (o *ScheduleJobResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *ScheduleJobResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_ScheduleJobOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_DeletePrinterOperation structure represents the RpcAsyncDeletePrinter operation
type xxx_DeletePrinterOperation struct {
	Printer *Printer `idl:"name:hPrinter" json:"printer"`
	Return  uint32   `idl:"name:Return" json:"return"`
}

func (o *xxx_DeletePrinterOperation) OpNum() int { return 7 }

func (o *xxx_DeletePrinterOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncDeletePrinter"
}

func (o *xxx_DeletePrinterOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	return nil
}

func (o *xxx_DeletePrinterOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// DeletePrinterRequest structure represents the RpcAsyncDeletePrinter operation request
type DeletePrinterRequest struct {
	// hPrinter: A handle to a printer object that has been opened using either RpcAsyncOpenPrinter
	// (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer *Printer `idl:"name:hPrinter" json:"printer"`
}

func (o *DeletePrinterRequest) xxx_ToOp(ctx context.Context, op *xxx_DeletePrinterOperation) *xxx_DeletePrinterOperation {
	if op == nil {
		op = &xxx_DeletePrinterOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	return op
}

func (o *DeletePrinterRequest) xxx_FromOp(ctx context.Context, op *xxx_DeletePrinterOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
}
func (o *DeletePrinterRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *DeletePrinterRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_DeletePrinterOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// DeletePrinterResponse structure represents the RpcAsyncDeletePrinter operation response
type DeletePrinterResponse struct {
	// Return: The RpcAsyncDeletePrinter return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *DeletePrinterResponse) xxx_ToOp(ctx context.Context, op *xxx_DeletePrinterOperation) *xxx_DeletePrinterOperation {
	if op == nil {
		op = &xxx_DeletePrinterOperation{}
	}
	if o == nil {
		return op
	}
	op.Return = o.Return
	return op
}

func (o *DeletePrinterResponse) xxx_FromOp(ctx context.Context, op *xxx_DeletePrinterOperation) {
	if o == nil {
		return
	}
	o.Return = op.Return
}
func (o *DeletePrinterResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *DeletePrinterResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_DeletePrinterOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_SetPrinterOperation structure represents the RpcAsyncSetPrinter operation
type xxx_SetPrinterOperation struct {
	Printer           *Printer           `idl:"name:hPrinter" json:"printer"`
	PrinterContainer  *PrinterContainer  `idl:"name:pPrinterContainer" json:"printer_container"`
	DevModeContainer  *DevModeContainer  `idl:"name:pDevModeContainer" json:"dev_mode_container"`
	SecurityContainer *SecurityContainer `idl:"name:pSecurityContainer" json:"security_container"`
	Command           uint32             `idl:"name:Command" json:"command"`
	Return            uint32             `idl:"name:Return" json:"return"`
}

func (o *xxx_SetPrinterOperation) OpNum() int { return 8 }

func (o *xxx_SetPrinterOperation) OpName() string { return "/IRemoteWinspool/v1/RpcAsyncSetPrinter" }

func (o *xxx_SetPrinterOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SetPrinterOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// pPrinterContainer {in} (1:{pointer=ref}*(1))(2:{alias=PRINTER_CONTAINER}(struct))
	{
		if o.PrinterContainer != nil {
			if err := o.PrinterContainer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PrinterContainer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pDevModeContainer {in} (1:{pointer=ref}*(1))(2:{alias=DEVMODE_CONTAINER}(struct))
	{
		if o.DevModeContainer != nil {
			if err := o.DevModeContainer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&DevModeContainer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pSecurityContainer {in} (1:{pointer=ref}*(1))(2:{alias=SECURITY_CONTAINER}(struct))
	{
		if o.SecurityContainer != nil {
			if err := o.SecurityContainer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&SecurityContainer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// Command {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Command); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SetPrinterOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// pPrinterContainer {in} (1:{pointer=ref}*(1))(2:{alias=PRINTER_CONTAINER}(struct))
	{
		if o.PrinterContainer == nil {
			o.PrinterContainer = &PrinterContainer{}
		}
		if err := o.PrinterContainer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pDevModeContainer {in} (1:{pointer=ref}*(1))(2:{alias=DEVMODE_CONTAINER}(struct))
	{
		if o.DevModeContainer == nil {
			o.DevModeContainer = &DevModeContainer{}
		}
		if err := o.DevModeContainer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pSecurityContainer {in} (1:{pointer=ref}*(1))(2:{alias=SECURITY_CONTAINER}(struct))
	{
		if o.SecurityContainer == nil {
			o.SecurityContainer = &SecurityContainer{}
		}
		if err := o.SecurityContainer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// Command {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Command); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SetPrinterOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SetPrinterOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SetPrinterOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// SetPrinterRequest structure represents the RpcAsyncSetPrinter operation request
type SetPrinterRequest struct {
	// hPrinter: A handle to a printer object or server object that has been opened by using
	// either RpcAsyncOpenPrinter (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer           *Printer           `idl:"name:hPrinter" json:"printer"`
	PrinterContainer  *PrinterContainer  `idl:"name:pPrinterContainer" json:"printer_container"`
	DevModeContainer  *DevModeContainer  `idl:"name:pDevModeContainer" json:"dev_mode_container"`
	SecurityContainer *SecurityContainer `idl:"name:pSecurityContainer" json:"security_container"`
	Command           uint32             `idl:"name:Command" json:"command"`
}

func (o *SetPrinterRequest) xxx_ToOp(ctx context.Context, op *xxx_SetPrinterOperation) *xxx_SetPrinterOperation {
	if op == nil {
		op = &xxx_SetPrinterOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.PrinterContainer = o.PrinterContainer
	op.DevModeContainer = o.DevModeContainer
	op.SecurityContainer = o.SecurityContainer
	op.Command = o.Command
	return op
}

func (o *SetPrinterRequest) xxx_FromOp(ctx context.Context, op *xxx_SetPrinterOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.PrinterContainer = op.PrinterContainer
	o.DevModeContainer = op.DevModeContainer
	o.SecurityContainer = op.SecurityContainer
	o.Command = op.Command
}
func (o *SetPrinterRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *SetPrinterRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_SetPrinterOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// SetPrinterResponse structure represents the RpcAsyncSetPrinter operation response
type SetPrinterResponse struct {
	// Return: The RpcAsyncSetPrinter return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *SetPrinterResponse) xxx_ToOp(ctx context.Context, op *xxx_SetPrinterOperation) *xxx_SetPrinterOperation {
	if op == nil {
		op = &xxx_SetPrinterOperation{}
	}
	if o == nil {
		return op
	}
	op.Return = o.Return
	return op
}

func (o *SetPrinterResponse) xxx_FromOp(ctx context.Context, op *xxx_SetPrinterOperation) {
	if o == nil {
		return
	}
	o.Return = op.Return
}
func (o *SetPrinterResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *SetPrinterResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_SetPrinterOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_GetPrinterOperation structure represents the RpcAsyncGetPrinter operation
type xxx_GetPrinterOperation struct {
	Printer       *Printer `idl:"name:hPrinter" json:"printer"`
	Level         uint32   `idl:"name:Level" json:"level"`
	PrinterBuffer []byte   `idl:"name:pPrinter;size_is:(cbBuf);pointer:unique" json:"printer_buffer"`
	BufferLength  uint32   `idl:"name:cbBuf" json:"buffer_length"`
	NeededLength  uint32   `idl:"name:pcbNeeded" json:"needed_length"`
	Return        uint32   `idl:"name:Return" json:"return"`
}

func (o *xxx_GetPrinterOperation) OpNum() int { return 9 }

func (o *xxx_GetPrinterOperation) OpName() string { return "/IRemoteWinspool/v1/RpcAsyncGetPrinter" }

func (o *xxx_GetPrinterOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if o.PrinterBuffer != nil && o.BufferLength == 0 {
		o.BufferLength = uint32(len(o.PrinterBuffer))
	}
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetPrinterOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// Level {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Level); err != nil {
			return err
		}
	}
	// pPrinter {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		if o.PrinterBuffer != nil || o.BufferLength > 0 {
			_ptr_pPrinter := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.BufferLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				for i1 := range o.PrinterBuffer {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(o.PrinterBuffer[i1]); err != nil {
						return err
					}
				}
				for i1 := len(o.PrinterBuffer); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint8(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.PrinterBuffer, _ptr_pPrinter); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.BufferLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetPrinterOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// Level {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Level); err != nil {
			return err
		}
	}
	// pPrinter {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		_ptr_pPrinter := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array o.PrinterBuffer", sizeInfo[0])
			}
			o.PrinterBuffer = make([]byte, sizeInfo[0])
			for i1 := range o.PrinterBuffer {
				i1 := i1
				if err := w.ReadData(&o.PrinterBuffer[i1]); err != nil {
					return err
				}
			}
			return nil
		})
		_s_pPrinter := func(ptr interface{}) { o.PrinterBuffer = *ptr.(*[]byte) }
		if err := w.ReadPointer(&o.PrinterBuffer, _s_pPrinter, _ptr_pPrinter); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.BufferLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetPrinterOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetPrinterOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// pPrinter {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		if o.PrinterBuffer != nil || o.BufferLength > 0 {
			_ptr_pPrinter := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.BufferLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				for i1 := range o.PrinterBuffer {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(o.PrinterBuffer[i1]); err != nil {
						return err
					}
				}
				for i1 := len(o.PrinterBuffer); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint8(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.PrinterBuffer, _ptr_pPrinter); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.NeededLength); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetPrinterOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// pPrinter {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		_ptr_pPrinter := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array o.PrinterBuffer", sizeInfo[0])
			}
			o.PrinterBuffer = make([]byte, sizeInfo[0])
			for i1 := range o.PrinterBuffer {
				i1 := i1
				if err := w.ReadData(&o.PrinterBuffer[i1]); err != nil {
					return err
				}
			}
			return nil
		})
		_s_pPrinter := func(ptr interface{}) { o.PrinterBuffer = *ptr.(*[]byte) }
		if err := w.ReadPointer(&o.PrinterBuffer, _s_pPrinter, _ptr_pPrinter); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.NeededLength); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// GetPrinterRequest structure represents the RpcAsyncGetPrinter operation request
type GetPrinterRequest struct {
	// hPrinter: A handle to a printer object that has been opened by using either RpcAsyncOpenPrinter
	// (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer       *Printer `idl:"name:hPrinter" json:"printer"`
	Level         uint32   `idl:"name:Level" json:"level"`
	PrinterBuffer []byte   `idl:"name:pPrinter;size_is:(cbBuf);pointer:unique" json:"printer_buffer"`
	BufferLength  uint32   `idl:"name:cbBuf" json:"buffer_length"`
}

func (o *GetPrinterRequest) xxx_ToOp(ctx context.Context, op *xxx_GetPrinterOperation) *xxx_GetPrinterOperation {
	if op == nil {
		op = &xxx_GetPrinterOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.Level = o.Level
	op.PrinterBuffer = o.PrinterBuffer
	op.BufferLength = o.BufferLength
	return op
}

func (o *GetPrinterRequest) xxx_FromOp(ctx context.Context, op *xxx_GetPrinterOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.Level = op.Level
	o.PrinterBuffer = op.PrinterBuffer
	o.BufferLength = op.BufferLength
}
func (o *GetPrinterRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *GetPrinterRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_GetPrinterOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// GetPrinterResponse structure represents the RpcAsyncGetPrinter operation response
type GetPrinterResponse struct {
	// XXX: cbBuf is an implicit input depedency for output parameters
	BufferLength uint32 `idl:"name:cbBuf" json:"buffer_length"`

	PrinterBuffer []byte `idl:"name:pPrinter;size_is:(cbBuf);pointer:unique" json:"printer_buffer"`
	NeededLength  uint32 `idl:"name:pcbNeeded" json:"needed_length"`
	// Return: The RpcAsyncGetPrinter return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *GetPrinterResponse) xxx_ToOp(ctx context.Context, op *xxx_GetPrinterOperation) *xxx_GetPrinterOperation {
	if op == nil {
		op = &xxx_GetPrinterOperation{}
	}
	if o == nil {
		return op
	}
	// XXX: implicit input dependencies for output parameters
	if op.BufferLength == uint32(0) {
		op.BufferLength = o.BufferLength
	}

	op.PrinterBuffer = o.PrinterBuffer
	op.NeededLength = o.NeededLength
	op.Return = o.Return
	return op
}

func (o *GetPrinterResponse) xxx_FromOp(ctx context.Context, op *xxx_GetPrinterOperation) {
	if o == nil {
		return
	}
	// XXX: implicit input dependencies for output parameters
	o.BufferLength = op.BufferLength

	o.PrinterBuffer = op.PrinterBuffer
	o.NeededLength = op.NeededLength
	o.Return = op.Return
}
func (o *GetPrinterResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *GetPrinterResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_GetPrinterOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_StartDocPrinterOperation structure represents the RpcAsyncStartDocPrinter operation
type xxx_StartDocPrinterOperation struct {
	Printer          *Printer          `idl:"name:hPrinter" json:"printer"`
	DocInfoContainer *DocInfoContainer `idl:"name:pDocInfoContainer" json:"doc_info_container"`
	JobID            uint32            `idl:"name:pJobId" json:"job_id"`
	Return           uint32            `idl:"name:Return" json:"return"`
}

func (o *xxx_StartDocPrinterOperation) OpNum() int { return 10 }

func (o *xxx_StartDocPrinterOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncStartDocPrinter"
}

func (o *xxx_StartDocPrinterOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_StartDocPrinterOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// pDocInfoContainer {in} (1:{pointer=ref}*(1))(2:{alias=DOC_INFO_CONTAINER}(struct))
	{
		if o.DocInfoContainer != nil {
			if err := o.DocInfoContainer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&DocInfoContainer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_StartDocPrinterOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// pDocInfoContainer {in} (1:{pointer=ref}*(1))(2:{alias=DOC_INFO_CONTAINER}(struct))
	{
		if o.DocInfoContainer == nil {
			o.DocInfoContainer = &DocInfoContainer{}
		}
		if err := o.DocInfoContainer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_StartDocPrinterOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_StartDocPrinterOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// pJobId {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.JobID); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_StartDocPrinterOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// pJobId {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.JobID); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// StartDocPrinterRequest structure represents the RpcAsyncStartDocPrinter operation request
type StartDocPrinterRequest struct {
	// hPrinter: A handle to a printer object that was opened by using either RpcAsyncOpenPrinter
	// (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer          *Printer          `idl:"name:hPrinter" json:"printer"`
	DocInfoContainer *DocInfoContainer `idl:"name:pDocInfoContainer" json:"doc_info_container"`
}

func (o *StartDocPrinterRequest) xxx_ToOp(ctx context.Context, op *xxx_StartDocPrinterOperation) *xxx_StartDocPrinterOperation {
	if op == nil {
		op = &xxx_StartDocPrinterOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.DocInfoContainer = o.DocInfoContainer
	return op
}

func (o *StartDocPrinterRequest) xxx_FromOp(ctx context.Context, op *xxx_StartDocPrinterOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.DocInfoContainer = op.DocInfoContainer
}
func (o *StartDocPrinterRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *StartDocPrinterRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_StartDocPrinterOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// StartDocPrinterResponse structure represents the RpcAsyncStartDocPrinter operation response
type StartDocPrinterResponse struct {
	JobID uint32 `idl:"name:pJobId" json:"job_id"`
	// Return: The RpcAsyncStartDocPrinter return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *StartDocPrinterResponse) xxx_ToOp(ctx context.Context, op *xxx_StartDocPrinterOperation) *xxx_StartDocPrinterOperation {
	if op == nil {
		op = &xxx_StartDocPrinterOperation{}
	}
	if o == nil {
		return op
	}
	op.JobID = o.JobID
	op.Return = o.Return
	return op
}

func (o *StartDocPrinterResponse) xxx_FromOp(ctx context.Context, op *xxx_StartDocPrinterOperation) {
	if o == nil {
		return
	}
	o.JobID = op.JobID
	o.Return = op.Return
}
func (o *StartDocPrinterResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *StartDocPrinterResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_StartDocPrinterOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_StartPagePrinterOperation structure represents the RpcAsyncStartPagePrinter operation
type xxx_StartPagePrinterOperation struct {
	Printer *Printer `idl:"name:hPrinter" json:"printer"`
	Return  uint32   `idl:"name:Return" json:"return"`
}

func (o *xxx_StartPagePrinterOperation) OpNum() int { return 11 }

func (o *xxx_StartPagePrinterOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncStartPagePrinter"
}

func (o *xxx_StartPagePrinterOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_StartPagePrinterOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	return nil
}

func (o *xxx_StartPagePrinterOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_StartPagePrinterOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_StartPagePrinterOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_StartPagePrinterOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// StartPagePrinterRequest structure represents the RpcAsyncStartPagePrinter operation request
type StartPagePrinterRequest struct {
	// hPrinter: A handle to a printer object that was opened by using either RpcAsyncOpenPrinter
	// (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer *Printer `idl:"name:hPrinter" json:"printer"`
}

func (o *StartPagePrinterRequest) xxx_ToOp(ctx context.Context, op *xxx_StartPagePrinterOperation) *xxx_StartPagePrinterOperation {
	if op == nil {
		op = &xxx_StartPagePrinterOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	return op
}

func (o *StartPagePrinterRequest) xxx_FromOp(ctx context.Context, op *xxx_StartPagePrinterOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
}
func (o *StartPagePrinterRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *StartPagePrinterRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_StartPagePrinterOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// StartPagePrinterResponse structure represents the RpcAsyncStartPagePrinter operation response
type StartPagePrinterResponse struct {
	// Return: The RpcAsyncStartPagePrinter return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *StartPagePrinterResponse) xxx_ToOp(ctx context.Context, op *xxx_StartPagePrinterOperation) *xxx_StartPagePrinterOperation {
	if op == nil {
		op = &xxx_StartPagePrinterOperation{}
	}
	if o == nil {
		return op
	}
	op.Return = o.Return
	return op
}

func (o *StartPagePrinterResponse) xxx_FromOp(ctx context.Context, op *xxx_StartPagePrinterOperation) {
	if o == nil {
		return
	}
	o.Return = op.Return
}
func (o *StartPagePrinterResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *StartPagePrinterResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_StartPagePrinterOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_WritePrinterOperation structure represents the RpcAsyncWritePrinter operation
type xxx_WritePrinterOperation struct {
	Printer      *Printer `idl:"name:hPrinter" json:"printer"`
	Buffer       []byte   `idl:"name:pBuf;size_is:(cbBuf)" json:"buffer"`
	BufferLength uint32   `idl:"name:cbBuf" json:"buffer_length"`
	WrittenCount uint32   `idl:"name:pcWritten" json:"written_count"`
	Return       uint32   `idl:"name:Return" json:"return"`
}

func (o *xxx_WritePrinterOperation) OpNum() int { return 12 }

func (o *xxx_WritePrinterOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncWritePrinter"
}

func (o *xxx_WritePrinterOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if o.Buffer != nil && o.BufferLength == 0 {
		o.BufferLength = uint32(len(o.Buffer))
	}
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_WritePrinterOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// pBuf {in} (1:{pointer=ref}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		dimSize1 := uint64(o.BufferLength)
		if err := w.WriteSize(dimSize1); err != nil {
			return err
		}
		sizeInfo := []uint64{
			dimSize1,
		}
		for i1 := range o.Buffer {
			i1 := i1
			if uint64(i1) >= sizeInfo[0] {
				break
			}
			if err := w.WriteData(o.Buffer[i1]); err != nil {
				return err
			}
		}
		for i1 := len(o.Buffer); uint64(i1) < sizeInfo[0]; i1++ {
			if err := w.WriteData(uint8(0)); err != nil {
				return err
			}
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.BufferLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_WritePrinterOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// pBuf {in} (1:{pointer=ref}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array o.Buffer", sizeInfo[0])
		}
		o.Buffer = make([]byte, sizeInfo[0])
		for i1 := range o.Buffer {
			i1 := i1
			if err := w.ReadData(&o.Buffer[i1]); err != nil {
				return err
			}
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.BufferLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_WritePrinterOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_WritePrinterOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// pcWritten {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.WrittenCount); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_WritePrinterOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// pcWritten {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.WrittenCount); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// WritePrinterRequest structure represents the RpcAsyncWritePrinter operation request
type WritePrinterRequest struct {
	// hPrinter: A handle to a printer object or port object that was opened by using either
	// RpcAsyncOpenPrinter (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer      *Printer `idl:"name:hPrinter" json:"printer"`
	Buffer       []byte   `idl:"name:pBuf;size_is:(cbBuf)" json:"buffer"`
	BufferLength uint32   `idl:"name:cbBuf" json:"buffer_length"`
}

func (o *WritePrinterRequest) xxx_ToOp(ctx context.Context, op *xxx_WritePrinterOperation) *xxx_WritePrinterOperation {
	if op == nil {
		op = &xxx_WritePrinterOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.Buffer = o.Buffer
	op.BufferLength = o.BufferLength
	return op
}

func (o *WritePrinterRequest) xxx_FromOp(ctx context.Context, op *xxx_WritePrinterOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.Buffer = op.Buffer
	o.BufferLength = op.BufferLength
}
func (o *WritePrinterRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *WritePrinterRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_WritePrinterOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// WritePrinterResponse structure represents the RpcAsyncWritePrinter operation response
type WritePrinterResponse struct {
	WrittenCount uint32 `idl:"name:pcWritten" json:"written_count"`
	// Return: The RpcAsyncWritePrinter return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *WritePrinterResponse) xxx_ToOp(ctx context.Context, op *xxx_WritePrinterOperation) *xxx_WritePrinterOperation {
	if op == nil {
		op = &xxx_WritePrinterOperation{}
	}
	if o == nil {
		return op
	}
	op.WrittenCount = o.WrittenCount
	op.Return = o.Return
	return op
}

func (o *WritePrinterResponse) xxx_FromOp(ctx context.Context, op *xxx_WritePrinterOperation) {
	if o == nil {
		return
	}
	o.WrittenCount = op.WrittenCount
	o.Return = op.Return
}
func (o *WritePrinterResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *WritePrinterResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_WritePrinterOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_EndPagePrinterOperation structure represents the RpcAsyncEndPagePrinter operation
type xxx_EndPagePrinterOperation struct {
	Printer *Printer `idl:"name:hPrinter" json:"printer"`
	Return  uint32   `idl:"name:Return" json:"return"`
}

func (o *xxx_EndPagePrinterOperation) OpNum() int { return 13 }

func (o *xxx_EndPagePrinterOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncEndPagePrinter"
}

func (o *xxx_EndPagePrinterOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EndPagePrinterOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	return nil
}

func (o *xxx_EndPagePrinterOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EndPagePrinterOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EndPagePrinterOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EndPagePrinterOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// EndPagePrinterRequest structure represents the RpcAsyncEndPagePrinter operation request
type EndPagePrinterRequest struct {
	// hPrinter: A handle to a printer object that was opened by using either RpcAsyncOpenPrinter
	// (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer *Printer `idl:"name:hPrinter" json:"printer"`
}

func (o *EndPagePrinterRequest) xxx_ToOp(ctx context.Context, op *xxx_EndPagePrinterOperation) *xxx_EndPagePrinterOperation {
	if op == nil {
		op = &xxx_EndPagePrinterOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	return op
}

func (o *EndPagePrinterRequest) xxx_FromOp(ctx context.Context, op *xxx_EndPagePrinterOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
}
func (o *EndPagePrinterRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *EndPagePrinterRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_EndPagePrinterOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// EndPagePrinterResponse structure represents the RpcAsyncEndPagePrinter operation response
type EndPagePrinterResponse struct {
	// Return: The RpcAsyncEndPagePrinter return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *EndPagePrinterResponse) xxx_ToOp(ctx context.Context, op *xxx_EndPagePrinterOperation) *xxx_EndPagePrinterOperation {
	if op == nil {
		op = &xxx_EndPagePrinterOperation{}
	}
	if o == nil {
		return op
	}
	op.Return = o.Return
	return op
}

func (o *EndPagePrinterResponse) xxx_FromOp(ctx context.Context, op *xxx_EndPagePrinterOperation) {
	if o == nil {
		return
	}
	o.Return = op.Return
}
func (o *EndPagePrinterResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *EndPagePrinterResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_EndPagePrinterOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_EndDocPrinterOperation structure represents the RpcAsyncEndDocPrinter operation
type xxx_EndDocPrinterOperation struct {
	Printer *Printer `idl:"name:hPrinter" json:"printer"`
	Return  uint32   `idl:"name:Return" json:"return"`
}

func (o *xxx_EndDocPrinterOperation) OpNum() int { return 14 }

func (o *xxx_EndDocPrinterOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncEndDocPrinter"
}

func (o *xxx_EndDocPrinterOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EndDocPrinterOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	return nil
}

func (o *xxx_EndDocPrinterOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EndDocPrinterOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EndDocPrinterOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EndDocPrinterOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// EndDocPrinterRequest structure represents the RpcAsyncEndDocPrinter operation request
type EndDocPrinterRequest struct {
	// hPrinter: A handle to a printer object that has been opened by using either RpcAsyncOpenPrinter
	// (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer *Printer `idl:"name:hPrinter" json:"printer"`
}

func (o *EndDocPrinterRequest) xxx_ToOp(ctx context.Context, op *xxx_EndDocPrinterOperation) *xxx_EndDocPrinterOperation {
	if op == nil {
		op = &xxx_EndDocPrinterOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	return op
}

func (o *EndDocPrinterRequest) xxx_FromOp(ctx context.Context, op *xxx_EndDocPrinterOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
}
func (o *EndDocPrinterRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *EndDocPrinterRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_EndDocPrinterOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// EndDocPrinterResponse structure represents the RpcAsyncEndDocPrinter operation response
type EndDocPrinterResponse struct {
	// Return: The RpcAsyncEndDocPrinter return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *EndDocPrinterResponse) xxx_ToOp(ctx context.Context, op *xxx_EndDocPrinterOperation) *xxx_EndDocPrinterOperation {
	if op == nil {
		op = &xxx_EndDocPrinterOperation{}
	}
	if o == nil {
		return op
	}
	op.Return = o.Return
	return op
}

func (o *EndDocPrinterResponse) xxx_FromOp(ctx context.Context, op *xxx_EndDocPrinterOperation) {
	if o == nil {
		return
	}
	o.Return = op.Return
}
func (o *EndDocPrinterResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *EndDocPrinterResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_EndDocPrinterOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_AbortPrinterOperation structure represents the RpcAsyncAbortPrinter operation
type xxx_AbortPrinterOperation struct {
	Printer *Printer `idl:"name:hPrinter" json:"printer"`
	Return  uint32   `idl:"name:Return" json:"return"`
}

func (o *xxx_AbortPrinterOperation) OpNum() int { return 15 }

func (o *xxx_AbortPrinterOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncAbortPrinter"
}

func (o *xxx_AbortPrinterOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AbortPrinterOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	return nil
}

func (o *xxx_AbortPrinterOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AbortPrinterOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AbortPrinterOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AbortPrinterOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// AbortPrinterRequest structure represents the RpcAsyncAbortPrinter operation request
type AbortPrinterRequest struct {
	// hPrinter: A handle to a printer object that has been opened by using either RpcAsyncOpenPrinter
	// (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer *Printer `idl:"name:hPrinter" json:"printer"`
}

func (o *AbortPrinterRequest) xxx_ToOp(ctx context.Context, op *xxx_AbortPrinterOperation) *xxx_AbortPrinterOperation {
	if op == nil {
		op = &xxx_AbortPrinterOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	return op
}

func (o *AbortPrinterRequest) xxx_FromOp(ctx context.Context, op *xxx_AbortPrinterOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
}
func (o *AbortPrinterRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *AbortPrinterRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_AbortPrinterOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// AbortPrinterResponse structure represents the RpcAsyncAbortPrinter operation response
type AbortPrinterResponse struct {
	// Return: The RpcAsyncAbortPrinter return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *AbortPrinterResponse) xxx_ToOp(ctx context.Context, op *xxx_AbortPrinterOperation) *xxx_AbortPrinterOperation {
	if op == nil {
		op = &xxx_AbortPrinterOperation{}
	}
	if o == nil {
		return op
	}
	op.Return = o.Return
	return op
}

func (o *AbortPrinterResponse) xxx_FromOp(ctx context.Context, op *xxx_AbortPrinterOperation) {
	if o == nil {
		return
	}
	o.Return = op.Return
}
func (o *AbortPrinterResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *AbortPrinterResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_AbortPrinterOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_GetPrinterDataOperation structure represents the RpcAsyncGetPrinterData operation
type xxx_GetPrinterDataOperation struct {
	Printer      *Printer `idl:"name:hPrinter" json:"printer"`
	ValueName    string   `idl:"name:pValueName;string" json:"value_name"`
	Type         uint32   `idl:"name:pType" json:"type"`
	Data         []byte   `idl:"name:pData;size_is:(nSize)" json:"data"`
	Size         uint32   `idl:"name:nSize" json:"size"`
	NeededLength uint32   `idl:"name:pcbNeeded" json:"needed_length"`
	Return       uint32   `idl:"name:Return" json:"return"`
}

func (o *xxx_GetPrinterDataOperation) OpNum() int { return 16 }

func (o *xxx_GetPrinterDataOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncGetPrinterData"
}

func (o *xxx_GetPrinterDataOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetPrinterDataOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// pValueName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.ValueName); err != nil {
			return err
		}
	}
	// nSize {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Size); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetPrinterDataOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// pValueName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.ValueName); err != nil {
			return err
		}
	}
	// nSize {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Size); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetPrinterDataOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetPrinterDataOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// pType {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Type); err != nil {
			return err
		}
	}
	// pData {out} (1:{pointer=ref}*(1)[dim:0,size_is=nSize](uchar))
	{
		dimSize1 := uint64(o.Size)
		if err := w.WriteSize(dimSize1); err != nil {
			return err
		}
		sizeInfo := []uint64{
			dimSize1,
		}
		for i1 := range o.Data {
			i1 := i1
			if uint64(i1) >= sizeInfo[0] {
				break
			}
			if err := w.WriteData(o.Data[i1]); err != nil {
				return err
			}
		}
		for i1 := len(o.Data); uint64(i1) < sizeInfo[0]; i1++ {
			if err := w.WriteData(uint8(0)); err != nil {
				return err
			}
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.NeededLength); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetPrinterDataOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// pType {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Type); err != nil {
			return err
		}
	}
	// pData {out} (1:{pointer=ref}*(1)[dim:0,size_is=nSize](uchar))
	{
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array o.Data", sizeInfo[0])
		}
		o.Data = make([]byte, sizeInfo[0])
		for i1 := range o.Data {
			i1 := i1
			if err := w.ReadData(&o.Data[i1]); err != nil {
				return err
			}
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.NeededLength); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// GetPrinterDataRequest structure represents the RpcAsyncGetPrinterData operation request
type GetPrinterDataRequest struct {
	// hPrinter: A handle to a printer object or server object that has been opened using
	// either RpcAsyncOpenPrinter (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer   *Printer `idl:"name:hPrinter" json:"printer"`
	ValueName string   `idl:"name:pValueName;string" json:"value_name"`
	Size      uint32   `idl:"name:nSize" json:"size"`
}

func (o *GetPrinterDataRequest) xxx_ToOp(ctx context.Context, op *xxx_GetPrinterDataOperation) *xxx_GetPrinterDataOperation {
	if op == nil {
		op = &xxx_GetPrinterDataOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.ValueName = o.ValueName
	op.Size = o.Size
	return op
}

func (o *GetPrinterDataRequest) xxx_FromOp(ctx context.Context, op *xxx_GetPrinterDataOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.ValueName = op.ValueName
	o.Size = op.Size
}
func (o *GetPrinterDataRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *GetPrinterDataRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_GetPrinterDataOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// GetPrinterDataResponse structure represents the RpcAsyncGetPrinterData operation response
type GetPrinterDataResponse struct {
	// XXX: nSize is an implicit input depedency for output parameters
	Size uint32 `idl:"name:nSize" json:"size"`

	Type         uint32 `idl:"name:pType" json:"type"`
	Data         []byte `idl:"name:pData;size_is:(nSize)" json:"data"`
	NeededLength uint32 `idl:"name:pcbNeeded" json:"needed_length"`
	// Return: The RpcAsyncGetPrinterData return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *GetPrinterDataResponse) xxx_ToOp(ctx context.Context, op *xxx_GetPrinterDataOperation) *xxx_GetPrinterDataOperation {
	if op == nil {
		op = &xxx_GetPrinterDataOperation{}
	}
	if o == nil {
		return op
	}
	// XXX: implicit input dependencies for output parameters
	if op.Size == uint32(0) {
		op.Size = o.Size
	}

	op.Type = o.Type
	op.Data = o.Data
	op.NeededLength = o.NeededLength
	op.Return = o.Return
	return op
}

func (o *GetPrinterDataResponse) xxx_FromOp(ctx context.Context, op *xxx_GetPrinterDataOperation) {
	if o == nil {
		return
	}
	// XXX: implicit input dependencies for output parameters
	o.Size = op.Size

	o.Type = op.Type
	o.Data = op.Data
	o.NeededLength = op.NeededLength
	o.Return = op.Return
}
func (o *GetPrinterDataResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *GetPrinterDataResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_GetPrinterDataOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_GetPrinterDataExOperation structure represents the RpcAsyncGetPrinterDataEx operation
type xxx_GetPrinterDataExOperation struct {
	Printer      *Printer `idl:"name:hPrinter" json:"printer"`
	KeyName      string   `idl:"name:pKeyName;string" json:"key_name"`
	ValueName    string   `idl:"name:pValueName;string" json:"value_name"`
	Type         uint32   `idl:"name:pType" json:"type"`
	Data         []byte   `idl:"name:pData;size_is:(nSize)" json:"data"`
	Size         uint32   `idl:"name:nSize" json:"size"`
	NeededLength uint32   `idl:"name:pcbNeeded" json:"needed_length"`
	Return       uint32   `idl:"name:Return" json:"return"`
}

func (o *xxx_GetPrinterDataExOperation) OpNum() int { return 17 }

func (o *xxx_GetPrinterDataExOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncGetPrinterDataEx"
}

func (o *xxx_GetPrinterDataExOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetPrinterDataExOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// pKeyName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.KeyName); err != nil {
			return err
		}
	}
	// pValueName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.ValueName); err != nil {
			return err
		}
	}
	// nSize {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Size); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetPrinterDataExOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// pKeyName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.KeyName); err != nil {
			return err
		}
	}
	// pValueName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.ValueName); err != nil {
			return err
		}
	}
	// nSize {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Size); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetPrinterDataExOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetPrinterDataExOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// pType {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Type); err != nil {
			return err
		}
	}
	// pData {out} (1:{pointer=ref}*(1)[dim:0,size_is=nSize](uchar))
	{
		dimSize1 := uint64(o.Size)
		if err := w.WriteSize(dimSize1); err != nil {
			return err
		}
		sizeInfo := []uint64{
			dimSize1,
		}
		for i1 := range o.Data {
			i1 := i1
			if uint64(i1) >= sizeInfo[0] {
				break
			}
			if err := w.WriteData(o.Data[i1]); err != nil {
				return err
			}
		}
		for i1 := len(o.Data); uint64(i1) < sizeInfo[0]; i1++ {
			if err := w.WriteData(uint8(0)); err != nil {
				return err
			}
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.NeededLength); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetPrinterDataExOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// pType {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Type); err != nil {
			return err
		}
	}
	// pData {out} (1:{pointer=ref}*(1)[dim:0,size_is=nSize](uchar))
	{
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array o.Data", sizeInfo[0])
		}
		o.Data = make([]byte, sizeInfo[0])
		for i1 := range o.Data {
			i1 := i1
			if err := w.ReadData(&o.Data[i1]); err != nil {
				return err
			}
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.NeededLength); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// GetPrinterDataExRequest structure represents the RpcAsyncGetPrinterDataEx operation request
type GetPrinterDataExRequest struct {
	// hPrinter: A handle to a printer object or server object that has been opened using
	// either RpcAsyncOpenPrinter (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer   *Printer `idl:"name:hPrinter" json:"printer"`
	KeyName   string   `idl:"name:pKeyName;string" json:"key_name"`
	ValueName string   `idl:"name:pValueName;string" json:"value_name"`
	Size      uint32   `idl:"name:nSize" json:"size"`
}

func (o *GetPrinterDataExRequest) xxx_ToOp(ctx context.Context, op *xxx_GetPrinterDataExOperation) *xxx_GetPrinterDataExOperation {
	if op == nil {
		op = &xxx_GetPrinterDataExOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.KeyName = o.KeyName
	op.ValueName = o.ValueName
	op.Size = o.Size
	return op
}

func (o *GetPrinterDataExRequest) xxx_FromOp(ctx context.Context, op *xxx_GetPrinterDataExOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.KeyName = op.KeyName
	o.ValueName = op.ValueName
	o.Size = op.Size
}
func (o *GetPrinterDataExRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *GetPrinterDataExRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_GetPrinterDataExOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// GetPrinterDataExResponse structure represents the RpcAsyncGetPrinterDataEx operation response
type GetPrinterDataExResponse struct {
	// XXX: nSize is an implicit input depedency for output parameters
	Size uint32 `idl:"name:nSize" json:"size"`

	Type         uint32 `idl:"name:pType" json:"type"`
	Data         []byte `idl:"name:pData;size_is:(nSize)" json:"data"`
	NeededLength uint32 `idl:"name:pcbNeeded" json:"needed_length"`
	// Return: The RpcAsyncGetPrinterDataEx return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *GetPrinterDataExResponse) xxx_ToOp(ctx context.Context, op *xxx_GetPrinterDataExOperation) *xxx_GetPrinterDataExOperation {
	if op == nil {
		op = &xxx_GetPrinterDataExOperation{}
	}
	if o == nil {
		return op
	}
	// XXX: implicit input dependencies for output parameters
	if op.Size == uint32(0) {
		op.Size = o.Size
	}

	op.Type = o.Type
	op.Data = o.Data
	op.NeededLength = o.NeededLength
	op.Return = o.Return
	return op
}

func (o *GetPrinterDataExResponse) xxx_FromOp(ctx context.Context, op *xxx_GetPrinterDataExOperation) {
	if o == nil {
		return
	}
	// XXX: implicit input dependencies for output parameters
	o.Size = op.Size

	o.Type = op.Type
	o.Data = op.Data
	o.NeededLength = op.NeededLength
	o.Return = op.Return
}
func (o *GetPrinterDataExResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *GetPrinterDataExResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_GetPrinterDataExOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_SetPrinterDataOperation structure represents the RpcAsyncSetPrinterData operation
type xxx_SetPrinterDataOperation struct {
	Printer    *Printer `idl:"name:hPrinter" json:"printer"`
	ValueName  string   `idl:"name:pValueName;string" json:"value_name"`
	Type       uint32   `idl:"name:Type" json:"type"`
	Data       []byte   `idl:"name:pData;size_is:(cbData)" json:"data"`
	DataLength uint32   `idl:"name:cbData" json:"data_length"`
	Return     uint32   `idl:"name:Return" json:"return"`
}

func (o *xxx_SetPrinterDataOperation) OpNum() int { return 18 }

func (o *xxx_SetPrinterDataOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncSetPrinterData"
}

func (o *xxx_SetPrinterDataOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if o.Data != nil && o.DataLength == 0 {
		o.DataLength = uint32(len(o.Data))
	}
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SetPrinterDataOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// pValueName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.ValueName); err != nil {
			return err
		}
	}
	// Type {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Type); err != nil {
			return err
		}
	}
	// pData {in} (1:{pointer=ref}*(1)[dim:0,size_is=cbData](uchar))
	{
		dimSize1 := uint64(o.DataLength)
		if err := w.WriteSize(dimSize1); err != nil {
			return err
		}
		sizeInfo := []uint64{
			dimSize1,
		}
		for i1 := range o.Data {
			i1 := i1
			if uint64(i1) >= sizeInfo[0] {
				break
			}
			if err := w.WriteData(o.Data[i1]); err != nil {
				return err
			}
		}
		for i1 := len(o.Data); uint64(i1) < sizeInfo[0]; i1++ {
			if err := w.WriteData(uint8(0)); err != nil {
				return err
			}
		}
	}
	// cbData {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.DataLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SetPrinterDataOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// pValueName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.ValueName); err != nil {
			return err
		}
	}
	// Type {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Type); err != nil {
			return err
		}
	}
	// pData {in} (1:{pointer=ref}*(1)[dim:0,size_is=cbData](uchar))
	{
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array o.Data", sizeInfo[0])
		}
		o.Data = make([]byte, sizeInfo[0])
		for i1 := range o.Data {
			i1 := i1
			if err := w.ReadData(&o.Data[i1]); err != nil {
				return err
			}
		}
	}
	// cbData {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.DataLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SetPrinterDataOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SetPrinterDataOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SetPrinterDataOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// SetPrinterDataRequest structure represents the RpcAsyncSetPrinterData operation request
type SetPrinterDataRequest struct {
	// hPrinter: A handle to a printer object or server object that has been opened using
	// either RpcAsyncOpenPrinter (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer    *Printer `idl:"name:hPrinter" json:"printer"`
	ValueName  string   `idl:"name:pValueName;string" json:"value_name"`
	Type       uint32   `idl:"name:Type" json:"type"`
	Data       []byte   `idl:"name:pData;size_is:(cbData)" json:"data"`
	DataLength uint32   `idl:"name:cbData" json:"data_length"`
}

func (o *SetPrinterDataRequest) xxx_ToOp(ctx context.Context, op *xxx_SetPrinterDataOperation) *xxx_SetPrinterDataOperation {
	if op == nil {
		op = &xxx_SetPrinterDataOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.ValueName = o.ValueName
	op.Type = o.Type
	op.Data = o.Data
	op.DataLength = o.DataLength
	return op
}

func (o *SetPrinterDataRequest) xxx_FromOp(ctx context.Context, op *xxx_SetPrinterDataOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.ValueName = op.ValueName
	o.Type = op.Type
	o.Data = op.Data
	o.DataLength = op.DataLength
}
func (o *SetPrinterDataRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *SetPrinterDataRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_SetPrinterDataOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// SetPrinterDataResponse structure represents the RpcAsyncSetPrinterData operation response
type SetPrinterDataResponse struct {
	// Return: The RpcAsyncSetPrinterData return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *SetPrinterDataResponse) xxx_ToOp(ctx context.Context, op *xxx_SetPrinterDataOperation) *xxx_SetPrinterDataOperation {
	if op == nil {
		op = &xxx_SetPrinterDataOperation{}
	}
	if o == nil {
		return op
	}
	op.Return = o.Return
	return op
}

func (o *SetPrinterDataResponse) xxx_FromOp(ctx context.Context, op *xxx_SetPrinterDataOperation) {
	if o == nil {
		return
	}
	o.Return = op.Return
}
func (o *SetPrinterDataResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *SetPrinterDataResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_SetPrinterDataOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_SetPrinterDataExOperation structure represents the RpcAsyncSetPrinterDataEx operation
type xxx_SetPrinterDataExOperation struct {
	Printer    *Printer `idl:"name:hPrinter" json:"printer"`
	KeyName    string   `idl:"name:pKeyName;string" json:"key_name"`
	ValueName  string   `idl:"name:pValueName;string" json:"value_name"`
	Type       uint32   `idl:"name:Type" json:"type"`
	Data       []byte   `idl:"name:pData;size_is:(cbData)" json:"data"`
	DataLength uint32   `idl:"name:cbData" json:"data_length"`
	Return     uint32   `idl:"name:Return" json:"return"`
}

func (o *xxx_SetPrinterDataExOperation) OpNum() int { return 19 }

func (o *xxx_SetPrinterDataExOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncSetPrinterDataEx"
}

func (o *xxx_SetPrinterDataExOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if o.Data != nil && o.DataLength == 0 {
		o.DataLength = uint32(len(o.Data))
	}
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SetPrinterDataExOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// pKeyName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.KeyName); err != nil {
			return err
		}
	}
	// pValueName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.ValueName); err != nil {
			return err
		}
	}
	// Type {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Type); err != nil {
			return err
		}
	}
	// pData {in} (1:{pointer=ref}*(1)[dim:0,size_is=cbData](uchar))
	{
		dimSize1 := uint64(o.DataLength)
		if err := w.WriteSize(dimSize1); err != nil {
			return err
		}
		sizeInfo := []uint64{
			dimSize1,
		}
		for i1 := range o.Data {
			i1 := i1
			if uint64(i1) >= sizeInfo[0] {
				break
			}
			if err := w.WriteData(o.Data[i1]); err != nil {
				return err
			}
		}
		for i1 := len(o.Data); uint64(i1) < sizeInfo[0]; i1++ {
			if err := w.WriteData(uint8(0)); err != nil {
				return err
			}
		}
	}
	// cbData {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.DataLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SetPrinterDataExOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// pKeyName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.KeyName); err != nil {
			return err
		}
	}
	// pValueName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.ValueName); err != nil {
			return err
		}
	}
	// Type {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Type); err != nil {
			return err
		}
	}
	// pData {in} (1:{pointer=ref}*(1)[dim:0,size_is=cbData](uchar))
	{
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array o.Data", sizeInfo[0])
		}
		o.Data = make([]byte, sizeInfo[0])
		for i1 := range o.Data {
			i1 := i1
			if err := w.ReadData(&o.Data[i1]); err != nil {
				return err
			}
		}
	}
	// cbData {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.DataLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SetPrinterDataExOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SetPrinterDataExOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SetPrinterDataExOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// SetPrinterDataExRequest structure represents the RpcAsyncSetPrinterDataEx operation request
type SetPrinterDataExRequest struct {
	// hPrinter: A handle to a printer object or server object that has been opened using
	// either RpcAsyncOpenPrinter (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer    *Printer `idl:"name:hPrinter" json:"printer"`
	KeyName    string   `idl:"name:pKeyName;string" json:"key_name"`
	ValueName  string   `idl:"name:pValueName;string" json:"value_name"`
	Type       uint32   `idl:"name:Type" json:"type"`
	Data       []byte   `idl:"name:pData;size_is:(cbData)" json:"data"`
	DataLength uint32   `idl:"name:cbData" json:"data_length"`
}

func (o *SetPrinterDataExRequest) xxx_ToOp(ctx context.Context, op *xxx_SetPrinterDataExOperation) *xxx_SetPrinterDataExOperation {
	if op == nil {
		op = &xxx_SetPrinterDataExOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.KeyName = o.KeyName
	op.ValueName = o.ValueName
	op.Type = o.Type
	op.Data = o.Data
	op.DataLength = o.DataLength
	return op
}

func (o *SetPrinterDataExRequest) xxx_FromOp(ctx context.Context, op *xxx_SetPrinterDataExOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.KeyName = op.KeyName
	o.ValueName = op.ValueName
	o.Type = op.Type
	o.Data = op.Data
	o.DataLength = op.DataLength
}
func (o *SetPrinterDataExRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *SetPrinterDataExRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_SetPrinterDataExOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// SetPrinterDataExResponse structure represents the RpcAsyncSetPrinterDataEx operation response
type SetPrinterDataExResponse struct {
	// Return: The RpcAsyncSetPrinterDataEx return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *SetPrinterDataExResponse) xxx_ToOp(ctx context.Context, op *xxx_SetPrinterDataExOperation) *xxx_SetPrinterDataExOperation {
	if op == nil {
		op = &xxx_SetPrinterDataExOperation{}
	}
	if o == nil {
		return op
	}
	op.Return = o.Return
	return op
}

func (o *SetPrinterDataExResponse) xxx_FromOp(ctx context.Context, op *xxx_SetPrinterDataExOperation) {
	if o == nil {
		return
	}
	o.Return = op.Return
}
func (o *SetPrinterDataExResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *SetPrinterDataExResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_SetPrinterDataExOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_ClosePrinterOperation structure represents the RpcAsyncClosePrinter operation
type xxx_ClosePrinterOperation struct {
	Printer *Printer `idl:"name:phPrinter" json:"printer"`
	Return  uint32   `idl:"name:Return" json:"return"`
}

func (o *xxx_ClosePrinterOperation) OpNum() int { return 20 }

func (o *xxx_ClosePrinterOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncClosePrinter"
}

func (o *xxx_ClosePrinterOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_ClosePrinterOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// phPrinter {in, out} (1:{pointer=ref}*(1))(2:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	return nil
}

func (o *xxx_ClosePrinterOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// phPrinter {in, out} (1:{pointer=ref}*(1))(2:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_ClosePrinterOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_ClosePrinterOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// phPrinter {in, out} (1:{pointer=ref}*(1))(2:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_ClosePrinterOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// phPrinter {in, out} (1:{pointer=ref}*(1))(2:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// ClosePrinterRequest structure represents the RpcAsyncClosePrinter operation request
type ClosePrinterRequest struct {
	// phPrinter: A pointer to the handle for a printer object, server object, job object,
	// or port object.
	Printer *Printer `idl:"name:phPrinter" json:"printer"`
}

func (o *ClosePrinterRequest) xxx_ToOp(ctx context.Context, op *xxx_ClosePrinterOperation) *xxx_ClosePrinterOperation {
	if op == nil {
		op = &xxx_ClosePrinterOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	return op
}

func (o *ClosePrinterRequest) xxx_FromOp(ctx context.Context, op *xxx_ClosePrinterOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
}
func (o *ClosePrinterRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *ClosePrinterRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_ClosePrinterOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// ClosePrinterResponse structure represents the RpcAsyncClosePrinter operation response
type ClosePrinterResponse struct {
	// phPrinter: A pointer to the handle for a printer object, server object, job object,
	// or port object.
	Printer *Printer `idl:"name:phPrinter" json:"printer"`
	// Return: The RpcAsyncClosePrinter return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *ClosePrinterResponse) xxx_ToOp(ctx context.Context, op *xxx_ClosePrinterOperation) *xxx_ClosePrinterOperation {
	if op == nil {
		op = &xxx_ClosePrinterOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.Return = o.Return
	return op
}

func (o *ClosePrinterResponse) xxx_FromOp(ctx context.Context, op *xxx_ClosePrinterOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.Return = op.Return
}
func (o *ClosePrinterResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *ClosePrinterResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_ClosePrinterOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_AddFormOperation structure represents the RpcAsyncAddForm operation
type xxx_AddFormOperation struct {
	Printer           *Printer       `idl:"name:hPrinter" json:"printer"`
	FormInfoContainer *FormContainer `idl:"name:pFormInfoContainer" json:"form_info_container"`
	Return            uint32         `idl:"name:Return" json:"return"`
}

func (o *xxx_AddFormOperation) OpNum() int { return 21 }

func (o *xxx_AddFormOperation) OpName() string { return "/IRemoteWinspool/v1/RpcAsyncAddForm" }

func (o *xxx_AddFormOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddFormOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// pFormInfoContainer {in} (1:{pointer=ref}*(1))(2:{alias=FORM_CONTAINER}(struct))
	{
		if o.FormInfoContainer != nil {
			if err := o.FormInfoContainer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&FormContainer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddFormOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// pFormInfoContainer {in} (1:{pointer=ref}*(1))(2:{alias=FORM_CONTAINER}(struct))
	{
		if o.FormInfoContainer == nil {
			o.FormInfoContainer = &FormContainer{}
		}
		if err := o.FormInfoContainer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddFormOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddFormOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddFormOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// AddFormRequest structure represents the RpcAsyncAddForm operation request
type AddFormRequest struct {
	// hPrinter: A handle to a printer object or server object that has been opened by using
	// either RpcAsyncOpenPrinter (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer           *Printer       `idl:"name:hPrinter" json:"printer"`
	FormInfoContainer *FormContainer `idl:"name:pFormInfoContainer" json:"form_info_container"`
}

func (o *AddFormRequest) xxx_ToOp(ctx context.Context, op *xxx_AddFormOperation) *xxx_AddFormOperation {
	if op == nil {
		op = &xxx_AddFormOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.FormInfoContainer = o.FormInfoContainer
	return op
}

func (o *AddFormRequest) xxx_FromOp(ctx context.Context, op *xxx_AddFormOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.FormInfoContainer = op.FormInfoContainer
}
func (o *AddFormRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *AddFormRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_AddFormOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// AddFormResponse structure represents the RpcAsyncAddForm operation response
type AddFormResponse struct {
	// Return: The RpcAsyncAddForm return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *AddFormResponse) xxx_ToOp(ctx context.Context, op *xxx_AddFormOperation) *xxx_AddFormOperation {
	if op == nil {
		op = &xxx_AddFormOperation{}
	}
	if o == nil {
		return op
	}
	op.Return = o.Return
	return op
}

func (o *AddFormResponse) xxx_FromOp(ctx context.Context, op *xxx_AddFormOperation) {
	if o == nil {
		return
	}
	o.Return = op.Return
}
func (o *AddFormResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *AddFormResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_AddFormOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_DeleteFormOperation structure represents the RpcAsyncDeleteForm operation
type xxx_DeleteFormOperation struct {
	Printer  *Printer `idl:"name:hPrinter" json:"printer"`
	FormName string   `idl:"name:pFormName;string" json:"form_name"`
	Return   uint32   `idl:"name:Return" json:"return"`
}

func (o *xxx_DeleteFormOperation) OpNum() int { return 22 }

func (o *xxx_DeleteFormOperation) OpName() string { return "/IRemoteWinspool/v1/RpcAsyncDeleteForm" }

func (o *xxx_DeleteFormOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeleteFormOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// pFormName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.FormName); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeleteFormOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// pFormName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.FormName); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeleteFormOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeleteFormOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeleteFormOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// DeleteFormRequest structure represents the RpcAsyncDeleteForm operation request
type DeleteFormRequest struct {
	// hPrinter: A handle to a printer object or server object that has been opened by using
	// either RpcAsyncOpenPrinter (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer  *Printer `idl:"name:hPrinter" json:"printer"`
	FormName string   `idl:"name:pFormName;string" json:"form_name"`
}

func (o *DeleteFormRequest) xxx_ToOp(ctx context.Context, op *xxx_DeleteFormOperation) *xxx_DeleteFormOperation {
	if op == nil {
		op = &xxx_DeleteFormOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.FormName = o.FormName
	return op
}

func (o *DeleteFormRequest) xxx_FromOp(ctx context.Context, op *xxx_DeleteFormOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.FormName = op.FormName
}
func (o *DeleteFormRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *DeleteFormRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_DeleteFormOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// DeleteFormResponse structure represents the RpcAsyncDeleteForm operation response
type DeleteFormResponse struct {
	// Return: The RpcAsyncDeleteForm return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *DeleteFormResponse) xxx_ToOp(ctx context.Context, op *xxx_DeleteFormOperation) *xxx_DeleteFormOperation {
	if op == nil {
		op = &xxx_DeleteFormOperation{}
	}
	if o == nil {
		return op
	}
	op.Return = o.Return
	return op
}

func (o *DeleteFormResponse) xxx_FromOp(ctx context.Context, op *xxx_DeleteFormOperation) {
	if o == nil {
		return
	}
	o.Return = op.Return
}
func (o *DeleteFormResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *DeleteFormResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_DeleteFormOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_GetFormOperation structure represents the RpcAsyncGetForm operation
type xxx_GetFormOperation struct {
	Printer      *Printer `idl:"name:hPrinter" json:"printer"`
	FormName     string   `idl:"name:pFormName;string" json:"form_name"`
	Level        uint32   `idl:"name:Level" json:"level"`
	Form         []byte   `idl:"name:pForm;size_is:(cbBuf);pointer:unique" json:"form"`
	BufferLength uint32   `idl:"name:cbBuf" json:"buffer_length"`
	NeededLength uint32   `idl:"name:pcbNeeded" json:"needed_length"`
	Return       uint32   `idl:"name:Return" json:"return"`
}

func (o *xxx_GetFormOperation) OpNum() int { return 23 }

func (o *xxx_GetFormOperation) OpName() string { return "/IRemoteWinspool/v1/RpcAsyncGetForm" }

func (o *xxx_GetFormOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if o.Form != nil && o.BufferLength == 0 {
		o.BufferLength = uint32(len(o.Form))
	}
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetFormOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// pFormName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.FormName); err != nil {
			return err
		}
	}
	// Level {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Level); err != nil {
			return err
		}
	}
	// pForm {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		if o.Form != nil || o.BufferLength > 0 {
			_ptr_pForm := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.BufferLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				for i1 := range o.Form {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(o.Form[i1]); err != nil {
						return err
					}
				}
				for i1 := len(o.Form); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint8(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.Form, _ptr_pForm); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.BufferLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetFormOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// pFormName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.FormName); err != nil {
			return err
		}
	}
	// Level {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Level); err != nil {
			return err
		}
	}
	// pForm {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		_ptr_pForm := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array o.Form", sizeInfo[0])
			}
			o.Form = make([]byte, sizeInfo[0])
			for i1 := range o.Form {
				i1 := i1
				if err := w.ReadData(&o.Form[i1]); err != nil {
					return err
				}
			}
			return nil
		})
		_s_pForm := func(ptr interface{}) { o.Form = *ptr.(*[]byte) }
		if err := w.ReadPointer(&o.Form, _s_pForm, _ptr_pForm); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.BufferLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetFormOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetFormOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// pForm {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		if o.Form != nil || o.BufferLength > 0 {
			_ptr_pForm := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.BufferLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				for i1 := range o.Form {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(o.Form[i1]); err != nil {
						return err
					}
				}
				for i1 := len(o.Form); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint8(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.Form, _ptr_pForm); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.NeededLength); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetFormOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// pForm {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		_ptr_pForm := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array o.Form", sizeInfo[0])
			}
			o.Form = make([]byte, sizeInfo[0])
			for i1 := range o.Form {
				i1 := i1
				if err := w.ReadData(&o.Form[i1]); err != nil {
					return err
				}
			}
			return nil
		})
		_s_pForm := func(ptr interface{}) { o.Form = *ptr.(*[]byte) }
		if err := w.ReadPointer(&o.Form, _s_pForm, _ptr_pForm); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.NeededLength); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// GetFormRequest structure represents the RpcAsyncGetForm operation request
type GetFormRequest struct {
	// hPrinter: A handle to a printer object or server object that has been opened by using
	// either RpcAsyncOpenPrinter (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer      *Printer `idl:"name:hPrinter" json:"printer"`
	FormName     string   `idl:"name:pFormName;string" json:"form_name"`
	Level        uint32   `idl:"name:Level" json:"level"`
	Form         []byte   `idl:"name:pForm;size_is:(cbBuf);pointer:unique" json:"form"`
	BufferLength uint32   `idl:"name:cbBuf" json:"buffer_length"`
}

func (o *GetFormRequest) xxx_ToOp(ctx context.Context, op *xxx_GetFormOperation) *xxx_GetFormOperation {
	if op == nil {
		op = &xxx_GetFormOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.FormName = o.FormName
	op.Level = o.Level
	op.Form = o.Form
	op.BufferLength = o.BufferLength
	return op
}

func (o *GetFormRequest) xxx_FromOp(ctx context.Context, op *xxx_GetFormOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.FormName = op.FormName
	o.Level = op.Level
	o.Form = op.Form
	o.BufferLength = op.BufferLength
}
func (o *GetFormRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *GetFormRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_GetFormOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// GetFormResponse structure represents the RpcAsyncGetForm operation response
type GetFormResponse struct {
	// XXX: cbBuf is an implicit input depedency for output parameters
	BufferLength uint32 `idl:"name:cbBuf" json:"buffer_length"`

	Form         []byte `idl:"name:pForm;size_is:(cbBuf);pointer:unique" json:"form"`
	NeededLength uint32 `idl:"name:pcbNeeded" json:"needed_length"`
	// Return: The RpcAsyncGetForm return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *GetFormResponse) xxx_ToOp(ctx context.Context, op *xxx_GetFormOperation) *xxx_GetFormOperation {
	if op == nil {
		op = &xxx_GetFormOperation{}
	}
	if o == nil {
		return op
	}
	// XXX: implicit input dependencies for output parameters
	if op.BufferLength == uint32(0) {
		op.BufferLength = o.BufferLength
	}

	op.Form = o.Form
	op.NeededLength = o.NeededLength
	op.Return = o.Return
	return op
}

func (o *GetFormResponse) xxx_FromOp(ctx context.Context, op *xxx_GetFormOperation) {
	if o == nil {
		return
	}
	// XXX: implicit input dependencies for output parameters
	o.BufferLength = op.BufferLength

	o.Form = op.Form
	o.NeededLength = op.NeededLength
	o.Return = op.Return
}
func (o *GetFormResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *GetFormResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_GetFormOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_SetFormOperation structure represents the RpcAsyncSetForm operation
type xxx_SetFormOperation struct {
	Printer           *Printer       `idl:"name:hPrinter" json:"printer"`
	FormName          string         `idl:"name:pFormName;string" json:"form_name"`
	FormInfoContainer *FormContainer `idl:"name:pFormInfoContainer" json:"form_info_container"`
	Return            uint32         `idl:"name:Return" json:"return"`
}

func (o *xxx_SetFormOperation) OpNum() int { return 24 }

func (o *xxx_SetFormOperation) OpName() string { return "/IRemoteWinspool/v1/RpcAsyncSetForm" }

func (o *xxx_SetFormOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SetFormOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// pFormName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.FormName); err != nil {
			return err
		}
	}
	// pFormInfoContainer {in} (1:{pointer=ref}*(1))(2:{alias=FORM_CONTAINER}(struct))
	{
		if o.FormInfoContainer != nil {
			if err := o.FormInfoContainer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&FormContainer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SetFormOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// pFormName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.FormName); err != nil {
			return err
		}
	}
	// pFormInfoContainer {in} (1:{pointer=ref}*(1))(2:{alias=FORM_CONTAINER}(struct))
	{
		if o.FormInfoContainer == nil {
			o.FormInfoContainer = &FormContainer{}
		}
		if err := o.FormInfoContainer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SetFormOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SetFormOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SetFormOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// SetFormRequest structure represents the RpcAsyncSetForm operation request
type SetFormRequest struct {
	// hPrinter: A handle to a printer object or server object that has been opened by using
	// either RpcAsyncOpenPrinter (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer           *Printer       `idl:"name:hPrinter" json:"printer"`
	FormName          string         `idl:"name:pFormName;string" json:"form_name"`
	FormInfoContainer *FormContainer `idl:"name:pFormInfoContainer" json:"form_info_container"`
}

func (o *SetFormRequest) xxx_ToOp(ctx context.Context, op *xxx_SetFormOperation) *xxx_SetFormOperation {
	if op == nil {
		op = &xxx_SetFormOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.FormName = o.FormName
	op.FormInfoContainer = o.FormInfoContainer
	return op
}

func (o *SetFormRequest) xxx_FromOp(ctx context.Context, op *xxx_SetFormOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.FormName = op.FormName
	o.FormInfoContainer = op.FormInfoContainer
}
func (o *SetFormRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *SetFormRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_SetFormOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// SetFormResponse structure represents the RpcAsyncSetForm operation response
type SetFormResponse struct {
	// Return: The RpcAsyncSetForm return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *SetFormResponse) xxx_ToOp(ctx context.Context, op *xxx_SetFormOperation) *xxx_SetFormOperation {
	if op == nil {
		op = &xxx_SetFormOperation{}
	}
	if o == nil {
		return op
	}
	op.Return = o.Return
	return op
}

func (o *SetFormResponse) xxx_FromOp(ctx context.Context, op *xxx_SetFormOperation) {
	if o == nil {
		return
	}
	o.Return = op.Return
}
func (o *SetFormResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *SetFormResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_SetFormOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_EnumFormsOperation structure represents the RpcAsyncEnumForms operation
type xxx_EnumFormsOperation struct {
	Printer       *Printer `idl:"name:hPrinter" json:"printer"`
	Level         uint32   `idl:"name:Level" json:"level"`
	Form          []byte   `idl:"name:pForm;size_is:(cbBuf);pointer:unique" json:"form"`
	BufferLength  uint32   `idl:"name:cbBuf" json:"buffer_length"`
	NeededLength  uint32   `idl:"name:pcbNeeded" json:"needed_length"`
	ReturnedCount uint32   `idl:"name:pcReturned" json:"returned_count"`
	Return        uint32   `idl:"name:Return" json:"return"`
}

func (o *xxx_EnumFormsOperation) OpNum() int { return 25 }

func (o *xxx_EnumFormsOperation) OpName() string { return "/IRemoteWinspool/v1/RpcAsyncEnumForms" }

func (o *xxx_EnumFormsOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if o.Form != nil && o.BufferLength == 0 {
		o.BufferLength = uint32(len(o.Form))
	}
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumFormsOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// Level {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Level); err != nil {
			return err
		}
	}
	// pForm {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		if o.Form != nil || o.BufferLength > 0 {
			_ptr_pForm := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.BufferLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				for i1 := range o.Form {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(o.Form[i1]); err != nil {
						return err
					}
				}
				for i1 := len(o.Form); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint8(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.Form, _ptr_pForm); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.BufferLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumFormsOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// Level {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Level); err != nil {
			return err
		}
	}
	// pForm {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		_ptr_pForm := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array o.Form", sizeInfo[0])
			}
			o.Form = make([]byte, sizeInfo[0])
			for i1 := range o.Form {
				i1 := i1
				if err := w.ReadData(&o.Form[i1]); err != nil {
					return err
				}
			}
			return nil
		})
		_s_pForm := func(ptr interface{}) { o.Form = *ptr.(*[]byte) }
		if err := w.ReadPointer(&o.Form, _s_pForm, _ptr_pForm); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.BufferLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumFormsOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumFormsOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// pForm {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		if o.Form != nil || o.BufferLength > 0 {
			_ptr_pForm := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.BufferLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				for i1 := range o.Form {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(o.Form[i1]); err != nil {
						return err
					}
				}
				for i1 := len(o.Form); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint8(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.Form, _ptr_pForm); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.NeededLength); err != nil {
			return err
		}
	}
	// pcReturned {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.ReturnedCount); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumFormsOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// pForm {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		_ptr_pForm := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array o.Form", sizeInfo[0])
			}
			o.Form = make([]byte, sizeInfo[0])
			for i1 := range o.Form {
				i1 := i1
				if err := w.ReadData(&o.Form[i1]); err != nil {
					return err
				}
			}
			return nil
		})
		_s_pForm := func(ptr interface{}) { o.Form = *ptr.(*[]byte) }
		if err := w.ReadPointer(&o.Form, _s_pForm, _ptr_pForm); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.NeededLength); err != nil {
			return err
		}
	}
	// pcReturned {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.ReturnedCount); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// EnumFormsRequest structure represents the RpcAsyncEnumForms operation request
type EnumFormsRequest struct {
	// hPrinter: A handle to a printer object or server object that has been opened by using
	// either RpcAsyncOpenPrinter (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer      *Printer `idl:"name:hPrinter" json:"printer"`
	Level        uint32   `idl:"name:Level" json:"level"`
	Form         []byte   `idl:"name:pForm;size_is:(cbBuf);pointer:unique" json:"form"`
	BufferLength uint32   `idl:"name:cbBuf" json:"buffer_length"`
}

func (o *EnumFormsRequest) xxx_ToOp(ctx context.Context, op *xxx_EnumFormsOperation) *xxx_EnumFormsOperation {
	if op == nil {
		op = &xxx_EnumFormsOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.Level = o.Level
	op.Form = o.Form
	op.BufferLength = o.BufferLength
	return op
}

func (o *EnumFormsRequest) xxx_FromOp(ctx context.Context, op *xxx_EnumFormsOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.Level = op.Level
	o.Form = op.Form
	o.BufferLength = op.BufferLength
}
func (o *EnumFormsRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *EnumFormsRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_EnumFormsOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// EnumFormsResponse structure represents the RpcAsyncEnumForms operation response
type EnumFormsResponse struct {
	// XXX: cbBuf is an implicit input depedency for output parameters
	BufferLength uint32 `idl:"name:cbBuf" json:"buffer_length"`

	Form          []byte `idl:"name:pForm;size_is:(cbBuf);pointer:unique" json:"form"`
	NeededLength  uint32 `idl:"name:pcbNeeded" json:"needed_length"`
	ReturnedCount uint32 `idl:"name:pcReturned" json:"returned_count"`
	// Return: The RpcAsyncEnumForms return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *EnumFormsResponse) xxx_ToOp(ctx context.Context, op *xxx_EnumFormsOperation) *xxx_EnumFormsOperation {
	if op == nil {
		op = &xxx_EnumFormsOperation{}
	}
	if o == nil {
		return op
	}
	// XXX: implicit input dependencies for output parameters
	if op.BufferLength == uint32(0) {
		op.BufferLength = o.BufferLength
	}

	op.Form = o.Form
	op.NeededLength = o.NeededLength
	op.ReturnedCount = o.ReturnedCount
	op.Return = o.Return
	return op
}

func (o *EnumFormsResponse) xxx_FromOp(ctx context.Context, op *xxx_EnumFormsOperation) {
	if o == nil {
		return
	}
	// XXX: implicit input dependencies for output parameters
	o.BufferLength = op.BufferLength

	o.Form = op.Form
	o.NeededLength = op.NeededLength
	o.ReturnedCount = op.ReturnedCount
	o.Return = op.Return
}
func (o *EnumFormsResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *EnumFormsResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_EnumFormsOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_GetPrinterDriverOperation structure represents the RpcAsyncGetPrinterDriver operation
type xxx_GetPrinterDriverOperation struct {
	Printer            *Printer `idl:"name:hPrinter" json:"printer"`
	Environment        string   `idl:"name:pEnvironment;string;pointer:unique" json:"environment"`
	Level              uint32   `idl:"name:Level" json:"level"`
	Driver             []byte   `idl:"name:pDriver;size_is:(cbBuf);pointer:unique" json:"driver"`
	BufferLength       uint32   `idl:"name:cbBuf" json:"buffer_length"`
	NeededLength       uint32   `idl:"name:pcbNeeded" json:"needed_length"`
	ClientMajorVersion uint32   `idl:"name:dwClientMajorVersion" json:"client_major_version"`
	ClientMinorVersion uint32   `idl:"name:dwClientMinorVersion" json:"client_minor_version"`
	ServerMaxVersion   uint32   `idl:"name:pdwServerMaxVersion" json:"server_max_version"`
	ServerMinVersion   uint32   `idl:"name:pdwServerMinVersion" json:"server_min_version"`
	Return             uint32   `idl:"name:Return" json:"return"`
}

func (o *xxx_GetPrinterDriverOperation) OpNum() int { return 26 }

func (o *xxx_GetPrinterDriverOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncGetPrinterDriver"
}

func (o *xxx_GetPrinterDriverOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if o.Driver != nil && o.BufferLength == 0 {
		o.BufferLength = uint32(len(o.Driver))
	}
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetPrinterDriverOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// pEnvironment {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Environment != "" {
			_ptr_pEnvironment := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Environment); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Environment, _ptr_pEnvironment); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// Level {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Level); err != nil {
			return err
		}
	}
	// pDriver {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		if o.Driver != nil || o.BufferLength > 0 {
			_ptr_pDriver := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.BufferLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				for i1 := range o.Driver {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(o.Driver[i1]); err != nil {
						return err
					}
				}
				for i1 := len(o.Driver); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint8(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.Driver, _ptr_pDriver); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.BufferLength); err != nil {
			return err
		}
	}
	// dwClientMajorVersion {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.ClientMajorVersion); err != nil {
			return err
		}
	}
	// dwClientMinorVersion {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.ClientMinorVersion); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetPrinterDriverOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// pEnvironment {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pEnvironment := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Environment); err != nil {
				return err
			}
			return nil
		})
		_s_pEnvironment := func(ptr interface{}) { o.Environment = *ptr.(*string) }
		if err := w.ReadPointer(&o.Environment, _s_pEnvironment, _ptr_pEnvironment); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// Level {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Level); err != nil {
			return err
		}
	}
	// pDriver {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		_ptr_pDriver := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array o.Driver", sizeInfo[0])
			}
			o.Driver = make([]byte, sizeInfo[0])
			for i1 := range o.Driver {
				i1 := i1
				if err := w.ReadData(&o.Driver[i1]); err != nil {
					return err
				}
			}
			return nil
		})
		_s_pDriver := func(ptr interface{}) { o.Driver = *ptr.(*[]byte) }
		if err := w.ReadPointer(&o.Driver, _s_pDriver, _ptr_pDriver); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.BufferLength); err != nil {
			return err
		}
	}
	// dwClientMajorVersion {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.ClientMajorVersion); err != nil {
			return err
		}
	}
	// dwClientMinorVersion {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.ClientMinorVersion); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetPrinterDriverOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetPrinterDriverOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// pDriver {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		if o.Driver != nil || o.BufferLength > 0 {
			_ptr_pDriver := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.BufferLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				for i1 := range o.Driver {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(o.Driver[i1]); err != nil {
						return err
					}
				}
				for i1 := len(o.Driver); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint8(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.Driver, _ptr_pDriver); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.NeededLength); err != nil {
			return err
		}
	}
	// pdwServerMaxVersion {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.ServerMaxVersion); err != nil {
			return err
		}
	}
	// pdwServerMinVersion {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.ServerMinVersion); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetPrinterDriverOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// pDriver {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		_ptr_pDriver := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array o.Driver", sizeInfo[0])
			}
			o.Driver = make([]byte, sizeInfo[0])
			for i1 := range o.Driver {
				i1 := i1
				if err := w.ReadData(&o.Driver[i1]); err != nil {
					return err
				}
			}
			return nil
		})
		_s_pDriver := func(ptr interface{}) { o.Driver = *ptr.(*[]byte) }
		if err := w.ReadPointer(&o.Driver, _s_pDriver, _ptr_pDriver); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.NeededLength); err != nil {
			return err
		}
	}
	// pdwServerMaxVersion {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.ServerMaxVersion); err != nil {
			return err
		}
	}
	// pdwServerMinVersion {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.ServerMinVersion); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// GetPrinterDriverRequest structure represents the RpcAsyncGetPrinterDriver operation request
type GetPrinterDriverRequest struct {
	// hPrinter: A handle to a printer object that has been opened by using either RpcAsyncOpenPrinter
	// (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer            *Printer `idl:"name:hPrinter" json:"printer"`
	Environment        string   `idl:"name:pEnvironment;string;pointer:unique" json:"environment"`
	Level              uint32   `idl:"name:Level" json:"level"`
	Driver             []byte   `idl:"name:pDriver;size_is:(cbBuf);pointer:unique" json:"driver"`
	BufferLength       uint32   `idl:"name:cbBuf" json:"buffer_length"`
	ClientMajorVersion uint32   `idl:"name:dwClientMajorVersion" json:"client_major_version"`
	ClientMinorVersion uint32   `idl:"name:dwClientMinorVersion" json:"client_minor_version"`
}

func (o *GetPrinterDriverRequest) xxx_ToOp(ctx context.Context, op *xxx_GetPrinterDriverOperation) *xxx_GetPrinterDriverOperation {
	if op == nil {
		op = &xxx_GetPrinterDriverOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.Environment = o.Environment
	op.Level = o.Level
	op.Driver = o.Driver
	op.BufferLength = o.BufferLength
	op.ClientMajorVersion = o.ClientMajorVersion
	op.ClientMinorVersion = o.ClientMinorVersion
	return op
}

func (o *GetPrinterDriverRequest) xxx_FromOp(ctx context.Context, op *xxx_GetPrinterDriverOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.Environment = op.Environment
	o.Level = op.Level
	o.Driver = op.Driver
	o.BufferLength = op.BufferLength
	o.ClientMajorVersion = op.ClientMajorVersion
	o.ClientMinorVersion = op.ClientMinorVersion
}
func (o *GetPrinterDriverRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *GetPrinterDriverRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_GetPrinterDriverOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// GetPrinterDriverResponse structure represents the RpcAsyncGetPrinterDriver operation response
type GetPrinterDriverResponse struct {
	// XXX: cbBuf is an implicit input depedency for output parameters
	BufferLength uint32 `idl:"name:cbBuf" json:"buffer_length"`

	Driver           []byte `idl:"name:pDriver;size_is:(cbBuf);pointer:unique" json:"driver"`
	NeededLength     uint32 `idl:"name:pcbNeeded" json:"needed_length"`
	ServerMaxVersion uint32 `idl:"name:pdwServerMaxVersion" json:"server_max_version"`
	ServerMinVersion uint32 `idl:"name:pdwServerMinVersion" json:"server_min_version"`
	// Return: The RpcAsyncGetPrinterDriver return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *GetPrinterDriverResponse) xxx_ToOp(ctx context.Context, op *xxx_GetPrinterDriverOperation) *xxx_GetPrinterDriverOperation {
	if op == nil {
		op = &xxx_GetPrinterDriverOperation{}
	}
	if o == nil {
		return op
	}
	// XXX: implicit input dependencies for output parameters
	if op.BufferLength == uint32(0) {
		op.BufferLength = o.BufferLength
	}

	op.Driver = o.Driver
	op.NeededLength = o.NeededLength
	op.ServerMaxVersion = o.ServerMaxVersion
	op.ServerMinVersion = o.ServerMinVersion
	op.Return = o.Return
	return op
}

func (o *GetPrinterDriverResponse) xxx_FromOp(ctx context.Context, op *xxx_GetPrinterDriverOperation) {
	if o == nil {
		return
	}
	// XXX: implicit input dependencies for output parameters
	o.BufferLength = op.BufferLength

	o.Driver = op.Driver
	o.NeededLength = op.NeededLength
	o.ServerMaxVersion = op.ServerMaxVersion
	o.ServerMinVersion = op.ServerMinVersion
	o.Return = op.Return
}
func (o *GetPrinterDriverResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *GetPrinterDriverResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_GetPrinterDriverOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_EnumPrinterDataOperation structure represents the RpcAsyncEnumPrinterData operation
type xxx_EnumPrinterDataOperation struct {
	Printer            *Printer `idl:"name:hPrinter" json:"printer"`
	Index              uint32   `idl:"name:dwIndex" json:"index"`
	ValueName          string   `idl:"name:pValueName;size_is:((cbValueNameIn/2))" json:"value_name"`
	ValueNameInLength  uint32   `idl:"name:cbValueNameIn" json:"value_name_in_length"`
	ValueNameOutLength uint32   `idl:"name:pcbValueNameOut" json:"value_name_out_length"`
	Type               uint32   `idl:"name:pType" json:"type"`
	Data               []byte   `idl:"name:pData;size_is:(cbDataIn)" json:"data"`
	DataInLength       uint32   `idl:"name:cbDataIn" json:"data_in_length"`
	DataOutLength      uint32   `idl:"name:pcbDataOut" json:"data_out_length"`
	Return             uint32   `idl:"name:Return" json:"return"`
}

func (o *xxx_EnumPrinterDataOperation) OpNum() int { return 27 }

func (o *xxx_EnumPrinterDataOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncEnumPrinterData"
}

func (o *xxx_EnumPrinterDataOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPrinterDataOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// dwIndex {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Index); err != nil {
			return err
		}
	}
	// cbValueNameIn {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.ValueNameInLength); err != nil {
			return err
		}
	}
	// cbDataIn {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.DataInLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPrinterDataOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// dwIndex {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Index); err != nil {
			return err
		}
	}
	// cbValueNameIn {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.ValueNameInLength); err != nil {
			return err
		}
	}
	// cbDataIn {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.DataInLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPrinterDataOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPrinterDataOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// pValueName {out} (1:{pointer=ref}*(1)[dim:0,size_is=(cbValueNameIn/2),string](wchar))
	{
		dimSize1 := uint64((o.ValueNameInLength / 2))
		if err := w.WriteSize(dimSize1); err != nil {
			return err
		}
		sizeInfo := []uint64{
			dimSize1,
		}
		_ValueName_buf := utf16.Encode([]rune(o.ValueName))
		if uint64(len(_ValueName_buf)) > sizeInfo[0] {
			_ValueName_buf = _ValueName_buf[:sizeInfo[0]]
		}
		for i1 := range _ValueName_buf {
			i1 := i1
			if uint64(i1) >= sizeInfo[0] {
				break
			}
			if err := w.WriteData(_ValueName_buf[i1]); err != nil {
				return err
			}
		}
		for i1 := len(_ValueName_buf); uint64(i1) < sizeInfo[0]; i1++ {
			if err := w.WriteData(uint16(0)); err != nil {
				return err
			}
		}
	}
	// pcbValueNameOut {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.ValueNameOutLength); err != nil {
			return err
		}
	}
	// pType {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Type); err != nil {
			return err
		}
	}
	// pData {out} (1:{pointer=ref}*(1)[dim:0,size_is=cbDataIn](uchar))
	{
		dimSize1 := uint64(o.DataInLength)
		if err := w.WriteSize(dimSize1); err != nil {
			return err
		}
		sizeInfo := []uint64{
			dimSize1,
		}
		for i1 := range o.Data {
			i1 := i1
			if uint64(i1) >= sizeInfo[0] {
				break
			}
			if err := w.WriteData(o.Data[i1]); err != nil {
				return err
			}
		}
		for i1 := len(o.Data); uint64(i1) < sizeInfo[0]; i1++ {
			if err := w.WriteData(uint8(0)); err != nil {
				return err
			}
		}
	}
	// pcbDataOut {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.DataOutLength); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPrinterDataOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// pValueName {out} (1:{pointer=ref}*(1)[dim:0,size_is=(cbValueNameIn/2),string](wchar))
	{
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		var _ValueName_buf []uint16
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array _ValueName_buf", sizeInfo[0])
		}
		_ValueName_buf = make([]uint16, sizeInfo[0])
		for i1 := range _ValueName_buf {
			i1 := i1
			if err := w.ReadData(&_ValueName_buf[i1]); err != nil {
				return err
			}
		}
		o.ValueName = strings.TrimRight(string(utf16.Decode(_ValueName_buf)), ndr.ZeroString)
	}
	// pcbValueNameOut {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.ValueNameOutLength); err != nil {
			return err
		}
	}
	// pType {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Type); err != nil {
			return err
		}
	}
	// pData {out} (1:{pointer=ref}*(1)[dim:0,size_is=cbDataIn](uchar))
	{
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array o.Data", sizeInfo[0])
		}
		o.Data = make([]byte, sizeInfo[0])
		for i1 := range o.Data {
			i1 := i1
			if err := w.ReadData(&o.Data[i1]); err != nil {
				return err
			}
		}
	}
	// pcbDataOut {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.DataOutLength); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// EnumPrinterDataRequest structure represents the RpcAsyncEnumPrinterData operation request
type EnumPrinterDataRequest struct {
	// hPrinter: A handle to a printer object that has been opened using either RpcAsyncOpenPrinter
	// (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer           *Printer `idl:"name:hPrinter" json:"printer"`
	Index             uint32   `idl:"name:dwIndex" json:"index"`
	ValueNameInLength uint32   `idl:"name:cbValueNameIn" json:"value_name_in_length"`
	DataInLength      uint32   `idl:"name:cbDataIn" json:"data_in_length"`
}

func (o *EnumPrinterDataRequest) xxx_ToOp(ctx context.Context, op *xxx_EnumPrinterDataOperation) *xxx_EnumPrinterDataOperation {
	if op == nil {
		op = &xxx_EnumPrinterDataOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.Index = o.Index
	op.ValueNameInLength = o.ValueNameInLength
	op.DataInLength = o.DataInLength
	return op
}

func (o *EnumPrinterDataRequest) xxx_FromOp(ctx context.Context, op *xxx_EnumPrinterDataOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.Index = op.Index
	o.ValueNameInLength = op.ValueNameInLength
	o.DataInLength = op.DataInLength
}
func (o *EnumPrinterDataRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *EnumPrinterDataRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_EnumPrinterDataOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// EnumPrinterDataResponse structure represents the RpcAsyncEnumPrinterData operation response
type EnumPrinterDataResponse struct {
	// XXX: cbValueNameIn is an implicit input depedency for output parameters
	ValueNameInLength uint32 `idl:"name:cbValueNameIn" json:"value_name_in_length"`
	// XXX: cbDataIn is an implicit input depedency for output parameters
	DataInLength uint32 `idl:"name:cbDataIn" json:"data_in_length"`

	ValueName          string `idl:"name:pValueName;size_is:((cbValueNameIn/2))" json:"value_name"`
	ValueNameOutLength uint32 `idl:"name:pcbValueNameOut" json:"value_name_out_length"`
	Type               uint32 `idl:"name:pType" json:"type"`
	Data               []byte `idl:"name:pData;size_is:(cbDataIn)" json:"data"`
	DataOutLength      uint32 `idl:"name:pcbDataOut" json:"data_out_length"`
	// Return: The RpcAsyncEnumPrinterData return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *EnumPrinterDataResponse) xxx_ToOp(ctx context.Context, op *xxx_EnumPrinterDataOperation) *xxx_EnumPrinterDataOperation {
	if op == nil {
		op = &xxx_EnumPrinterDataOperation{}
	}
	if o == nil {
		return op
	}
	// XXX: implicit input dependencies for output parameters
	if op.ValueNameInLength == uint32(0) {
		op.ValueNameInLength = o.ValueNameInLength
	}
	if op.DataInLength == uint32(0) {
		op.DataInLength = o.DataInLength
	}

	op.ValueName = o.ValueName
	op.ValueNameOutLength = o.ValueNameOutLength
	op.Type = o.Type
	op.Data = o.Data
	op.DataOutLength = o.DataOutLength
	op.Return = o.Return
	return op
}

func (o *EnumPrinterDataResponse) xxx_FromOp(ctx context.Context, op *xxx_EnumPrinterDataOperation) {
	if o == nil {
		return
	}
	// XXX: implicit input dependencies for output parameters
	o.ValueNameInLength = op.ValueNameInLength
	o.DataInLength = op.DataInLength

	o.ValueName = op.ValueName
	o.ValueNameOutLength = op.ValueNameOutLength
	o.Type = op.Type
	o.Data = op.Data
	o.DataOutLength = op.DataOutLength
	o.Return = op.Return
}
func (o *EnumPrinterDataResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *EnumPrinterDataResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_EnumPrinterDataOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_EnumPrinterDataExOperation structure represents the RpcAsyncEnumPrinterDataEx operation
type xxx_EnumPrinterDataExOperation struct {
	Printer             *Printer `idl:"name:hPrinter" json:"printer"`
	KeyName             string   `idl:"name:pKeyName;string" json:"key_name"`
	EnumValues          []byte   `idl:"name:pEnumValues;size_is:(cbEnumValuesIn)" json:"enum_values"`
	EnumValuesInLength  uint32   `idl:"name:cbEnumValuesIn" json:"enum_values_in_length"`
	EnumValuesOutLength uint32   `idl:"name:pcbEnumValuesOut" json:"enum_values_out_length"`
	EnumValuesLength    uint32   `idl:"name:numEnumValues" json:"enum_values_length"`
	Return              uint32   `idl:"name:Return" json:"return"`
}

func (o *xxx_EnumPrinterDataExOperation) OpNum() int { return 28 }

func (o *xxx_EnumPrinterDataExOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncEnumPrinterDataEx"
}

func (o *xxx_EnumPrinterDataExOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPrinterDataExOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// pKeyName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.KeyName); err != nil {
			return err
		}
	}
	// cbEnumValuesIn {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.EnumValuesInLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPrinterDataExOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// pKeyName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.KeyName); err != nil {
			return err
		}
	}
	// cbEnumValuesIn {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.EnumValuesInLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPrinterDataExOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPrinterDataExOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// pEnumValues {out} (1:{pointer=ref}*(1)[dim:0,size_is=cbEnumValuesIn](uchar))
	{
		dimSize1 := uint64(o.EnumValuesInLength)
		if err := w.WriteSize(dimSize1); err != nil {
			return err
		}
		sizeInfo := []uint64{
			dimSize1,
		}
		for i1 := range o.EnumValues {
			i1 := i1
			if uint64(i1) >= sizeInfo[0] {
				break
			}
			if err := w.WriteData(o.EnumValues[i1]); err != nil {
				return err
			}
		}
		for i1 := len(o.EnumValues); uint64(i1) < sizeInfo[0]; i1++ {
			if err := w.WriteData(uint8(0)); err != nil {
				return err
			}
		}
	}
	// pcbEnumValuesOut {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.EnumValuesOutLength); err != nil {
			return err
		}
	}
	// numEnumValues {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.EnumValuesLength); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPrinterDataExOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// pEnumValues {out} (1:{pointer=ref}*(1)[dim:0,size_is=cbEnumValuesIn](uchar))
	{
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array o.EnumValues", sizeInfo[0])
		}
		o.EnumValues = make([]byte, sizeInfo[0])
		for i1 := range o.EnumValues {
			i1 := i1
			if err := w.ReadData(&o.EnumValues[i1]); err != nil {
				return err
			}
		}
	}
	// pcbEnumValuesOut {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.EnumValuesOutLength); err != nil {
			return err
		}
	}
	// numEnumValues {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.EnumValuesLength); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// EnumPrinterDataExRequest structure represents the RpcAsyncEnumPrinterDataEx operation request
type EnumPrinterDataExRequest struct {
	// hPrinter: A handle to a printer object that has been opened using either RpcAsyncOpenPrinter
	// (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer            *Printer `idl:"name:hPrinter" json:"printer"`
	KeyName            string   `idl:"name:pKeyName;string" json:"key_name"`
	EnumValuesInLength uint32   `idl:"name:cbEnumValuesIn" json:"enum_values_in_length"`
}

func (o *EnumPrinterDataExRequest) xxx_ToOp(ctx context.Context, op *xxx_EnumPrinterDataExOperation) *xxx_EnumPrinterDataExOperation {
	if op == nil {
		op = &xxx_EnumPrinterDataExOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.KeyName = o.KeyName
	op.EnumValuesInLength = o.EnumValuesInLength
	return op
}

func (o *EnumPrinterDataExRequest) xxx_FromOp(ctx context.Context, op *xxx_EnumPrinterDataExOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.KeyName = op.KeyName
	o.EnumValuesInLength = op.EnumValuesInLength
}
func (o *EnumPrinterDataExRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *EnumPrinterDataExRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_EnumPrinterDataExOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// EnumPrinterDataExResponse structure represents the RpcAsyncEnumPrinterDataEx operation response
type EnumPrinterDataExResponse struct {
	// XXX: cbEnumValuesIn is an implicit input depedency for output parameters
	EnumValuesInLength uint32 `idl:"name:cbEnumValuesIn" json:"enum_values_in_length"`

	EnumValues          []byte `idl:"name:pEnumValues;size_is:(cbEnumValuesIn)" json:"enum_values"`
	EnumValuesOutLength uint32 `idl:"name:pcbEnumValuesOut" json:"enum_values_out_length"`
	EnumValuesLength    uint32 `idl:"name:numEnumValues" json:"enum_values_length"`
	// Return: The RpcAsyncEnumPrinterDataEx return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *EnumPrinterDataExResponse) xxx_ToOp(ctx context.Context, op *xxx_EnumPrinterDataExOperation) *xxx_EnumPrinterDataExOperation {
	if op == nil {
		op = &xxx_EnumPrinterDataExOperation{}
	}
	if o == nil {
		return op
	}
	// XXX: implicit input dependencies for output parameters
	if op.EnumValuesInLength == uint32(0) {
		op.EnumValuesInLength = o.EnumValuesInLength
	}

	op.EnumValues = o.EnumValues
	op.EnumValuesOutLength = o.EnumValuesOutLength
	op.EnumValuesLength = o.EnumValuesLength
	op.Return = o.Return
	return op
}

func (o *EnumPrinterDataExResponse) xxx_FromOp(ctx context.Context, op *xxx_EnumPrinterDataExOperation) {
	if o == nil {
		return
	}
	// XXX: implicit input dependencies for output parameters
	o.EnumValuesInLength = op.EnumValuesInLength

	o.EnumValues = op.EnumValues
	o.EnumValuesOutLength = op.EnumValuesOutLength
	o.EnumValuesLength = op.EnumValuesLength
	o.Return = op.Return
}
func (o *EnumPrinterDataExResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *EnumPrinterDataExResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_EnumPrinterDataExOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_EnumPrinterKeyOperation structure represents the RpcAsyncEnumPrinterKey operation
type xxx_EnumPrinterKeyOperation struct {
	Printer         *Printer `idl:"name:hPrinter" json:"printer"`
	KeyName         string   `idl:"name:pKeyName;string" json:"key_name"`
	Subkey          string   `idl:"name:pSubkey;size_is:((cbSubkeyIn/2))" json:"subkey"`
	SubkeyInLength  uint32   `idl:"name:cbSubkeyIn" json:"subkey_in_length"`
	SubkeyOutLength uint32   `idl:"name:pcbSubkeyOut" json:"subkey_out_length"`
	Return          uint32   `idl:"name:Return" json:"return"`
}

func (o *xxx_EnumPrinterKeyOperation) OpNum() int { return 29 }

func (o *xxx_EnumPrinterKeyOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncEnumPrinterKey"
}

func (o *xxx_EnumPrinterKeyOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPrinterKeyOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// pKeyName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.KeyName); err != nil {
			return err
		}
	}
	// cbSubkeyIn {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.SubkeyInLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPrinterKeyOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// pKeyName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.KeyName); err != nil {
			return err
		}
	}
	// cbSubkeyIn {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.SubkeyInLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPrinterKeyOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPrinterKeyOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// pSubkey {out} (1:{pointer=ref}*(1)[dim:0,size_is=(cbSubkeyIn/2),string](wchar))
	{
		dimSize1 := uint64((o.SubkeyInLength / 2))
		if err := w.WriteSize(dimSize1); err != nil {
			return err
		}
		sizeInfo := []uint64{
			dimSize1,
		}
		_Subkey_buf := utf16.Encode([]rune(o.Subkey))
		if uint64(len(_Subkey_buf)) > sizeInfo[0] {
			_Subkey_buf = _Subkey_buf[:sizeInfo[0]]
		}
		for i1 := range _Subkey_buf {
			i1 := i1
			if uint64(i1) >= sizeInfo[0] {
				break
			}
			if err := w.WriteData(_Subkey_buf[i1]); err != nil {
				return err
			}
		}
		for i1 := len(_Subkey_buf); uint64(i1) < sizeInfo[0]; i1++ {
			if err := w.WriteData(uint16(0)); err != nil {
				return err
			}
		}
	}
	// pcbSubkeyOut {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.SubkeyOutLength); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPrinterKeyOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// pSubkey {out} (1:{pointer=ref}*(1)[dim:0,size_is=(cbSubkeyIn/2),string](wchar))
	{
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		var _Subkey_buf []uint16
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array _Subkey_buf", sizeInfo[0])
		}
		_Subkey_buf = make([]uint16, sizeInfo[0])
		for i1 := range _Subkey_buf {
			i1 := i1
			if err := w.ReadData(&_Subkey_buf[i1]); err != nil {
				return err
			}
		}
		o.Subkey = strings.TrimRight(string(utf16.Decode(_Subkey_buf)), ndr.ZeroString)
	}
	// pcbSubkeyOut {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.SubkeyOutLength); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// EnumPrinterKeyRequest structure represents the RpcAsyncEnumPrinterKey operation request
type EnumPrinterKeyRequest struct {
	// hPrinter: A handle to a printer object that has been opened using either RpcAsyncOpenPrinter
	// (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer        *Printer `idl:"name:hPrinter" json:"printer"`
	KeyName        string   `idl:"name:pKeyName;string" json:"key_name"`
	SubkeyInLength uint32   `idl:"name:cbSubkeyIn" json:"subkey_in_length"`
}

func (o *EnumPrinterKeyRequest) xxx_ToOp(ctx context.Context, op *xxx_EnumPrinterKeyOperation) *xxx_EnumPrinterKeyOperation {
	if op == nil {
		op = &xxx_EnumPrinterKeyOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.KeyName = o.KeyName
	op.SubkeyInLength = o.SubkeyInLength
	return op
}

func (o *EnumPrinterKeyRequest) xxx_FromOp(ctx context.Context, op *xxx_EnumPrinterKeyOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.KeyName = op.KeyName
	o.SubkeyInLength = op.SubkeyInLength
}
func (o *EnumPrinterKeyRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *EnumPrinterKeyRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_EnumPrinterKeyOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// EnumPrinterKeyResponse structure represents the RpcAsyncEnumPrinterKey operation response
type EnumPrinterKeyResponse struct {
	// XXX: cbSubkeyIn is an implicit input depedency for output parameters
	SubkeyInLength uint32 `idl:"name:cbSubkeyIn" json:"subkey_in_length"`

	Subkey          string `idl:"name:pSubkey;size_is:((cbSubkeyIn/2))" json:"subkey"`
	SubkeyOutLength uint32 `idl:"name:pcbSubkeyOut" json:"subkey_out_length"`
	// Return: The RpcAsyncEnumPrinterKey return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *EnumPrinterKeyResponse) xxx_ToOp(ctx context.Context, op *xxx_EnumPrinterKeyOperation) *xxx_EnumPrinterKeyOperation {
	if op == nil {
		op = &xxx_EnumPrinterKeyOperation{}
	}
	if o == nil {
		return op
	}
	// XXX: implicit input dependencies for output parameters
	if op.SubkeyInLength == uint32(0) {
		op.SubkeyInLength = o.SubkeyInLength
	}

	op.Subkey = o.Subkey
	op.SubkeyOutLength = o.SubkeyOutLength
	op.Return = o.Return
	return op
}

func (o *EnumPrinterKeyResponse) xxx_FromOp(ctx context.Context, op *xxx_EnumPrinterKeyOperation) {
	if o == nil {
		return
	}
	// XXX: implicit input dependencies for output parameters
	o.SubkeyInLength = op.SubkeyInLength

	o.Subkey = op.Subkey
	o.SubkeyOutLength = op.SubkeyOutLength
	o.Return = op.Return
}
func (o *EnumPrinterKeyResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *EnumPrinterKeyResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_EnumPrinterKeyOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_DeletePrinterDataOperation structure represents the RpcAsyncDeletePrinterData operation
type xxx_DeletePrinterDataOperation struct {
	Printer   *Printer `idl:"name:hPrinter" json:"printer"`
	ValueName string   `idl:"name:pValueName;string" json:"value_name"`
	Return    uint32   `idl:"name:Return" json:"return"`
}

func (o *xxx_DeletePrinterDataOperation) OpNum() int { return 30 }

func (o *xxx_DeletePrinterDataOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncDeletePrinterData"
}

func (o *xxx_DeletePrinterDataOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterDataOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// pValueName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.ValueName); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterDataOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// pValueName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.ValueName); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterDataOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterDataOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterDataOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// DeletePrinterDataRequest structure represents the RpcAsyncDeletePrinterData operation request
type DeletePrinterDataRequest struct {
	// hPrinter: A handle to a printer object that has been opened using either RpcAsyncOpenPrinter
	// (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer   *Printer `idl:"name:hPrinter" json:"printer"`
	ValueName string   `idl:"name:pValueName;string" json:"value_name"`
}

func (o *DeletePrinterDataRequest) xxx_ToOp(ctx context.Context, op *xxx_DeletePrinterDataOperation) *xxx_DeletePrinterDataOperation {
	if op == nil {
		op = &xxx_DeletePrinterDataOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.ValueName = o.ValueName
	return op
}

func (o *DeletePrinterDataRequest) xxx_FromOp(ctx context.Context, op *xxx_DeletePrinterDataOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.ValueName = op.ValueName
}
func (o *DeletePrinterDataRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *DeletePrinterDataRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_DeletePrinterDataOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// DeletePrinterDataResponse structure represents the RpcAsyncDeletePrinterData operation response
type DeletePrinterDataResponse struct {
	// Return: The RpcAsyncDeletePrinterData return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *DeletePrinterDataResponse) xxx_ToOp(ctx context.Context, op *xxx_DeletePrinterDataOperation) *xxx_DeletePrinterDataOperation {
	if op == nil {
		op = &xxx_DeletePrinterDataOperation{}
	}
	if o == nil {
		return op
	}
	op.Return = o.Return
	return op
}

func (o *DeletePrinterDataResponse) xxx_FromOp(ctx context.Context, op *xxx_DeletePrinterDataOperation) {
	if o == nil {
		return
	}
	o.Return = op.Return
}
func (o *DeletePrinterDataResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *DeletePrinterDataResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_DeletePrinterDataOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_DeletePrinterDataExOperation structure represents the RpcAsyncDeletePrinterDataEx operation
type xxx_DeletePrinterDataExOperation struct {
	Printer   *Printer `idl:"name:hPrinter" json:"printer"`
	KeyName   string   `idl:"name:pKeyName;string" json:"key_name"`
	ValueName string   `idl:"name:pValueName;string" json:"value_name"`
	Return    uint32   `idl:"name:Return" json:"return"`
}

func (o *xxx_DeletePrinterDataExOperation) OpNum() int { return 31 }

func (o *xxx_DeletePrinterDataExOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncDeletePrinterDataEx"
}

func (o *xxx_DeletePrinterDataExOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterDataExOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// pKeyName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.KeyName); err != nil {
			return err
		}
	}
	// pValueName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.ValueName); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterDataExOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// pKeyName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.KeyName); err != nil {
			return err
		}
	}
	// pValueName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.ValueName); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterDataExOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterDataExOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterDataExOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// DeletePrinterDataExRequest structure represents the RpcAsyncDeletePrinterDataEx operation request
type DeletePrinterDataExRequest struct {
	// hPrinter: A handle to a printer object that has been opened using either RpcAsyncOpenPrinter
	// (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer   *Printer `idl:"name:hPrinter" json:"printer"`
	KeyName   string   `idl:"name:pKeyName;string" json:"key_name"`
	ValueName string   `idl:"name:pValueName;string" json:"value_name"`
}

func (o *DeletePrinterDataExRequest) xxx_ToOp(ctx context.Context, op *xxx_DeletePrinterDataExOperation) *xxx_DeletePrinterDataExOperation {
	if op == nil {
		op = &xxx_DeletePrinterDataExOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.KeyName = o.KeyName
	op.ValueName = o.ValueName
	return op
}

func (o *DeletePrinterDataExRequest) xxx_FromOp(ctx context.Context, op *xxx_DeletePrinterDataExOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.KeyName = op.KeyName
	o.ValueName = op.ValueName
}
func (o *DeletePrinterDataExRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *DeletePrinterDataExRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_DeletePrinterDataExOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// DeletePrinterDataExResponse structure represents the RpcAsyncDeletePrinterDataEx operation response
type DeletePrinterDataExResponse struct {
	// Return: The RpcAsyncDeletePrinterDataEx return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *DeletePrinterDataExResponse) xxx_ToOp(ctx context.Context, op *xxx_DeletePrinterDataExOperation) *xxx_DeletePrinterDataExOperation {
	if op == nil {
		op = &xxx_DeletePrinterDataExOperation{}
	}
	if o == nil {
		return op
	}
	op.Return = o.Return
	return op
}

func (o *DeletePrinterDataExResponse) xxx_FromOp(ctx context.Context, op *xxx_DeletePrinterDataExOperation) {
	if o == nil {
		return
	}
	o.Return = op.Return
}
func (o *DeletePrinterDataExResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *DeletePrinterDataExResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_DeletePrinterDataExOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_DeletePrinterKeyOperation structure represents the RpcAsyncDeletePrinterKey operation
type xxx_DeletePrinterKeyOperation struct {
	Printer *Printer `idl:"name:hPrinter" json:"printer"`
	KeyName string   `idl:"name:pKeyName;string" json:"key_name"`
	Return  uint32   `idl:"name:Return" json:"return"`
}

func (o *xxx_DeletePrinterKeyOperation) OpNum() int { return 32 }

func (o *xxx_DeletePrinterKeyOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncDeletePrinterKey"
}

func (o *xxx_DeletePrinterKeyOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterKeyOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// pKeyName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.KeyName); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterKeyOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// pKeyName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.KeyName); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterKeyOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterKeyOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterKeyOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// DeletePrinterKeyRequest structure represents the RpcAsyncDeletePrinterKey operation request
type DeletePrinterKeyRequest struct {
	// hPrinter: A handle to a printer object that has been opened using either RpcAsyncOpenPrinter
	// (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer *Printer `idl:"name:hPrinter" json:"printer"`
	KeyName string   `idl:"name:pKeyName;string" json:"key_name"`
}

func (o *DeletePrinterKeyRequest) xxx_ToOp(ctx context.Context, op *xxx_DeletePrinterKeyOperation) *xxx_DeletePrinterKeyOperation {
	if op == nil {
		op = &xxx_DeletePrinterKeyOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.KeyName = o.KeyName
	return op
}

func (o *DeletePrinterKeyRequest) xxx_FromOp(ctx context.Context, op *xxx_DeletePrinterKeyOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.KeyName = op.KeyName
}
func (o *DeletePrinterKeyRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *DeletePrinterKeyRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_DeletePrinterKeyOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// DeletePrinterKeyResponse structure represents the RpcAsyncDeletePrinterKey operation response
type DeletePrinterKeyResponse struct {
	// Return: The RpcAsyncDeletePrinterKey return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *DeletePrinterKeyResponse) xxx_ToOp(ctx context.Context, op *xxx_DeletePrinterKeyOperation) *xxx_DeletePrinterKeyOperation {
	if op == nil {
		op = &xxx_DeletePrinterKeyOperation{}
	}
	if o == nil {
		return op
	}
	op.Return = o.Return
	return op
}

func (o *DeletePrinterKeyResponse) xxx_FromOp(ctx context.Context, op *xxx_DeletePrinterKeyOperation) {
	if o == nil {
		return
	}
	o.Return = op.Return
}
func (o *DeletePrinterKeyResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *DeletePrinterKeyResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_DeletePrinterKeyOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_XcvDataOperation structure represents the RpcAsyncXcvData operation
type xxx_XcvDataOperation struct {
	Xcv                *Printer `idl:"name:hXcv" json:"xcv"`
	DataName           string   `idl:"name:pszDataName;string" json:"data_name"`
	InputData          []byte   `idl:"name:pInputData;size_is:(cbInputData)" json:"input_data"`
	InputDataLength    uint32   `idl:"name:cbInputData" json:"input_data_length"`
	OutputData         []byte   `idl:"name:pOutputData;size_is:(cbOutputData)" json:"output_data"`
	OutputDataLength   uint32   `idl:"name:cbOutputData" json:"output_data_length"`
	OutputNeededLength uint32   `idl:"name:pcbOutputNeeded" json:"output_needed_length"`
	Status             uint32   `idl:"name:pdwStatus" json:"status"`
	Return             uint32   `idl:"name:Return" json:"return"`
}

func (o *xxx_XcvDataOperation) OpNum() int { return 33 }

func (o *xxx_XcvDataOperation) OpName() string { return "/IRemoteWinspool/v1/RpcAsyncXcvData" }

func (o *xxx_XcvDataOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if o.InputData != nil && o.InputDataLength == 0 {
		o.InputDataLength = uint32(len(o.InputData))
	}
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_XcvDataOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hXcv {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Xcv != nil {
			if err := o.Xcv.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// pszDataName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.DataName); err != nil {
			return err
		}
	}
	// pInputData {in} (1:{pointer=ref}*(1)[dim:0,size_is=cbInputData](uchar))
	{
		dimSize1 := uint64(o.InputDataLength)
		if err := w.WriteSize(dimSize1); err != nil {
			return err
		}
		sizeInfo := []uint64{
			dimSize1,
		}
		for i1 := range o.InputData {
			i1 := i1
			if uint64(i1) >= sizeInfo[0] {
				break
			}
			if err := w.WriteData(o.InputData[i1]); err != nil {
				return err
			}
		}
		for i1 := len(o.InputData); uint64(i1) < sizeInfo[0]; i1++ {
			if err := w.WriteData(uint8(0)); err != nil {
				return err
			}
		}
	}
	// cbInputData {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.InputDataLength); err != nil {
			return err
		}
	}
	// cbOutputData {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.OutputDataLength); err != nil {
			return err
		}
	}
	// pdwStatus {in, out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Status); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_XcvDataOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hXcv {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Xcv == nil {
			o.Xcv = &Printer{}
		}
		if err := o.Xcv.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// pszDataName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.DataName); err != nil {
			return err
		}
	}
	// pInputData {in} (1:{pointer=ref}*(1)[dim:0,size_is=cbInputData](uchar))
	{
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array o.InputData", sizeInfo[0])
		}
		o.InputData = make([]byte, sizeInfo[0])
		for i1 := range o.InputData {
			i1 := i1
			if err := w.ReadData(&o.InputData[i1]); err != nil {
				return err
			}
		}
	}
	// cbInputData {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.InputDataLength); err != nil {
			return err
		}
	}
	// cbOutputData {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.OutputDataLength); err != nil {
			return err
		}
	}
	// pdwStatus {in, out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Status); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_XcvDataOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_XcvDataOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// pOutputData {out} (1:{pointer=ref}*(1)[dim:0,size_is=cbOutputData](uchar))
	{
		dimSize1 := uint64(o.OutputDataLength)
		if err := w.WriteSize(dimSize1); err != nil {
			return err
		}
		sizeInfo := []uint64{
			dimSize1,
		}
		for i1 := range o.OutputData {
			i1 := i1
			if uint64(i1) >= sizeInfo[0] {
				break
			}
			if err := w.WriteData(o.OutputData[i1]); err != nil {
				return err
			}
		}
		for i1 := len(o.OutputData); uint64(i1) < sizeInfo[0]; i1++ {
			if err := w.WriteData(uint8(0)); err != nil {
				return err
			}
		}
	}
	// pcbOutputNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.OutputNeededLength); err != nil {
			return err
		}
	}
	// pdwStatus {in, out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Status); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_XcvDataOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// pOutputData {out} (1:{pointer=ref}*(1)[dim:0,size_is=cbOutputData](uchar))
	{
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array o.OutputData", sizeInfo[0])
		}
		o.OutputData = make([]byte, sizeInfo[0])
		for i1 := range o.OutputData {
			i1 := i1
			if err := w.ReadData(&o.OutputData[i1]); err != nil {
				return err
			}
		}
	}
	// pcbOutputNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.OutputNeededLength); err != nil {
			return err
		}
	}
	// pdwStatus {in, out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Status); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// XcvDataRequest structure represents the RpcAsyncXcvData operation request
type XcvDataRequest struct {
	// hXcv: A handle to a port object that has been opened by using RpcAsyncOpenPrinter
	// (section 3.1.4.1.1).
	Xcv              *Printer `idl:"name:hXcv" json:"xcv"`
	DataName         string   `idl:"name:pszDataName;string" json:"data_name"`
	InputData        []byte   `idl:"name:pInputData;size_is:(cbInputData)" json:"input_data"`
	InputDataLength  uint32   `idl:"name:cbInputData" json:"input_data_length"`
	OutputDataLength uint32   `idl:"name:cbOutputData" json:"output_data_length"`
	Status           uint32   `idl:"name:pdwStatus" json:"status"`
}

func (o *XcvDataRequest) xxx_ToOp(ctx context.Context, op *xxx_XcvDataOperation) *xxx_XcvDataOperation {
	if op == nil {
		op = &xxx_XcvDataOperation{}
	}
	if o == nil {
		return op
	}
	op.Xcv = o.Xcv
	op.DataName = o.DataName
	op.InputData = o.InputData
	op.InputDataLength = o.InputDataLength
	op.OutputDataLength = o.OutputDataLength
	op.Status = o.Status
	return op
}

func (o *XcvDataRequest) xxx_FromOp(ctx context.Context, op *xxx_XcvDataOperation) {
	if o == nil {
		return
	}
	o.Xcv = op.Xcv
	o.DataName = op.DataName
	o.InputData = op.InputData
	o.InputDataLength = op.InputDataLength
	o.OutputDataLength = op.OutputDataLength
	o.Status = op.Status
}
func (o *XcvDataRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *XcvDataRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_XcvDataOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// XcvDataResponse structure represents the RpcAsyncXcvData operation response
type XcvDataResponse struct {
	// XXX: cbOutputData is an implicit input depedency for output parameters
	OutputDataLength uint32 `idl:"name:cbOutputData" json:"output_data_length"`

	OutputData         []byte `idl:"name:pOutputData;size_is:(cbOutputData)" json:"output_data"`
	OutputNeededLength uint32 `idl:"name:pcbOutputNeeded" json:"output_needed_length"`
	Status             uint32 `idl:"name:pdwStatus" json:"status"`
	// Return: The RpcAsyncXcvData return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *XcvDataResponse) xxx_ToOp(ctx context.Context, op *xxx_XcvDataOperation) *xxx_XcvDataOperation {
	if op == nil {
		op = &xxx_XcvDataOperation{}
	}
	if o == nil {
		return op
	}
	// XXX: implicit input dependencies for output parameters
	if op.OutputDataLength == uint32(0) {
		op.OutputDataLength = o.OutputDataLength
	}

	op.OutputData = o.OutputData
	op.OutputNeededLength = o.OutputNeededLength
	op.Status = o.Status
	op.Return = o.Return
	return op
}

func (o *XcvDataResponse) xxx_FromOp(ctx context.Context, op *xxx_XcvDataOperation) {
	if o == nil {
		return
	}
	// XXX: implicit input dependencies for output parameters
	o.OutputDataLength = op.OutputDataLength

	o.OutputData = op.OutputData
	o.OutputNeededLength = op.OutputNeededLength
	o.Status = op.Status
	o.Return = op.Return
}
func (o *XcvDataResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *XcvDataResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_XcvDataOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_SendRecvBIDIDataOperation structure represents the RpcAsyncSendRecvBidiData operation
type xxx_SendRecvBIDIDataOperation struct {
	Printer      *Printer               `idl:"name:hPrinter" json:"printer"`
	Action       string                 `idl:"name:pAction;string;pointer:unique" json:"action"`
	RequestData  *BIDIRequestContainer  `idl:"name:pReqData" json:"request_data"`
	ResponseData *BIDIResponseContainer `idl:"name:ppRespData" json:"response_data"`
	Return       uint32                 `idl:"name:Return" json:"return"`
}

func (o *xxx_SendRecvBIDIDataOperation) OpNum() int { return 34 }

func (o *xxx_SendRecvBIDIDataOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncSendRecvBidiData"
}

func (o *xxx_SendRecvBIDIDataOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SendRecvBIDIDataOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// pAction {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Action != "" {
			_ptr_pAction := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Action); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Action, _ptr_pAction); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pReqData {in} (1:{pointer=ref}*(1))(2:{alias=RPC_BIDI_REQUEST_CONTAINER}(struct))
	{
		if o.RequestData != nil {
			if err := o.RequestData.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&BIDIRequestContainer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SendRecvBIDIDataOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// pAction {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pAction := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Action); err != nil {
				return err
			}
			return nil
		})
		_s_pAction := func(ptr interface{}) { o.Action = *ptr.(*string) }
		if err := w.ReadPointer(&o.Action, _s_pAction, _ptr_pAction); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pReqData {in} (1:{pointer=ref}*(1))(2:{alias=RPC_BIDI_REQUEST_CONTAINER}(struct))
	{
		if o.RequestData == nil {
			o.RequestData = &BIDIRequestContainer{}
		}
		if err := o.RequestData.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SendRecvBIDIDataOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SendRecvBIDIDataOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// ppRespData {out} (1:{pointer=ref}*(2)*(1))(2:{alias=RPC_BIDI_RESPONSE_CONTAINER}(struct))
	{
		if o.ResponseData != nil {
			_ptr_ppRespData := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if o.ResponseData != nil {
					if err := o.ResponseData.MarshalNDR(ctx, w); err != nil {
						return err
					}
				} else {
					if err := (&BIDIResponseContainer{}).MarshalNDR(ctx, w); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.ResponseData, _ptr_ppRespData); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SendRecvBIDIDataOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// ppRespData {out} (1:{pointer=ref}*(2)*(1))(2:{alias=RPC_BIDI_RESPONSE_CONTAINER}(struct))
	{
		_ptr_ppRespData := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if o.ResponseData == nil {
				o.ResponseData = &BIDIResponseContainer{}
			}
			if err := o.ResponseData.UnmarshalNDR(ctx, w); err != nil {
				return err
			}
			return nil
		})
		_s_ppRespData := func(ptr interface{}) { o.ResponseData = *ptr.(**BIDIResponseContainer) }
		if err := w.ReadPointer(&o.ResponseData, _s_ppRespData, _ptr_ppRespData); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// SendRecvBIDIDataRequest structure represents the RpcAsyncSendRecvBidiData operation request
type SendRecvBIDIDataRequest struct {
	// hPrinter: A handle to a printer object that has been opened using either RpcAsyncOpenPrinter
	// (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer     *Printer              `idl:"name:hPrinter" json:"printer"`
	Action      string                `idl:"name:pAction;string;pointer:unique" json:"action"`
	RequestData *BIDIRequestContainer `idl:"name:pReqData" json:"request_data"`
}

func (o *SendRecvBIDIDataRequest) xxx_ToOp(ctx context.Context, op *xxx_SendRecvBIDIDataOperation) *xxx_SendRecvBIDIDataOperation {
	if op == nil {
		op = &xxx_SendRecvBIDIDataOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.Action = o.Action
	op.RequestData = o.RequestData
	return op
}

func (o *SendRecvBIDIDataRequest) xxx_FromOp(ctx context.Context, op *xxx_SendRecvBIDIDataOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.Action = op.Action
	o.RequestData = op.RequestData
}
func (o *SendRecvBIDIDataRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *SendRecvBIDIDataRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_SendRecvBIDIDataOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// SendRecvBIDIDataResponse structure represents the RpcAsyncSendRecvBidiData operation response
type SendRecvBIDIDataResponse struct {
	ResponseData *BIDIResponseContainer `idl:"name:ppRespData" json:"response_data"`
	// Return: The RpcAsyncSendRecvBidiData return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *SendRecvBIDIDataResponse) xxx_ToOp(ctx context.Context, op *xxx_SendRecvBIDIDataOperation) *xxx_SendRecvBIDIDataOperation {
	if op == nil {
		op = &xxx_SendRecvBIDIDataOperation{}
	}
	if o == nil {
		return op
	}
	op.ResponseData = o.ResponseData
	op.Return = o.Return
	return op
}

func (o *SendRecvBIDIDataResponse) xxx_FromOp(ctx context.Context, op *xxx_SendRecvBIDIDataOperation) {
	if o == nil {
		return
	}
	o.ResponseData = op.ResponseData
	o.Return = op.Return
}
func (o *SendRecvBIDIDataResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *SendRecvBIDIDataResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_SendRecvBIDIDataOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_CreatePrinterICOperation structure represents the RpcAsyncCreatePrinterIC operation
type xxx_CreatePrinterICOperation struct {
	Printer          *Printer          `idl:"name:hPrinter" json:"printer"`
	Handle           *GDI              `idl:"name:pHandle" json:"handle"`
	DevModeContainer *DevModeContainer `idl:"name:pDevModeContainer" json:"dev_mode_container"`
	Return           uint32            `idl:"name:Return" json:"return"`
}

func (o *xxx_CreatePrinterICOperation) OpNum() int { return 35 }

func (o *xxx_CreatePrinterICOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncCreatePrinterIC"
}

func (o *xxx_CreatePrinterICOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_CreatePrinterICOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// pDevModeContainer {in} (1:{pointer=ref}*(1))(2:{alias=DEVMODE_CONTAINER}(struct))
	{
		if o.DevModeContainer != nil {
			if err := o.DevModeContainer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&DevModeContainer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_CreatePrinterICOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// pDevModeContainer {in} (1:{pointer=ref}*(1))(2:{alias=DEVMODE_CONTAINER}(struct))
	{
		if o.DevModeContainer == nil {
			o.DevModeContainer = &DevModeContainer{}
		}
		if err := o.DevModeContainer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_CreatePrinterICOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_CreatePrinterICOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// pHandle {out} (1:{pointer=ref}*(1))(2:{context_handle, alias=GDI_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Handle != nil {
			if err := o.Handle.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&GDI{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_CreatePrinterICOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// pHandle {out} (1:{pointer=ref}*(1))(2:{context_handle, alias=GDI_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Handle == nil {
			o.Handle = &GDI{}
		}
		if err := o.Handle.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// CreatePrinterICRequest structure represents the RpcAsyncCreatePrinterIC operation request
type CreatePrinterICRequest struct {
	// hPrinter: A handle to a printer object ([MS-RPRN] section 2.2.1.1.4) that has been
	// opened using RpcAsyncOpenPrinter (section 3.1.4.1.1) or RpcAsyncAddPrinter (section
	// 3.1.4.1.2).
	Printer          *Printer          `idl:"name:hPrinter" json:"printer"`
	DevModeContainer *DevModeContainer `idl:"name:pDevModeContainer" json:"dev_mode_container"`
}

func (o *CreatePrinterICRequest) xxx_ToOp(ctx context.Context, op *xxx_CreatePrinterICOperation) *xxx_CreatePrinterICOperation {
	if op == nil {
		op = &xxx_CreatePrinterICOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.DevModeContainer = o.DevModeContainer
	return op
}

func (o *CreatePrinterICRequest) xxx_FromOp(ctx context.Context, op *xxx_CreatePrinterICOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.DevModeContainer = op.DevModeContainer
}
func (o *CreatePrinterICRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *CreatePrinterICRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_CreatePrinterICOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// CreatePrinterICResponse structure represents the RpcAsyncCreatePrinterIC operation response
type CreatePrinterICResponse struct {
	Handle *GDI `idl:"name:pHandle" json:"handle"`
	// Return: The RpcAsyncCreatePrinterIC return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *CreatePrinterICResponse) xxx_ToOp(ctx context.Context, op *xxx_CreatePrinterICOperation) *xxx_CreatePrinterICOperation {
	if op == nil {
		op = &xxx_CreatePrinterICOperation{}
	}
	if o == nil {
		return op
	}
	op.Handle = o.Handle
	op.Return = o.Return
	return op
}

func (o *CreatePrinterICResponse) xxx_FromOp(ctx context.Context, op *xxx_CreatePrinterICOperation) {
	if o == nil {
		return
	}
	o.Handle = op.Handle
	o.Return = op.Return
}
func (o *CreatePrinterICResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *CreatePrinterICResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_CreatePrinterICOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_PlayGDIScriptOnPrinterICOperation structure represents the RpcAsyncPlayGdiScriptOnPrinterIC operation
type xxx_PlayGDIScriptOnPrinterICOperation struct {
	PrinterIC *GDI   `idl:"name:hPrinterIC" json:"printer_ic"`
	In        []byte `idl:"name:pIn;size_is:(cIn)" json:"in"`
	InCount   uint32 `idl:"name:cIn" json:"in_count"`
	Out       []byte `idl:"name:pOut;size_is:(cOut)" json:"out"`
	OutCount  uint32 `idl:"name:cOut" json:"out_count"`
	Ul        uint32 `idl:"name:ul" json:"ul"`
	Return    uint32 `idl:"name:Return" json:"return"`
}

func (o *xxx_PlayGDIScriptOnPrinterICOperation) OpNum() int { return 36 }

func (o *xxx_PlayGDIScriptOnPrinterICOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncPlayGdiScriptOnPrinterIC"
}

func (o *xxx_PlayGDIScriptOnPrinterICOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if o.In != nil && o.InCount == 0 {
		o.InCount = uint32(len(o.In))
	}
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_PlayGDIScriptOnPrinterICOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinterIC {in} (1:{context_handle, alias=GDI_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.PrinterIC != nil {
			if err := o.PrinterIC.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&GDI{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// pIn {in} (1:{pointer=ref}*(1)[dim:0,size_is=cIn](uchar))
	{
		dimSize1 := uint64(o.InCount)
		if err := w.WriteSize(dimSize1); err != nil {
			return err
		}
		sizeInfo := []uint64{
			dimSize1,
		}
		for i1 := range o.In {
			i1 := i1
			if uint64(i1) >= sizeInfo[0] {
				break
			}
			if err := w.WriteData(o.In[i1]); err != nil {
				return err
			}
		}
		for i1 := len(o.In); uint64(i1) < sizeInfo[0]; i1++ {
			if err := w.WriteData(uint8(0)); err != nil {
				return err
			}
		}
	}
	// cIn {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.InCount); err != nil {
			return err
		}
	}
	// cOut {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.OutCount); err != nil {
			return err
		}
	}
	// ul {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Ul); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_PlayGDIScriptOnPrinterICOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinterIC {in} (1:{context_handle, alias=GDI_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.PrinterIC == nil {
			o.PrinterIC = &GDI{}
		}
		if err := o.PrinterIC.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// pIn {in} (1:{pointer=ref}*(1)[dim:0,size_is=cIn](uchar))
	{
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array o.In", sizeInfo[0])
		}
		o.In = make([]byte, sizeInfo[0])
		for i1 := range o.In {
			i1 := i1
			if err := w.ReadData(&o.In[i1]); err != nil {
				return err
			}
		}
	}
	// cIn {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.InCount); err != nil {
			return err
		}
	}
	// cOut {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.OutCount); err != nil {
			return err
		}
	}
	// ul {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Ul); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_PlayGDIScriptOnPrinterICOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_PlayGDIScriptOnPrinterICOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// pOut {out} (1:{pointer=ref}*(1)[dim:0,size_is=cOut](uchar))
	{
		dimSize1 := uint64(o.OutCount)
		if err := w.WriteSize(dimSize1); err != nil {
			return err
		}
		sizeInfo := []uint64{
			dimSize1,
		}
		for i1 := range o.Out {
			i1 := i1
			if uint64(i1) >= sizeInfo[0] {
				break
			}
			if err := w.WriteData(o.Out[i1]); err != nil {
				return err
			}
		}
		for i1 := len(o.Out); uint64(i1) < sizeInfo[0]; i1++ {
			if err := w.WriteData(uint8(0)); err != nil {
				return err
			}
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_PlayGDIScriptOnPrinterICOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// pOut {out} (1:{pointer=ref}*(1)[dim:0,size_is=cOut](uchar))
	{
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array o.Out", sizeInfo[0])
		}
		o.Out = make([]byte, sizeInfo[0])
		for i1 := range o.Out {
			i1 := i1
			if err := w.ReadData(&o.Out[i1]); err != nil {
				return err
			}
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// PlayGDIScriptOnPrinterICRequest structure represents the RpcAsyncPlayGdiScriptOnPrinterIC operation request
type PlayGDIScriptOnPrinterICRequest struct {
	// hPrinterIC: A printer information context handle ([MS-RPRN] section 2.2.1.1.2) that
	// has been returned by RpcAsyncCreatePrinterIC (section 3.1.4.1.18).
	PrinterIC *GDI   `idl:"name:hPrinterIC" json:"printer_ic"`
	In        []byte `idl:"name:pIn;size_is:(cIn)" json:"in"`
	InCount   uint32 `idl:"name:cIn" json:"in_count"`
	OutCount  uint32 `idl:"name:cOut" json:"out_count"`
	Ul        uint32 `idl:"name:ul" json:"ul"`
}

func (o *PlayGDIScriptOnPrinterICRequest) xxx_ToOp(ctx context.Context, op *xxx_PlayGDIScriptOnPrinterICOperation) *xxx_PlayGDIScriptOnPrinterICOperation {
	if op == nil {
		op = &xxx_PlayGDIScriptOnPrinterICOperation{}
	}
	if o == nil {
		return op
	}
	op.PrinterIC = o.PrinterIC
	op.In = o.In
	op.InCount = o.InCount
	op.OutCount = o.OutCount
	op.Ul = o.Ul
	return op
}

func (o *PlayGDIScriptOnPrinterICRequest) xxx_FromOp(ctx context.Context, op *xxx_PlayGDIScriptOnPrinterICOperation) {
	if o == nil {
		return
	}
	o.PrinterIC = op.PrinterIC
	o.In = op.In
	o.InCount = op.InCount
	o.OutCount = op.OutCount
	o.Ul = op.Ul
}
func (o *PlayGDIScriptOnPrinterICRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *PlayGDIScriptOnPrinterICRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_PlayGDIScriptOnPrinterICOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// PlayGDIScriptOnPrinterICResponse structure represents the RpcAsyncPlayGdiScriptOnPrinterIC operation response
type PlayGDIScriptOnPrinterICResponse struct {
	// XXX: cOut is an implicit input depedency for output parameters
	OutCount uint32 `idl:"name:cOut" json:"out_count"`

	Out []byte `idl:"name:pOut;size_is:(cOut)" json:"out"`
	// Return: The RpcAsyncPlayGdiScriptOnPrinterIC return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *PlayGDIScriptOnPrinterICResponse) xxx_ToOp(ctx context.Context, op *xxx_PlayGDIScriptOnPrinterICOperation) *xxx_PlayGDIScriptOnPrinterICOperation {
	if op == nil {
		op = &xxx_PlayGDIScriptOnPrinterICOperation{}
	}
	if o == nil {
		return op
	}
	// XXX: implicit input dependencies for output parameters
	if op.OutCount == uint32(0) {
		op.OutCount = o.OutCount
	}

	op.Out = o.Out
	op.Return = o.Return
	return op
}

func (o *PlayGDIScriptOnPrinterICResponse) xxx_FromOp(ctx context.Context, op *xxx_PlayGDIScriptOnPrinterICOperation) {
	if o == nil {
		return
	}
	// XXX: implicit input dependencies for output parameters
	o.OutCount = op.OutCount

	o.Out = op.Out
	o.Return = op.Return
}
func (o *PlayGDIScriptOnPrinterICResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *PlayGDIScriptOnPrinterICResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_PlayGDIScriptOnPrinterICOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_DeletePrinterICOperation structure represents the RpcAsyncDeletePrinterIC operation
type xxx_DeletePrinterICOperation struct {
	PrinterIC *GDI   `idl:"name:phPrinterIC" json:"printer_ic"`
	Return    uint32 `idl:"name:Return" json:"return"`
}

func (o *xxx_DeletePrinterICOperation) OpNum() int { return 37 }

func (o *xxx_DeletePrinterICOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncDeletePrinterIC"
}

func (o *xxx_DeletePrinterICOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterICOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// phPrinterIC {in, out} (1:{pointer=ref}*(1))(2:{context_handle, alias=GDI_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.PrinterIC != nil {
			if err := o.PrinterIC.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&GDI{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	return nil
}

func (o *xxx_DeletePrinterICOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// phPrinterIC {in, out} (1:{pointer=ref}*(1))(2:{context_handle, alias=GDI_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.PrinterIC == nil {
			o.PrinterIC = &GDI{}
		}
		if err := o.PrinterIC.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterICOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterICOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// phPrinterIC {in, out} (1:{pointer=ref}*(1))(2:{context_handle, alias=GDI_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.PrinterIC != nil {
			if err := o.PrinterIC.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&GDI{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterICOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// phPrinterIC {in, out} (1:{pointer=ref}*(1))(2:{context_handle, alias=GDI_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.PrinterIC == nil {
			o.PrinterIC = &GDI{}
		}
		if err := o.PrinterIC.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// DeletePrinterICRequest structure represents the RpcAsyncDeletePrinterIC operation request
type DeletePrinterICRequest struct {
	// phPrinterIC: A non-NULL pointer to a printer information context handle ([MS-RPRN]
	// section 2.2.1.1.2) that has been returned by RpcAsyncCreatePrinterIC (section 3.1.4.1.18).
	PrinterIC *GDI `idl:"name:phPrinterIC" json:"printer_ic"`
}

func (o *DeletePrinterICRequest) xxx_ToOp(ctx context.Context, op *xxx_DeletePrinterICOperation) *xxx_DeletePrinterICOperation {
	if op == nil {
		op = &xxx_DeletePrinterICOperation{}
	}
	if o == nil {
		return op
	}
	op.PrinterIC = o.PrinterIC
	return op
}

func (o *DeletePrinterICRequest) xxx_FromOp(ctx context.Context, op *xxx_DeletePrinterICOperation) {
	if o == nil {
		return
	}
	o.PrinterIC = op.PrinterIC
}
func (o *DeletePrinterICRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *DeletePrinterICRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_DeletePrinterICOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// DeletePrinterICResponse structure represents the RpcAsyncDeletePrinterIC operation response
type DeletePrinterICResponse struct {
	// phPrinterIC: A non-NULL pointer to a printer information context handle ([MS-RPRN]
	// section 2.2.1.1.2) that has been returned by RpcAsyncCreatePrinterIC (section 3.1.4.1.18).
	PrinterIC *GDI `idl:"name:phPrinterIC" json:"printer_ic"`
	// Return: The RpcAsyncDeletePrinterIC return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *DeletePrinterICResponse) xxx_ToOp(ctx context.Context, op *xxx_DeletePrinterICOperation) *xxx_DeletePrinterICOperation {
	if op == nil {
		op = &xxx_DeletePrinterICOperation{}
	}
	if o == nil {
		return op
	}
	op.PrinterIC = o.PrinterIC
	op.Return = o.Return
	return op
}

func (o *DeletePrinterICResponse) xxx_FromOp(ctx context.Context, op *xxx_DeletePrinterICOperation) {
	if o == nil {
		return
	}
	o.PrinterIC = op.PrinterIC
	o.Return = op.Return
}
func (o *DeletePrinterICResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *DeletePrinterICResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_DeletePrinterICOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_EnumPrintersOperation structure represents the RpcAsyncEnumPrinters operation
type xxx_EnumPrintersOperation struct {
	Flags         uint32 `idl:"name:Flags" json:"flags"`
	Name          string `idl:"name:Name;string;pointer:unique" json:"name"`
	Level         uint32 `idl:"name:Level" json:"level"`
	PrinterEnum   []byte `idl:"name:pPrinterEnum;size_is:(cbBuf);pointer:unique" json:"printer_enum"`
	BufferLength  uint32 `idl:"name:cbBuf" json:"buffer_length"`
	NeededLength  uint32 `idl:"name:pcbNeeded" json:"needed_length"`
	ReturnedCount uint32 `idl:"name:pcReturned" json:"returned_count"`
	Return        uint32 `idl:"name:Return" json:"return"`
}

func (o *xxx_EnumPrintersOperation) OpNum() int { return 38 }

func (o *xxx_EnumPrintersOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncEnumPrinters"
}

func (o *xxx_EnumPrintersOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if o.PrinterEnum != nil && o.BufferLength == 0 {
		o.BufferLength = uint32(len(o.PrinterEnum))
	}
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPrintersOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// Flags {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Flags); err != nil {
			return err
		}
	}
	// Name {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Name != "" {
			_ptr_Name := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Name); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Name, _ptr_Name); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// Level {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Level); err != nil {
			return err
		}
	}
	// pPrinterEnum {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		if o.PrinterEnum != nil || o.BufferLength > 0 {
			_ptr_pPrinterEnum := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.BufferLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				for i1 := range o.PrinterEnum {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(o.PrinterEnum[i1]); err != nil {
						return err
					}
				}
				for i1 := len(o.PrinterEnum); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint8(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.PrinterEnum, _ptr_pPrinterEnum); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.BufferLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPrintersOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// Flags {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Flags); err != nil {
			return err
		}
	}
	// Name {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_Name := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Name); err != nil {
				return err
			}
			return nil
		})
		_s_Name := func(ptr interface{}) { o.Name = *ptr.(*string) }
		if err := w.ReadPointer(&o.Name, _s_Name, _ptr_Name); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// Level {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Level); err != nil {
			return err
		}
	}
	// pPrinterEnum {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		_ptr_pPrinterEnum := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array o.PrinterEnum", sizeInfo[0])
			}
			o.PrinterEnum = make([]byte, sizeInfo[0])
			for i1 := range o.PrinterEnum {
				i1 := i1
				if err := w.ReadData(&o.PrinterEnum[i1]); err != nil {
					return err
				}
			}
			return nil
		})
		_s_pPrinterEnum := func(ptr interface{}) { o.PrinterEnum = *ptr.(*[]byte) }
		if err := w.ReadPointer(&o.PrinterEnum, _s_pPrinterEnum, _ptr_pPrinterEnum); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.BufferLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPrintersOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPrintersOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// pPrinterEnum {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		if o.PrinterEnum != nil || o.BufferLength > 0 {
			_ptr_pPrinterEnum := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.BufferLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				for i1 := range o.PrinterEnum {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(o.PrinterEnum[i1]); err != nil {
						return err
					}
				}
				for i1 := len(o.PrinterEnum); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint8(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.PrinterEnum, _ptr_pPrinterEnum); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.NeededLength); err != nil {
			return err
		}
	}
	// pcReturned {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.ReturnedCount); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPrintersOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// pPrinterEnum {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		_ptr_pPrinterEnum := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array o.PrinterEnum", sizeInfo[0])
			}
			o.PrinterEnum = make([]byte, sizeInfo[0])
			for i1 := range o.PrinterEnum {
				i1 := i1
				if err := w.ReadData(&o.PrinterEnum[i1]); err != nil {
					return err
				}
			}
			return nil
		})
		_s_pPrinterEnum := func(ptr interface{}) { o.PrinterEnum = *ptr.(*[]byte) }
		if err := w.ReadPointer(&o.PrinterEnum, _s_pPrinterEnum, _ptr_pPrinterEnum); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.NeededLength); err != nil {
			return err
		}
	}
	// pcReturned {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.ReturnedCount); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// EnumPrintersRequest structure represents the RpcAsyncEnumPrinters operation request
type EnumPrintersRequest struct {
	Flags        uint32 `idl:"name:Flags" json:"flags"`
	Name         string `idl:"name:Name;string;pointer:unique" json:"name"`
	Level        uint32 `idl:"name:Level" json:"level"`
	PrinterEnum  []byte `idl:"name:pPrinterEnum;size_is:(cbBuf);pointer:unique" json:"printer_enum"`
	BufferLength uint32 `idl:"name:cbBuf" json:"buffer_length"`
}

func (o *EnumPrintersRequest) xxx_ToOp(ctx context.Context, op *xxx_EnumPrintersOperation) *xxx_EnumPrintersOperation {
	if op == nil {
		op = &xxx_EnumPrintersOperation{}
	}
	if o == nil {
		return op
	}
	op.Flags = o.Flags
	op.Name = o.Name
	op.Level = o.Level
	op.PrinterEnum = o.PrinterEnum
	op.BufferLength = o.BufferLength
	return op
}

func (o *EnumPrintersRequest) xxx_FromOp(ctx context.Context, op *xxx_EnumPrintersOperation) {
	if o == nil {
		return
	}
	o.Flags = op.Flags
	o.Name = op.Name
	o.Level = op.Level
	o.PrinterEnum = op.PrinterEnum
	o.BufferLength = op.BufferLength
}
func (o *EnumPrintersRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *EnumPrintersRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_EnumPrintersOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// EnumPrintersResponse structure represents the RpcAsyncEnumPrinters operation response
type EnumPrintersResponse struct {
	// XXX: cbBuf is an implicit input depedency for output parameters
	BufferLength uint32 `idl:"name:cbBuf" json:"buffer_length"`

	PrinterEnum   []byte `idl:"name:pPrinterEnum;size_is:(cbBuf);pointer:unique" json:"printer_enum"`
	NeededLength  uint32 `idl:"name:pcbNeeded" json:"needed_length"`
	ReturnedCount uint32 `idl:"name:pcReturned" json:"returned_count"`
	// Return: The RpcAsyncEnumPrinters return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *EnumPrintersResponse) xxx_ToOp(ctx context.Context, op *xxx_EnumPrintersOperation) *xxx_EnumPrintersOperation {
	if op == nil {
		op = &xxx_EnumPrintersOperation{}
	}
	if o == nil {
		return op
	}
	// XXX: implicit input dependencies for output parameters
	if op.BufferLength == uint32(0) {
		op.BufferLength = o.BufferLength
	}

	op.PrinterEnum = o.PrinterEnum
	op.NeededLength = o.NeededLength
	op.ReturnedCount = o.ReturnedCount
	op.Return = o.Return
	return op
}

func (o *EnumPrintersResponse) xxx_FromOp(ctx context.Context, op *xxx_EnumPrintersOperation) {
	if o == nil {
		return
	}
	// XXX: implicit input dependencies for output parameters
	o.BufferLength = op.BufferLength

	o.PrinterEnum = op.PrinterEnum
	o.NeededLength = op.NeededLength
	o.ReturnedCount = op.ReturnedCount
	o.Return = op.Return
}
func (o *EnumPrintersResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *EnumPrintersResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_EnumPrintersOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_AddPrinterDriverOperation structure represents the RpcAsyncAddPrinterDriver operation
type xxx_AddPrinterDriverOperation struct {
	Name            string           `idl:"name:pName;string;pointer:unique" json:"name"`
	DriverContainer *DriverContainer `idl:"name:pDriverContainer" json:"driver_container"`
	FileCopyFlags   uint32           `idl:"name:dwFileCopyFlags" json:"file_copy_flags"`
	Return          uint32           `idl:"name:Return" json:"return"`
}

func (o *xxx_AddPrinterDriverOperation) OpNum() int { return 39 }

func (o *xxx_AddPrinterDriverOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncAddPrinterDriver"
}

func (o *xxx_AddPrinterDriverOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddPrinterDriverOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// pName {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Name != "" {
			_ptr_pName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Name); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Name, _ptr_pName); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pDriverContainer {in} (1:{pointer=ref}*(1))(2:{alias=DRIVER_CONTAINER}(struct))
	{
		if o.DriverContainer != nil {
			if err := o.DriverContainer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&DriverContainer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// dwFileCopyFlags {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.FileCopyFlags); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddPrinterDriverOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// pName {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Name); err != nil {
				return err
			}
			return nil
		})
		_s_pName := func(ptr interface{}) { o.Name = *ptr.(*string) }
		if err := w.ReadPointer(&o.Name, _s_pName, _ptr_pName); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pDriverContainer {in} (1:{pointer=ref}*(1))(2:{alias=DRIVER_CONTAINER}(struct))
	{
		if o.DriverContainer == nil {
			o.DriverContainer = &DriverContainer{}
		}
		if err := o.DriverContainer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// dwFileCopyFlags {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.FileCopyFlags); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddPrinterDriverOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddPrinterDriverOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddPrinterDriverOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// AddPrinterDriverRequest structure represents the RpcAsyncAddPrinterDriver operation request
type AddPrinterDriverRequest struct {
	Name            string           `idl:"name:pName;string;pointer:unique" json:"name"`
	DriverContainer *DriverContainer `idl:"name:pDriverContainer" json:"driver_container"`
	FileCopyFlags   uint32           `idl:"name:dwFileCopyFlags" json:"file_copy_flags"`
}

func (o *AddPrinterDriverRequest) xxx_ToOp(ctx context.Context, op *xxx_AddPrinterDriverOperation) *xxx_AddPrinterDriverOperation {
	if op == nil {
		op = &xxx_AddPrinterDriverOperation{}
	}
	if o == nil {
		return op
	}
	op.Name = o.Name
	op.DriverContainer = o.DriverContainer
	op.FileCopyFlags = o.FileCopyFlags
	return op
}

func (o *AddPrinterDriverRequest) xxx_FromOp(ctx context.Context, op *xxx_AddPrinterDriverOperation) {
	if o == nil {
		return
	}
	o.Name = op.Name
	o.DriverContainer = op.DriverContainer
	o.FileCopyFlags = op.FileCopyFlags
}
func (o *AddPrinterDriverRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *AddPrinterDriverRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_AddPrinterDriverOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// AddPrinterDriverResponse structure represents the RpcAsyncAddPrinterDriver operation response
type AddPrinterDriverResponse struct {
	// Return: The RpcAsyncAddPrinterDriver return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *AddPrinterDriverResponse) xxx_ToOp(ctx context.Context, op *xxx_AddPrinterDriverOperation) *xxx_AddPrinterDriverOperation {
	if op == nil {
		op = &xxx_AddPrinterDriverOperation{}
	}
	if o == nil {
		return op
	}
	op.Return = o.Return
	return op
}

func (o *AddPrinterDriverResponse) xxx_FromOp(ctx context.Context, op *xxx_AddPrinterDriverOperation) {
	if o == nil {
		return
	}
	o.Return = op.Return
}
func (o *AddPrinterDriverResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *AddPrinterDriverResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_AddPrinterDriverOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_EnumPrinterDriversOperation structure represents the RpcAsyncEnumPrinterDrivers operation
type xxx_EnumPrinterDriversOperation struct {
	Name          string `idl:"name:pName;string;pointer:unique" json:"name"`
	Environment   string `idl:"name:pEnvironment;string;pointer:unique" json:"environment"`
	Level         uint32 `idl:"name:Level" json:"level"`
	Drivers       []byte `idl:"name:pDrivers;size_is:(cbBuf);pointer:unique" json:"drivers"`
	BufferLength  uint32 `idl:"name:cbBuf" json:"buffer_length"`
	NeededLength  uint32 `idl:"name:pcbNeeded" json:"needed_length"`
	ReturnedCount uint32 `idl:"name:pcReturned" json:"returned_count"`
	Return        uint32 `idl:"name:Return" json:"return"`
}

func (o *xxx_EnumPrinterDriversOperation) OpNum() int { return 40 }

func (o *xxx_EnumPrinterDriversOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncEnumPrinterDrivers"
}

func (o *xxx_EnumPrinterDriversOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if o.Drivers != nil && o.BufferLength == 0 {
		o.BufferLength = uint32(len(o.Drivers))
	}
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPrinterDriversOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// pName {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Name != "" {
			_ptr_pName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Name); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Name, _ptr_pName); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pEnvironment {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Environment != "" {
			_ptr_pEnvironment := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Environment); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Environment, _ptr_pEnvironment); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// Level {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Level); err != nil {
			return err
		}
	}
	// pDrivers {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		if o.Drivers != nil || o.BufferLength > 0 {
			_ptr_pDrivers := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.BufferLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				for i1 := range o.Drivers {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(o.Drivers[i1]); err != nil {
						return err
					}
				}
				for i1 := len(o.Drivers); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint8(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.Drivers, _ptr_pDrivers); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.BufferLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPrinterDriversOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// pName {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Name); err != nil {
				return err
			}
			return nil
		})
		_s_pName := func(ptr interface{}) { o.Name = *ptr.(*string) }
		if err := w.ReadPointer(&o.Name, _s_pName, _ptr_pName); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pEnvironment {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pEnvironment := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Environment); err != nil {
				return err
			}
			return nil
		})
		_s_pEnvironment := func(ptr interface{}) { o.Environment = *ptr.(*string) }
		if err := w.ReadPointer(&o.Environment, _s_pEnvironment, _ptr_pEnvironment); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// Level {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Level); err != nil {
			return err
		}
	}
	// pDrivers {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		_ptr_pDrivers := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array o.Drivers", sizeInfo[0])
			}
			o.Drivers = make([]byte, sizeInfo[0])
			for i1 := range o.Drivers {
				i1 := i1
				if err := w.ReadData(&o.Drivers[i1]); err != nil {
					return err
				}
			}
			return nil
		})
		_s_pDrivers := func(ptr interface{}) { o.Drivers = *ptr.(*[]byte) }
		if err := w.ReadPointer(&o.Drivers, _s_pDrivers, _ptr_pDrivers); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.BufferLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPrinterDriversOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPrinterDriversOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// pDrivers {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		if o.Drivers != nil || o.BufferLength > 0 {
			_ptr_pDrivers := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.BufferLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				for i1 := range o.Drivers {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(o.Drivers[i1]); err != nil {
						return err
					}
				}
				for i1 := len(o.Drivers); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint8(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.Drivers, _ptr_pDrivers); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.NeededLength); err != nil {
			return err
		}
	}
	// pcReturned {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.ReturnedCount); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPrinterDriversOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// pDrivers {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		_ptr_pDrivers := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array o.Drivers", sizeInfo[0])
			}
			o.Drivers = make([]byte, sizeInfo[0])
			for i1 := range o.Drivers {
				i1 := i1
				if err := w.ReadData(&o.Drivers[i1]); err != nil {
					return err
				}
			}
			return nil
		})
		_s_pDrivers := func(ptr interface{}) { o.Drivers = *ptr.(*[]byte) }
		if err := w.ReadPointer(&o.Drivers, _s_pDrivers, _ptr_pDrivers); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.NeededLength); err != nil {
			return err
		}
	}
	// pcReturned {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.ReturnedCount); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// EnumPrinterDriversRequest structure represents the RpcAsyncEnumPrinterDrivers operation request
type EnumPrinterDriversRequest struct {
	Name         string `idl:"name:pName;string;pointer:unique" json:"name"`
	Environment  string `idl:"name:pEnvironment;string;pointer:unique" json:"environment"`
	Level        uint32 `idl:"name:Level" json:"level"`
	Drivers      []byte `idl:"name:pDrivers;size_is:(cbBuf);pointer:unique" json:"drivers"`
	BufferLength uint32 `idl:"name:cbBuf" json:"buffer_length"`
}

func (o *EnumPrinterDriversRequest) xxx_ToOp(ctx context.Context, op *xxx_EnumPrinterDriversOperation) *xxx_EnumPrinterDriversOperation {
	if op == nil {
		op = &xxx_EnumPrinterDriversOperation{}
	}
	if o == nil {
		return op
	}
	op.Name = o.Name
	op.Environment = o.Environment
	op.Level = o.Level
	op.Drivers = o.Drivers
	op.BufferLength = o.BufferLength
	return op
}

func (o *EnumPrinterDriversRequest) xxx_FromOp(ctx context.Context, op *xxx_EnumPrinterDriversOperation) {
	if o == nil {
		return
	}
	o.Name = op.Name
	o.Environment = op.Environment
	o.Level = op.Level
	o.Drivers = op.Drivers
	o.BufferLength = op.BufferLength
}
func (o *EnumPrinterDriversRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *EnumPrinterDriversRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_EnumPrinterDriversOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// EnumPrinterDriversResponse structure represents the RpcAsyncEnumPrinterDrivers operation response
type EnumPrinterDriversResponse struct {
	// XXX: cbBuf is an implicit input depedency for output parameters
	BufferLength uint32 `idl:"name:cbBuf" json:"buffer_length"`

	Drivers       []byte `idl:"name:pDrivers;size_is:(cbBuf);pointer:unique" json:"drivers"`
	NeededLength  uint32 `idl:"name:pcbNeeded" json:"needed_length"`
	ReturnedCount uint32 `idl:"name:pcReturned" json:"returned_count"`
	// Return: The RpcAsyncEnumPrinterDrivers return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *EnumPrinterDriversResponse) xxx_ToOp(ctx context.Context, op *xxx_EnumPrinterDriversOperation) *xxx_EnumPrinterDriversOperation {
	if op == nil {
		op = &xxx_EnumPrinterDriversOperation{}
	}
	if o == nil {
		return op
	}
	// XXX: implicit input dependencies for output parameters
	if op.BufferLength == uint32(0) {
		op.BufferLength = o.BufferLength
	}

	op.Drivers = o.Drivers
	op.NeededLength = o.NeededLength
	op.ReturnedCount = o.ReturnedCount
	op.Return = o.Return
	return op
}

func (o *EnumPrinterDriversResponse) xxx_FromOp(ctx context.Context, op *xxx_EnumPrinterDriversOperation) {
	if o == nil {
		return
	}
	// XXX: implicit input dependencies for output parameters
	o.BufferLength = op.BufferLength

	o.Drivers = op.Drivers
	o.NeededLength = op.NeededLength
	o.ReturnedCount = op.ReturnedCount
	o.Return = op.Return
}
func (o *EnumPrinterDriversResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *EnumPrinterDriversResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_EnumPrinterDriversOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_GetPrinterDriverDirectoryOperation structure represents the RpcAsyncGetPrinterDriverDirectory operation
type xxx_GetPrinterDriverDirectoryOperation struct {
	Name            string `idl:"name:pName;string;pointer:unique" json:"name"`
	Environment     string `idl:"name:pEnvironment;string;pointer:unique" json:"environment"`
	Level           uint32 `idl:"name:Level" json:"level"`
	DriverDirectory []byte `idl:"name:pDriverDirectory;size_is:(cbBuf);pointer:unique" json:"driver_directory"`
	BufferLength    uint32 `idl:"name:cbBuf" json:"buffer_length"`
	NeededLength    uint32 `idl:"name:pcbNeeded" json:"needed_length"`
	Return          uint32 `idl:"name:Return" json:"return"`
}

func (o *xxx_GetPrinterDriverDirectoryOperation) OpNum() int { return 41 }

func (o *xxx_GetPrinterDriverDirectoryOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncGetPrinterDriverDirectory"
}

func (o *xxx_GetPrinterDriverDirectoryOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if o.DriverDirectory != nil && o.BufferLength == 0 {
		o.BufferLength = uint32(len(o.DriverDirectory))
	}
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetPrinterDriverDirectoryOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// pName {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Name != "" {
			_ptr_pName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Name); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Name, _ptr_pName); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pEnvironment {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Environment != "" {
			_ptr_pEnvironment := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Environment); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Environment, _ptr_pEnvironment); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// Level {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Level); err != nil {
			return err
		}
	}
	// pDriverDirectory {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		if o.DriverDirectory != nil || o.BufferLength > 0 {
			_ptr_pDriverDirectory := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.BufferLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				for i1 := range o.DriverDirectory {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(o.DriverDirectory[i1]); err != nil {
						return err
					}
				}
				for i1 := len(o.DriverDirectory); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint8(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.DriverDirectory, _ptr_pDriverDirectory); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.BufferLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetPrinterDriverDirectoryOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// pName {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Name); err != nil {
				return err
			}
			return nil
		})
		_s_pName := func(ptr interface{}) { o.Name = *ptr.(*string) }
		if err := w.ReadPointer(&o.Name, _s_pName, _ptr_pName); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pEnvironment {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pEnvironment := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Environment); err != nil {
				return err
			}
			return nil
		})
		_s_pEnvironment := func(ptr interface{}) { o.Environment = *ptr.(*string) }
		if err := w.ReadPointer(&o.Environment, _s_pEnvironment, _ptr_pEnvironment); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// Level {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Level); err != nil {
			return err
		}
	}
	// pDriverDirectory {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		_ptr_pDriverDirectory := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array o.DriverDirectory", sizeInfo[0])
			}
			o.DriverDirectory = make([]byte, sizeInfo[0])
			for i1 := range o.DriverDirectory {
				i1 := i1
				if err := w.ReadData(&o.DriverDirectory[i1]); err != nil {
					return err
				}
			}
			return nil
		})
		_s_pDriverDirectory := func(ptr interface{}) { o.DriverDirectory = *ptr.(*[]byte) }
		if err := w.ReadPointer(&o.DriverDirectory, _s_pDriverDirectory, _ptr_pDriverDirectory); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.BufferLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetPrinterDriverDirectoryOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetPrinterDriverDirectoryOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// pDriverDirectory {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		if o.DriverDirectory != nil || o.BufferLength > 0 {
			_ptr_pDriverDirectory := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.BufferLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				for i1 := range o.DriverDirectory {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(o.DriverDirectory[i1]); err != nil {
						return err
					}
				}
				for i1 := len(o.DriverDirectory); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint8(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.DriverDirectory, _ptr_pDriverDirectory); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.NeededLength); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetPrinterDriverDirectoryOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// pDriverDirectory {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		_ptr_pDriverDirectory := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array o.DriverDirectory", sizeInfo[0])
			}
			o.DriverDirectory = make([]byte, sizeInfo[0])
			for i1 := range o.DriverDirectory {
				i1 := i1
				if err := w.ReadData(&o.DriverDirectory[i1]); err != nil {
					return err
				}
			}
			return nil
		})
		_s_pDriverDirectory := func(ptr interface{}) { o.DriverDirectory = *ptr.(*[]byte) }
		if err := w.ReadPointer(&o.DriverDirectory, _s_pDriverDirectory, _ptr_pDriverDirectory); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.NeededLength); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// GetPrinterDriverDirectoryRequest structure represents the RpcAsyncGetPrinterDriverDirectory operation request
type GetPrinterDriverDirectoryRequest struct {
	Name            string `idl:"name:pName;string;pointer:unique" json:"name"`
	Environment     string `idl:"name:pEnvironment;string;pointer:unique" json:"environment"`
	Level           uint32 `idl:"name:Level" json:"level"`
	DriverDirectory []byte `idl:"name:pDriverDirectory;size_is:(cbBuf);pointer:unique" json:"driver_directory"`
	BufferLength    uint32 `idl:"name:cbBuf" json:"buffer_length"`
}

func (o *GetPrinterDriverDirectoryRequest) xxx_ToOp(ctx context.Context, op *xxx_GetPrinterDriverDirectoryOperation) *xxx_GetPrinterDriverDirectoryOperation {
	if op == nil {
		op = &xxx_GetPrinterDriverDirectoryOperation{}
	}
	if o == nil {
		return op
	}
	op.Name = o.Name
	op.Environment = o.Environment
	op.Level = o.Level
	op.DriverDirectory = o.DriverDirectory
	op.BufferLength = o.BufferLength
	return op
}

func (o *GetPrinterDriverDirectoryRequest) xxx_FromOp(ctx context.Context, op *xxx_GetPrinterDriverDirectoryOperation) {
	if o == nil {
		return
	}
	o.Name = op.Name
	o.Environment = op.Environment
	o.Level = op.Level
	o.DriverDirectory = op.DriverDirectory
	o.BufferLength = op.BufferLength
}
func (o *GetPrinterDriverDirectoryRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *GetPrinterDriverDirectoryRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_GetPrinterDriverDirectoryOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// GetPrinterDriverDirectoryResponse structure represents the RpcAsyncGetPrinterDriverDirectory operation response
type GetPrinterDriverDirectoryResponse struct {
	// XXX: cbBuf is an implicit input depedency for output parameters
	BufferLength uint32 `idl:"name:cbBuf" json:"buffer_length"`

	DriverDirectory []byte `idl:"name:pDriverDirectory;size_is:(cbBuf);pointer:unique" json:"driver_directory"`
	NeededLength    uint32 `idl:"name:pcbNeeded" json:"needed_length"`
	// Return: The RpcAsyncGetPrinterDriverDirectory return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *GetPrinterDriverDirectoryResponse) xxx_ToOp(ctx context.Context, op *xxx_GetPrinterDriverDirectoryOperation) *xxx_GetPrinterDriverDirectoryOperation {
	if op == nil {
		op = &xxx_GetPrinterDriverDirectoryOperation{}
	}
	if o == nil {
		return op
	}
	// XXX: implicit input dependencies for output parameters
	if op.BufferLength == uint32(0) {
		op.BufferLength = o.BufferLength
	}

	op.DriverDirectory = o.DriverDirectory
	op.NeededLength = o.NeededLength
	op.Return = o.Return
	return op
}

func (o *GetPrinterDriverDirectoryResponse) xxx_FromOp(ctx context.Context, op *xxx_GetPrinterDriverDirectoryOperation) {
	if o == nil {
		return
	}
	// XXX: implicit input dependencies for output parameters
	o.BufferLength = op.BufferLength

	o.DriverDirectory = op.DriverDirectory
	o.NeededLength = op.NeededLength
	o.Return = op.Return
}
func (o *GetPrinterDriverDirectoryResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *GetPrinterDriverDirectoryResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_GetPrinterDriverDirectoryOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_DeletePrinterDriverOperation structure represents the RpcAsyncDeletePrinterDriver operation
type xxx_DeletePrinterDriverOperation struct {
	Name        string `idl:"name:pName;string;pointer:unique" json:"name"`
	Environment string `idl:"name:pEnvironment;string" json:"environment"`
	DriverName  string `idl:"name:pDriverName;string" json:"driver_name"`
	Return      uint32 `idl:"name:Return" json:"return"`
}

func (o *xxx_DeletePrinterDriverOperation) OpNum() int { return 42 }

func (o *xxx_DeletePrinterDriverOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncDeletePrinterDriver"
}

func (o *xxx_DeletePrinterDriverOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterDriverOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// pName {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Name != "" {
			_ptr_pName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Name); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Name, _ptr_pName); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pEnvironment {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.Environment); err != nil {
			return err
		}
	}
	// pDriverName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.DriverName); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterDriverOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// pName {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Name); err != nil {
				return err
			}
			return nil
		})
		_s_pName := func(ptr interface{}) { o.Name = *ptr.(*string) }
		if err := w.ReadPointer(&o.Name, _s_pName, _ptr_pName); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pEnvironment {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.Environment); err != nil {
			return err
		}
	}
	// pDriverName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.DriverName); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterDriverOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterDriverOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterDriverOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// DeletePrinterDriverRequest structure represents the RpcAsyncDeletePrinterDriver operation request
type DeletePrinterDriverRequest struct {
	Name        string `idl:"name:pName;string;pointer:unique" json:"name"`
	Environment string `idl:"name:pEnvironment;string" json:"environment"`
	DriverName  string `idl:"name:pDriverName;string" json:"driver_name"`
}

func (o *DeletePrinterDriverRequest) xxx_ToOp(ctx context.Context, op *xxx_DeletePrinterDriverOperation) *xxx_DeletePrinterDriverOperation {
	if op == nil {
		op = &xxx_DeletePrinterDriverOperation{}
	}
	if o == nil {
		return op
	}
	op.Name = o.Name
	op.Environment = o.Environment
	op.DriverName = o.DriverName
	return op
}

func (o *DeletePrinterDriverRequest) xxx_FromOp(ctx context.Context, op *xxx_DeletePrinterDriverOperation) {
	if o == nil {
		return
	}
	o.Name = op.Name
	o.Environment = op.Environment
	o.DriverName = op.DriverName
}
func (o *DeletePrinterDriverRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *DeletePrinterDriverRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_DeletePrinterDriverOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// DeletePrinterDriverResponse structure represents the RpcAsyncDeletePrinterDriver operation response
type DeletePrinterDriverResponse struct {
	// Return: The RpcAsyncDeletePrinterDriver return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *DeletePrinterDriverResponse) xxx_ToOp(ctx context.Context, op *xxx_DeletePrinterDriverOperation) *xxx_DeletePrinterDriverOperation {
	if op == nil {
		op = &xxx_DeletePrinterDriverOperation{}
	}
	if o == nil {
		return op
	}
	op.Return = o.Return
	return op
}

func (o *DeletePrinterDriverResponse) xxx_FromOp(ctx context.Context, op *xxx_DeletePrinterDriverOperation) {
	if o == nil {
		return
	}
	o.Return = op.Return
}
func (o *DeletePrinterDriverResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *DeletePrinterDriverResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_DeletePrinterDriverOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_DeletePrinterDriverExOperation structure represents the RpcAsyncDeletePrinterDriverEx operation
type xxx_DeletePrinterDriverExOperation struct {
	Name        string `idl:"name:pName;string;pointer:unique" json:"name"`
	Environment string `idl:"name:pEnvironment;string" json:"environment"`
	DriverName  string `idl:"name:pDriverName;string" json:"driver_name"`
	DeleteFlag  uint32 `idl:"name:dwDeleteFlag" json:"delete_flag"`
	VersionNum  uint32 `idl:"name:dwVersionNum" json:"version_num"`
	Return      uint32 `idl:"name:Return" json:"return"`
}

func (o *xxx_DeletePrinterDriverExOperation) OpNum() int { return 43 }

func (o *xxx_DeletePrinterDriverExOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncDeletePrinterDriverEx"
}

func (o *xxx_DeletePrinterDriverExOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterDriverExOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// pName {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Name != "" {
			_ptr_pName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Name); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Name, _ptr_pName); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pEnvironment {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.Environment); err != nil {
			return err
		}
	}
	// pDriverName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.DriverName); err != nil {
			return err
		}
	}
	// dwDeleteFlag {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.DeleteFlag); err != nil {
			return err
		}
	}
	// dwVersionNum {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.VersionNum); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterDriverExOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// pName {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Name); err != nil {
				return err
			}
			return nil
		})
		_s_pName := func(ptr interface{}) { o.Name = *ptr.(*string) }
		if err := w.ReadPointer(&o.Name, _s_pName, _ptr_pName); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pEnvironment {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.Environment); err != nil {
			return err
		}
	}
	// pDriverName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.DriverName); err != nil {
			return err
		}
	}
	// dwDeleteFlag {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.DeleteFlag); err != nil {
			return err
		}
	}
	// dwVersionNum {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.VersionNum); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterDriverExOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterDriverExOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterDriverExOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// DeletePrinterDriverExRequest structure represents the RpcAsyncDeletePrinterDriverEx operation request
type DeletePrinterDriverExRequest struct {
	Name        string `idl:"name:pName;string;pointer:unique" json:"name"`
	Environment string `idl:"name:pEnvironment;string" json:"environment"`
	DriverName  string `idl:"name:pDriverName;string" json:"driver_name"`
	DeleteFlag  uint32 `idl:"name:dwDeleteFlag" json:"delete_flag"`
	VersionNum  uint32 `idl:"name:dwVersionNum" json:"version_num"`
}

func (o *DeletePrinterDriverExRequest) xxx_ToOp(ctx context.Context, op *xxx_DeletePrinterDriverExOperation) *xxx_DeletePrinterDriverExOperation {
	if op == nil {
		op = &xxx_DeletePrinterDriverExOperation{}
	}
	if o == nil {
		return op
	}
	op.Name = o.Name
	op.Environment = o.Environment
	op.DriverName = o.DriverName
	op.DeleteFlag = o.DeleteFlag
	op.VersionNum = o.VersionNum
	return op
}

func (o *DeletePrinterDriverExRequest) xxx_FromOp(ctx context.Context, op *xxx_DeletePrinterDriverExOperation) {
	if o == nil {
		return
	}
	o.Name = op.Name
	o.Environment = op.Environment
	o.DriverName = op.DriverName
	o.DeleteFlag = op.DeleteFlag
	o.VersionNum = op.VersionNum
}
func (o *DeletePrinterDriverExRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *DeletePrinterDriverExRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_DeletePrinterDriverExOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// DeletePrinterDriverExResponse structure represents the RpcAsyncDeletePrinterDriverEx operation response
type DeletePrinterDriverExResponse struct {
	// Return: The RpcAsyncDeletePrinterDriverEx return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *DeletePrinterDriverExResponse) xxx_ToOp(ctx context.Context, op *xxx_DeletePrinterDriverExOperation) *xxx_DeletePrinterDriverExOperation {
	if op == nil {
		op = &xxx_DeletePrinterDriverExOperation{}
	}
	if o == nil {
		return op
	}
	op.Return = o.Return
	return op
}

func (o *DeletePrinterDriverExResponse) xxx_FromOp(ctx context.Context, op *xxx_DeletePrinterDriverExOperation) {
	if o == nil {
		return
	}
	o.Return = op.Return
}
func (o *DeletePrinterDriverExResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *DeletePrinterDriverExResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_DeletePrinterDriverExOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_AddPrintProcessorOperation structure represents the RpcAsyncAddPrintProcessor operation
type xxx_AddPrintProcessorOperation struct {
	Name               string `idl:"name:pName;string;pointer:unique" json:"name"`
	Environment        string `idl:"name:pEnvironment;string" json:"environment"`
	PathName           string `idl:"name:pPathName;string" json:"path_name"`
	PrintProcessorName string `idl:"name:pPrintProcessorName;string" json:"print_processor_name"`
	Return             uint32 `idl:"name:Return" json:"return"`
}

func (o *xxx_AddPrintProcessorOperation) OpNum() int { return 44 }

func (o *xxx_AddPrintProcessorOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncAddPrintProcessor"
}

func (o *xxx_AddPrintProcessorOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddPrintProcessorOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// pName {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Name != "" {
			_ptr_pName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Name); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Name, _ptr_pName); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pEnvironment {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.Environment); err != nil {
			return err
		}
	}
	// pPathName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.PathName); err != nil {
			return err
		}
	}
	// pPrintProcessorName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.PrintProcessorName); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddPrintProcessorOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// pName {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Name); err != nil {
				return err
			}
			return nil
		})
		_s_pName := func(ptr interface{}) { o.Name = *ptr.(*string) }
		if err := w.ReadPointer(&o.Name, _s_pName, _ptr_pName); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pEnvironment {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.Environment); err != nil {
			return err
		}
	}
	// pPathName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.PathName); err != nil {
			return err
		}
	}
	// pPrintProcessorName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.PrintProcessorName); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddPrintProcessorOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddPrintProcessorOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddPrintProcessorOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// AddPrintProcessorRequest structure represents the RpcAsyncAddPrintProcessor operation request
type AddPrintProcessorRequest struct {
	Name               string `idl:"name:pName;string;pointer:unique" json:"name"`
	Environment        string `idl:"name:pEnvironment;string" json:"environment"`
	PathName           string `idl:"name:pPathName;string" json:"path_name"`
	PrintProcessorName string `idl:"name:pPrintProcessorName;string" json:"print_processor_name"`
}

func (o *AddPrintProcessorRequest) xxx_ToOp(ctx context.Context, op *xxx_AddPrintProcessorOperation) *xxx_AddPrintProcessorOperation {
	if op == nil {
		op = &xxx_AddPrintProcessorOperation{}
	}
	if o == nil {
		return op
	}
	op.Name = o.Name
	op.Environment = o.Environment
	op.PathName = o.PathName
	op.PrintProcessorName = o.PrintProcessorName
	return op
}

func (o *AddPrintProcessorRequest) xxx_FromOp(ctx context.Context, op *xxx_AddPrintProcessorOperation) {
	if o == nil {
		return
	}
	o.Name = op.Name
	o.Environment = op.Environment
	o.PathName = op.PathName
	o.PrintProcessorName = op.PrintProcessorName
}
func (o *AddPrintProcessorRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *AddPrintProcessorRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_AddPrintProcessorOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// AddPrintProcessorResponse structure represents the RpcAsyncAddPrintProcessor operation response
type AddPrintProcessorResponse struct {
	// Return: The RpcAsyncAddPrintProcessor return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *AddPrintProcessorResponse) xxx_ToOp(ctx context.Context, op *xxx_AddPrintProcessorOperation) *xxx_AddPrintProcessorOperation {
	if op == nil {
		op = &xxx_AddPrintProcessorOperation{}
	}
	if o == nil {
		return op
	}
	op.Return = o.Return
	return op
}

func (o *AddPrintProcessorResponse) xxx_FromOp(ctx context.Context, op *xxx_AddPrintProcessorOperation) {
	if o == nil {
		return
	}
	o.Return = op.Return
}
func (o *AddPrintProcessorResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *AddPrintProcessorResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_AddPrintProcessorOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_EnumPrintProcessorsOperation structure represents the RpcAsyncEnumPrintProcessors operation
type xxx_EnumPrintProcessorsOperation struct {
	Name               string `idl:"name:pName;string;pointer:unique" json:"name"`
	Environment        string `idl:"name:pEnvironment;string;pointer:unique" json:"environment"`
	Level              uint32 `idl:"name:Level" json:"level"`
	PrintProcessorInfo []byte `idl:"name:pPrintProcessorInfo;size_is:(cbBuf);pointer:unique" json:"print_processor_info"`
	BufferLength       uint32 `idl:"name:cbBuf" json:"buffer_length"`
	NeededLength       uint32 `idl:"name:pcbNeeded" json:"needed_length"`
	ReturnedCount      uint32 `idl:"name:pcReturned" json:"returned_count"`
	Return             uint32 `idl:"name:Return" json:"return"`
}

func (o *xxx_EnumPrintProcessorsOperation) OpNum() int { return 45 }

func (o *xxx_EnumPrintProcessorsOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncEnumPrintProcessors"
}

func (o *xxx_EnumPrintProcessorsOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if o.PrintProcessorInfo != nil && o.BufferLength == 0 {
		o.BufferLength = uint32(len(o.PrintProcessorInfo))
	}
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPrintProcessorsOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// pName {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Name != "" {
			_ptr_pName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Name); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Name, _ptr_pName); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pEnvironment {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Environment != "" {
			_ptr_pEnvironment := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Environment); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Environment, _ptr_pEnvironment); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// Level {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Level); err != nil {
			return err
		}
	}
	// pPrintProcessorInfo {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		if o.PrintProcessorInfo != nil || o.BufferLength > 0 {
			_ptr_pPrintProcessorInfo := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.BufferLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				for i1 := range o.PrintProcessorInfo {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(o.PrintProcessorInfo[i1]); err != nil {
						return err
					}
				}
				for i1 := len(o.PrintProcessorInfo); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint8(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.PrintProcessorInfo, _ptr_pPrintProcessorInfo); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.BufferLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPrintProcessorsOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// pName {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Name); err != nil {
				return err
			}
			return nil
		})
		_s_pName := func(ptr interface{}) { o.Name = *ptr.(*string) }
		if err := w.ReadPointer(&o.Name, _s_pName, _ptr_pName); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pEnvironment {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pEnvironment := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Environment); err != nil {
				return err
			}
			return nil
		})
		_s_pEnvironment := func(ptr interface{}) { o.Environment = *ptr.(*string) }
		if err := w.ReadPointer(&o.Environment, _s_pEnvironment, _ptr_pEnvironment); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// Level {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Level); err != nil {
			return err
		}
	}
	// pPrintProcessorInfo {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		_ptr_pPrintProcessorInfo := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array o.PrintProcessorInfo", sizeInfo[0])
			}
			o.PrintProcessorInfo = make([]byte, sizeInfo[0])
			for i1 := range o.PrintProcessorInfo {
				i1 := i1
				if err := w.ReadData(&o.PrintProcessorInfo[i1]); err != nil {
					return err
				}
			}
			return nil
		})
		_s_pPrintProcessorInfo := func(ptr interface{}) { o.PrintProcessorInfo = *ptr.(*[]byte) }
		if err := w.ReadPointer(&o.PrintProcessorInfo, _s_pPrintProcessorInfo, _ptr_pPrintProcessorInfo); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.BufferLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPrintProcessorsOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPrintProcessorsOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// pPrintProcessorInfo {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		if o.PrintProcessorInfo != nil || o.BufferLength > 0 {
			_ptr_pPrintProcessorInfo := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.BufferLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				for i1 := range o.PrintProcessorInfo {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(o.PrintProcessorInfo[i1]); err != nil {
						return err
					}
				}
				for i1 := len(o.PrintProcessorInfo); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint8(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.PrintProcessorInfo, _ptr_pPrintProcessorInfo); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.NeededLength); err != nil {
			return err
		}
	}
	// pcReturned {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.ReturnedCount); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPrintProcessorsOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// pPrintProcessorInfo {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		_ptr_pPrintProcessorInfo := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array o.PrintProcessorInfo", sizeInfo[0])
			}
			o.PrintProcessorInfo = make([]byte, sizeInfo[0])
			for i1 := range o.PrintProcessorInfo {
				i1 := i1
				if err := w.ReadData(&o.PrintProcessorInfo[i1]); err != nil {
					return err
				}
			}
			return nil
		})
		_s_pPrintProcessorInfo := func(ptr interface{}) { o.PrintProcessorInfo = *ptr.(*[]byte) }
		if err := w.ReadPointer(&o.PrintProcessorInfo, _s_pPrintProcessorInfo, _ptr_pPrintProcessorInfo); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.NeededLength); err != nil {
			return err
		}
	}
	// pcReturned {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.ReturnedCount); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// EnumPrintProcessorsRequest structure represents the RpcAsyncEnumPrintProcessors operation request
type EnumPrintProcessorsRequest struct {
	Name               string `idl:"name:pName;string;pointer:unique" json:"name"`
	Environment        string `idl:"name:pEnvironment;string;pointer:unique" json:"environment"`
	Level              uint32 `idl:"name:Level" json:"level"`
	PrintProcessorInfo []byte `idl:"name:pPrintProcessorInfo;size_is:(cbBuf);pointer:unique" json:"print_processor_info"`
	BufferLength       uint32 `idl:"name:cbBuf" json:"buffer_length"`
}

func (o *EnumPrintProcessorsRequest) xxx_ToOp(ctx context.Context, op *xxx_EnumPrintProcessorsOperation) *xxx_EnumPrintProcessorsOperation {
	if op == nil {
		op = &xxx_EnumPrintProcessorsOperation{}
	}
	if o == nil {
		return op
	}
	op.Name = o.Name
	op.Environment = o.Environment
	op.Level = o.Level
	op.PrintProcessorInfo = o.PrintProcessorInfo
	op.BufferLength = o.BufferLength
	return op
}

func (o *EnumPrintProcessorsRequest) xxx_FromOp(ctx context.Context, op *xxx_EnumPrintProcessorsOperation) {
	if o == nil {
		return
	}
	o.Name = op.Name
	o.Environment = op.Environment
	o.Level = op.Level
	o.PrintProcessorInfo = op.PrintProcessorInfo
	o.BufferLength = op.BufferLength
}
func (o *EnumPrintProcessorsRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *EnumPrintProcessorsRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_EnumPrintProcessorsOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// EnumPrintProcessorsResponse structure represents the RpcAsyncEnumPrintProcessors operation response
type EnumPrintProcessorsResponse struct {
	// XXX: cbBuf is an implicit input depedency for output parameters
	BufferLength uint32 `idl:"name:cbBuf" json:"buffer_length"`

	PrintProcessorInfo []byte `idl:"name:pPrintProcessorInfo;size_is:(cbBuf);pointer:unique" json:"print_processor_info"`
	NeededLength       uint32 `idl:"name:pcbNeeded" json:"needed_length"`
	ReturnedCount      uint32 `idl:"name:pcReturned" json:"returned_count"`
	// Return: The RpcAsyncEnumPrintProcessors return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *EnumPrintProcessorsResponse) xxx_ToOp(ctx context.Context, op *xxx_EnumPrintProcessorsOperation) *xxx_EnumPrintProcessorsOperation {
	if op == nil {
		op = &xxx_EnumPrintProcessorsOperation{}
	}
	if o == nil {
		return op
	}
	// XXX: implicit input dependencies for output parameters
	if op.BufferLength == uint32(0) {
		op.BufferLength = o.BufferLength
	}

	op.PrintProcessorInfo = o.PrintProcessorInfo
	op.NeededLength = o.NeededLength
	op.ReturnedCount = o.ReturnedCount
	op.Return = o.Return
	return op
}

func (o *EnumPrintProcessorsResponse) xxx_FromOp(ctx context.Context, op *xxx_EnumPrintProcessorsOperation) {
	if o == nil {
		return
	}
	// XXX: implicit input dependencies for output parameters
	o.BufferLength = op.BufferLength

	o.PrintProcessorInfo = op.PrintProcessorInfo
	o.NeededLength = op.NeededLength
	o.ReturnedCount = op.ReturnedCount
	o.Return = op.Return
}
func (o *EnumPrintProcessorsResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *EnumPrintProcessorsResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_EnumPrintProcessorsOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_GetPrintProcessorDirectoryOperation structure represents the RpcAsyncGetPrintProcessorDirectory operation
type xxx_GetPrintProcessorDirectoryOperation struct {
	Name                    string `idl:"name:pName;string;pointer:unique" json:"name"`
	Environment             string `idl:"name:pEnvironment;string;pointer:unique" json:"environment"`
	Level                   uint32 `idl:"name:Level" json:"level"`
	PrintProcessorDirectory []byte `idl:"name:pPrintProcessorDirectory;size_is:(cbBuf);pointer:unique" json:"print_processor_directory"`
	BufferLength            uint32 `idl:"name:cbBuf" json:"buffer_length"`
	NeededLength            uint32 `idl:"name:pcbNeeded" json:"needed_length"`
	Return                  uint32 `idl:"name:Return" json:"return"`
}

func (o *xxx_GetPrintProcessorDirectoryOperation) OpNum() int { return 46 }

func (o *xxx_GetPrintProcessorDirectoryOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncGetPrintProcessorDirectory"
}

func (o *xxx_GetPrintProcessorDirectoryOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if o.PrintProcessorDirectory != nil && o.BufferLength == 0 {
		o.BufferLength = uint32(len(o.PrintProcessorDirectory))
	}
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetPrintProcessorDirectoryOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// pName {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Name != "" {
			_ptr_pName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Name); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Name, _ptr_pName); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pEnvironment {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Environment != "" {
			_ptr_pEnvironment := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Environment); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Environment, _ptr_pEnvironment); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// Level {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Level); err != nil {
			return err
		}
	}
	// pPrintProcessorDirectory {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		if o.PrintProcessorDirectory != nil || o.BufferLength > 0 {
			_ptr_pPrintProcessorDirectory := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.BufferLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				for i1 := range o.PrintProcessorDirectory {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(o.PrintProcessorDirectory[i1]); err != nil {
						return err
					}
				}
				for i1 := len(o.PrintProcessorDirectory); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint8(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.PrintProcessorDirectory, _ptr_pPrintProcessorDirectory); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.BufferLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetPrintProcessorDirectoryOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// pName {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Name); err != nil {
				return err
			}
			return nil
		})
		_s_pName := func(ptr interface{}) { o.Name = *ptr.(*string) }
		if err := w.ReadPointer(&o.Name, _s_pName, _ptr_pName); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pEnvironment {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pEnvironment := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Environment); err != nil {
				return err
			}
			return nil
		})
		_s_pEnvironment := func(ptr interface{}) { o.Environment = *ptr.(*string) }
		if err := w.ReadPointer(&o.Environment, _s_pEnvironment, _ptr_pEnvironment); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// Level {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Level); err != nil {
			return err
		}
	}
	// pPrintProcessorDirectory {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		_ptr_pPrintProcessorDirectory := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array o.PrintProcessorDirectory", sizeInfo[0])
			}
			o.PrintProcessorDirectory = make([]byte, sizeInfo[0])
			for i1 := range o.PrintProcessorDirectory {
				i1 := i1
				if err := w.ReadData(&o.PrintProcessorDirectory[i1]); err != nil {
					return err
				}
			}
			return nil
		})
		_s_pPrintProcessorDirectory := func(ptr interface{}) { o.PrintProcessorDirectory = *ptr.(*[]byte) }
		if err := w.ReadPointer(&o.PrintProcessorDirectory, _s_pPrintProcessorDirectory, _ptr_pPrintProcessorDirectory); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.BufferLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetPrintProcessorDirectoryOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetPrintProcessorDirectoryOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// pPrintProcessorDirectory {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		if o.PrintProcessorDirectory != nil || o.BufferLength > 0 {
			_ptr_pPrintProcessorDirectory := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.BufferLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				for i1 := range o.PrintProcessorDirectory {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(o.PrintProcessorDirectory[i1]); err != nil {
						return err
					}
				}
				for i1 := len(o.PrintProcessorDirectory); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint8(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.PrintProcessorDirectory, _ptr_pPrintProcessorDirectory); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.NeededLength); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetPrintProcessorDirectoryOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// pPrintProcessorDirectory {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		_ptr_pPrintProcessorDirectory := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array o.PrintProcessorDirectory", sizeInfo[0])
			}
			o.PrintProcessorDirectory = make([]byte, sizeInfo[0])
			for i1 := range o.PrintProcessorDirectory {
				i1 := i1
				if err := w.ReadData(&o.PrintProcessorDirectory[i1]); err != nil {
					return err
				}
			}
			return nil
		})
		_s_pPrintProcessorDirectory := func(ptr interface{}) { o.PrintProcessorDirectory = *ptr.(*[]byte) }
		if err := w.ReadPointer(&o.PrintProcessorDirectory, _s_pPrintProcessorDirectory, _ptr_pPrintProcessorDirectory); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.NeededLength); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// GetPrintProcessorDirectoryRequest structure represents the RpcAsyncGetPrintProcessorDirectory operation request
type GetPrintProcessorDirectoryRequest struct {
	Name                    string `idl:"name:pName;string;pointer:unique" json:"name"`
	Environment             string `idl:"name:pEnvironment;string;pointer:unique" json:"environment"`
	Level                   uint32 `idl:"name:Level" json:"level"`
	PrintProcessorDirectory []byte `idl:"name:pPrintProcessorDirectory;size_is:(cbBuf);pointer:unique" json:"print_processor_directory"`
	BufferLength            uint32 `idl:"name:cbBuf" json:"buffer_length"`
}

func (o *GetPrintProcessorDirectoryRequest) xxx_ToOp(ctx context.Context, op *xxx_GetPrintProcessorDirectoryOperation) *xxx_GetPrintProcessorDirectoryOperation {
	if op == nil {
		op = &xxx_GetPrintProcessorDirectoryOperation{}
	}
	if o == nil {
		return op
	}
	op.Name = o.Name
	op.Environment = o.Environment
	op.Level = o.Level
	op.PrintProcessorDirectory = o.PrintProcessorDirectory
	op.BufferLength = o.BufferLength
	return op
}

func (o *GetPrintProcessorDirectoryRequest) xxx_FromOp(ctx context.Context, op *xxx_GetPrintProcessorDirectoryOperation) {
	if o == nil {
		return
	}
	o.Name = op.Name
	o.Environment = op.Environment
	o.Level = op.Level
	o.PrintProcessorDirectory = op.PrintProcessorDirectory
	o.BufferLength = op.BufferLength
}
func (o *GetPrintProcessorDirectoryRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *GetPrintProcessorDirectoryRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_GetPrintProcessorDirectoryOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// GetPrintProcessorDirectoryResponse structure represents the RpcAsyncGetPrintProcessorDirectory operation response
type GetPrintProcessorDirectoryResponse struct {
	// XXX: cbBuf is an implicit input depedency for output parameters
	BufferLength uint32 `idl:"name:cbBuf" json:"buffer_length"`

	PrintProcessorDirectory []byte `idl:"name:pPrintProcessorDirectory;size_is:(cbBuf);pointer:unique" json:"print_processor_directory"`
	NeededLength            uint32 `idl:"name:pcbNeeded" json:"needed_length"`
	// Return: The RpcAsyncGetPrintProcessorDirectory return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *GetPrintProcessorDirectoryResponse) xxx_ToOp(ctx context.Context, op *xxx_GetPrintProcessorDirectoryOperation) *xxx_GetPrintProcessorDirectoryOperation {
	if op == nil {
		op = &xxx_GetPrintProcessorDirectoryOperation{}
	}
	if o == nil {
		return op
	}
	// XXX: implicit input dependencies for output parameters
	if op.BufferLength == uint32(0) {
		op.BufferLength = o.BufferLength
	}

	op.PrintProcessorDirectory = o.PrintProcessorDirectory
	op.NeededLength = o.NeededLength
	op.Return = o.Return
	return op
}

func (o *GetPrintProcessorDirectoryResponse) xxx_FromOp(ctx context.Context, op *xxx_GetPrintProcessorDirectoryOperation) {
	if o == nil {
		return
	}
	// XXX: implicit input dependencies for output parameters
	o.BufferLength = op.BufferLength

	o.PrintProcessorDirectory = op.PrintProcessorDirectory
	o.NeededLength = op.NeededLength
	o.Return = op.Return
}
func (o *GetPrintProcessorDirectoryResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *GetPrintProcessorDirectoryResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_GetPrintProcessorDirectoryOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_EnumPortsOperation structure represents the RpcAsyncEnumPorts operation
type xxx_EnumPortsOperation struct {
	Name          string `idl:"name:pName;string;pointer:unique" json:"name"`
	Level         uint32 `idl:"name:Level" json:"level"`
	Port          []byte `idl:"name:pPort;size_is:(cbBuf);pointer:unique" json:"port"`
	BufferLength  uint32 `idl:"name:cbBuf" json:"buffer_length"`
	NeededLength  uint32 `idl:"name:pcbNeeded" json:"needed_length"`
	ReturnedCount uint32 `idl:"name:pcReturned" json:"returned_count"`
	Return        uint32 `idl:"name:Return" json:"return"`
}

func (o *xxx_EnumPortsOperation) OpNum() int { return 47 }

func (o *xxx_EnumPortsOperation) OpName() string { return "/IRemoteWinspool/v1/RpcAsyncEnumPorts" }

func (o *xxx_EnumPortsOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if o.Port != nil && o.BufferLength == 0 {
		o.BufferLength = uint32(len(o.Port))
	}
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPortsOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// pName {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Name != "" {
			_ptr_pName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Name); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Name, _ptr_pName); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// Level {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Level); err != nil {
			return err
		}
	}
	// pPort {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		if o.Port != nil || o.BufferLength > 0 {
			_ptr_pPort := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.BufferLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				for i1 := range o.Port {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(o.Port[i1]); err != nil {
						return err
					}
				}
				for i1 := len(o.Port); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint8(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.Port, _ptr_pPort); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.BufferLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPortsOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// pName {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Name); err != nil {
				return err
			}
			return nil
		})
		_s_pName := func(ptr interface{}) { o.Name = *ptr.(*string) }
		if err := w.ReadPointer(&o.Name, _s_pName, _ptr_pName); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// Level {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Level); err != nil {
			return err
		}
	}
	// pPort {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		_ptr_pPort := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array o.Port", sizeInfo[0])
			}
			o.Port = make([]byte, sizeInfo[0])
			for i1 := range o.Port {
				i1 := i1
				if err := w.ReadData(&o.Port[i1]); err != nil {
					return err
				}
			}
			return nil
		})
		_s_pPort := func(ptr interface{}) { o.Port = *ptr.(*[]byte) }
		if err := w.ReadPointer(&o.Port, _s_pPort, _ptr_pPort); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.BufferLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPortsOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPortsOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// pPort {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		if o.Port != nil || o.BufferLength > 0 {
			_ptr_pPort := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.BufferLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				for i1 := range o.Port {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(o.Port[i1]); err != nil {
						return err
					}
				}
				for i1 := len(o.Port); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint8(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.Port, _ptr_pPort); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.NeededLength); err != nil {
			return err
		}
	}
	// pcReturned {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.ReturnedCount); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPortsOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// pPort {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		_ptr_pPort := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array o.Port", sizeInfo[0])
			}
			o.Port = make([]byte, sizeInfo[0])
			for i1 := range o.Port {
				i1 := i1
				if err := w.ReadData(&o.Port[i1]); err != nil {
					return err
				}
			}
			return nil
		})
		_s_pPort := func(ptr interface{}) { o.Port = *ptr.(*[]byte) }
		if err := w.ReadPointer(&o.Port, _s_pPort, _ptr_pPort); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.NeededLength); err != nil {
			return err
		}
	}
	// pcReturned {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.ReturnedCount); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// EnumPortsRequest structure represents the RpcAsyncEnumPorts operation request
type EnumPortsRequest struct {
	Name         string `idl:"name:pName;string;pointer:unique" json:"name"`
	Level        uint32 `idl:"name:Level" json:"level"`
	Port         []byte `idl:"name:pPort;size_is:(cbBuf);pointer:unique" json:"port"`
	BufferLength uint32 `idl:"name:cbBuf" json:"buffer_length"`
}

func (o *EnumPortsRequest) xxx_ToOp(ctx context.Context, op *xxx_EnumPortsOperation) *xxx_EnumPortsOperation {
	if op == nil {
		op = &xxx_EnumPortsOperation{}
	}
	if o == nil {
		return op
	}
	op.Name = o.Name
	op.Level = o.Level
	op.Port = o.Port
	op.BufferLength = o.BufferLength
	return op
}

func (o *EnumPortsRequest) xxx_FromOp(ctx context.Context, op *xxx_EnumPortsOperation) {
	if o == nil {
		return
	}
	o.Name = op.Name
	o.Level = op.Level
	o.Port = op.Port
	o.BufferLength = op.BufferLength
}
func (o *EnumPortsRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *EnumPortsRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_EnumPortsOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// EnumPortsResponse structure represents the RpcAsyncEnumPorts operation response
type EnumPortsResponse struct {
	// XXX: cbBuf is an implicit input depedency for output parameters
	BufferLength uint32 `idl:"name:cbBuf" json:"buffer_length"`

	Port          []byte `idl:"name:pPort;size_is:(cbBuf);pointer:unique" json:"port"`
	NeededLength  uint32 `idl:"name:pcbNeeded" json:"needed_length"`
	ReturnedCount uint32 `idl:"name:pcReturned" json:"returned_count"`
	// Return: The RpcAsyncEnumPorts return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *EnumPortsResponse) xxx_ToOp(ctx context.Context, op *xxx_EnumPortsOperation) *xxx_EnumPortsOperation {
	if op == nil {
		op = &xxx_EnumPortsOperation{}
	}
	if o == nil {
		return op
	}
	// XXX: implicit input dependencies for output parameters
	if op.BufferLength == uint32(0) {
		op.BufferLength = o.BufferLength
	}

	op.Port = o.Port
	op.NeededLength = o.NeededLength
	op.ReturnedCount = o.ReturnedCount
	op.Return = o.Return
	return op
}

func (o *EnumPortsResponse) xxx_FromOp(ctx context.Context, op *xxx_EnumPortsOperation) {
	if o == nil {
		return
	}
	// XXX: implicit input dependencies for output parameters
	o.BufferLength = op.BufferLength

	o.Port = op.Port
	o.NeededLength = op.NeededLength
	o.ReturnedCount = op.ReturnedCount
	o.Return = op.Return
}
func (o *EnumPortsResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *EnumPortsResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_EnumPortsOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_EnumMonitorsOperation structure represents the RpcAsyncEnumMonitors operation
type xxx_EnumMonitorsOperation struct {
	Name          string `idl:"name:pName;string;pointer:unique" json:"name"`
	Level         uint32 `idl:"name:Level" json:"level"`
	Monitor       []byte `idl:"name:pMonitor;size_is:(cbBuf);pointer:unique" json:"monitor"`
	BufferLength  uint32 `idl:"name:cbBuf" json:"buffer_length"`
	NeededLength  uint32 `idl:"name:pcbNeeded" json:"needed_length"`
	ReturnedCount uint32 `idl:"name:pcReturned" json:"returned_count"`
	Return        uint32 `idl:"name:Return" json:"return"`
}

func (o *xxx_EnumMonitorsOperation) OpNum() int { return 48 }

func (o *xxx_EnumMonitorsOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncEnumMonitors"
}

func (o *xxx_EnumMonitorsOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if o.Monitor != nil && o.BufferLength == 0 {
		o.BufferLength = uint32(len(o.Monitor))
	}
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumMonitorsOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// pName {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Name != "" {
			_ptr_pName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Name); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Name, _ptr_pName); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// Level {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Level); err != nil {
			return err
		}
	}
	// pMonitor {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		if o.Monitor != nil || o.BufferLength > 0 {
			_ptr_pMonitor := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.BufferLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				for i1 := range o.Monitor {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(o.Monitor[i1]); err != nil {
						return err
					}
				}
				for i1 := len(o.Monitor); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint8(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.Monitor, _ptr_pMonitor); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.BufferLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumMonitorsOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// pName {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Name); err != nil {
				return err
			}
			return nil
		})
		_s_pName := func(ptr interface{}) { o.Name = *ptr.(*string) }
		if err := w.ReadPointer(&o.Name, _s_pName, _ptr_pName); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// Level {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Level); err != nil {
			return err
		}
	}
	// pMonitor {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		_ptr_pMonitor := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array o.Monitor", sizeInfo[0])
			}
			o.Monitor = make([]byte, sizeInfo[0])
			for i1 := range o.Monitor {
				i1 := i1
				if err := w.ReadData(&o.Monitor[i1]); err != nil {
					return err
				}
			}
			return nil
		})
		_s_pMonitor := func(ptr interface{}) { o.Monitor = *ptr.(*[]byte) }
		if err := w.ReadPointer(&o.Monitor, _s_pMonitor, _ptr_pMonitor); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.BufferLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumMonitorsOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumMonitorsOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// pMonitor {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		if o.Monitor != nil || o.BufferLength > 0 {
			_ptr_pMonitor := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.BufferLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				for i1 := range o.Monitor {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(o.Monitor[i1]); err != nil {
						return err
					}
				}
				for i1 := len(o.Monitor); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint8(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.Monitor, _ptr_pMonitor); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.NeededLength); err != nil {
			return err
		}
	}
	// pcReturned {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.ReturnedCount); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumMonitorsOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// pMonitor {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		_ptr_pMonitor := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array o.Monitor", sizeInfo[0])
			}
			o.Monitor = make([]byte, sizeInfo[0])
			for i1 := range o.Monitor {
				i1 := i1
				if err := w.ReadData(&o.Monitor[i1]); err != nil {
					return err
				}
			}
			return nil
		})
		_s_pMonitor := func(ptr interface{}) { o.Monitor = *ptr.(*[]byte) }
		if err := w.ReadPointer(&o.Monitor, _s_pMonitor, _ptr_pMonitor); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.NeededLength); err != nil {
			return err
		}
	}
	// pcReturned {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.ReturnedCount); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// EnumMonitorsRequest structure represents the RpcAsyncEnumMonitors operation request
type EnumMonitorsRequest struct {
	Name         string `idl:"name:pName;string;pointer:unique" json:"name"`
	Level        uint32 `idl:"name:Level" json:"level"`
	Monitor      []byte `idl:"name:pMonitor;size_is:(cbBuf);pointer:unique" json:"monitor"`
	BufferLength uint32 `idl:"name:cbBuf" json:"buffer_length"`
}

func (o *EnumMonitorsRequest) xxx_ToOp(ctx context.Context, op *xxx_EnumMonitorsOperation) *xxx_EnumMonitorsOperation {
	if op == nil {
		op = &xxx_EnumMonitorsOperation{}
	}
	if o == nil {
		return op
	}
	op.Name = o.Name
	op.Level = o.Level
	op.Monitor = o.Monitor
	op.BufferLength = o.BufferLength
	return op
}

func (o *EnumMonitorsRequest) xxx_FromOp(ctx context.Context, op *xxx_EnumMonitorsOperation) {
	if o == nil {
		return
	}
	o.Name = op.Name
	o.Level = op.Level
	o.Monitor = op.Monitor
	o.BufferLength = op.BufferLength
}
func (o *EnumMonitorsRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *EnumMonitorsRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_EnumMonitorsOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// EnumMonitorsResponse structure represents the RpcAsyncEnumMonitors operation response
type EnumMonitorsResponse struct {
	// XXX: cbBuf is an implicit input depedency for output parameters
	BufferLength uint32 `idl:"name:cbBuf" json:"buffer_length"`

	Monitor       []byte `idl:"name:pMonitor;size_is:(cbBuf);pointer:unique" json:"monitor"`
	NeededLength  uint32 `idl:"name:pcbNeeded" json:"needed_length"`
	ReturnedCount uint32 `idl:"name:pcReturned" json:"returned_count"`
	// Return: The RpcAsyncEnumMonitors return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *EnumMonitorsResponse) xxx_ToOp(ctx context.Context, op *xxx_EnumMonitorsOperation) *xxx_EnumMonitorsOperation {
	if op == nil {
		op = &xxx_EnumMonitorsOperation{}
	}
	if o == nil {
		return op
	}
	// XXX: implicit input dependencies for output parameters
	if op.BufferLength == uint32(0) {
		op.BufferLength = o.BufferLength
	}

	op.Monitor = o.Monitor
	op.NeededLength = o.NeededLength
	op.ReturnedCount = o.ReturnedCount
	op.Return = o.Return
	return op
}

func (o *EnumMonitorsResponse) xxx_FromOp(ctx context.Context, op *xxx_EnumMonitorsOperation) {
	if o == nil {
		return
	}
	// XXX: implicit input dependencies for output parameters
	o.BufferLength = op.BufferLength

	o.Monitor = op.Monitor
	o.NeededLength = op.NeededLength
	o.ReturnedCount = op.ReturnedCount
	o.Return = op.Return
}
func (o *EnumMonitorsResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *EnumMonitorsResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_EnumMonitorsOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_AddPortOperation structure represents the RpcAsyncAddPort operation
type xxx_AddPortOperation struct {
	Name             string            `idl:"name:pName;string;pointer:unique" json:"name"`
	PortContainer    *PortContainer    `idl:"name:pPortContainer" json:"port_container"`
	PortVarContainer *PortVarContainer `idl:"name:pPortVarContainer" json:"port_var_container"`
	MonitorName      string            `idl:"name:pMonitorName;string" json:"monitor_name"`
	Return           uint32            `idl:"name:Return" json:"return"`
}

func (o *xxx_AddPortOperation) OpNum() int { return 49 }

func (o *xxx_AddPortOperation) OpName() string { return "/IRemoteWinspool/v1/RpcAsyncAddPort" }

func (o *xxx_AddPortOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddPortOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// pName {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Name != "" {
			_ptr_pName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Name); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Name, _ptr_pName); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pPortContainer {in} (1:{pointer=ref}*(1))(2:{alias=PORT_CONTAINER}(struct))
	{
		if o.PortContainer != nil {
			if err := o.PortContainer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PortContainer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pPortVarContainer {in} (1:{pointer=ref}*(1))(2:{alias=PORT_VAR_CONTAINER}(struct))
	{
		if o.PortVarContainer != nil {
			if err := o.PortVarContainer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PortVarContainer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pMonitorName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.MonitorName); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddPortOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// pName {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Name); err != nil {
				return err
			}
			return nil
		})
		_s_pName := func(ptr interface{}) { o.Name = *ptr.(*string) }
		if err := w.ReadPointer(&o.Name, _s_pName, _ptr_pName); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pPortContainer {in} (1:{pointer=ref}*(1))(2:{alias=PORT_CONTAINER}(struct))
	{
		if o.PortContainer == nil {
			o.PortContainer = &PortContainer{}
		}
		if err := o.PortContainer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pPortVarContainer {in} (1:{pointer=ref}*(1))(2:{alias=PORT_VAR_CONTAINER}(struct))
	{
		if o.PortVarContainer == nil {
			o.PortVarContainer = &PortVarContainer{}
		}
		if err := o.PortVarContainer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pMonitorName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.MonitorName); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddPortOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddPortOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddPortOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// AddPortRequest structure represents the RpcAsyncAddPort operation request
type AddPortRequest struct {
	Name             string            `idl:"name:pName;string;pointer:unique" json:"name"`
	PortContainer    *PortContainer    `idl:"name:pPortContainer" json:"port_container"`
	PortVarContainer *PortVarContainer `idl:"name:pPortVarContainer" json:"port_var_container"`
	MonitorName      string            `idl:"name:pMonitorName;string" json:"monitor_name"`
}

func (o *AddPortRequest) xxx_ToOp(ctx context.Context, op *xxx_AddPortOperation) *xxx_AddPortOperation {
	if op == nil {
		op = &xxx_AddPortOperation{}
	}
	if o == nil {
		return op
	}
	op.Name = o.Name
	op.PortContainer = o.PortContainer
	op.PortVarContainer = o.PortVarContainer
	op.MonitorName = o.MonitorName
	return op
}

func (o *AddPortRequest) xxx_FromOp(ctx context.Context, op *xxx_AddPortOperation) {
	if o == nil {
		return
	}
	o.Name = op.Name
	o.PortContainer = op.PortContainer
	o.PortVarContainer = op.PortVarContainer
	o.MonitorName = op.MonitorName
}
func (o *AddPortRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *AddPortRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_AddPortOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// AddPortResponse structure represents the RpcAsyncAddPort operation response
type AddPortResponse struct {
	// Return: The RpcAsyncAddPort return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *AddPortResponse) xxx_ToOp(ctx context.Context, op *xxx_AddPortOperation) *xxx_AddPortOperation {
	if op == nil {
		op = &xxx_AddPortOperation{}
	}
	if o == nil {
		return op
	}
	op.Return = o.Return
	return op
}

func (o *AddPortResponse) xxx_FromOp(ctx context.Context, op *xxx_AddPortOperation) {
	if o == nil {
		return
	}
	o.Return = op.Return
}
func (o *AddPortResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *AddPortResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_AddPortOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_SetPortOperation structure represents the RpcAsyncSetPort operation
type xxx_SetPortOperation struct {
	Name          string         `idl:"name:pName;string;pointer:unique" json:"name"`
	PortName      string         `idl:"name:pPortName;string;pointer:unique" json:"port_name"`
	PortContainer *PortContainer `idl:"name:pPortContainer" json:"port_container"`
	Return        uint32         `idl:"name:Return" json:"return"`
}

func (o *xxx_SetPortOperation) OpNum() int { return 50 }

func (o *xxx_SetPortOperation) OpName() string { return "/IRemoteWinspool/v1/RpcAsyncSetPort" }

func (o *xxx_SetPortOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SetPortOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// pName {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Name != "" {
			_ptr_pName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Name); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Name, _ptr_pName); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pPortName {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.PortName != "" {
			_ptr_pPortName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.PortName); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.PortName, _ptr_pPortName); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pPortContainer {in} (1:{pointer=ref}*(1))(2:{alias=PORT_CONTAINER}(struct))
	{
		if o.PortContainer != nil {
			if err := o.PortContainer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PortContainer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SetPortOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// pName {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Name); err != nil {
				return err
			}
			return nil
		})
		_s_pName := func(ptr interface{}) { o.Name = *ptr.(*string) }
		if err := w.ReadPointer(&o.Name, _s_pName, _ptr_pName); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pPortName {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pPortName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.PortName); err != nil {
				return err
			}
			return nil
		})
		_s_pPortName := func(ptr interface{}) { o.PortName = *ptr.(*string) }
		if err := w.ReadPointer(&o.PortName, _s_pPortName, _ptr_pPortName); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pPortContainer {in} (1:{pointer=ref}*(1))(2:{alias=PORT_CONTAINER}(struct))
	{
		if o.PortContainer == nil {
			o.PortContainer = &PortContainer{}
		}
		if err := o.PortContainer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SetPortOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SetPortOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SetPortOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// SetPortRequest structure represents the RpcAsyncSetPort operation request
type SetPortRequest struct {
	Name          string         `idl:"name:pName;string;pointer:unique" json:"name"`
	PortName      string         `idl:"name:pPortName;string;pointer:unique" json:"port_name"`
	PortContainer *PortContainer `idl:"name:pPortContainer" json:"port_container"`
}

func (o *SetPortRequest) xxx_ToOp(ctx context.Context, op *xxx_SetPortOperation) *xxx_SetPortOperation {
	if op == nil {
		op = &xxx_SetPortOperation{}
	}
	if o == nil {
		return op
	}
	op.Name = o.Name
	op.PortName = o.PortName
	op.PortContainer = o.PortContainer
	return op
}

func (o *SetPortRequest) xxx_FromOp(ctx context.Context, op *xxx_SetPortOperation) {
	if o == nil {
		return
	}
	o.Name = op.Name
	o.PortName = op.PortName
	o.PortContainer = op.PortContainer
}
func (o *SetPortRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *SetPortRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_SetPortOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// SetPortResponse structure represents the RpcAsyncSetPort operation response
type SetPortResponse struct {
	// Return: The RpcAsyncSetPort return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *SetPortResponse) xxx_ToOp(ctx context.Context, op *xxx_SetPortOperation) *xxx_SetPortOperation {
	if op == nil {
		op = &xxx_SetPortOperation{}
	}
	if o == nil {
		return op
	}
	op.Return = o.Return
	return op
}

func (o *SetPortResponse) xxx_FromOp(ctx context.Context, op *xxx_SetPortOperation) {
	if o == nil {
		return
	}
	o.Return = op.Return
}
func (o *SetPortResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *SetPortResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_SetPortOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_AddMonitorOperation structure represents the RpcAsyncAddMonitor operation
type xxx_AddMonitorOperation struct {
	Name             string            `idl:"name:Name;string;pointer:unique" json:"name"`
	MonitorContainer *MonitorContainer `idl:"name:pMonitorContainer" json:"monitor_container"`
	Return           uint32            `idl:"name:Return" json:"return"`
}

func (o *xxx_AddMonitorOperation) OpNum() int { return 51 }

func (o *xxx_AddMonitorOperation) OpName() string { return "/IRemoteWinspool/v1/RpcAsyncAddMonitor" }

func (o *xxx_AddMonitorOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddMonitorOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// Name {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Name != "" {
			_ptr_Name := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Name); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Name, _ptr_Name); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pMonitorContainer {in} (1:{pointer=ref}*(1))(2:{alias=MONITOR_CONTAINER}(struct))
	{
		if o.MonitorContainer != nil {
			if err := o.MonitorContainer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&MonitorContainer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddMonitorOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// Name {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_Name := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Name); err != nil {
				return err
			}
			return nil
		})
		_s_Name := func(ptr interface{}) { o.Name = *ptr.(*string) }
		if err := w.ReadPointer(&o.Name, _s_Name, _ptr_Name); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pMonitorContainer {in} (1:{pointer=ref}*(1))(2:{alias=MONITOR_CONTAINER}(struct))
	{
		if o.MonitorContainer == nil {
			o.MonitorContainer = &MonitorContainer{}
		}
		if err := o.MonitorContainer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddMonitorOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddMonitorOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddMonitorOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// AddMonitorRequest structure represents the RpcAsyncAddMonitor operation request
type AddMonitorRequest struct {
	Name             string            `idl:"name:Name;string;pointer:unique" json:"name"`
	MonitorContainer *MonitorContainer `idl:"name:pMonitorContainer" json:"monitor_container"`
}

func (o *AddMonitorRequest) xxx_ToOp(ctx context.Context, op *xxx_AddMonitorOperation) *xxx_AddMonitorOperation {
	if op == nil {
		op = &xxx_AddMonitorOperation{}
	}
	if o == nil {
		return op
	}
	op.Name = o.Name
	op.MonitorContainer = o.MonitorContainer
	return op
}

func (o *AddMonitorRequest) xxx_FromOp(ctx context.Context, op *xxx_AddMonitorOperation) {
	if o == nil {
		return
	}
	o.Name = op.Name
	o.MonitorContainer = op.MonitorContainer
}
func (o *AddMonitorRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *AddMonitorRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_AddMonitorOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// AddMonitorResponse structure represents the RpcAsyncAddMonitor operation response
type AddMonitorResponse struct {
	// Return: The RpcAsyncAddMonitor return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *AddMonitorResponse) xxx_ToOp(ctx context.Context, op *xxx_AddMonitorOperation) *xxx_AddMonitorOperation {
	if op == nil {
		op = &xxx_AddMonitorOperation{}
	}
	if o == nil {
		return op
	}
	op.Return = o.Return
	return op
}

func (o *AddMonitorResponse) xxx_FromOp(ctx context.Context, op *xxx_AddMonitorOperation) {
	if o == nil {
		return
	}
	o.Return = op.Return
}
func (o *AddMonitorResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *AddMonitorResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_AddMonitorOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_DeleteMonitorOperation structure represents the RpcAsyncDeleteMonitor operation
type xxx_DeleteMonitorOperation struct {
	Name        string `idl:"name:Name;string;pointer:unique" json:"name"`
	Environment string `idl:"name:pEnvironment;string;pointer:unique" json:"environment"`
	MonitorName string `idl:"name:pMonitorName;string" json:"monitor_name"`
	Return      uint32 `idl:"name:Return" json:"return"`
}

func (o *xxx_DeleteMonitorOperation) OpNum() int { return 52 }

func (o *xxx_DeleteMonitorOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncDeleteMonitor"
}

func (o *xxx_DeleteMonitorOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeleteMonitorOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// Name {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Name != "" {
			_ptr_Name := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Name); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Name, _ptr_Name); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pEnvironment {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Environment != "" {
			_ptr_pEnvironment := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Environment); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Environment, _ptr_pEnvironment); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pMonitorName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.MonitorName); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeleteMonitorOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// Name {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_Name := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Name); err != nil {
				return err
			}
			return nil
		})
		_s_Name := func(ptr interface{}) { o.Name = *ptr.(*string) }
		if err := w.ReadPointer(&o.Name, _s_Name, _ptr_Name); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pEnvironment {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pEnvironment := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Environment); err != nil {
				return err
			}
			return nil
		})
		_s_pEnvironment := func(ptr interface{}) { o.Environment = *ptr.(*string) }
		if err := w.ReadPointer(&o.Environment, _s_pEnvironment, _ptr_pEnvironment); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pMonitorName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.MonitorName); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeleteMonitorOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeleteMonitorOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeleteMonitorOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// DeleteMonitorRequest structure represents the RpcAsyncDeleteMonitor operation request
type DeleteMonitorRequest struct {
	Name        string `idl:"name:Name;string;pointer:unique" json:"name"`
	Environment string `idl:"name:pEnvironment;string;pointer:unique" json:"environment"`
	MonitorName string `idl:"name:pMonitorName;string" json:"monitor_name"`
}

func (o *DeleteMonitorRequest) xxx_ToOp(ctx context.Context, op *xxx_DeleteMonitorOperation) *xxx_DeleteMonitorOperation {
	if op == nil {
		op = &xxx_DeleteMonitorOperation{}
	}
	if o == nil {
		return op
	}
	op.Name = o.Name
	op.Environment = o.Environment
	op.MonitorName = o.MonitorName
	return op
}

func (o *DeleteMonitorRequest) xxx_FromOp(ctx context.Context, op *xxx_DeleteMonitorOperation) {
	if o == nil {
		return
	}
	o.Name = op.Name
	o.Environment = op.Environment
	o.MonitorName = op.MonitorName
}
func (o *DeleteMonitorRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *DeleteMonitorRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_DeleteMonitorOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// DeleteMonitorResponse structure represents the RpcAsyncDeleteMonitor operation response
type DeleteMonitorResponse struct {
	// Return: The RpcAsyncDeleteMonitor return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *DeleteMonitorResponse) xxx_ToOp(ctx context.Context, op *xxx_DeleteMonitorOperation) *xxx_DeleteMonitorOperation {
	if op == nil {
		op = &xxx_DeleteMonitorOperation{}
	}
	if o == nil {
		return op
	}
	op.Return = o.Return
	return op
}

func (o *DeleteMonitorResponse) xxx_FromOp(ctx context.Context, op *xxx_DeleteMonitorOperation) {
	if o == nil {
		return
	}
	o.Return = op.Return
}
func (o *DeleteMonitorResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *DeleteMonitorResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_DeleteMonitorOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_DeletePrintProcessorOperation structure represents the RpcAsyncDeletePrintProcessor operation
type xxx_DeletePrintProcessorOperation struct {
	Name               string `idl:"name:Name;string;pointer:unique" json:"name"`
	Environment        string `idl:"name:pEnvironment;string;pointer:unique" json:"environment"`
	PrintProcessorName string `idl:"name:pPrintProcessorName;string" json:"print_processor_name"`
	Return             uint32 `idl:"name:Return" json:"return"`
}

func (o *xxx_DeletePrintProcessorOperation) OpNum() int { return 53 }

func (o *xxx_DeletePrintProcessorOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncDeletePrintProcessor"
}

func (o *xxx_DeletePrintProcessorOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrintProcessorOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// Name {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Name != "" {
			_ptr_Name := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Name); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Name, _ptr_Name); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pEnvironment {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Environment != "" {
			_ptr_pEnvironment := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Environment); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Environment, _ptr_pEnvironment); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pPrintProcessorName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.PrintProcessorName); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrintProcessorOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// Name {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_Name := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Name); err != nil {
				return err
			}
			return nil
		})
		_s_Name := func(ptr interface{}) { o.Name = *ptr.(*string) }
		if err := w.ReadPointer(&o.Name, _s_Name, _ptr_Name); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pEnvironment {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pEnvironment := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Environment); err != nil {
				return err
			}
			return nil
		})
		_s_pEnvironment := func(ptr interface{}) { o.Environment = *ptr.(*string) }
		if err := w.ReadPointer(&o.Environment, _s_pEnvironment, _ptr_pEnvironment); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pPrintProcessorName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.PrintProcessorName); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrintProcessorOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrintProcessorOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrintProcessorOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// DeletePrintProcessorRequest structure represents the RpcAsyncDeletePrintProcessor operation request
type DeletePrintProcessorRequest struct {
	Name               string `idl:"name:Name;string;pointer:unique" json:"name"`
	Environment        string `idl:"name:pEnvironment;string;pointer:unique" json:"environment"`
	PrintProcessorName string `idl:"name:pPrintProcessorName;string" json:"print_processor_name"`
}

func (o *DeletePrintProcessorRequest) xxx_ToOp(ctx context.Context, op *xxx_DeletePrintProcessorOperation) *xxx_DeletePrintProcessorOperation {
	if op == nil {
		op = &xxx_DeletePrintProcessorOperation{}
	}
	if o == nil {
		return op
	}
	op.Name = o.Name
	op.Environment = o.Environment
	op.PrintProcessorName = o.PrintProcessorName
	return op
}

func (o *DeletePrintProcessorRequest) xxx_FromOp(ctx context.Context, op *xxx_DeletePrintProcessorOperation) {
	if o == nil {
		return
	}
	o.Name = op.Name
	o.Environment = op.Environment
	o.PrintProcessorName = op.PrintProcessorName
}
func (o *DeletePrintProcessorRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *DeletePrintProcessorRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_DeletePrintProcessorOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// DeletePrintProcessorResponse structure represents the RpcAsyncDeletePrintProcessor operation response
type DeletePrintProcessorResponse struct {
	// Return: The RpcAsyncDeletePrintProcessor return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *DeletePrintProcessorResponse) xxx_ToOp(ctx context.Context, op *xxx_DeletePrintProcessorOperation) *xxx_DeletePrintProcessorOperation {
	if op == nil {
		op = &xxx_DeletePrintProcessorOperation{}
	}
	if o == nil {
		return op
	}
	op.Return = o.Return
	return op
}

func (o *DeletePrintProcessorResponse) xxx_FromOp(ctx context.Context, op *xxx_DeletePrintProcessorOperation) {
	if o == nil {
		return
	}
	o.Return = op.Return
}
func (o *DeletePrintProcessorResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *DeletePrintProcessorResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_DeletePrintProcessorOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_EnumPrintProcessorDataTypesOperation structure represents the RpcAsyncEnumPrintProcessorDatatypes operation
type xxx_EnumPrintProcessorDataTypesOperation struct {
	Name               string `idl:"name:pName;string;pointer:unique" json:"name"`
	PrintProcessorName string `idl:"name:pPrintProcessorName;string;pointer:unique" json:"print_processor_name"`
	Level              uint32 `idl:"name:Level" json:"level"`
	DataTypes          []byte `idl:"name:pDatatypes;size_is:(cbBuf);pointer:unique" json:"data_types"`
	BufferLength       uint32 `idl:"name:cbBuf" json:"buffer_length"`
	NeededLength       uint32 `idl:"name:pcbNeeded" json:"needed_length"`
	ReturnedCount      uint32 `idl:"name:pcReturned" json:"returned_count"`
	Return             uint32 `idl:"name:Return" json:"return"`
}

func (o *xxx_EnumPrintProcessorDataTypesOperation) OpNum() int { return 54 }

func (o *xxx_EnumPrintProcessorDataTypesOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncEnumPrintProcessorDatatypes"
}

func (o *xxx_EnumPrintProcessorDataTypesOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if o.DataTypes != nil && o.BufferLength == 0 {
		o.BufferLength = uint32(len(o.DataTypes))
	}
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPrintProcessorDataTypesOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// pName {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Name != "" {
			_ptr_pName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Name); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Name, _ptr_pName); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pPrintProcessorName {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.PrintProcessorName != "" {
			_ptr_pPrintProcessorName := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.PrintProcessorName); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.PrintProcessorName, _ptr_pPrintProcessorName); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// Level {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Level); err != nil {
			return err
		}
	}
	// pDatatypes {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		if o.DataTypes != nil || o.BufferLength > 0 {
			_ptr_pDatatypes := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.BufferLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				for i1 := range o.DataTypes {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(o.DataTypes[i1]); err != nil {
						return err
					}
				}
				for i1 := len(o.DataTypes); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint8(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.DataTypes, _ptr_pDatatypes); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.BufferLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPrintProcessorDataTypesOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// pName {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Name); err != nil {
				return err
			}
			return nil
		})
		_s_pName := func(ptr interface{}) { o.Name = *ptr.(*string) }
		if err := w.ReadPointer(&o.Name, _s_pName, _ptr_pName); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pPrintProcessorName {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pPrintProcessorName := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.PrintProcessorName); err != nil {
				return err
			}
			return nil
		})
		_s_pPrintProcessorName := func(ptr interface{}) { o.PrintProcessorName = *ptr.(*string) }
		if err := w.ReadPointer(&o.PrintProcessorName, _s_pPrintProcessorName, _ptr_pPrintProcessorName); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// Level {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Level); err != nil {
			return err
		}
	}
	// pDatatypes {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		_ptr_pDatatypes := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array o.DataTypes", sizeInfo[0])
			}
			o.DataTypes = make([]byte, sizeInfo[0])
			for i1 := range o.DataTypes {
				i1 := i1
				if err := w.ReadData(&o.DataTypes[i1]); err != nil {
					return err
				}
			}
			return nil
		})
		_s_pDatatypes := func(ptr interface{}) { o.DataTypes = *ptr.(*[]byte) }
		if err := w.ReadPointer(&o.DataTypes, _s_pDatatypes, _ptr_pDatatypes); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.BufferLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPrintProcessorDataTypesOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPrintProcessorDataTypesOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// pDatatypes {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		if o.DataTypes != nil || o.BufferLength > 0 {
			_ptr_pDatatypes := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.BufferLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				for i1 := range o.DataTypes {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(o.DataTypes[i1]); err != nil {
						return err
					}
				}
				for i1 := len(o.DataTypes); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint8(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.DataTypes, _ptr_pDatatypes); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.NeededLength); err != nil {
			return err
		}
	}
	// pcReturned {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.ReturnedCount); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPrintProcessorDataTypesOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// pDatatypes {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		_ptr_pDatatypes := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array o.DataTypes", sizeInfo[0])
			}
			o.DataTypes = make([]byte, sizeInfo[0])
			for i1 := range o.DataTypes {
				i1 := i1
				if err := w.ReadData(&o.DataTypes[i1]); err != nil {
					return err
				}
			}
			return nil
		})
		_s_pDatatypes := func(ptr interface{}) { o.DataTypes = *ptr.(*[]byte) }
		if err := w.ReadPointer(&o.DataTypes, _s_pDatatypes, _ptr_pDatatypes); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.NeededLength); err != nil {
			return err
		}
	}
	// pcReturned {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.ReturnedCount); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// EnumPrintProcessorDataTypesRequest structure represents the RpcAsyncEnumPrintProcessorDatatypes operation request
type EnumPrintProcessorDataTypesRequest struct {
	Name               string `idl:"name:pName;string;pointer:unique" json:"name"`
	PrintProcessorName string `idl:"name:pPrintProcessorName;string;pointer:unique" json:"print_processor_name"`
	Level              uint32 `idl:"name:Level" json:"level"`
	DataTypes          []byte `idl:"name:pDatatypes;size_is:(cbBuf);pointer:unique" json:"data_types"`
	BufferLength       uint32 `idl:"name:cbBuf" json:"buffer_length"`
}

func (o *EnumPrintProcessorDataTypesRequest) xxx_ToOp(ctx context.Context, op *xxx_EnumPrintProcessorDataTypesOperation) *xxx_EnumPrintProcessorDataTypesOperation {
	if op == nil {
		op = &xxx_EnumPrintProcessorDataTypesOperation{}
	}
	if o == nil {
		return op
	}
	op.Name = o.Name
	op.PrintProcessorName = o.PrintProcessorName
	op.Level = o.Level
	op.DataTypes = o.DataTypes
	op.BufferLength = o.BufferLength
	return op
}

func (o *EnumPrintProcessorDataTypesRequest) xxx_FromOp(ctx context.Context, op *xxx_EnumPrintProcessorDataTypesOperation) {
	if o == nil {
		return
	}
	o.Name = op.Name
	o.PrintProcessorName = op.PrintProcessorName
	o.Level = op.Level
	o.DataTypes = op.DataTypes
	o.BufferLength = op.BufferLength
}
func (o *EnumPrintProcessorDataTypesRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *EnumPrintProcessorDataTypesRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_EnumPrintProcessorDataTypesOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// EnumPrintProcessorDataTypesResponse structure represents the RpcAsyncEnumPrintProcessorDatatypes operation response
type EnumPrintProcessorDataTypesResponse struct {
	// XXX: cbBuf is an implicit input depedency for output parameters
	BufferLength uint32 `idl:"name:cbBuf" json:"buffer_length"`

	DataTypes     []byte `idl:"name:pDatatypes;size_is:(cbBuf);pointer:unique" json:"data_types"`
	NeededLength  uint32 `idl:"name:pcbNeeded" json:"needed_length"`
	ReturnedCount uint32 `idl:"name:pcReturned" json:"returned_count"`
	// Return: The RpcAsyncEnumPrintProcessorDatatypes return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *EnumPrintProcessorDataTypesResponse) xxx_ToOp(ctx context.Context, op *xxx_EnumPrintProcessorDataTypesOperation) *xxx_EnumPrintProcessorDataTypesOperation {
	if op == nil {
		op = &xxx_EnumPrintProcessorDataTypesOperation{}
	}
	if o == nil {
		return op
	}
	// XXX: implicit input dependencies for output parameters
	if op.BufferLength == uint32(0) {
		op.BufferLength = o.BufferLength
	}

	op.DataTypes = o.DataTypes
	op.NeededLength = o.NeededLength
	op.ReturnedCount = o.ReturnedCount
	op.Return = o.Return
	return op
}

func (o *EnumPrintProcessorDataTypesResponse) xxx_FromOp(ctx context.Context, op *xxx_EnumPrintProcessorDataTypesOperation) {
	if o == nil {
		return
	}
	// XXX: implicit input dependencies for output parameters
	o.BufferLength = op.BufferLength

	o.DataTypes = op.DataTypes
	o.NeededLength = op.NeededLength
	o.ReturnedCount = op.ReturnedCount
	o.Return = op.Return
}
func (o *EnumPrintProcessorDataTypesResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *EnumPrintProcessorDataTypesResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_EnumPrintProcessorDataTypesOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_AddPerMachineConnectionOperation structure represents the RpcAsyncAddPerMachineConnection operation
type xxx_AddPerMachineConnectionOperation struct {
	Server      string `idl:"name:pServer;string;pointer:unique" json:"server"`
	PrinterName string `idl:"name:pPrinterName;string" json:"printer_name"`
	PrintServer string `idl:"name:pPrintServer;string" json:"print_server"`
	Provider    string `idl:"name:pProvider;string" json:"provider"`
	Return      uint32 `idl:"name:Return" json:"return"`
}

func (o *xxx_AddPerMachineConnectionOperation) OpNum() int { return 55 }

func (o *xxx_AddPerMachineConnectionOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncAddPerMachineConnection"
}

func (o *xxx_AddPerMachineConnectionOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddPerMachineConnectionOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// pServer {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Server != "" {
			_ptr_pServer := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Server); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Server, _ptr_pServer); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pPrinterName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.PrinterName); err != nil {
			return err
		}
	}
	// pPrintServer {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.PrintServer); err != nil {
			return err
		}
	}
	// pProvider {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.Provider); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddPerMachineConnectionOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// pServer {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pServer := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Server); err != nil {
				return err
			}
			return nil
		})
		_s_pServer := func(ptr interface{}) { o.Server = *ptr.(*string) }
		if err := w.ReadPointer(&o.Server, _s_pServer, _ptr_pServer); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pPrinterName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.PrinterName); err != nil {
			return err
		}
	}
	// pPrintServer {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.PrintServer); err != nil {
			return err
		}
	}
	// pProvider {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.Provider); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddPerMachineConnectionOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddPerMachineConnectionOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_AddPerMachineConnectionOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// AddPerMachineConnectionRequest structure represents the RpcAsyncAddPerMachineConnection operation request
type AddPerMachineConnectionRequest struct {
	Server      string `idl:"name:pServer;string;pointer:unique" json:"server"`
	PrinterName string `idl:"name:pPrinterName;string" json:"printer_name"`
	PrintServer string `idl:"name:pPrintServer;string" json:"print_server"`
	Provider    string `idl:"name:pProvider;string" json:"provider"`
}

func (o *AddPerMachineConnectionRequest) xxx_ToOp(ctx context.Context, op *xxx_AddPerMachineConnectionOperation) *xxx_AddPerMachineConnectionOperation {
	if op == nil {
		op = &xxx_AddPerMachineConnectionOperation{}
	}
	if o == nil {
		return op
	}
	op.Server = o.Server
	op.PrinterName = o.PrinterName
	op.PrintServer = o.PrintServer
	op.Provider = o.Provider
	return op
}

func (o *AddPerMachineConnectionRequest) xxx_FromOp(ctx context.Context, op *xxx_AddPerMachineConnectionOperation) {
	if o == nil {
		return
	}
	o.Server = op.Server
	o.PrinterName = op.PrinterName
	o.PrintServer = op.PrintServer
	o.Provider = op.Provider
}
func (o *AddPerMachineConnectionRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *AddPerMachineConnectionRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_AddPerMachineConnectionOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// AddPerMachineConnectionResponse structure represents the RpcAsyncAddPerMachineConnection operation response
type AddPerMachineConnectionResponse struct {
	// Return: The RpcAsyncAddPerMachineConnection return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *AddPerMachineConnectionResponse) xxx_ToOp(ctx context.Context, op *xxx_AddPerMachineConnectionOperation) *xxx_AddPerMachineConnectionOperation {
	if op == nil {
		op = &xxx_AddPerMachineConnectionOperation{}
	}
	if o == nil {
		return op
	}
	op.Return = o.Return
	return op
}

func (o *AddPerMachineConnectionResponse) xxx_FromOp(ctx context.Context, op *xxx_AddPerMachineConnectionOperation) {
	if o == nil {
		return
	}
	o.Return = op.Return
}
func (o *AddPerMachineConnectionResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *AddPerMachineConnectionResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_AddPerMachineConnectionOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_DeletePerMachineConnectionOperation structure represents the RpcAsyncDeletePerMachineConnection operation
type xxx_DeletePerMachineConnectionOperation struct {
	Server      string `idl:"name:pServer;string;pointer:unique" json:"server"`
	PrinterName string `idl:"name:pPrinterName;string" json:"printer_name"`
	Return      uint32 `idl:"name:Return" json:"return"`
}

func (o *xxx_DeletePerMachineConnectionOperation) OpNum() int { return 56 }

func (o *xxx_DeletePerMachineConnectionOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncDeletePerMachineConnection"
}

func (o *xxx_DeletePerMachineConnectionOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePerMachineConnectionOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// pServer {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Server != "" {
			_ptr_pServer := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Server); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Server, _ptr_pServer); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pPrinterName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.PrinterName); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePerMachineConnectionOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// pServer {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pServer := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Server); err != nil {
				return err
			}
			return nil
		})
		_s_pServer := func(ptr interface{}) { o.Server = *ptr.(*string) }
		if err := w.ReadPointer(&o.Server, _s_pServer, _ptr_pServer); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pPrinterName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.PrinterName); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePerMachineConnectionOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePerMachineConnectionOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePerMachineConnectionOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// DeletePerMachineConnectionRequest structure represents the RpcAsyncDeletePerMachineConnection operation request
type DeletePerMachineConnectionRequest struct {
	Server      string `idl:"name:pServer;string;pointer:unique" json:"server"`
	PrinterName string `idl:"name:pPrinterName;string" json:"printer_name"`
}

func (o *DeletePerMachineConnectionRequest) xxx_ToOp(ctx context.Context, op *xxx_DeletePerMachineConnectionOperation) *xxx_DeletePerMachineConnectionOperation {
	if op == nil {
		op = &xxx_DeletePerMachineConnectionOperation{}
	}
	if o == nil {
		return op
	}
	op.Server = o.Server
	op.PrinterName = o.PrinterName
	return op
}

func (o *DeletePerMachineConnectionRequest) xxx_FromOp(ctx context.Context, op *xxx_DeletePerMachineConnectionOperation) {
	if o == nil {
		return
	}
	o.Server = op.Server
	o.PrinterName = op.PrinterName
}
func (o *DeletePerMachineConnectionRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *DeletePerMachineConnectionRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_DeletePerMachineConnectionOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// DeletePerMachineConnectionResponse structure represents the RpcAsyncDeletePerMachineConnection operation response
type DeletePerMachineConnectionResponse struct {
	// Return: The RpcAsyncDeletePerMachineConnection return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *DeletePerMachineConnectionResponse) xxx_ToOp(ctx context.Context, op *xxx_DeletePerMachineConnectionOperation) *xxx_DeletePerMachineConnectionOperation {
	if op == nil {
		op = &xxx_DeletePerMachineConnectionOperation{}
	}
	if o == nil {
		return op
	}
	op.Return = o.Return
	return op
}

func (o *DeletePerMachineConnectionResponse) xxx_FromOp(ctx context.Context, op *xxx_DeletePerMachineConnectionOperation) {
	if o == nil {
		return
	}
	o.Return = op.Return
}
func (o *DeletePerMachineConnectionResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *DeletePerMachineConnectionResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_DeletePerMachineConnectionOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_EnumPerMachineConnectionsOperation structure represents the RpcAsyncEnumPerMachineConnections operation
type xxx_EnumPerMachineConnectionsOperation struct {
	Server        string `idl:"name:pServer;string;pointer:unique" json:"server"`
	PrinterEnum   []byte `idl:"name:pPrinterEnum;size_is:(cbBuf);pointer:unique" json:"printer_enum"`
	BufferLength  uint32 `idl:"name:cbBuf" json:"buffer_length"`
	NeededLength  uint32 `idl:"name:pcbNeeded" json:"needed_length"`
	ReturnedCount uint32 `idl:"name:pcReturned" json:"returned_count"`
	Return        uint32 `idl:"name:Return" json:"return"`
}

func (o *xxx_EnumPerMachineConnectionsOperation) OpNum() int { return 57 }

func (o *xxx_EnumPerMachineConnectionsOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncEnumPerMachineConnections"
}

func (o *xxx_EnumPerMachineConnectionsOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if o.PrinterEnum != nil && o.BufferLength == 0 {
		o.BufferLength = uint32(len(o.PrinterEnum))
	}
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPerMachineConnectionsOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// pServer {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Server != "" {
			_ptr_pServer := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Server); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Server, _ptr_pServer); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pPrinterEnum {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		if o.PrinterEnum != nil || o.BufferLength > 0 {
			_ptr_pPrinterEnum := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.BufferLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				for i1 := range o.PrinterEnum {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(o.PrinterEnum[i1]); err != nil {
						return err
					}
				}
				for i1 := len(o.PrinterEnum); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint8(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.PrinterEnum, _ptr_pPrinterEnum); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.BufferLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPerMachineConnectionsOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// pServer {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pServer := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Server); err != nil {
				return err
			}
			return nil
		})
		_s_pServer := func(ptr interface{}) { o.Server = *ptr.(*string) }
		if err := w.ReadPointer(&o.Server, _s_pServer, _ptr_pServer); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pPrinterEnum {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		_ptr_pPrinterEnum := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array o.PrinterEnum", sizeInfo[0])
			}
			o.PrinterEnum = make([]byte, sizeInfo[0])
			for i1 := range o.PrinterEnum {
				i1 := i1
				if err := w.ReadData(&o.PrinterEnum[i1]); err != nil {
					return err
				}
			}
			return nil
		})
		_s_pPrinterEnum := func(ptr interface{}) { o.PrinterEnum = *ptr.(*[]byte) }
		if err := w.ReadPointer(&o.PrinterEnum, _s_pPrinterEnum, _ptr_pPrinterEnum); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.BufferLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPerMachineConnectionsOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPerMachineConnectionsOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// pPrinterEnum {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		if o.PrinterEnum != nil || o.BufferLength > 0 {
			_ptr_pPrinterEnum := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.BufferLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				for i1 := range o.PrinterEnum {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(o.PrinterEnum[i1]); err != nil {
						return err
					}
				}
				for i1 := len(o.PrinterEnum); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint8(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.PrinterEnum, _ptr_pPrinterEnum); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.NeededLength); err != nil {
			return err
		}
	}
	// pcReturned {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.ReturnedCount); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumPerMachineConnectionsOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// pPrinterEnum {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		_ptr_pPrinterEnum := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array o.PrinterEnum", sizeInfo[0])
			}
			o.PrinterEnum = make([]byte, sizeInfo[0])
			for i1 := range o.PrinterEnum {
				i1 := i1
				if err := w.ReadData(&o.PrinterEnum[i1]); err != nil {
					return err
				}
			}
			return nil
		})
		_s_pPrinterEnum := func(ptr interface{}) { o.PrinterEnum = *ptr.(*[]byte) }
		if err := w.ReadPointer(&o.PrinterEnum, _s_pPrinterEnum, _ptr_pPrinterEnum); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pcbNeeded {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.NeededLength); err != nil {
			return err
		}
	}
	// pcReturned {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.ReturnedCount); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// EnumPerMachineConnectionsRequest structure represents the RpcAsyncEnumPerMachineConnections operation request
type EnumPerMachineConnectionsRequest struct {
	Server       string `idl:"name:pServer;string;pointer:unique" json:"server"`
	PrinterEnum  []byte `idl:"name:pPrinterEnum;size_is:(cbBuf);pointer:unique" json:"printer_enum"`
	BufferLength uint32 `idl:"name:cbBuf" json:"buffer_length"`
}

func (o *EnumPerMachineConnectionsRequest) xxx_ToOp(ctx context.Context, op *xxx_EnumPerMachineConnectionsOperation) *xxx_EnumPerMachineConnectionsOperation {
	if op == nil {
		op = &xxx_EnumPerMachineConnectionsOperation{}
	}
	if o == nil {
		return op
	}
	op.Server = o.Server
	op.PrinterEnum = o.PrinterEnum
	op.BufferLength = o.BufferLength
	return op
}

func (o *EnumPerMachineConnectionsRequest) xxx_FromOp(ctx context.Context, op *xxx_EnumPerMachineConnectionsOperation) {
	if o == nil {
		return
	}
	o.Server = op.Server
	o.PrinterEnum = op.PrinterEnum
	o.BufferLength = op.BufferLength
}
func (o *EnumPerMachineConnectionsRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *EnumPerMachineConnectionsRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_EnumPerMachineConnectionsOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// EnumPerMachineConnectionsResponse structure represents the RpcAsyncEnumPerMachineConnections operation response
type EnumPerMachineConnectionsResponse struct {
	// XXX: cbBuf is an implicit input depedency for output parameters
	BufferLength uint32 `idl:"name:cbBuf" json:"buffer_length"`

	PrinterEnum   []byte `idl:"name:pPrinterEnum;size_is:(cbBuf);pointer:unique" json:"printer_enum"`
	NeededLength  uint32 `idl:"name:pcbNeeded" json:"needed_length"`
	ReturnedCount uint32 `idl:"name:pcReturned" json:"returned_count"`
	// Return: The RpcAsyncEnumPerMachineConnections return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *EnumPerMachineConnectionsResponse) xxx_ToOp(ctx context.Context, op *xxx_EnumPerMachineConnectionsOperation) *xxx_EnumPerMachineConnectionsOperation {
	if op == nil {
		op = &xxx_EnumPerMachineConnectionsOperation{}
	}
	if o == nil {
		return op
	}
	// XXX: implicit input dependencies for output parameters
	if op.BufferLength == uint32(0) {
		op.BufferLength = o.BufferLength
	}

	op.PrinterEnum = o.PrinterEnum
	op.NeededLength = o.NeededLength
	op.ReturnedCount = o.ReturnedCount
	op.Return = o.Return
	return op
}

func (o *EnumPerMachineConnectionsResponse) xxx_FromOp(ctx context.Context, op *xxx_EnumPerMachineConnectionsOperation) {
	if o == nil {
		return
	}
	// XXX: implicit input dependencies for output parameters
	o.BufferLength = op.BufferLength

	o.PrinterEnum = op.PrinterEnum
	o.NeededLength = op.NeededLength
	o.ReturnedCount = op.ReturnedCount
	o.Return = op.Return
}
func (o *EnumPerMachineConnectionsResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *EnumPerMachineConnectionsResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_EnumPerMachineConnectionsOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_SyncRegisterForRemoteNotificationsOperation structure represents the RpcSyncRegisterForRemoteNotifications operation
type xxx_SyncRegisterForRemoteNotificationsOperation struct {
	Printer      *Printer                   `idl:"name:hPrinter" json:"printer"`
	NotifyFilter *PrintPropertiesCollection `idl:"name:pNotifyFilter" json:"notify_filter"`
	RPCHandle    *RemoteNotify              `idl:"name:phRpcHandle" json:"rpc_handle"`
	Return       int32                      `idl:"name:Return" json:"return"`
}

func (o *xxx_SyncRegisterForRemoteNotificationsOperation) OpNum() int { return 58 }

func (o *xxx_SyncRegisterForRemoteNotificationsOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcSyncRegisterForRemoteNotifications"
}

func (o *xxx_SyncRegisterForRemoteNotificationsOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SyncRegisterForRemoteNotificationsOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// pNotifyFilter {in} (1:{pointer=ref}*(1))(2:{alias=RpcPrintPropertiesCollection}(struct))
	{
		if o.NotifyFilter != nil {
			if err := o.NotifyFilter.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PrintPropertiesCollection{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SyncRegisterForRemoteNotificationsOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// pNotifyFilter {in} (1:{pointer=ref}*(1))(2:{alias=RpcPrintPropertiesCollection}(struct))
	{
		if o.NotifyFilter == nil {
			o.NotifyFilter = &PrintPropertiesCollection{}
		}
		if err := o.NotifyFilter.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SyncRegisterForRemoteNotificationsOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SyncRegisterForRemoteNotificationsOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// phRpcHandle {out} (1:{pointer=ref}*(1))(2:{context_handle, alias=RMTNTFY_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.RPCHandle != nil {
			if err := o.RPCHandle.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&RemoteNotify{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// Return {out} (1:{alias=HRESULT, names=LONG}(int32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SyncRegisterForRemoteNotificationsOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// phRpcHandle {out} (1:{pointer=ref}*(1))(2:{context_handle, alias=RMTNTFY_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.RPCHandle == nil {
			o.RPCHandle = &RemoteNotify{}
		}
		if err := o.RPCHandle.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=HRESULT, names=LONG}(int32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// SyncRegisterForRemoteNotificationsRequest structure represents the RpcSyncRegisterForRemoteNotifications operation request
type SyncRegisterForRemoteNotificationsRequest struct {
	// hPrinter: A handle to a printer object or print server object opened by using either
	// RpcAsyncOpenPrinter (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer *Printer `idl:"name:hPrinter" json:"printer"`
	// pNotifyFilter: A pointer to an RpcPrintPropertiesCollection (section 2.2.4) instance
	// that contains the caller-specified notification filter settings.
	NotifyFilter *PrintPropertiesCollection `idl:"name:pNotifyFilter" json:"notify_filter"`
}

func (o *SyncRegisterForRemoteNotificationsRequest) xxx_ToOp(ctx context.Context, op *xxx_SyncRegisterForRemoteNotificationsOperation) *xxx_SyncRegisterForRemoteNotificationsOperation {
	if op == nil {
		op = &xxx_SyncRegisterForRemoteNotificationsOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.NotifyFilter = o.NotifyFilter
	return op
}

func (o *SyncRegisterForRemoteNotificationsRequest) xxx_FromOp(ctx context.Context, op *xxx_SyncRegisterForRemoteNotificationsOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.NotifyFilter = op.NotifyFilter
}
func (o *SyncRegisterForRemoteNotificationsRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *SyncRegisterForRemoteNotificationsRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_SyncRegisterForRemoteNotificationsOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// SyncRegisterForRemoteNotificationsResponse structure represents the RpcSyncRegisterForRemoteNotifications operation response
type SyncRegisterForRemoteNotificationsResponse struct {
	// phRpcHandle: A pointer to a variable that receives the remote notification handle.
	RPCHandle *RemoteNotify `idl:"name:phRpcHandle" json:"rpc_handle"`
	// Return: The RpcSyncRegisterForRemoteNotifications return value.
	Return int32 `idl:"name:Return" json:"return"`
}

func (o *SyncRegisterForRemoteNotificationsResponse) xxx_ToOp(ctx context.Context, op *xxx_SyncRegisterForRemoteNotificationsOperation) *xxx_SyncRegisterForRemoteNotificationsOperation {
	if op == nil {
		op = &xxx_SyncRegisterForRemoteNotificationsOperation{}
	}
	if o == nil {
		return op
	}
	op.RPCHandle = o.RPCHandle
	op.Return = o.Return
	return op
}

func (o *SyncRegisterForRemoteNotificationsResponse) xxx_FromOp(ctx context.Context, op *xxx_SyncRegisterForRemoteNotificationsOperation) {
	if o == nil {
		return
	}
	o.RPCHandle = op.RPCHandle
	o.Return = op.Return
}
func (o *SyncRegisterForRemoteNotificationsResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *SyncRegisterForRemoteNotificationsResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_SyncRegisterForRemoteNotificationsOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_SyncUnregisterForRemoteNotificationsOperation structure represents the RpcSyncUnRegisterForRemoteNotifications operation
type xxx_SyncUnregisterForRemoteNotificationsOperation struct {
	RPCHandle *RemoteNotify `idl:"name:phRpcHandle" json:"rpc_handle"`
	Return    int32         `idl:"name:Return" json:"return"`
}

func (o *xxx_SyncUnregisterForRemoteNotificationsOperation) OpNum() int { return 59 }

func (o *xxx_SyncUnregisterForRemoteNotificationsOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcSyncUnRegisterForRemoteNotifications"
}

func (o *xxx_SyncUnregisterForRemoteNotificationsOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SyncUnregisterForRemoteNotificationsOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// phRpcHandle {in, out} (1:{pointer=ref}*(1))(2:{context_handle, alias=RMTNTFY_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.RPCHandle != nil {
			if err := o.RPCHandle.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&RemoteNotify{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	return nil
}

func (o *xxx_SyncUnregisterForRemoteNotificationsOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// phRpcHandle {in, out} (1:{pointer=ref}*(1))(2:{context_handle, alias=RMTNTFY_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.RPCHandle == nil {
			o.RPCHandle = &RemoteNotify{}
		}
		if err := o.RPCHandle.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SyncUnregisterForRemoteNotificationsOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SyncUnregisterForRemoteNotificationsOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// phRpcHandle {in, out} (1:{pointer=ref}*(1))(2:{context_handle, alias=RMTNTFY_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.RPCHandle != nil {
			if err := o.RPCHandle.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&RemoteNotify{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// Return {out} (1:{alias=HRESULT, names=LONG}(int32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SyncUnregisterForRemoteNotificationsOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// phRpcHandle {in, out} (1:{pointer=ref}*(1))(2:{context_handle, alias=RMTNTFY_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.RPCHandle == nil {
			o.RPCHandle = &RemoteNotify{}
		}
		if err := o.RPCHandle.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=HRESULT, names=LONG}(int32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// SyncUnregisterForRemoteNotificationsRequest structure represents the RpcSyncUnRegisterForRemoteNotifications operation request
type SyncUnregisterForRemoteNotificationsRequest struct {
	// phRpcHandle: A pointer to the remote notification handle from which the user no longer
	// wants to receive notifications.
	RPCHandle *RemoteNotify `idl:"name:phRpcHandle" json:"rpc_handle"`
}

func (o *SyncUnregisterForRemoteNotificationsRequest) xxx_ToOp(ctx context.Context, op *xxx_SyncUnregisterForRemoteNotificationsOperation) *xxx_SyncUnregisterForRemoteNotificationsOperation {
	if op == nil {
		op = &xxx_SyncUnregisterForRemoteNotificationsOperation{}
	}
	if o == nil {
		return op
	}
	op.RPCHandle = o.RPCHandle
	return op
}

func (o *SyncUnregisterForRemoteNotificationsRequest) xxx_FromOp(ctx context.Context, op *xxx_SyncUnregisterForRemoteNotificationsOperation) {
	if o == nil {
		return
	}
	o.RPCHandle = op.RPCHandle
}
func (o *SyncUnregisterForRemoteNotificationsRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *SyncUnregisterForRemoteNotificationsRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_SyncUnregisterForRemoteNotificationsOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// SyncUnregisterForRemoteNotificationsResponse structure represents the RpcSyncUnRegisterForRemoteNotifications operation response
type SyncUnregisterForRemoteNotificationsResponse struct {
	// phRpcHandle: A pointer to the remote notification handle from which the user no longer
	// wants to receive notifications.
	RPCHandle *RemoteNotify `idl:"name:phRpcHandle" json:"rpc_handle"`
	// Return: The RpcSyncUnRegisterForRemoteNotifications return value.
	Return int32 `idl:"name:Return" json:"return"`
}

func (o *SyncUnregisterForRemoteNotificationsResponse) xxx_ToOp(ctx context.Context, op *xxx_SyncUnregisterForRemoteNotificationsOperation) *xxx_SyncUnregisterForRemoteNotificationsOperation {
	if op == nil {
		op = &xxx_SyncUnregisterForRemoteNotificationsOperation{}
	}
	if o == nil {
		return op
	}
	op.RPCHandle = o.RPCHandle
	op.Return = o.Return
	return op
}

func (o *SyncUnregisterForRemoteNotificationsResponse) xxx_FromOp(ctx context.Context, op *xxx_SyncUnregisterForRemoteNotificationsOperation) {
	if o == nil {
		return
	}
	o.RPCHandle = op.RPCHandle
	o.Return = op.Return
}
func (o *SyncUnregisterForRemoteNotificationsResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *SyncUnregisterForRemoteNotificationsResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_SyncUnregisterForRemoteNotificationsOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_SyncRefreshRemoteNotificationsOperation structure represents the RpcSyncRefreshRemoteNotifications operation
type xxx_SyncRefreshRemoteNotificationsOperation struct {
	Handle       *RemoteNotify              `idl:"name:hRpcHandle" json:"handle"`
	NotifyFilter *PrintPropertiesCollection `idl:"name:pNotifyFilter" json:"notify_filter"`
	NotifyData   *PrintPropertiesCollection `idl:"name:ppNotifyData" json:"notify_data"`
	Return       int32                      `idl:"name:Return" json:"return"`
}

func (o *xxx_SyncRefreshRemoteNotificationsOperation) OpNum() int { return 60 }

func (o *xxx_SyncRefreshRemoteNotificationsOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcSyncRefreshRemoteNotifications"
}

func (o *xxx_SyncRefreshRemoteNotificationsOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SyncRefreshRemoteNotificationsOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hRpcHandle {in} (1:{context_handle, alias=RMTNTFY_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Handle != nil {
			if err := o.Handle.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&RemoteNotify{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// pNotifyFilter {in} (1:{pointer=ref}*(1))(2:{alias=RpcPrintPropertiesCollection}(struct))
	{
		if o.NotifyFilter != nil {
			if err := o.NotifyFilter.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PrintPropertiesCollection{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SyncRefreshRemoteNotificationsOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hRpcHandle {in} (1:{context_handle, alias=RMTNTFY_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Handle == nil {
			o.Handle = &RemoteNotify{}
		}
		if err := o.Handle.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// pNotifyFilter {in} (1:{pointer=ref}*(1))(2:{alias=RpcPrintPropertiesCollection}(struct))
	{
		if o.NotifyFilter == nil {
			o.NotifyFilter = &PrintPropertiesCollection{}
		}
		if err := o.NotifyFilter.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SyncRefreshRemoteNotificationsOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SyncRefreshRemoteNotificationsOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// ppNotifyData {out} (1:{pointer=ref}*(2)*(1))(2:{alias=RpcPrintPropertiesCollection}(struct))
	{
		if o.NotifyData != nil {
			_ptr_ppNotifyData := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if o.NotifyData != nil {
					if err := o.NotifyData.MarshalNDR(ctx, w); err != nil {
						return err
					}
				} else {
					if err := (&PrintPropertiesCollection{}).MarshalNDR(ctx, w); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.NotifyData, _ptr_ppNotifyData); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=HRESULT, names=LONG}(int32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SyncRefreshRemoteNotificationsOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// ppNotifyData {out} (1:{pointer=ref}*(2)*(1))(2:{alias=RpcPrintPropertiesCollection}(struct))
	{
		_ptr_ppNotifyData := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if o.NotifyData == nil {
				o.NotifyData = &PrintPropertiesCollection{}
			}
			if err := o.NotifyData.UnmarshalNDR(ctx, w); err != nil {
				return err
			}
			return nil
		})
		_s_ppNotifyData := func(ptr interface{}) { o.NotifyData = *ptr.(**PrintPropertiesCollection) }
		if err := w.ReadPointer(&o.NotifyData, _s_ppNotifyData, _ptr_ppNotifyData); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=HRESULT, names=LONG}(int32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// SyncRefreshRemoteNotificationsRequest structure represents the RpcSyncRefreshRemoteNotifications operation request
type SyncRefreshRemoteNotificationsRequest struct {
	// hRpcHandle: A remote notification handle that was opened by using RpcSyncRegisterForRemoteNotifications
	// (section 3.1.4.9.1).
	Handle *RemoteNotify `idl:"name:hRpcHandle" json:"handle"`
	// pNotifyFilter: A pointer to an RpcPrintPropertiesCollection instance that contains
	// the caller-specified notification filter settings.
	NotifyFilter *PrintPropertiesCollection `idl:"name:pNotifyFilter" json:"notify_filter"`
}

func (o *SyncRefreshRemoteNotificationsRequest) xxx_ToOp(ctx context.Context, op *xxx_SyncRefreshRemoteNotificationsOperation) *xxx_SyncRefreshRemoteNotificationsOperation {
	if op == nil {
		op = &xxx_SyncRefreshRemoteNotificationsOperation{}
	}
	if o == nil {
		return op
	}
	op.Handle = o.Handle
	op.NotifyFilter = o.NotifyFilter
	return op
}

func (o *SyncRefreshRemoteNotificationsRequest) xxx_FromOp(ctx context.Context, op *xxx_SyncRefreshRemoteNotificationsOperation) {
	if o == nil {
		return
	}
	o.Handle = op.Handle
	o.NotifyFilter = op.NotifyFilter
}
func (o *SyncRefreshRemoteNotificationsRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *SyncRefreshRemoteNotificationsRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_SyncRefreshRemoteNotificationsOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// SyncRefreshRemoteNotificationsResponse structure represents the RpcSyncRefreshRemoteNotifications operation response
type SyncRefreshRemoteNotificationsResponse struct {
	// ppNotifyData: A pointer to a variable that receives a pointer to an RpcPrintPropertiesCollection
	// instance that contains the notification data.
	NotifyData *PrintPropertiesCollection `idl:"name:ppNotifyData" json:"notify_data"`
	// Return: The RpcSyncRefreshRemoteNotifications return value.
	Return int32 `idl:"name:Return" json:"return"`
}

func (o *SyncRefreshRemoteNotificationsResponse) xxx_ToOp(ctx context.Context, op *xxx_SyncRefreshRemoteNotificationsOperation) *xxx_SyncRefreshRemoteNotificationsOperation {
	if op == nil {
		op = &xxx_SyncRefreshRemoteNotificationsOperation{}
	}
	if o == nil {
		return op
	}
	op.NotifyData = o.NotifyData
	op.Return = o.Return
	return op
}

func (o *SyncRefreshRemoteNotificationsResponse) xxx_FromOp(ctx context.Context, op *xxx_SyncRefreshRemoteNotificationsOperation) {
	if o == nil {
		return
	}
	o.NotifyData = op.NotifyData
	o.Return = op.Return
}
func (o *SyncRefreshRemoteNotificationsResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *SyncRefreshRemoteNotificationsResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_SyncRefreshRemoteNotificationsOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_GetRemoteNotificationsOperation structure represents the RpcAsyncGetRemoteNotifications operation
type xxx_GetRemoteNotificationsOperation struct {
	Handle     *RemoteNotify              `idl:"name:hRpcHandle" json:"handle"`
	NotifyData *PrintPropertiesCollection `idl:"name:ppNotifyData" json:"notify_data"`
	Return     int32                      `idl:"name:Return" json:"return"`
}

func (o *xxx_GetRemoteNotificationsOperation) OpNum() int { return 61 }

func (o *xxx_GetRemoteNotificationsOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncGetRemoteNotifications"
}

func (o *xxx_GetRemoteNotificationsOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetRemoteNotificationsOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hRpcHandle {in} (1:{context_handle, alias=RMTNTFY_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Handle != nil {
			if err := o.Handle.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&RemoteNotify{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	return nil
}

func (o *xxx_GetRemoteNotificationsOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hRpcHandle {in} (1:{context_handle, alias=RMTNTFY_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Handle == nil {
			o.Handle = &RemoteNotify{}
		}
		if err := o.Handle.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetRemoteNotificationsOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetRemoteNotificationsOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// ppNotifyData {out} (1:{pointer=ref}*(2)*(1))(2:{alias=RpcPrintPropertiesCollection}(struct))
	{
		if o.NotifyData != nil {
			_ptr_ppNotifyData := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if o.NotifyData != nil {
					if err := o.NotifyData.MarshalNDR(ctx, w); err != nil {
						return err
					}
				} else {
					if err := (&PrintPropertiesCollection{}).MarshalNDR(ctx, w); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.NotifyData, _ptr_ppNotifyData); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=HRESULT, names=LONG}(int32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetRemoteNotificationsOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// ppNotifyData {out} (1:{pointer=ref}*(2)*(1))(2:{alias=RpcPrintPropertiesCollection}(struct))
	{
		_ptr_ppNotifyData := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if o.NotifyData == nil {
				o.NotifyData = &PrintPropertiesCollection{}
			}
			if err := o.NotifyData.UnmarshalNDR(ctx, w); err != nil {
				return err
			}
			return nil
		})
		_s_ppNotifyData := func(ptr interface{}) { o.NotifyData = *ptr.(**PrintPropertiesCollection) }
		if err := w.ReadPointer(&o.NotifyData, _s_ppNotifyData, _ptr_ppNotifyData); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=HRESULT, names=LONG}(int32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// GetRemoteNotificationsRequest structure represents the RpcAsyncGetRemoteNotifications operation request
type GetRemoteNotificationsRequest struct {
	// hRpcHandle: A remote notification handle that was opened by using RpcSyncRegisterForRemoteNotifications
	// (section 3.1.4.9.1).
	Handle *RemoteNotify `idl:"name:hRpcHandle" json:"handle"`
}

func (o *GetRemoteNotificationsRequest) xxx_ToOp(ctx context.Context, op *xxx_GetRemoteNotificationsOperation) *xxx_GetRemoteNotificationsOperation {
	if op == nil {
		op = &xxx_GetRemoteNotificationsOperation{}
	}
	if o == nil {
		return op
	}
	op.Handle = o.Handle
	return op
}

func (o *GetRemoteNotificationsRequest) xxx_FromOp(ctx context.Context, op *xxx_GetRemoteNotificationsOperation) {
	if o == nil {
		return
	}
	o.Handle = op.Handle
}
func (o *GetRemoteNotificationsRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *GetRemoteNotificationsRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_GetRemoteNotificationsOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// GetRemoteNotificationsResponse structure represents the RpcAsyncGetRemoteNotifications operation response
type GetRemoteNotificationsResponse struct {
	// ppNotifyData: A pointer to a variable that receives a pointer to an RpcPrintPropertiesCollection
	// (section 2.2.4) instance that contains the notification data.
	NotifyData *PrintPropertiesCollection `idl:"name:ppNotifyData" json:"notify_data"`
	// Return: The RpcAsyncGetRemoteNotifications return value.
	Return int32 `idl:"name:Return" json:"return"`
}

func (o *GetRemoteNotificationsResponse) xxx_ToOp(ctx context.Context, op *xxx_GetRemoteNotificationsOperation) *xxx_GetRemoteNotificationsOperation {
	if op == nil {
		op = &xxx_GetRemoteNotificationsOperation{}
	}
	if o == nil {
		return op
	}
	op.NotifyData = o.NotifyData
	op.Return = o.Return
	return op
}

func (o *GetRemoteNotificationsResponse) xxx_FromOp(ctx context.Context, op *xxx_GetRemoteNotificationsOperation) {
	if o == nil {
		return
	}
	o.NotifyData = op.NotifyData
	o.Return = op.Return
}
func (o *GetRemoteNotificationsResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *GetRemoteNotificationsResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_GetRemoteNotificationsOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_InstallPrinterDriverFromPackageOperation structure represents the RpcAsyncInstallPrinterDriverFromPackage operation
type xxx_InstallPrinterDriverFromPackageOperation struct {
	Server      string `idl:"name:pszServer;string;pointer:unique" json:"server"`
	InfPath     string `idl:"name:pszInfPath;string;pointer:unique" json:"inf_path"`
	DriverName  string `idl:"name:pszDriverName;string" json:"driver_name"`
	Environment string `idl:"name:pszEnvironment;string" json:"environment"`
	Flags       uint32 `idl:"name:dwFlags" json:"flags"`
	Return      int32  `idl:"name:Return" json:"return"`
}

func (o *xxx_InstallPrinterDriverFromPackageOperation) OpNum() int { return 62 }

func (o *xxx_InstallPrinterDriverFromPackageOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncInstallPrinterDriverFromPackage"
}

func (o *xxx_InstallPrinterDriverFromPackageOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_InstallPrinterDriverFromPackageOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// pszServer {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Server != "" {
			_ptr_pszServer := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Server); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Server, _ptr_pszServer); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pszInfPath {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.InfPath != "" {
			_ptr_pszInfPath := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.InfPath); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.InfPath, _ptr_pszInfPath); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pszDriverName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.DriverName); err != nil {
			return err
		}
	}
	// pszEnvironment {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.Environment); err != nil {
			return err
		}
	}
	// dwFlags {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Flags); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_InstallPrinterDriverFromPackageOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// pszServer {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pszServer := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Server); err != nil {
				return err
			}
			return nil
		})
		_s_pszServer := func(ptr interface{}) { o.Server = *ptr.(*string) }
		if err := w.ReadPointer(&o.Server, _s_pszServer, _ptr_pszServer); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pszInfPath {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pszInfPath := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.InfPath); err != nil {
				return err
			}
			return nil
		})
		_s_pszInfPath := func(ptr interface{}) { o.InfPath = *ptr.(*string) }
		if err := w.ReadPointer(&o.InfPath, _s_pszInfPath, _ptr_pszInfPath); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pszDriverName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.DriverName); err != nil {
			return err
		}
	}
	// pszEnvironment {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.Environment); err != nil {
			return err
		}
	}
	// dwFlags {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Flags); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_InstallPrinterDriverFromPackageOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_InstallPrinterDriverFromPackageOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// Return {out} (1:{alias=HRESULT, names=LONG}(int32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_InstallPrinterDriverFromPackageOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// Return {out} (1:{alias=HRESULT, names=LONG}(int32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// InstallPrinterDriverFromPackageRequest structure represents the RpcAsyncInstallPrinterDriverFromPackage operation request
type InstallPrinterDriverFromPackageRequest struct {
	// pszServer: A pointer to a string that specifies the name of the print server on which
	// to install the printer driver.
	Server string `idl:"name:pszServer;string;pointer:unique" json:"server"`
	// pszInfPath: A pointer to a string that specifies the path to a driver installation
	// control file that specifies the printer driver.
	InfPath string `idl:"name:pszInfPath;string;pointer:unique" json:"inf_path"`
	// pszDriverName: A pointer to a string that specifies the name of the printer driver.
	DriverName string `idl:"name:pszDriverName;string" json:"driver_name"`
	// pszEnvironment: A pointer to a string that specifies the environment name for which
	// the printer driver is installed. For rules governing environment names, refer to
	// [MS-RPRN] section 2.2.4.4.
	Environment string `idl:"name:pszEnvironment;string" json:"environment"`
	// dwFlags: A bitfield that specifies the options for installing printer driver files
	// from a driver package.
	//
	//	+---------------------------------+----------------------------------------------------------------------------------+
	//	|                                 |                                                                                  |
	//	|              VALUE              |                                     MEANING                                      |
	//	|                                 |                                                                                  |
	//	+---------------------------------+----------------------------------------------------------------------------------+
	//	+---------------------------------+----------------------------------------------------------------------------------+
	//	| 0x00000000                      | Only the files that will not overwrite files with a newer version SHOULD be      |
	//	|                                 | installed.                                                                       |
	//	+---------------------------------+----------------------------------------------------------------------------------+
	//	| IPDFP_COPY_ALL_FILES 0x00000001 | All files SHOULD be installed, even if doing so would overwrite some newer       |
	//	|                                 | versions.                                                                        |
	//	+---------------------------------+----------------------------------------------------------------------------------+
	Flags uint32 `idl:"name:dwFlags" json:"flags"`
}

func (o *InstallPrinterDriverFromPackageRequest) xxx_ToOp(ctx context.Context, op *xxx_InstallPrinterDriverFromPackageOperation) *xxx_InstallPrinterDriverFromPackageOperation {
	if op == nil {
		op = &xxx_InstallPrinterDriverFromPackageOperation{}
	}
	if o == nil {
		return op
	}
	op.Server = o.Server
	op.InfPath = o.InfPath
	op.DriverName = o.DriverName
	op.Environment = o.Environment
	op.Flags = o.Flags
	return op
}

func (o *InstallPrinterDriverFromPackageRequest) xxx_FromOp(ctx context.Context, op *xxx_InstallPrinterDriverFromPackageOperation) {
	if o == nil {
		return
	}
	o.Server = op.Server
	o.InfPath = op.InfPath
	o.DriverName = op.DriverName
	o.Environment = op.Environment
	o.Flags = op.Flags
}
func (o *InstallPrinterDriverFromPackageRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *InstallPrinterDriverFromPackageRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_InstallPrinterDriverFromPackageOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// InstallPrinterDriverFromPackageResponse structure represents the RpcAsyncInstallPrinterDriverFromPackage operation response
type InstallPrinterDriverFromPackageResponse struct {
	// Return: The RpcAsyncInstallPrinterDriverFromPackage return value.
	Return int32 `idl:"name:Return" json:"return"`
}

func (o *InstallPrinterDriverFromPackageResponse) xxx_ToOp(ctx context.Context, op *xxx_InstallPrinterDriverFromPackageOperation) *xxx_InstallPrinterDriverFromPackageOperation {
	if op == nil {
		op = &xxx_InstallPrinterDriverFromPackageOperation{}
	}
	if o == nil {
		return op
	}
	op.Return = o.Return
	return op
}

func (o *InstallPrinterDriverFromPackageResponse) xxx_FromOp(ctx context.Context, op *xxx_InstallPrinterDriverFromPackageOperation) {
	if o == nil {
		return
	}
	o.Return = op.Return
}
func (o *InstallPrinterDriverFromPackageResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *InstallPrinterDriverFromPackageResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_InstallPrinterDriverFromPackageOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_UploadPrinterDriverPackageOperation structure represents the RpcAsyncUploadPrinterDriverPackage operation
type xxx_UploadPrinterDriverPackageOperation struct {
	Server                   string `idl:"name:pszServer;string;pointer:unique" json:"server"`
	InfPath                  string `idl:"name:pszInfPath;string" json:"inf_path"`
	Environment              string `idl:"name:pszEnvironment;string" json:"environment"`
	Flags                    uint32 `idl:"name:dwFlags" json:"flags"`
	DestinationInfPath       string `idl:"name:pszDestInfPath;size_is:(pcchDestInfPath);pointer:unique" json:"destination_inf_path"`
	DestinationInfPathLength uint32 `idl:"name:pcchDestInfPath" json:"destination_inf_path_length"`
	Return                   int32  `idl:"name:Return" json:"return"`
}

func (o *xxx_UploadPrinterDriverPackageOperation) OpNum() int { return 63 }

func (o *xxx_UploadPrinterDriverPackageOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncUploadPrinterDriverPackage"
}

func (o *xxx_UploadPrinterDriverPackageOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if o.DestinationInfPath != "" && o.DestinationInfPathLength == 0 {
		o.DestinationInfPathLength = uint32(ndr.UTF16Len(o.DestinationInfPath))
	}
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_UploadPrinterDriverPackageOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// pszServer {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Server != "" {
			_ptr_pszServer := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Server); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Server, _ptr_pszServer); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pszInfPath {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.InfPath); err != nil {
			return err
		}
	}
	// pszEnvironment {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.Environment); err != nil {
			return err
		}
	}
	// dwFlags {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Flags); err != nil {
			return err
		}
	}
	// pszDestInfPath {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=pcchDestInfPath,string](wchar))
	{
		if o.DestinationInfPath != "" || o.DestinationInfPathLength > 0 {
			_ptr_pszDestInfPath := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.DestinationInfPathLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				_DestinationInfPath_buf := utf16.Encode([]rune(o.DestinationInfPath))
				if uint64(len(_DestinationInfPath_buf)) > sizeInfo[0] {
					_DestinationInfPath_buf = _DestinationInfPath_buf[:sizeInfo[0]]
				}
				for i1 := range _DestinationInfPath_buf {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(_DestinationInfPath_buf[i1]); err != nil {
						return err
					}
				}
				for i1 := len(_DestinationInfPath_buf); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint16(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.DestinationInfPath, _ptr_pszDestInfPath); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pcchDestInfPath {in, out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.DestinationInfPathLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_UploadPrinterDriverPackageOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// pszServer {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pszServer := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Server); err != nil {
				return err
			}
			return nil
		})
		_s_pszServer := func(ptr interface{}) { o.Server = *ptr.(*string) }
		if err := w.ReadPointer(&o.Server, _s_pszServer, _ptr_pszServer); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pszInfPath {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.InfPath); err != nil {
			return err
		}
	}
	// pszEnvironment {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.Environment); err != nil {
			return err
		}
	}
	// dwFlags {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Flags); err != nil {
			return err
		}
	}
	// pszDestInfPath {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=pcchDestInfPath,string](wchar))
	{
		_ptr_pszDestInfPath := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			var _DestinationInfPath_buf []uint16
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array _DestinationInfPath_buf", sizeInfo[0])
			}
			_DestinationInfPath_buf = make([]uint16, sizeInfo[0])
			for i1 := range _DestinationInfPath_buf {
				i1 := i1
				if err := w.ReadData(&_DestinationInfPath_buf[i1]); err != nil {
					return err
				}
			}
			o.DestinationInfPath = strings.TrimRight(string(utf16.Decode(_DestinationInfPath_buf)), ndr.ZeroString)
			return nil
		})
		_s_pszDestInfPath := func(ptr interface{}) { o.DestinationInfPath = *ptr.(*string) }
		if err := w.ReadPointer(&o.DestinationInfPath, _s_pszDestInfPath, _ptr_pszDestInfPath); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pcchDestInfPath {in, out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.DestinationInfPathLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_UploadPrinterDriverPackageOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if o.DestinationInfPath != "" && o.DestinationInfPathLength == 0 {
		o.DestinationInfPathLength = uint32(ndr.UTF16Len(o.DestinationInfPath))
	}
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_UploadPrinterDriverPackageOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// pszDestInfPath {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=pcchDestInfPath,string](wchar))
	{
		if o.DestinationInfPath != "" || o.DestinationInfPathLength > 0 {
			_ptr_pszDestInfPath := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.DestinationInfPathLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				_DestinationInfPath_buf := utf16.Encode([]rune(o.DestinationInfPath))
				if uint64(len(_DestinationInfPath_buf)) > sizeInfo[0] {
					_DestinationInfPath_buf = _DestinationInfPath_buf[:sizeInfo[0]]
				}
				for i1 := range _DestinationInfPath_buf {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(_DestinationInfPath_buf[i1]); err != nil {
						return err
					}
				}
				for i1 := len(_DestinationInfPath_buf); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint16(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.DestinationInfPath, _ptr_pszDestInfPath); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pcchDestInfPath {in, out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.DestinationInfPathLength); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=HRESULT, names=LONG}(int32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_UploadPrinterDriverPackageOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// pszDestInfPath {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=pcchDestInfPath,string](wchar))
	{
		_ptr_pszDestInfPath := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			var _DestinationInfPath_buf []uint16
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array _DestinationInfPath_buf", sizeInfo[0])
			}
			_DestinationInfPath_buf = make([]uint16, sizeInfo[0])
			for i1 := range _DestinationInfPath_buf {
				i1 := i1
				if err := w.ReadData(&_DestinationInfPath_buf[i1]); err != nil {
					return err
				}
			}
			o.DestinationInfPath = strings.TrimRight(string(utf16.Decode(_DestinationInfPath_buf)), ndr.ZeroString)
			return nil
		})
		_s_pszDestInfPath := func(ptr interface{}) { o.DestinationInfPath = *ptr.(*string) }
		if err := w.ReadPointer(&o.DestinationInfPath, _s_pszDestInfPath, _ptr_pszDestInfPath); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pcchDestInfPath {in, out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.DestinationInfPathLength); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=HRESULT, names=LONG}(int32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// UploadPrinterDriverPackageRequest structure represents the RpcAsyncUploadPrinterDriverPackage operation request
type UploadPrinterDriverPackageRequest struct {
	// pszServer: A pointer to a string that specifies the name of the print server to which
	// this method will upload the printer driver package.
	Server string `idl:"name:pszServer;string;pointer:unique" json:"server"`
	// pszInfPath: A pointer to a string that specifies the path to a driver installation
	// control file that specifies the printer driver.
	//
	// This control file MAY be used to install the driver on a target system.<19> For rules
	// governing path names, see [MS-RPRN] section 2.2.4.9.
	InfPath string `idl:"name:pszInfPath;string" json:"inf_path"`
	// pszEnvironment: A pointer to a string that specifies the environment name for which
	// the driver package is uploaded. For rules governing environment names, see [MS-RPRN]
	// section 2.2.4.4.
	Environment string `idl:"name:pszEnvironment;string" json:"environment"`
	// dwFlags: A bitfield that specifies the options for uploading a driver package.
	//
	//	+-----------------------------------+----------------------------------------------------------------------------------+
	//	|                                   |                                                                                  |
	//	|               VALUE               |                                     MEANING                                      |
	//	|                                   |                                                                                  |
	//	+-----------------------------------+----------------------------------------------------------------------------------+
	//	+-----------------------------------+----------------------------------------------------------------------------------+
	//	| 0x00000000                        | This method uploads the driver package that is named by the string pointed to by |
	//	|                                   | the pszInfPath parameter to the print server, but only if that driver package is |
	//	|                                   | not already present on the server.                                               |
	//	+-----------------------------------+----------------------------------------------------------------------------------+
	//	| UPDP_UPLOAD_ALWAYS 0x00000002     | This method uploads the driver package files specified by the pszInfPath         |
	//	|                                   | parameter even if the driver package is already present on the print server.     |
	//	+-----------------------------------+----------------------------------------------------------------------------------+
	//	| UPDP_CHECK_DRIVERSTORE 0x00000004 | This method only checks the print server's driver store to see if the driver     |
	//	|                                   | package specified by the pszInfPath parameter is already present on the print    |
	//	|                                   | server. If the driver package is not present on the print server, this method    |
	//	|                                   | returns ERROR_NOT_FOUND; otherwise, the method returns zero. This flag is        |
	//	|                                   | ignored if the UPDP_UPLOAD_ALWAYS flag is set.                                   |
	//	+-----------------------------------+----------------------------------------------------------------------------------+
	Flags uint32 `idl:"name:dwFlags" json:"flags"`
	// pszDestInfPath: A pointer to a buffer that receives a string that specifies the full
	// path of the directory to which the driver installation control file was copied. For
	// rules governing path names, see [MS-RPRN] section 2.2.4.9.
	DestinationInfPath string `idl:"name:pszDestInfPath;size_is:(pcchDestInfPath);pointer:unique" json:"destination_inf_path"`
	// pcchDestInfPath: On input, this parameter is a pointer to a variable that specifies
	// the size, in characters, of the buffer that is referenced by the pszDestInfPath parameter.
	// The specified size is at least 260 characters.
	DestinationInfPathLength uint32 `idl:"name:pcchDestInfPath" json:"destination_inf_path_length"`
}

func (o *UploadPrinterDriverPackageRequest) xxx_ToOp(ctx context.Context, op *xxx_UploadPrinterDriverPackageOperation) *xxx_UploadPrinterDriverPackageOperation {
	if op == nil {
		op = &xxx_UploadPrinterDriverPackageOperation{}
	}
	if o == nil {
		return op
	}
	op.Server = o.Server
	op.InfPath = o.InfPath
	op.Environment = o.Environment
	op.Flags = o.Flags
	op.DestinationInfPath = o.DestinationInfPath
	op.DestinationInfPathLength = o.DestinationInfPathLength
	return op
}

func (o *UploadPrinterDriverPackageRequest) xxx_FromOp(ctx context.Context, op *xxx_UploadPrinterDriverPackageOperation) {
	if o == nil {
		return
	}
	o.Server = op.Server
	o.InfPath = op.InfPath
	o.Environment = op.Environment
	o.Flags = op.Flags
	o.DestinationInfPath = op.DestinationInfPath
	o.DestinationInfPathLength = op.DestinationInfPathLength
}
func (o *UploadPrinterDriverPackageRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *UploadPrinterDriverPackageRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_UploadPrinterDriverPackageOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// UploadPrinterDriverPackageResponse structure represents the RpcAsyncUploadPrinterDriverPackage operation response
type UploadPrinterDriverPackageResponse struct {
	// pszDestInfPath: A pointer to a buffer that receives a string that specifies the full
	// path of the directory to which the driver installation control file was copied. For
	// rules governing path names, see [MS-RPRN] section 2.2.4.9.
	DestinationInfPath string `idl:"name:pszDestInfPath;size_is:(pcchDestInfPath);pointer:unique" json:"destination_inf_path"`
	// pcchDestInfPath: On input, this parameter is a pointer to a variable that specifies
	// the size, in characters, of the buffer that is referenced by the pszDestInfPath parameter.
	// The specified size is at least 260 characters.
	DestinationInfPathLength uint32 `idl:"name:pcchDestInfPath" json:"destination_inf_path_length"`
	// Return: The RpcAsyncUploadPrinterDriverPackage return value.
	Return int32 `idl:"name:Return" json:"return"`
}

func (o *UploadPrinterDriverPackageResponse) xxx_ToOp(ctx context.Context, op *xxx_UploadPrinterDriverPackageOperation) *xxx_UploadPrinterDriverPackageOperation {
	if op == nil {
		op = &xxx_UploadPrinterDriverPackageOperation{}
	}
	if o == nil {
		return op
	}
	op.DestinationInfPath = o.DestinationInfPath
	op.DestinationInfPathLength = o.DestinationInfPathLength
	op.Return = o.Return
	return op
}

func (o *UploadPrinterDriverPackageResponse) xxx_FromOp(ctx context.Context, op *xxx_UploadPrinterDriverPackageOperation) {
	if o == nil {
		return
	}
	o.DestinationInfPath = op.DestinationInfPath
	o.DestinationInfPathLength = op.DestinationInfPathLength
	o.Return = op.Return
}
func (o *UploadPrinterDriverPackageResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *UploadPrinterDriverPackageResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_UploadPrinterDriverPackageOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_GetCorePrinterDriversOperation structure represents the RpcAsyncGetCorePrinterDrivers operation
type xxx_GetCorePrinterDriversOperation struct {
	Server                  string               `idl:"name:pszServer;string;pointer:unique" json:"server"`
	Environment             string               `idl:"name:pszEnvironment;string" json:"environment"`
	CoreDriversLength       uint32               `idl:"name:cchCoreDrivers" json:"core_drivers_length"`
	CoreDriverDependencies  string               `idl:"name:pszzCoreDriverDependencies;size_is:(cchCoreDrivers)" json:"core_driver_dependencies"`
	CorePrinterDriversCount uint32               `idl:"name:cCorePrinterDrivers" json:"core_printer_drivers_count"`
	CorePrinterDrivers      []*CorePrinterDriver `idl:"name:pCorePrinterDrivers;size_is:(cCorePrinterDrivers)" json:"core_printer_drivers"`
	Return                  int32                `idl:"name:Return" json:"return"`
}

func (o *xxx_GetCorePrinterDriversOperation) OpNum() int { return 64 }

func (o *xxx_GetCorePrinterDriversOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncGetCorePrinterDrivers"
}

func (o *xxx_GetCorePrinterDriversOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if o.CoreDriverDependencies != "" && o.CoreDriversLength == 0 {
		o.CoreDriversLength = uint32(ndr.UTF16Len(o.CoreDriverDependencies))
	}
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetCorePrinterDriversOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// pszServer {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Server != "" {
			_ptr_pszServer := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Server); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Server, _ptr_pszServer); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pszEnvironment {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.Environment); err != nil {
			return err
		}
	}
	// cchCoreDrivers {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.CoreDriversLength); err != nil {
			return err
		}
	}
	// pszzCoreDriverDependencies {in} (1:{pointer=ref}*(1)[dim:0,size_is=cchCoreDrivers,string](wchar))
	{
		dimSize1 := uint64(o.CoreDriversLength)
		if err := w.WriteSize(dimSize1); err != nil {
			return err
		}
		sizeInfo := []uint64{
			dimSize1,
		}
		_CoreDriverDependencies_buf := utf16.Encode([]rune(o.CoreDriverDependencies))
		if uint64(len(_CoreDriverDependencies_buf)) > sizeInfo[0] {
			_CoreDriverDependencies_buf = _CoreDriverDependencies_buf[:sizeInfo[0]]
		}
		for i1 := range _CoreDriverDependencies_buf {
			i1 := i1
			if uint64(i1) >= sizeInfo[0] {
				break
			}
			if err := w.WriteData(_CoreDriverDependencies_buf[i1]); err != nil {
				return err
			}
		}
		for i1 := len(_CoreDriverDependencies_buf); uint64(i1) < sizeInfo[0]; i1++ {
			if err := w.WriteData(uint16(0)); err != nil {
				return err
			}
		}
	}
	// cCorePrinterDrivers {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.CorePrinterDriversCount); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetCorePrinterDriversOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// pszServer {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pszServer := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Server); err != nil {
				return err
			}
			return nil
		})
		_s_pszServer := func(ptr interface{}) { o.Server = *ptr.(*string) }
		if err := w.ReadPointer(&o.Server, _s_pszServer, _ptr_pszServer); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pszEnvironment {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.Environment); err != nil {
			return err
		}
	}
	// cchCoreDrivers {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.CoreDriversLength); err != nil {
			return err
		}
	}
	// pszzCoreDriverDependencies {in} (1:{pointer=ref}*(1)[dim:0,size_is=cchCoreDrivers,string](wchar))
	{
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		var _CoreDriverDependencies_buf []uint16
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array _CoreDriverDependencies_buf", sizeInfo[0])
		}
		_CoreDriverDependencies_buf = make([]uint16, sizeInfo[0])
		for i1 := range _CoreDriverDependencies_buf {
			i1 := i1
			if err := w.ReadData(&_CoreDriverDependencies_buf[i1]); err != nil {
				return err
			}
		}
		o.CoreDriverDependencies = strings.TrimRight(string(utf16.Decode(_CoreDriverDependencies_buf)), ndr.ZeroString)
	}
	// cCorePrinterDrivers {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.CorePrinterDriversCount); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetCorePrinterDriversOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetCorePrinterDriversOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// pCorePrinterDrivers {out} (1:{pointer=ref}*(1))(2:{alias=CORE_PRINTER_DRIVER}[dim:0,size_is=cCorePrinterDrivers](struct))
	{
		dimSize1 := uint64(o.CorePrinterDriversCount)
		if err := w.WriteSize(dimSize1); err != nil {
			return err
		}
		sizeInfo := []uint64{
			dimSize1,
		}
		for i1 := range o.CorePrinterDrivers {
			i1 := i1
			if uint64(i1) >= sizeInfo[0] {
				break
			}
			if o.CorePrinterDrivers[i1] != nil {
				if err := o.CorePrinterDrivers[i1].MarshalNDR(ctx, w); err != nil {
					return err
				}
			} else {
				if err := (&CorePrinterDriver{}).MarshalNDR(ctx, w); err != nil {
					return err
				}
			}
		}
		for i1 := len(o.CorePrinterDrivers); uint64(i1) < sizeInfo[0]; i1++ {
			if err := (&CorePrinterDriver{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// Return {out} (1:{alias=HRESULT, names=LONG}(int32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetCorePrinterDriversOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// pCorePrinterDrivers {out} (1:{pointer=ref}*(1))(2:{alias=CORE_PRINTER_DRIVER}[dim:0,size_is=cCorePrinterDrivers](struct))
	{
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array o.CorePrinterDrivers", sizeInfo[0])
		}
		o.CorePrinterDrivers = make([]*CorePrinterDriver, sizeInfo[0])
		for i1 := range o.CorePrinterDrivers {
			i1 := i1
			if o.CorePrinterDrivers[i1] == nil {
				o.CorePrinterDrivers[i1] = &CorePrinterDriver{}
			}
			if err := o.CorePrinterDrivers[i1].UnmarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// Return {out} (1:{alias=HRESULT, names=LONG}(int32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// GetCorePrinterDriversRequest structure represents the RpcAsyncGetCorePrinterDrivers operation request
type GetCorePrinterDriversRequest struct {
	// pszServer: A pointer to a string that specifies the name of the print server from
	// which to get the core printer driver information. This string contains a server name
	// that is identical to the server name that was used to create the hRemoteBinding parameter.
	// For details on RPC bind handles, see [MS-RPCE]. For rules governing print server
	// names, see [MS-RPRN] section 2.2.4.16.
	Server string `idl:"name:pszServer;string;pointer:unique" json:"server"`
	// pszEnvironment: A pointer to a string that specifies the environment name for which
	// the core printer driver information will be returned. For rules governing environment
	// names, see [MS-RPRN] section 2.2.4.4.
	Environment string `idl:"name:pszEnvironment;string" json:"environment"`
	// cchCoreDrivers: The size, in bytes, of the buffer that is referenced by the pszzCoreDriverDependencies
	// parameter.
	CoreDriversLength uint32 `idl:"name:cchCoreDrivers" json:"core_drivers_length"`
	// pszzCoreDriverDependencies: A pointer to a multisz that contains a list of IDs <22>
	// of the core printer drivers to be retrieved.
	//
	// *
	//
	// Call *RpcAsyncGetPrinterDriver* (section 3.1.4.2.1 ( ea314d84-f508-48b8-9dee-46fed1719600
	// ) ) with a Level parameter value of 0x00000008.
	//
	// *
	//
	// A *_DRIVER_INFO_8* custom-marshaled structure ([MS-RPRN] section 2.2.2.4.8 ( ../ms-rprn/f9b749d6-08fc-4820-8d7b-fe0ee33e42c5
	// ) ) is returned in the pDriver parameter.
	//
	// *
	//
	// In the *_DRIVER_INFO_8* , the *szzCoreDependenciesOffset* field contains an offset
	// to a multisz that contains the list of IDs.
	CoreDriverDependencies string `idl:"name:pszzCoreDriverDependencies;size_is:(cchCoreDrivers)" json:"core_driver_dependencies"`
	// cCorePrinterDrivers: The count of CORE_PRINTER_DRIVER structures (section 2.2.8)
	// that are contained in the buffer that is pointed to by the pCorePrinterDrivers parameter.
	// It equals the number of IDs that are specified in the multisz that is pointed to
	// by the pszzCoreDriverDependencies parameter.
	CorePrinterDriversCount uint32 `idl:"name:cCorePrinterDrivers" json:"core_printer_drivers_count"`
}

func (o *GetCorePrinterDriversRequest) xxx_ToOp(ctx context.Context, op *xxx_GetCorePrinterDriversOperation) *xxx_GetCorePrinterDriversOperation {
	if op == nil {
		op = &xxx_GetCorePrinterDriversOperation{}
	}
	if o == nil {
		return op
	}
	op.Server = o.Server
	op.Environment = o.Environment
	op.CoreDriversLength = o.CoreDriversLength
	op.CoreDriverDependencies = o.CoreDriverDependencies
	op.CorePrinterDriversCount = o.CorePrinterDriversCount
	return op
}

func (o *GetCorePrinterDriversRequest) xxx_FromOp(ctx context.Context, op *xxx_GetCorePrinterDriversOperation) {
	if o == nil {
		return
	}
	o.Server = op.Server
	o.Environment = op.Environment
	o.CoreDriversLength = op.CoreDriversLength
	o.CoreDriverDependencies = op.CoreDriverDependencies
	o.CorePrinterDriversCount = op.CorePrinterDriversCount
}
func (o *GetCorePrinterDriversRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *GetCorePrinterDriversRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_GetCorePrinterDriversOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// GetCorePrinterDriversResponse structure represents the RpcAsyncGetCorePrinterDrivers operation response
type GetCorePrinterDriversResponse struct {
	// XXX: cCorePrinterDrivers is an implicit input depedency for output parameters
	CorePrinterDriversCount uint32 `idl:"name:cCorePrinterDrivers" json:"core_printer_drivers_count"`

	// pCorePrinterDrivers: A pointer to a buffer that receives an array of CORE_PRINTER_DRIVER
	// structures.
	CorePrinterDrivers []*CorePrinterDriver `idl:"name:pCorePrinterDrivers;size_is:(cCorePrinterDrivers)" json:"core_printer_drivers"`
	// Return: The RpcAsyncGetCorePrinterDrivers return value.
	Return int32 `idl:"name:Return" json:"return"`
}

func (o *GetCorePrinterDriversResponse) xxx_ToOp(ctx context.Context, op *xxx_GetCorePrinterDriversOperation) *xxx_GetCorePrinterDriversOperation {
	if op == nil {
		op = &xxx_GetCorePrinterDriversOperation{}
	}
	if o == nil {
		return op
	}
	// XXX: implicit input dependencies for output parameters
	if op.CorePrinterDriversCount == uint32(0) {
		op.CorePrinterDriversCount = o.CorePrinterDriversCount
	}

	op.CorePrinterDrivers = o.CorePrinterDrivers
	op.Return = o.Return
	return op
}

func (o *GetCorePrinterDriversResponse) xxx_FromOp(ctx context.Context, op *xxx_GetCorePrinterDriversOperation) {
	if o == nil {
		return
	}
	// XXX: implicit input dependencies for output parameters
	o.CorePrinterDriversCount = op.CorePrinterDriversCount

	o.CorePrinterDrivers = op.CorePrinterDrivers
	o.Return = op.Return
}
func (o *GetCorePrinterDriversResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *GetCorePrinterDriversResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_GetCorePrinterDriversOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_CorePrinterDriverInstalledOperation structure represents the RpcAsyncCorePrinterDriverInstalled operation
type xxx_CorePrinterDriverInstalledOperation struct {
	Server          string         `idl:"name:pszServer;string;pointer:unique" json:"server"`
	Environment     string         `idl:"name:pszEnvironment;string" json:"environment"`
	CoreDriverGUID  *dtyp.GUID     `idl:"name:CoreDriverGUID" json:"core_driver_guid"`
	DriverDate      *dtyp.Filetime `idl:"name:ftDriverDate" json:"driver_date"`
	DriverVersion   uint64         `idl:"name:dwlDriverVersion" json:"driver_version"`
	DriverInstalled int32          `idl:"name:pbDriverInstalled" json:"driver_installed"`
	Return          int32          `idl:"name:Return" json:"return"`
}

func (o *xxx_CorePrinterDriverInstalledOperation) OpNum() int { return 65 }

func (o *xxx_CorePrinterDriverInstalledOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncCorePrinterDriverInstalled"
}

func (o *xxx_CorePrinterDriverInstalledOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_CorePrinterDriverInstalledOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// pszServer {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Server != "" {
			_ptr_pszServer := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Server); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Server, _ptr_pszServer); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pszEnvironment {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.Environment); err != nil {
			return err
		}
	}
	// CoreDriverGUID {in} (1:{alias=GUID}(struct))
	{
		if o.CoreDriverGUID != nil {
			if err := o.CoreDriverGUID.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&dtyp.GUID{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// ftDriverDate {in} (1:{alias=FILETIME}(struct))
	{
		if o.DriverDate != nil {
			if err := o.DriverDate.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&dtyp.Filetime{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// dwlDriverVersion {in} (1:{alias=DWORDLONG, names=ULONGLONG}(uint64))
	{
		if err := w.WriteData(o.DriverVersion); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_CorePrinterDriverInstalledOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// pszServer {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pszServer := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Server); err != nil {
				return err
			}
			return nil
		})
		_s_pszServer := func(ptr interface{}) { o.Server = *ptr.(*string) }
		if err := w.ReadPointer(&o.Server, _s_pszServer, _ptr_pszServer); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pszEnvironment {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.Environment); err != nil {
			return err
		}
	}
	// CoreDriverGUID {in} (1:{alias=GUID}(struct))
	{
		if o.CoreDriverGUID == nil {
			o.CoreDriverGUID = &dtyp.GUID{}
		}
		if err := o.CoreDriverGUID.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// ftDriverDate {in} (1:{alias=FILETIME}(struct))
	{
		if o.DriverDate == nil {
			o.DriverDate = &dtyp.Filetime{}
		}
		if err := o.DriverDate.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// dwlDriverVersion {in} (1:{alias=DWORDLONG, names=ULONGLONG}(uint64))
	{
		if err := w.ReadData(&o.DriverVersion); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_CorePrinterDriverInstalledOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_CorePrinterDriverInstalledOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// pbDriverInstalled {out} (1:{pointer=ref}*(1)(int32))
	{
		if err := w.WriteData(o.DriverInstalled); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=HRESULT, names=LONG}(int32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_CorePrinterDriverInstalledOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// pbDriverInstalled {out} (1:{pointer=ref}*(1)(int32))
	{
		if err := w.ReadData(&o.DriverInstalled); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=HRESULT, names=LONG}(int32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// CorePrinterDriverInstalledRequest structure represents the RpcAsyncCorePrinterDriverInstalled operation request
type CorePrinterDriverInstalledRequest struct {
	// pszServer: A pointer to a string that contains the name of the print server to check
	// and determine if a core printer driver is installed. This server name MUST be identical
	// to the server name that was used to create the hRemoteBinding parameter. For details
	// on RPC bind handles, see [MS-RPCE]. For rules governing print server names, see [MS-RPRN]
	// section 2.2.4.16.
	Server string `idl:"name:pszServer;string;pointer:unique" json:"server"`
	// pszEnvironment: A pointer to a string that contains the environment name of the core
	// printer driver. For rules governing environment names and behaviors, see [MS-RPRN]
	// section 2.2.4.4.
	Environment string `idl:"name:pszEnvironment;string" json:"environment"`
	// CoreDriverGUID: The GUID of the core printer driver.
	CoreDriverGUID *dtyp.GUID `idl:"name:CoreDriverGUID" json:"core_driver_guid"`
	// ftDriverDate: The date of the core printer driver.<23>
	DriverDate *dtyp.Filetime `idl:"name:ftDriverDate" json:"driver_date"`
	// dwlDriverVersion: The version<24> of the core printer driver.
	DriverVersion uint64 `idl:"name:dwlDriverVersion" json:"driver_version"`
}

func (o *CorePrinterDriverInstalledRequest) xxx_ToOp(ctx context.Context, op *xxx_CorePrinterDriverInstalledOperation) *xxx_CorePrinterDriverInstalledOperation {
	if op == nil {
		op = &xxx_CorePrinterDriverInstalledOperation{}
	}
	if o == nil {
		return op
	}
	op.Server = o.Server
	op.Environment = o.Environment
	op.CoreDriverGUID = o.CoreDriverGUID
	op.DriverDate = o.DriverDate
	op.DriverVersion = o.DriverVersion
	return op
}

func (o *CorePrinterDriverInstalledRequest) xxx_FromOp(ctx context.Context, op *xxx_CorePrinterDriverInstalledOperation) {
	if o == nil {
		return
	}
	o.Server = op.Server
	o.Environment = op.Environment
	o.CoreDriverGUID = op.CoreDriverGUID
	o.DriverDate = op.DriverDate
	o.DriverVersion = op.DriverVersion
}
func (o *CorePrinterDriverInstalledRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *CorePrinterDriverInstalledRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_CorePrinterDriverInstalledOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// CorePrinterDriverInstalledResponse structure represents the RpcAsyncCorePrinterDriverInstalled operation response
type CorePrinterDriverInstalledResponse struct {
	// pbDriverInstalled: A pointer to a variable that receives one of the following values.
	//
	//	+-------+-----------------------------------------------------------------+
	//	|       |                                                                 |
	//	| VALUE |                             MEANING                             |
	//	|       |                                                                 |
	//	+-------+-----------------------------------------------------------------+
	//	+-------+-----------------------------------------------------------------+
	//	|     0 | The driver, or a newer version of the driver, is not installed. |
	//	+-------+-----------------------------------------------------------------+
	//	|     1 | The driver, or a newer version of the driver, is installed.     |
	//	+-------+-----------------------------------------------------------------+
	DriverInstalled int32 `idl:"name:pbDriverInstalled" json:"driver_installed"`
	// Return: The RpcAsyncCorePrinterDriverInstalled return value.
	Return int32 `idl:"name:Return" json:"return"`
}

func (o *CorePrinterDriverInstalledResponse) xxx_ToOp(ctx context.Context, op *xxx_CorePrinterDriverInstalledOperation) *xxx_CorePrinterDriverInstalledOperation {
	if op == nil {
		op = &xxx_CorePrinterDriverInstalledOperation{}
	}
	if o == nil {
		return op
	}
	op.DriverInstalled = o.DriverInstalled
	op.Return = o.Return
	return op
}

func (o *CorePrinterDriverInstalledResponse) xxx_FromOp(ctx context.Context, op *xxx_CorePrinterDriverInstalledOperation) {
	if o == nil {
		return
	}
	o.DriverInstalled = op.DriverInstalled
	o.Return = op.Return
}
func (o *CorePrinterDriverInstalledResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *CorePrinterDriverInstalledResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_CorePrinterDriverInstalledOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_GetPrinterDriverPackagePathOperation structure represents the RpcAsyncGetPrinterDriverPackagePath operation
type xxx_GetPrinterDriverPackagePathOperation struct {
	Server                 string `idl:"name:pszServer;string;pointer:unique" json:"server"`
	Environment            string `idl:"name:pszEnvironment;string" json:"environment"`
	Language               string `idl:"name:pszLanguage;string;pointer:unique" json:"language"`
	PackageID              string `idl:"name:pszPackageID;string" json:"package_id"`
	DriverPackageCab       string `idl:"name:pszDriverPackageCab;size_is:(cchDriverPackageCab);pointer:unique" json:"driver_package_cab"`
	DriverPackageCabLength uint32 `idl:"name:cchDriverPackageCab" json:"driver_package_cab_length"`
	RequiredLength         uint32 `idl:"name:pcchRequiredSize" json:"required_length"`
	Return                 int32  `idl:"name:Return" json:"return"`
}

func (o *xxx_GetPrinterDriverPackagePathOperation) OpNum() int { return 66 }

func (o *xxx_GetPrinterDriverPackagePathOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncGetPrinterDriverPackagePath"
}

func (o *xxx_GetPrinterDriverPackagePathOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if o.DriverPackageCab != "" && o.DriverPackageCabLength == 0 {
		o.DriverPackageCabLength = uint32(ndr.UTF16Len(o.DriverPackageCab))
	}
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetPrinterDriverPackagePathOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// pszServer {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Server != "" {
			_ptr_pszServer := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Server); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Server, _ptr_pszServer); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pszEnvironment {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.Environment); err != nil {
			return err
		}
	}
	// pszLanguage {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Language != "" {
			_ptr_pszLanguage := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Language); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Language, _ptr_pszLanguage); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pszPackageID {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.PackageID); err != nil {
			return err
		}
	}
	// pszDriverPackageCab {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cchDriverPackageCab,string](wchar))
	{
		if o.DriverPackageCab != "" || o.DriverPackageCabLength > 0 {
			_ptr_pszDriverPackageCab := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.DriverPackageCabLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				_DriverPackageCab_buf := utf16.Encode([]rune(o.DriverPackageCab))
				if uint64(len(_DriverPackageCab_buf)) > sizeInfo[0] {
					_DriverPackageCab_buf = _DriverPackageCab_buf[:sizeInfo[0]]
				}
				for i1 := range _DriverPackageCab_buf {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(_DriverPackageCab_buf[i1]); err != nil {
						return err
					}
				}
				for i1 := len(_DriverPackageCab_buf); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint16(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.DriverPackageCab, _ptr_pszDriverPackageCab); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// cchDriverPackageCab {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.DriverPackageCabLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetPrinterDriverPackagePathOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// pszServer {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pszServer := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Server); err != nil {
				return err
			}
			return nil
		})
		_s_pszServer := func(ptr interface{}) { o.Server = *ptr.(*string) }
		if err := w.ReadPointer(&o.Server, _s_pszServer, _ptr_pszServer); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pszEnvironment {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.Environment); err != nil {
			return err
		}
	}
	// pszLanguage {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pszLanguage := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Language); err != nil {
				return err
			}
			return nil
		})
		_s_pszLanguage := func(ptr interface{}) { o.Language = *ptr.(*string) }
		if err := w.ReadPointer(&o.Language, _s_pszLanguage, _ptr_pszLanguage); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pszPackageID {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.PackageID); err != nil {
			return err
		}
	}
	// pszDriverPackageCab {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cchDriverPackageCab,string](wchar))
	{
		_ptr_pszDriverPackageCab := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			var _DriverPackageCab_buf []uint16
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array _DriverPackageCab_buf", sizeInfo[0])
			}
			_DriverPackageCab_buf = make([]uint16, sizeInfo[0])
			for i1 := range _DriverPackageCab_buf {
				i1 := i1
				if err := w.ReadData(&_DriverPackageCab_buf[i1]); err != nil {
					return err
				}
			}
			o.DriverPackageCab = strings.TrimRight(string(utf16.Decode(_DriverPackageCab_buf)), ndr.ZeroString)
			return nil
		})
		_s_pszDriverPackageCab := func(ptr interface{}) { o.DriverPackageCab = *ptr.(*string) }
		if err := w.ReadPointer(&o.DriverPackageCab, _s_pszDriverPackageCab, _ptr_pszDriverPackageCab); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// cchDriverPackageCab {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.DriverPackageCabLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetPrinterDriverPackagePathOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetPrinterDriverPackagePathOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// pszDriverPackageCab {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cchDriverPackageCab,string](wchar))
	{
		if o.DriverPackageCab != "" || o.DriverPackageCabLength > 0 {
			_ptr_pszDriverPackageCab := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.DriverPackageCabLength)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				_DriverPackageCab_buf := utf16.Encode([]rune(o.DriverPackageCab))
				if uint64(len(_DriverPackageCab_buf)) > sizeInfo[0] {
					_DriverPackageCab_buf = _DriverPackageCab_buf[:sizeInfo[0]]
				}
				for i1 := range _DriverPackageCab_buf {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if err := w.WriteData(_DriverPackageCab_buf[i1]); err != nil {
						return err
					}
				}
				for i1 := len(_DriverPackageCab_buf); uint64(i1) < sizeInfo[0]; i1++ {
					if err := w.WriteData(uint16(0)); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.DriverPackageCab, _ptr_pszDriverPackageCab); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pcchRequiredSize {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.RequiredLength); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=HRESULT, names=LONG}(int32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetPrinterDriverPackagePathOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// pszDriverPackageCab {in, out} (1:{pointer=unique}*(1)[dim:0,size_is=cchDriverPackageCab,string](wchar))
	{
		_ptr_pszDriverPackageCab := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			var _DriverPackageCab_buf []uint16
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array _DriverPackageCab_buf", sizeInfo[0])
			}
			_DriverPackageCab_buf = make([]uint16, sizeInfo[0])
			for i1 := range _DriverPackageCab_buf {
				i1 := i1
				if err := w.ReadData(&_DriverPackageCab_buf[i1]); err != nil {
					return err
				}
			}
			o.DriverPackageCab = strings.TrimRight(string(utf16.Decode(_DriverPackageCab_buf)), ndr.ZeroString)
			return nil
		})
		_s_pszDriverPackageCab := func(ptr interface{}) { o.DriverPackageCab = *ptr.(*string) }
		if err := w.ReadPointer(&o.DriverPackageCab, _s_pszDriverPackageCab, _ptr_pszDriverPackageCab); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pcchRequiredSize {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.RequiredLength); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=HRESULT, names=LONG}(int32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// GetPrinterDriverPackagePathRequest structure represents the RpcAsyncGetPrinterDriverPackagePath operation request
type GetPrinterDriverPackagePathRequest struct {
	// pszServer: A pointer to a string that contains the name of the print server from
	// which to get the printer driver package path. This server name MUST be identical
	// to the server name that was used to create the hRemoteBinding parameter. For details
	// on RPC bind handles, see [MS-RPCE]. For rules governing print server names, see [MS-RPRN]
	// section 2.2.4.16.
	Server string `idl:"name:pszServer;string;pointer:unique" json:"server"`
	// pszEnvironment: A pointer to a string that contains the environment name for which
	// the driver package path is returned. For rules governing environment names and behaviors,
	// see [MS-RPRN] section 2.2.4.4.
	Environment string `idl:"name:pszEnvironment;string" json:"environment"`
	// pszLanguage: A pointer to a string that contains the language for which the driver
	// package path is returned.<25> Providing this pointer is optional. If the pointer
	// is not provided, the value of this parameter MUST be NULL.
	Language string `idl:"name:pszLanguage;string;pointer:unique" json:"language"`
	// pszPackageID: A pointer to a string that contains package name. The package name
	// is obtained by calling RpcAsyncGetCorePrinterDrivers.
	PackageID string `idl:"name:pszPackageID;string" json:"package_id"`
	// pszDriverPackageCab: A pointer to a string that contains the path name of the driver
	// package file.<26> For rules governing path names, see [MS-RPRN] section 2.2.4.9.
	// The pszDriverPackageCab parameter MUST NOT be NULL unless cchDriverPackageCab is
	// zero.
	DriverPackageCab string `idl:"name:pszDriverPackageCab;size_is:(cchDriverPackageCab);pointer:unique" json:"driver_package_cab"`
	// cchDriverPackageCab: The size, in characters, of the buffer that is referenced by
	// the pszDriverPackageCab parameter. The value of this parameter MAY<27> be zero.
	DriverPackageCabLength uint32 `idl:"name:cchDriverPackageCab" json:"driver_package_cab_length"`
}

func (o *GetPrinterDriverPackagePathRequest) xxx_ToOp(ctx context.Context, op *xxx_GetPrinterDriverPackagePathOperation) *xxx_GetPrinterDriverPackagePathOperation {
	if op == nil {
		op = &xxx_GetPrinterDriverPackagePathOperation{}
	}
	if o == nil {
		return op
	}
	op.Server = o.Server
	op.Environment = o.Environment
	op.Language = o.Language
	op.PackageID = o.PackageID
	op.DriverPackageCab = o.DriverPackageCab
	op.DriverPackageCabLength = o.DriverPackageCabLength
	return op
}

func (o *GetPrinterDriverPackagePathRequest) xxx_FromOp(ctx context.Context, op *xxx_GetPrinterDriverPackagePathOperation) {
	if o == nil {
		return
	}
	o.Server = op.Server
	o.Environment = op.Environment
	o.Language = op.Language
	o.PackageID = op.PackageID
	o.DriverPackageCab = op.DriverPackageCab
	o.DriverPackageCabLength = op.DriverPackageCabLength
}
func (o *GetPrinterDriverPackagePathRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *GetPrinterDriverPackagePathRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_GetPrinterDriverPackagePathOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// GetPrinterDriverPackagePathResponse structure represents the RpcAsyncGetPrinterDriverPackagePath operation response
type GetPrinterDriverPackagePathResponse struct {
	// XXX: cchDriverPackageCab is an implicit input depedency for output parameters
	DriverPackageCabLength uint32 `idl:"name:cchDriverPackageCab" json:"driver_package_cab_length"`

	// pszDriverPackageCab: A pointer to a string that contains the path name of the driver
	// package file.<26> For rules governing path names, see [MS-RPRN] section 2.2.4.9.
	// The pszDriverPackageCab parameter MUST NOT be NULL unless cchDriverPackageCab is
	// zero.
	DriverPackageCab string `idl:"name:pszDriverPackageCab;size_is:(cchDriverPackageCab);pointer:unique" json:"driver_package_cab"`
	// pcchRequiredSize: A pointer to a variable that receives the required size of the
	// buffer that is pointed to by the pszDriverPackageCab parameter.
	RequiredLength uint32 `idl:"name:pcchRequiredSize" json:"required_length"`
	// Return: The RpcAsyncGetPrinterDriverPackagePath return value.
	Return int32 `idl:"name:Return" json:"return"`
}

func (o *GetPrinterDriverPackagePathResponse) xxx_ToOp(ctx context.Context, op *xxx_GetPrinterDriverPackagePathOperation) *xxx_GetPrinterDriverPackagePathOperation {
	if op == nil {
		op = &xxx_GetPrinterDriverPackagePathOperation{}
	}
	if o == nil {
		return op
	}
	// XXX: implicit input dependencies for output parameters
	if op.DriverPackageCabLength == uint32(0) {
		op.DriverPackageCabLength = o.DriverPackageCabLength
	}

	op.DriverPackageCab = o.DriverPackageCab
	op.RequiredLength = o.RequiredLength
	op.Return = o.Return
	return op
}

func (o *GetPrinterDriverPackagePathResponse) xxx_FromOp(ctx context.Context, op *xxx_GetPrinterDriverPackagePathOperation) {
	if o == nil {
		return
	}
	// XXX: implicit input dependencies for output parameters
	o.DriverPackageCabLength = op.DriverPackageCabLength

	o.DriverPackageCab = op.DriverPackageCab
	o.RequiredLength = op.RequiredLength
	o.Return = op.Return
}
func (o *GetPrinterDriverPackagePathResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *GetPrinterDriverPackagePathResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_GetPrinterDriverPackagePathOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_DeletePrinterDriverPackageOperation structure represents the RpcAsyncDeletePrinterDriverPackage operation
type xxx_DeletePrinterDriverPackageOperation struct {
	Server      string `idl:"name:pszServer;string;pointer:unique" json:"server"`
	InfPath     string `idl:"name:pszInfPath;string" json:"inf_path"`
	Environment string `idl:"name:pszEnvironment;string" json:"environment"`
	Return      int32  `idl:"name:Return" json:"return"`
}

func (o *xxx_DeletePrinterDriverPackageOperation) OpNum() int { return 67 }

func (o *xxx_DeletePrinterDriverPackageOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncDeletePrinterDriverPackage"
}

func (o *xxx_DeletePrinterDriverPackageOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterDriverPackageOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// pszServer {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.Server != "" {
			_ptr_pszServer := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.Server); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.Server, _ptr_pszServer); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pszInfPath {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.InfPath); err != nil {
			return err
		}
	}
	// pszEnvironment {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.Environment); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterDriverPackageOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// pszServer {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pszServer := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.Server); err != nil {
				return err
			}
			return nil
		})
		_s_pszServer := func(ptr interface{}) { o.Server = *ptr.(*string) }
		if err := w.ReadPointer(&o.Server, _s_pszServer, _ptr_pszServer); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pszInfPath {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.InfPath); err != nil {
			return err
		}
	}
	// pszEnvironment {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.Environment); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterDriverPackageOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterDriverPackageOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// Return {out} (1:{alias=HRESULT, names=LONG}(int32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeletePrinterDriverPackageOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// Return {out} (1:{alias=HRESULT, names=LONG}(int32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// DeletePrinterDriverPackageRequest structure represents the RpcAsyncDeletePrinterDriverPackage operation request
type DeletePrinterDriverPackageRequest struct {
	// pszServer: A non-NULL pointer to a string that specifies the name of the print server
	// from which to delete the printer driver package. This string contains a server name
	// that is identical to the server name that was used to create the hRemoteBinding parameter.
	// For details on RPC bind handles, see [MS-RPCE]. For rules governing print server
	// names, see [MS-RPRN] section 2.2.4.16.
	Server string `idl:"name:pszServer;string;pointer:unique" json:"server"`
	// pszInfPath: A non-NULL pointer to a string that specifies the path name of a driver
	// installation control file that specifies the printer driver and MAY<28> be used to
	// delete the driver from the print server. For rules governing path names, see [MS-RPRN]
	// section 2.2.4.9.
	InfPath string `idl:"name:pszInfPath;string" json:"inf_path"`
	// pszEnvironment: A non-NULL pointer to a string that specifies the environment name
	// for which the driver will be deleted. For rules governing environment names, see
	// [MS-RPRN] section 2.2.4.4.
	Environment string `idl:"name:pszEnvironment;string" json:"environment"`
}

func (o *DeletePrinterDriverPackageRequest) xxx_ToOp(ctx context.Context, op *xxx_DeletePrinterDriverPackageOperation) *xxx_DeletePrinterDriverPackageOperation {
	if op == nil {
		op = &xxx_DeletePrinterDriverPackageOperation{}
	}
	if o == nil {
		return op
	}
	op.Server = o.Server
	op.InfPath = o.InfPath
	op.Environment = o.Environment
	return op
}

func (o *DeletePrinterDriverPackageRequest) xxx_FromOp(ctx context.Context, op *xxx_DeletePrinterDriverPackageOperation) {
	if o == nil {
		return
	}
	o.Server = op.Server
	o.InfPath = op.InfPath
	o.Environment = op.Environment
}
func (o *DeletePrinterDriverPackageRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *DeletePrinterDriverPackageRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_DeletePrinterDriverPackageOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// DeletePrinterDriverPackageResponse structure represents the RpcAsyncDeletePrinterDriverPackage operation response
type DeletePrinterDriverPackageResponse struct {
	// Return: The RpcAsyncDeletePrinterDriverPackage return value.
	Return int32 `idl:"name:Return" json:"return"`
}

func (o *DeletePrinterDriverPackageResponse) xxx_ToOp(ctx context.Context, op *xxx_DeletePrinterDriverPackageOperation) *xxx_DeletePrinterDriverPackageOperation {
	if op == nil {
		op = &xxx_DeletePrinterDriverPackageOperation{}
	}
	if o == nil {
		return op
	}
	op.Return = o.Return
	return op
}

func (o *DeletePrinterDriverPackageResponse) xxx_FromOp(ctx context.Context, op *xxx_DeletePrinterDriverPackageOperation) {
	if o == nil {
		return
	}
	o.Return = op.Return
}
func (o *DeletePrinterDriverPackageResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *DeletePrinterDriverPackageResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_DeletePrinterDriverPackageOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_ReadPrinterOperation structure represents the RpcAsyncReadPrinter operation
type xxx_ReadPrinterOperation struct {
	Printer          *Printer `idl:"name:hPrinter" json:"printer"`
	Buffer           []byte   `idl:"name:pBuf;size_is:(cbBuf)" json:"buffer"`
	BufferLength     uint32   `idl:"name:cbBuf" json:"buffer_length"`
	NoBytesReadCount uint32   `idl:"name:pcNoBytesRead" json:"no_bytes_read_count"`
	Return           uint32   `idl:"name:Return" json:"return"`
}

func (o *xxx_ReadPrinterOperation) OpNum() int { return 68 }

func (o *xxx_ReadPrinterOperation) OpName() string { return "/IRemoteWinspool/v1/RpcAsyncReadPrinter" }

func (o *xxx_ReadPrinterOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_ReadPrinterOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.BufferLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_ReadPrinterOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// cbBuf {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.BufferLength); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_ReadPrinterOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_ReadPrinterOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// pBuf {out} (1:{pointer=ref}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		dimSize1 := uint64(o.BufferLength)
		if err := w.WriteSize(dimSize1); err != nil {
			return err
		}
		sizeInfo := []uint64{
			dimSize1,
		}
		for i1 := range o.Buffer {
			i1 := i1
			if uint64(i1) >= sizeInfo[0] {
				break
			}
			if err := w.WriteData(o.Buffer[i1]); err != nil {
				return err
			}
		}
		for i1 := len(o.Buffer); uint64(i1) < sizeInfo[0]; i1++ {
			if err := w.WriteData(uint8(0)); err != nil {
				return err
			}
		}
	}
	// pcNoBytesRead {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.NoBytesReadCount); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_ReadPrinterOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// pBuf {out} (1:{pointer=ref}*(1)[dim:0,size_is=cbBuf](uchar))
	{
		sizeInfo := []uint64{
			0,
		}
		for sz1 := range sizeInfo {
			if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
				return err
			}
		}
		if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
			return fmt.Errorf("buffer overflow for size %d of array o.Buffer", sizeInfo[0])
		}
		o.Buffer = make([]byte, sizeInfo[0])
		for i1 := range o.Buffer {
			i1 := i1
			if err := w.ReadData(&o.Buffer[i1]); err != nil {
				return err
			}
		}
	}
	// pcNoBytesRead {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.NoBytesReadCount); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// ReadPrinterRequest structure represents the RpcAsyncReadPrinter operation request
type ReadPrinterRequest struct {
	// hPrinter: A handle to a job object that has been opened by using either RpcAsyncOpenPrinter
	// (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer      *Printer `idl:"name:hPrinter" json:"printer"`
	BufferLength uint32   `idl:"name:cbBuf" json:"buffer_length"`
}

func (o *ReadPrinterRequest) xxx_ToOp(ctx context.Context, op *xxx_ReadPrinterOperation) *xxx_ReadPrinterOperation {
	if op == nil {
		op = &xxx_ReadPrinterOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.BufferLength = o.BufferLength
	return op
}

func (o *ReadPrinterRequest) xxx_FromOp(ctx context.Context, op *xxx_ReadPrinterOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.BufferLength = op.BufferLength
}
func (o *ReadPrinterRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *ReadPrinterRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_ReadPrinterOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// ReadPrinterResponse structure represents the RpcAsyncReadPrinter operation response
type ReadPrinterResponse struct {
	// XXX: cbBuf is an implicit input depedency for output parameters
	BufferLength uint32 `idl:"name:cbBuf" json:"buffer_length"`

	Buffer           []byte `idl:"name:pBuf;size_is:(cbBuf)" json:"buffer"`
	NoBytesReadCount uint32 `idl:"name:pcNoBytesRead" json:"no_bytes_read_count"`
	// Return: The RpcAsyncReadPrinter return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *ReadPrinterResponse) xxx_ToOp(ctx context.Context, op *xxx_ReadPrinterOperation) *xxx_ReadPrinterOperation {
	if op == nil {
		op = &xxx_ReadPrinterOperation{}
	}
	if o == nil {
		return op
	}
	// XXX: implicit input dependencies for output parameters
	if op.BufferLength == uint32(0) {
		op.BufferLength = o.BufferLength
	}

	op.Buffer = o.Buffer
	op.NoBytesReadCount = o.NoBytesReadCount
	op.Return = o.Return
	return op
}

func (o *ReadPrinterResponse) xxx_FromOp(ctx context.Context, op *xxx_ReadPrinterOperation) {
	if o == nil {
		return
	}
	// XXX: implicit input dependencies for output parameters
	o.BufferLength = op.BufferLength

	o.Buffer = op.Buffer
	o.NoBytesReadCount = op.NoBytesReadCount
	o.Return = op.Return
}
func (o *ReadPrinterResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *ReadPrinterResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_ReadPrinterOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_ResetPrinterOperation structure represents the RpcAsyncResetPrinter operation
type xxx_ResetPrinterOperation struct {
	Printer          *Printer          `idl:"name:hPrinter" json:"printer"`
	DataType         string            `idl:"name:pDatatype;string;pointer:unique" json:"data_type"`
	DevModeContainer *DevModeContainer `idl:"name:pDevModeContainer" json:"dev_mode_container"`
	Return           uint32            `idl:"name:Return" json:"return"`
}

func (o *xxx_ResetPrinterOperation) OpNum() int { return 69 }

func (o *xxx_ResetPrinterOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncResetPrinter"
}

func (o *xxx_ResetPrinterOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_ResetPrinterOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// pDatatype {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		if o.DataType != "" {
			_ptr_pDatatype := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				if err := ndr.WriteUTF16NString(ctx, w, o.DataType); err != nil {
					return err
				}
				return nil
			})
			if err := w.WritePointer(&o.DataType, _ptr_pDatatype); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// pDevModeContainer {in} (1:{pointer=ref}*(1))(2:{alias=DEVMODE_CONTAINER}(struct))
	{
		if o.DevModeContainer != nil {
			if err := o.DevModeContainer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&DevModeContainer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_ResetPrinterOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// pDatatype {in} (1:{string, pointer=unique}*(1)[dim:0,string,null](wchar))
	{
		_ptr_pDatatype := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			if err := ndr.ReadUTF16NString(ctx, w, &o.DataType); err != nil {
				return err
			}
			return nil
		})
		_s_pDatatype := func(ptr interface{}) { o.DataType = *ptr.(*string) }
		if err := w.ReadPointer(&o.DataType, _s_pDatatype, _ptr_pDatatype); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// pDevModeContainer {in} (1:{pointer=ref}*(1))(2:{alias=DEVMODE_CONTAINER}(struct))
	{
		if o.DevModeContainer == nil {
			o.DevModeContainer = &DevModeContainer{}
		}
		if err := o.DevModeContainer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_ResetPrinterOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_ResetPrinterOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_ResetPrinterOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// ResetPrinterRequest structure represents the RpcAsyncResetPrinter operation request
type ResetPrinterRequest struct {
	// hPrinter: A handle to a printer object that has been opened using either RpcAsyncOpenPrinter
	// (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer          *Printer          `idl:"name:hPrinter" json:"printer"`
	DataType         string            `idl:"name:pDatatype;string;pointer:unique" json:"data_type"`
	DevModeContainer *DevModeContainer `idl:"name:pDevModeContainer" json:"dev_mode_container"`
}

func (o *ResetPrinterRequest) xxx_ToOp(ctx context.Context, op *xxx_ResetPrinterOperation) *xxx_ResetPrinterOperation {
	if op == nil {
		op = &xxx_ResetPrinterOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.DataType = o.DataType
	op.DevModeContainer = o.DevModeContainer
	return op
}

func (o *ResetPrinterRequest) xxx_FromOp(ctx context.Context, op *xxx_ResetPrinterOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.DataType = op.DataType
	o.DevModeContainer = op.DevModeContainer
}
func (o *ResetPrinterRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *ResetPrinterRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_ResetPrinterOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// ResetPrinterResponse structure represents the RpcAsyncResetPrinter operation response
type ResetPrinterResponse struct {
	// Return: The RpcAsyncResetPrinter return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *ResetPrinterResponse) xxx_ToOp(ctx context.Context, op *xxx_ResetPrinterOperation) *xxx_ResetPrinterOperation {
	if op == nil {
		op = &xxx_ResetPrinterOperation{}
	}
	if o == nil {
		return op
	}
	op.Return = o.Return
	return op
}

func (o *ResetPrinterResponse) xxx_FromOp(ctx context.Context, op *xxx_ResetPrinterOperation) {
	if o == nil {
		return
	}
	o.Return = op.Return
}
func (o *ResetPrinterResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *ResetPrinterResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_ResetPrinterOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_GetJobNamedPropertyValueOperation structure represents the RpcAsyncGetJobNamedPropertyValue operation
type xxx_GetJobNamedPropertyValueOperation struct {
	Printer *Printer               `idl:"name:hPrinter" json:"printer"`
	JobID   uint32                 `idl:"name:JobId" json:"job_id"`
	Name    string                 `idl:"name:pszName;string" json:"name"`
	Value   *PrintJobPropertyValue `idl:"name:pValue" json:"value"`
	Return  uint32                 `idl:"name:Return" json:"return"`
}

func (o *xxx_GetJobNamedPropertyValueOperation) OpNum() int { return 70 }

func (o *xxx_GetJobNamedPropertyValueOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncGetJobNamedPropertyValue"
}

func (o *xxx_GetJobNamedPropertyValueOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetJobNamedPropertyValueOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// JobId {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.JobID); err != nil {
			return err
		}
	}
	// pszName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.Name); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetJobNamedPropertyValueOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// JobId {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.JobID); err != nil {
			return err
		}
	}
	// pszName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.Name); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetJobNamedPropertyValueOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetJobNamedPropertyValueOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// pValue {out} (1:{pointer=ref}*(1))(2:{alias=RPC_PrintJobPropertyValue}(struct))
	{
		if o.Value != nil {
			if err := o.Value.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PrintJobPropertyValue{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_GetJobNamedPropertyValueOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// pValue {out} (1:{pointer=ref}*(1))(2:{alias=RPC_PrintJobPropertyValue}(struct))
	{
		if o.Value == nil {
			o.Value = &PrintJobPropertyValue{}
		}
		if err := o.Value.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// GetJobNamedPropertyValueRequest structure represents the RpcAsyncGetJobNamedPropertyValue operation request
type GetJobNamedPropertyValueRequest struct {
	// hPrinter: A handle to a printer object or server object that has been opened by using
	// either RpcAsyncOpenPrinter (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer *Printer `idl:"name:hPrinter" json:"printer"`
	JobID   uint32   `idl:"name:JobId" json:"job_id"`
	Name    string   `idl:"name:pszName;string" json:"name"`
}

func (o *GetJobNamedPropertyValueRequest) xxx_ToOp(ctx context.Context, op *xxx_GetJobNamedPropertyValueOperation) *xxx_GetJobNamedPropertyValueOperation {
	if op == nil {
		op = &xxx_GetJobNamedPropertyValueOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.JobID = o.JobID
	op.Name = o.Name
	return op
}

func (o *GetJobNamedPropertyValueRequest) xxx_FromOp(ctx context.Context, op *xxx_GetJobNamedPropertyValueOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.JobID = op.JobID
	o.Name = op.Name
}
func (o *GetJobNamedPropertyValueRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *GetJobNamedPropertyValueRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_GetJobNamedPropertyValueOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// GetJobNamedPropertyValueResponse structure represents the RpcAsyncGetJobNamedPropertyValue operation response
type GetJobNamedPropertyValueResponse struct {
	Value *PrintJobPropertyValue `idl:"name:pValue" json:"value"`
	// Return: The RpcAsyncGetJobNamedPropertyValue return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *GetJobNamedPropertyValueResponse) xxx_ToOp(ctx context.Context, op *xxx_GetJobNamedPropertyValueOperation) *xxx_GetJobNamedPropertyValueOperation {
	if op == nil {
		op = &xxx_GetJobNamedPropertyValueOperation{}
	}
	if o == nil {
		return op
	}
	op.Value = o.Value
	op.Return = o.Return
	return op
}

func (o *GetJobNamedPropertyValueResponse) xxx_FromOp(ctx context.Context, op *xxx_GetJobNamedPropertyValueOperation) {
	if o == nil {
		return
	}
	o.Value = op.Value
	o.Return = op.Return
}
func (o *GetJobNamedPropertyValueResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *GetJobNamedPropertyValueResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_GetJobNamedPropertyValueOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_SetJobNamedPropertyOperation structure represents the RpcAsyncSetJobNamedProperty operation
type xxx_SetJobNamedPropertyOperation struct {
	Printer  *Printer               `idl:"name:hPrinter" json:"printer"`
	JobID    uint32                 `idl:"name:JobId" json:"job_id"`
	Property *PrintJobNamedProperty `idl:"name:pProperty" json:"property"`
	Return   uint32                 `idl:"name:Return" json:"return"`
}

func (o *xxx_SetJobNamedPropertyOperation) OpNum() int { return 71 }

func (o *xxx_SetJobNamedPropertyOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncSetJobNamedProperty"
}

func (o *xxx_SetJobNamedPropertyOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SetJobNamedPropertyOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// JobId {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.JobID); err != nil {
			return err
		}
	}
	// pProperty {in} (1:{pointer=ref}*(1))(2:{alias=RPC_PrintJobNamedProperty}(struct))
	{
		if o.Property != nil {
			if err := o.Property.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&PrintJobNamedProperty{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SetJobNamedPropertyOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// JobId {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.JobID); err != nil {
			return err
		}
	}
	// pProperty {in} (1:{pointer=ref}*(1))(2:{alias=RPC_PrintJobNamedProperty}(struct))
	{
		if o.Property == nil {
			o.Property = &PrintJobNamedProperty{}
		}
		if err := o.Property.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SetJobNamedPropertyOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SetJobNamedPropertyOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_SetJobNamedPropertyOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// SetJobNamedPropertyRequest structure represents the RpcAsyncSetJobNamedProperty operation request
type SetJobNamedPropertyRequest struct {
	// hPrinter: A handle to a printer object or server object that has been opened by using
	// either RpcAsyncOpenPrinter (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer  *Printer               `idl:"name:hPrinter" json:"printer"`
	JobID    uint32                 `idl:"name:JobId" json:"job_id"`
	Property *PrintJobNamedProperty `idl:"name:pProperty" json:"property"`
}

func (o *SetJobNamedPropertyRequest) xxx_ToOp(ctx context.Context, op *xxx_SetJobNamedPropertyOperation) *xxx_SetJobNamedPropertyOperation {
	if op == nil {
		op = &xxx_SetJobNamedPropertyOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.JobID = o.JobID
	op.Property = o.Property
	return op
}

func (o *SetJobNamedPropertyRequest) xxx_FromOp(ctx context.Context, op *xxx_SetJobNamedPropertyOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.JobID = op.JobID
	o.Property = op.Property
}
func (o *SetJobNamedPropertyRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *SetJobNamedPropertyRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_SetJobNamedPropertyOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// SetJobNamedPropertyResponse structure represents the RpcAsyncSetJobNamedProperty operation response
type SetJobNamedPropertyResponse struct {
	// Return: The RpcAsyncSetJobNamedProperty return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *SetJobNamedPropertyResponse) xxx_ToOp(ctx context.Context, op *xxx_SetJobNamedPropertyOperation) *xxx_SetJobNamedPropertyOperation {
	if op == nil {
		op = &xxx_SetJobNamedPropertyOperation{}
	}
	if o == nil {
		return op
	}
	op.Return = o.Return
	return op
}

func (o *SetJobNamedPropertyResponse) xxx_FromOp(ctx context.Context, op *xxx_SetJobNamedPropertyOperation) {
	if o == nil {
		return
	}
	o.Return = op.Return
}
func (o *SetJobNamedPropertyResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *SetJobNamedPropertyResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_SetJobNamedPropertyOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_DeleteJobNamedPropertyOperation structure represents the RpcAsyncDeleteJobNamedProperty operation
type xxx_DeleteJobNamedPropertyOperation struct {
	Printer *Printer `idl:"name:hPrinter" json:"printer"`
	JobID   uint32   `idl:"name:JobId" json:"job_id"`
	Name    string   `idl:"name:pszName;string" json:"name"`
	Return  uint32   `idl:"name:Return" json:"return"`
}

func (o *xxx_DeleteJobNamedPropertyOperation) OpNum() int { return 72 }

func (o *xxx_DeleteJobNamedPropertyOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncDeleteJobNamedProperty"
}

func (o *xxx_DeleteJobNamedPropertyOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeleteJobNamedPropertyOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// JobId {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.JobID); err != nil {
			return err
		}
	}
	// pszName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.WriteUTF16NString(ctx, w, o.Name); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeleteJobNamedPropertyOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// JobId {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.JobID); err != nil {
			return err
		}
	}
	// pszName {in} (1:{string, pointer=ref}*(1)[dim:0,string,null](wchar))
	{
		if err := ndr.ReadUTF16NString(ctx, w, &o.Name); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeleteJobNamedPropertyOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeleteJobNamedPropertyOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_DeleteJobNamedPropertyOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// DeleteJobNamedPropertyRequest structure represents the RpcAsyncDeleteJobNamedProperty operation request
type DeleteJobNamedPropertyRequest struct {
	// hPrinter: A handle to a printer object or server object that has been opened by using
	// either RpcAsyncOpenPrinter (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer *Printer `idl:"name:hPrinter" json:"printer"`
	JobID   uint32   `idl:"name:JobId" json:"job_id"`
	Name    string   `idl:"name:pszName;string" json:"name"`
}

func (o *DeleteJobNamedPropertyRequest) xxx_ToOp(ctx context.Context, op *xxx_DeleteJobNamedPropertyOperation) *xxx_DeleteJobNamedPropertyOperation {
	if op == nil {
		op = &xxx_DeleteJobNamedPropertyOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.JobID = o.JobID
	op.Name = o.Name
	return op
}

func (o *DeleteJobNamedPropertyRequest) xxx_FromOp(ctx context.Context, op *xxx_DeleteJobNamedPropertyOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.JobID = op.JobID
	o.Name = op.Name
}
func (o *DeleteJobNamedPropertyRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *DeleteJobNamedPropertyRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_DeleteJobNamedPropertyOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// DeleteJobNamedPropertyResponse structure represents the RpcAsyncDeleteJobNamedProperty operation response
type DeleteJobNamedPropertyResponse struct {
	// Return: The RpcAsyncDeleteJobNamedProperty return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *DeleteJobNamedPropertyResponse) xxx_ToOp(ctx context.Context, op *xxx_DeleteJobNamedPropertyOperation) *xxx_DeleteJobNamedPropertyOperation {
	if op == nil {
		op = &xxx_DeleteJobNamedPropertyOperation{}
	}
	if o == nil {
		return op
	}
	op.Return = o.Return
	return op
}

func (o *DeleteJobNamedPropertyResponse) xxx_FromOp(ctx context.Context, op *xxx_DeleteJobNamedPropertyOperation) {
	if o == nil {
		return
	}
	o.Return = op.Return
}
func (o *DeleteJobNamedPropertyResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *DeleteJobNamedPropertyResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_DeleteJobNamedPropertyOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_EnumJobNamedPropertiesOperation structure represents the RpcAsyncEnumJobNamedProperties operation
type xxx_EnumJobNamedPropertiesOperation struct {
	Printer         *Printer                 `idl:"name:hPrinter" json:"printer"`
	JobID           uint32                   `idl:"name:JobId" json:"job_id"`
	PropertiesCount uint32                   `idl:"name:pcProperties" json:"properties_count"`
	Properties      []*PrintJobNamedProperty `idl:"name:ppProperties;size_is:(, pcProperties)" json:"properties"`
	Return          uint32                   `idl:"name:Return" json:"return"`
}

func (o *xxx_EnumJobNamedPropertiesOperation) OpNum() int { return 73 }

func (o *xxx_EnumJobNamedPropertiesOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncEnumJobNamedProperties"
}

func (o *xxx_EnumJobNamedPropertiesOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumJobNamedPropertiesOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// JobId {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.JobID); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumJobNamedPropertiesOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// JobId {in} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.JobID); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumJobNamedPropertiesOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if o.Properties != nil && o.PropertiesCount == 0 {
		o.PropertiesCount = uint32(len(o.Properties))
	}
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumJobNamedPropertiesOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// pcProperties {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.PropertiesCount); err != nil {
			return err
		}
	}
	// ppProperties {out} (1:{pointer=ref}*(2)*(1))(2:{alias=RPC_PrintJobNamedProperty}[dim:0,size_is=pcProperties](struct))
	{
		if o.Properties != nil || o.PropertiesCount > 0 {
			_ptr_ppProperties := ndr.MarshalNDRFunc(func(ctx context.Context, w ndr.Writer) error {
				dimSize1 := uint64(o.PropertiesCount)
				if err := w.WriteSize(dimSize1); err != nil {
					return err
				}
				sizeInfo := []uint64{
					dimSize1,
				}
				for i1 := range o.Properties {
					i1 := i1
					if uint64(i1) >= sizeInfo[0] {
						break
					}
					if o.Properties[i1] != nil {
						if err := o.Properties[i1].MarshalNDR(ctx, w); err != nil {
							return err
						}
					} else {
						if err := (&PrintJobNamedProperty{}).MarshalNDR(ctx, w); err != nil {
							return err
						}
					}
				}
				for i1 := len(o.Properties); uint64(i1) < sizeInfo[0]; i1++ {
					if err := (&PrintJobNamedProperty{}).MarshalNDR(ctx, w); err != nil {
						return err
					}
				}
				return nil
			})
			if err := w.WritePointer(&o.Properties, _ptr_ppProperties); err != nil {
				return err
			}
		} else {
			if err := w.WritePointer(nil); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_EnumJobNamedPropertiesOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// pcProperties {out} (1:{pointer=ref}*(1))(2:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.PropertiesCount); err != nil {
			return err
		}
	}
	// ppProperties {out} (1:{pointer=ref}*(2)*(1))(2:{alias=RPC_PrintJobNamedProperty}[dim:0,size_is=pcProperties](struct))
	{
		_ptr_ppProperties := ndr.UnmarshalNDRFunc(func(ctx context.Context, w ndr.Reader) error {
			sizeInfo := []uint64{
				0,
			}
			for sz1 := range sizeInfo {
				if err := w.ReadSize(&sizeInfo[sz1]); err != nil {
					return err
				}
			}
			if sizeInfo[0] > uint64(w.Len()) /* sanity-check */ {
				return fmt.Errorf("buffer overflow for size %d of array o.Properties", sizeInfo[0])
			}
			o.Properties = make([]*PrintJobNamedProperty, sizeInfo[0])
			for i1 := range o.Properties {
				i1 := i1
				if o.Properties[i1] == nil {
					o.Properties[i1] = &PrintJobNamedProperty{}
				}
				if err := o.Properties[i1].UnmarshalNDR(ctx, w); err != nil {
					return err
				}
			}
			return nil
		})
		_s_ppProperties := func(ptr interface{}) { o.Properties = *ptr.(*[]*PrintJobNamedProperty) }
		if err := w.ReadPointer(&o.Properties, _s_ppProperties, _ptr_ppProperties); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// EnumJobNamedPropertiesRequest structure represents the RpcAsyncEnumJobNamedProperties operation request
type EnumJobNamedPropertiesRequest struct {
	// hPrinter: A handle to a printer object or server object that has been opened by using
	// either RpcAsyncOpenPrinter (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer *Printer `idl:"name:hPrinter" json:"printer"`
	JobID   uint32   `idl:"name:JobId" json:"job_id"`
}

func (o *EnumJobNamedPropertiesRequest) xxx_ToOp(ctx context.Context, op *xxx_EnumJobNamedPropertiesOperation) *xxx_EnumJobNamedPropertiesOperation {
	if op == nil {
		op = &xxx_EnumJobNamedPropertiesOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.JobID = o.JobID
	return op
}

func (o *EnumJobNamedPropertiesRequest) xxx_FromOp(ctx context.Context, op *xxx_EnumJobNamedPropertiesOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.JobID = op.JobID
}
func (o *EnumJobNamedPropertiesRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *EnumJobNamedPropertiesRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_EnumJobNamedPropertiesOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// EnumJobNamedPropertiesResponse structure represents the RpcAsyncEnumJobNamedProperties operation response
type EnumJobNamedPropertiesResponse struct {
	PropertiesCount uint32                   `idl:"name:pcProperties" json:"properties_count"`
	Properties      []*PrintJobNamedProperty `idl:"name:ppProperties;size_is:(, pcProperties)" json:"properties"`
	// Return: The RpcAsyncEnumJobNamedProperties return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *EnumJobNamedPropertiesResponse) xxx_ToOp(ctx context.Context, op *xxx_EnumJobNamedPropertiesOperation) *xxx_EnumJobNamedPropertiesOperation {
	if op == nil {
		op = &xxx_EnumJobNamedPropertiesOperation{}
	}
	if o == nil {
		return op
	}
	op.PropertiesCount = o.PropertiesCount
	op.Properties = o.Properties
	op.Return = o.Return
	return op
}

func (o *EnumJobNamedPropertiesResponse) xxx_FromOp(ctx context.Context, op *xxx_EnumJobNamedPropertiesOperation) {
	if o == nil {
		return
	}
	o.PropertiesCount = op.PropertiesCount
	o.Properties = op.Properties
	o.Return = op.Return
}
func (o *EnumJobNamedPropertiesResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *EnumJobNamedPropertiesResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_EnumJobNamedPropertiesOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// xxx_LogJobInfoForBranchOfficeOperation structure represents the RpcAsyncLogJobInfoForBranchOffice operation
type xxx_LogJobInfoForBranchOfficeOperation struct {
	Printer                      *Printer                      `idl:"name:hPrinter" json:"printer"`
	BranchOfficeJobDataContainer *BranchOfficeJobDataContainer `idl:"name:pBranchOfficeJobDataContainer;pointer:ref" json:"branch_office_job_data_container"`
	Return                       uint32                        `idl:"name:Return" json:"return"`
}

func (o *xxx_LogJobInfoForBranchOfficeOperation) OpNum() int { return 74 }

func (o *xxx_LogJobInfoForBranchOfficeOperation) OpName() string {
	return "/IRemoteWinspool/v1/RpcAsyncLogJobInfoForBranchOffice"
}

func (o *xxx_LogJobInfoForBranchOfficeOperation) xxx_PrepareRequestPayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareRequestPayload(context.Context) error }); ok {
		if err := hook.AfterPrepareRequestPayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_LogJobInfoForBranchOfficeOperation) MarshalNDRRequest(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareRequestPayload(ctx); err != nil {
		return err
	}
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer != nil {
			if err := o.Printer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&Printer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
	}
	// pBranchOfficeJobDataContainer {in} (1:{pointer=ref}*(1))(2:{alias=RPC_BranchOfficeJobDataContainer}(struct))
	{
		if o.BranchOfficeJobDataContainer != nil {
			if err := o.BranchOfficeJobDataContainer.MarshalNDR(ctx, w); err != nil {
				return err
			}
		} else {
			if err := (&BranchOfficeJobDataContainer{}).MarshalNDR(ctx, w); err != nil {
				return err
			}
		}
		if err := w.WriteDeferred(); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_LogJobInfoForBranchOfficeOperation) UnmarshalNDRRequest(ctx context.Context, w ndr.Reader) error {
	// hPrinter {in} (1:{context_handle, alias=PRINTER_HANDLE, names=ndr_context_handle}(struct))
	{
		if o.Printer == nil {
			o.Printer = &Printer{}
		}
		if err := o.Printer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
	}
	// pBranchOfficeJobDataContainer {in} (1:{pointer=ref}*(1))(2:{alias=RPC_BranchOfficeJobDataContainer}(struct))
	{
		if o.BranchOfficeJobDataContainer == nil {
			o.BranchOfficeJobDataContainer = &BranchOfficeJobDataContainer{}
		}
		if err := o.BranchOfficeJobDataContainer.UnmarshalNDR(ctx, w); err != nil {
			return err
		}
		if err := w.ReadDeferred(); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_LogJobInfoForBranchOfficeOperation) xxx_PrepareResponsePayload(ctx context.Context) error {
	if hook, ok := (interface{})(o).(interface{ AfterPrepareResponsePayload(context.Context) error }); ok {
		if err := hook.AfterPrepareResponsePayload(ctx); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_LogJobInfoForBranchOfficeOperation) MarshalNDRResponse(ctx context.Context, w ndr.Writer) error {
	if err := o.xxx_PrepareResponsePayload(ctx); err != nil {
		return err
	}
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.WriteData(o.Return); err != nil {
			return err
		}
	}
	return nil
}

func (o *xxx_LogJobInfoForBranchOfficeOperation) UnmarshalNDRResponse(ctx context.Context, w ndr.Reader) error {
	// Return {out} (1:{alias=DWORD}(uint32))
	{
		if err := w.ReadData(&o.Return); err != nil {
			return err
		}
	}
	return nil
}

// LogJobInfoForBranchOfficeRequest structure represents the RpcAsyncLogJobInfoForBranchOffice operation request
type LogJobInfoForBranchOfficeRequest struct {
	// hPrinter: A handle to a printer object that has been opened by using either RpcAsyncOpenPrinter
	// (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).
	Printer                      *Printer                      `idl:"name:hPrinter" json:"printer"`
	BranchOfficeJobDataContainer *BranchOfficeJobDataContainer `idl:"name:pBranchOfficeJobDataContainer;pointer:ref" json:"branch_office_job_data_container"`
}

func (o *LogJobInfoForBranchOfficeRequest) xxx_ToOp(ctx context.Context, op *xxx_LogJobInfoForBranchOfficeOperation) *xxx_LogJobInfoForBranchOfficeOperation {
	if op == nil {
		op = &xxx_LogJobInfoForBranchOfficeOperation{}
	}
	if o == nil {
		return op
	}
	op.Printer = o.Printer
	op.BranchOfficeJobDataContainer = o.BranchOfficeJobDataContainer
	return op
}

func (o *LogJobInfoForBranchOfficeRequest) xxx_FromOp(ctx context.Context, op *xxx_LogJobInfoForBranchOfficeOperation) {
	if o == nil {
		return
	}
	o.Printer = op.Printer
	o.BranchOfficeJobDataContainer = op.BranchOfficeJobDataContainer
}
func (o *LogJobInfoForBranchOfficeRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRRequest(ctx, w)
}
func (o *LogJobInfoForBranchOfficeRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_LogJobInfoForBranchOfficeOperation{}
	if err := _o.UnmarshalNDRRequest(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}

// LogJobInfoForBranchOfficeResponse structure represents the RpcAsyncLogJobInfoForBranchOffice operation response
type LogJobInfoForBranchOfficeResponse struct {
	// Return: The RpcAsyncLogJobInfoForBranchOffice return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

func (o *LogJobInfoForBranchOfficeResponse) xxx_ToOp(ctx context.Context, op *xxx_LogJobInfoForBranchOfficeOperation) *xxx_LogJobInfoForBranchOfficeOperation {
	if op == nil {
		op = &xxx_LogJobInfoForBranchOfficeOperation{}
	}
	if o == nil {
		return op
	}
	op.Return = o.Return
	return op
}

func (o *LogJobInfoForBranchOfficeResponse) xxx_FromOp(ctx context.Context, op *xxx_LogJobInfoForBranchOfficeOperation) {
	if o == nil {
		return
	}
	o.Return = op.Return
}
func (o *LogJobInfoForBranchOfficeResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error {
	return o.xxx_ToOp(ctx, nil).MarshalNDRResponse(ctx, w)
}
func (o *LogJobInfoForBranchOfficeResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error {
	_o := &xxx_LogJobInfoForBranchOfficeOperation{}
	if err := _o.UnmarshalNDRResponse(ctx, r); err != nil {
		return err
	}
	o.xxx_FromOp(ctx, _o)
	return nil
}
