/* parser auto-generated by pidl */

#include "replace.h"
#include "bin/default/source3/librpc/gen_ndr/ndr_libnet_join.h"

#include "librpc/gen_ndr/ndr_wkssvc.h"
#include "librpc/gen_ndr/ndr_security.h"
#include "librpc/gen_ndr/ndr_misc.h"
#include "librpc/gen_ndr/ndr_netlogon.h"
#include "librpc/gen_ndr/ndr_ODJ.h"
#include "librpc/gen_ndr/ndr_ads.h"
_PUBLIC_ enum ndr_err_code ndr_push_libnetjoin_JoinDomNameType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum libnetjoin_JoinDomNameType r)
{
	NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
	return NDR_ERR_SUCCESS;
}

_PUBLIC_ enum ndr_err_code ndr_pull_libnetjoin_JoinDomNameType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum libnetjoin_JoinDomNameType *r)
{
	uint16_t v;
	NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
	*r = v;
	return NDR_ERR_SUCCESS;
}

_PUBLIC_ void ndr_print_libnetjoin_JoinDomNameType(struct ndr_print *ndr, const char *name, enum libnetjoin_JoinDomNameType r)
{
	const char *val = NULL;

	switch (r) {
		case JoinDomNameTypeUnknown: val = "JoinDomNameTypeUnknown"; break;
		case JoinDomNameTypeDNS: val = "JoinDomNameTypeDNS"; break;
		case JoinDomNameTypeNBT: val = "JoinDomNameTypeNBT"; break;
	}
	ndr_print_enum(ndr, name, "ENUM", val, r);
}

_PUBLIC_ void ndr_print_libnet_JoinCtx(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct libnet_JoinCtx *r)
{
	ndr_print_struct(ndr, name, "libnet_JoinCtx");
	if (r == NULL) { ndr_print_null(ndr); return; }
	ndr->depth++;
	if (flags & NDR_SET_VALUES) {
		ndr->flags |= LIBNDR_PRINT_SET_VALUES;
	}
	if (flags & NDR_IN) {
		ndr_print_struct(ndr, "in", "libnet_JoinCtx");
		ndr->depth++;
		ndr_print_string(ndr, "dc_name", r->in.dc_name);
		ndr_print_string(ndr, "machine_name", r->in.machine_name);
		ndr_print_ptr(ndr, "domain_name", r->in.domain_name);
		ndr->depth++;
		ndr_print_string(ndr, "domain_name", r->in.domain_name);
		ndr->depth--;
		ndr_print_libnetjoin_JoinDomNameType(ndr, "domain_name_type", r->in.domain_name_type);
		ndr_print_string(ndr, "account_ou", r->in.account_ou);
		ndr_print_ptr(ndr, "admin_credentials", r->in.admin_credentials);
		/* [ignore] 'admin_credentials' */
		{
			libndr_flags _flags_save_string = ndr->flags;
			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET);
			ndr_print_string(ndr, "passed_machine_password", r->in.passed_machine_password);
			ndr->flags = _flags_save_string;
		}
		{
			libndr_flags _flags_save_string = ndr->flags;
			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET);
			ndr_print_string(ndr, "machine_password", r->in.machine_password);
			ndr->flags = _flags_save_string;
		}
		ndr_print_wkssvc_joinflags(ndr, "join_flags", r->in.join_flags);
		ndr_print_string(ndr, "os_version", r->in.os_version);
		ndr_print_string(ndr, "os_name", r->in.os_name);
		ndr_print_string(ndr, "os_servicepack", r->in.os_servicepack);
		ndr_print_uint8(ndr, "create_upn", r->in.create_upn);
		ndr_print_string(ndr, "upn", r->in.upn);
		ndr_print_string(ndr, "dnshostname", r->in.dnshostname);
		ndr_print_uint8(ndr, "modify_config", r->in.modify_config);
		ndr_print_ptr(ndr, "ads", r->in.ads);
		ndr->depth++;
		if (r->in.ads) {
			ndr_print_ads_struct(ndr, "ads", r->in.ads);
		}
		ndr->depth--;
		ndr_print_uint8(ndr, "debug", r->in.debug);
		ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->in.secure_channel_type);
		ndr_print_uint32(ndr, "desired_encryption_types", r->in.desired_encryption_types);
		ndr_print_uint8(ndr, "provision_computer_account_only", r->in.provision_computer_account_only);
		ndr_print_ptr(ndr, "odj_provision_data", r->in.odj_provision_data);
		ndr->depth++;
		if (r->in.odj_provision_data) {
			ndr_print_ODJ_PROVISION_DATA(ndr, "odj_provision_data", r->in.odj_provision_data);
		}
		ndr->depth--;
		ndr_print_uint8(ndr, "request_offline_join", r->in.request_offline_join);
		ndr->depth--;
	}
	if (flags & NDR_OUT) {
		ndr_print_struct(ndr, "out", "libnet_JoinCtx");
		ndr->depth++;
		ndr_print_ptr(ndr, "odj_provision_data", r->out.odj_provision_data);
		ndr->depth++;
		if (r->out.odj_provision_data) {
			ndr_print_ODJ_PROVISION_DATA(ndr, "odj_provision_data", r->out.odj_provision_data);
		}
		ndr->depth--;
		ndr_print_string(ndr, "account_name", r->out.account_name);
		ndr_print_string(ndr, "netbios_domain_name", r->out.netbios_domain_name);
		ndr_print_string(ndr, "dns_domain_name", r->out.dns_domain_name);
		ndr_print_string(ndr, "forest_name", r->out.forest_name);
		ndr_print_string(ndr, "dn", r->out.dn);
		ndr_print_GUID(ndr, "domain_guid", &r->out.domain_guid);
		ndr_print_ptr(ndr, "domain_sid", r->out.domain_sid);
		ndr->depth++;
		ndr_print_dom_sid(ndr, "domain_sid", r->out.domain_sid);
		ndr->depth--;
		ndr_print_uint8(ndr, "modified_config", r->out.modified_config);
		ndr_print_string(ndr, "error_string", r->out.error_string);
		ndr_print_uint8(ndr, "domain_is_ad", r->out.domain_is_ad);
		ndr_print_uint32(ndr, "set_encryption_types", r->out.set_encryption_types);
		ndr_print_string(ndr, "krb5_salt", r->out.krb5_salt);
		ndr_print_ptr(ndr, "dcinfo", r->out.dcinfo);
		ndr->depth++;
		if (r->out.dcinfo) {
			ndr_print_netr_DsRGetDCNameInfo(ndr, "dcinfo", r->out.dcinfo);
		}
		ndr->depth--;
		ndr_print_uint32(ndr, "account_rid", r->out.account_rid);
		ndr_print_WERROR(ndr, "result", r->out.result);
		ndr->depth--;
	}
	ndr->depth--;
}

_PUBLIC_ void ndr_print_libnet_UnjoinCtx(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct libnet_UnjoinCtx *r)
{
	ndr_print_struct(ndr, name, "libnet_UnjoinCtx");
	if (r == NULL) { ndr_print_null(ndr); return; }
	ndr->depth++;
	if (flags & NDR_SET_VALUES) {
		ndr->flags |= LIBNDR_PRINT_SET_VALUES;
	}
	if (flags & NDR_IN) {
		ndr_print_struct(ndr, "in", "libnet_UnjoinCtx");
		ndr->depth++;
		ndr_print_string(ndr, "dc_name", r->in.dc_name);
		ndr_print_string(ndr, "machine_name", r->in.machine_name);
		ndr_print_string(ndr, "domain_name", r->in.domain_name);
		ndr_print_string(ndr, "account_ou", r->in.account_ou);
		ndr_print_ptr(ndr, "admin_credentials", r->in.admin_credentials);
		/* [ignore] 'admin_credentials' */
		ndr_print_wkssvc_joinflags(ndr, "unjoin_flags", r->in.unjoin_flags);
		ndr_print_uint8(ndr, "delete_machine_account", r->in.delete_machine_account);
		ndr_print_uint8(ndr, "modify_config", r->in.modify_config);
		ndr_print_ptr(ndr, "domain_sid", r->in.domain_sid);
		ndr->depth++;
		ndr_print_dom_sid(ndr, "domain_sid", r->in.domain_sid);
		ndr->depth--;
		ndr_print_ptr(ndr, "ads", r->in.ads);
		ndr->depth++;
		if (r->in.ads) {
			ndr_print_ads_struct(ndr, "ads", r->in.ads);
		}
		ndr->depth--;
		ndr_print_uint8(ndr, "debug", r->in.debug);
		ndr_print_ptr(ndr, "msg_ctx", r->in.msg_ctx);
		/* [ignore] 'msg_ctx' */
		ndr->depth--;
	}
	if (flags & NDR_OUT) {
		ndr_print_struct(ndr, "out", "libnet_UnjoinCtx");
		ndr->depth++;
		ndr_print_string(ndr, "netbios_domain_name", r->out.netbios_domain_name);
		ndr_print_string(ndr, "dns_domain_name", r->out.dns_domain_name);
		ndr_print_string(ndr, "forest_name", r->out.forest_name);
		ndr_print_uint8(ndr, "modified_config", r->out.modified_config);
		ndr_print_string(ndr, "error_string", r->out.error_string);
		ndr_print_uint8(ndr, "disabled_machine_account", r->out.disabled_machine_account);
		ndr_print_uint8(ndr, "deleted_machine_account", r->out.deleted_machine_account);
		ndr_print_WERROR(ndr, "result", r->out.result);
		ndr->depth--;
	}
	ndr->depth--;
}

#ifndef SKIP_NDR_TABLE_libnetjoin
static const struct ndr_interface_public_struct libnetjoin_public_structs[] = {
	{ .name = NULL }
};

static const struct ndr_interface_call libnetjoin_calls[] = {
	{ .name = NULL }
};

static const char * const libnetjoin_endpoint_strings[] = {
	"ncacn_np:[\\pipe\\libnetjoin]", 
};

static const struct ndr_interface_string_array libnetjoin_endpoints = {
	.count	= 1,
	.names	= libnetjoin_endpoint_strings
};

static const char * const libnetjoin_authservice_strings[] = {
	"host", 
};

static const struct ndr_interface_string_array libnetjoin_authservices = {
	.count	= 1,
	.names	= libnetjoin_authservice_strings
};


const struct ndr_interface_table ndr_table_libnetjoin = {
	.name		= "libnetjoin",
	.num_calls	= 0,
	.calls		= libnetjoin_calls,
	.num_public_structs	= 0,
	.public_structs		= libnetjoin_public_structs,
	.endpoints	= &libnetjoin_endpoints,
	.authservices	= &libnetjoin_authservices
};

#endif /* SKIP_NDR_TABLE_libnetjoin */
