/* c/zx-ff12-dec.c - WARNING: This file was auto generated by xsd2sg.pl. DO NOT EDIT!
 * $Id$ */
/* Code generation design Copyright (c) 2006 Sampo Kellomaki (sampo@iki.fi),
 * All Rights Reserved. NO WARRANTY. See file COPYING for terms and conditions
 * of use. Some aspects of code generation were driven by schema
 * descriptions that were used as input and may be subject to their own copyright.
 * Code generation uses a template, whose copyright statement follows. */

/** dec-templ.c  -  XML decoder template, used in code generation
 ** Copyright (c) 2010 Sampo Kellomaki (sampo@iki.fi), All Rights Reserved.
 ** Copyright (c) 2006-2007 Symlabs (symlabs@symlabs.com), All Rights Reserved.
 ** Author: Sampo Kellomaki (sampo@iki.fi)
 ** This is confidential unpublished proprietary source code of the author.
 ** NO WARRANTY, not even implied warranties. Contains trade secrets.
 ** Distribution prohibited unless authorized in writing.
 ** Licensed under Apache License 2.0, see file COPYING.
 ** Id: dec-templ.c,v 1.30 2008-10-04 23:42:14 sampo Exp $
 **
 ** 28.5.2006, created, Sampo Kellomaki (sampo@iki.fi)
 ** 8.8.2006,  reworked namespace handling --Sampo
 ** 12.8.2006, added special scanning of xmlns to avoid backtracking elem recognition --Sampo
 ** 23.9.2006, added collection of WO information --Sampo
 ** 21.6.2007, improved handling of undeclared namespace prefixes --Sampo
 ** 27.10.2010, CSE refactoring, re-engineered namespace handling --Sampo
 ** 21.11.2010, re-engineered to extract most code to zx_DEC_elem, leaving just switches --Sampo
 **
 ** N.B: This template is meant to be processed by pd/xsd2sg.pl. Beware
 ** of special markers that xsd2sg.pl expects to find and understand.
 **/

#include "errmac.h"
#include "zx.h"
#include "c/zx-const.h"
#include "c/zx-data.h"
#include "c/zx-ff12-data.h"
#define TPF zx_
#include "zx_ext_pt.h"



int zx_DEC_ATTR_ff12_Assertion(struct zx_ctx* c, struct zx_ff12_Assertion_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_AssertionID_ATTR:  x->AssertionID = x->gg.attr; return 1;
    case zx_InResponseTo_ATTR:  x->InResponseTo = x->gg.attr; return 1;
    case zx_IssueInstant_ATTR:  x->IssueInstant = x->gg.attr; return 1;
    case zx_Issuer_ATTR:  x->Issuer = x->gg.attr; return 1;
    case zx_MajorVersion_ATTR:  x->MajorVersion = x->gg.attr; return 1;
    case zx_MinorVersion_ATTR:  x->MinorVersion = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_ff12_Assertion(struct zx_ctx* c, struct zx_ff12_Assertion_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_sa11_Conditions_ELEM:
    if (!x->Conditions)
      x->Conditions = (struct zx_sa11_Conditions_s*)el;
    return 1;
  case zx_sa11_Advice_ELEM:
    if (!x->Advice)
      x->Advice = (struct zx_sa11_Advice_s*)el;
    return 1;
  case zx_sa11_Statement_ELEM:
    if (!x->Statement)
      x->Statement = el;
    return 1;
  case zx_sa11_SubjectStatement_ELEM:
    if (!x->SubjectStatement)
      x->SubjectStatement = (struct zx_sa11_SubjectStatement_s*)el;
    return 1;
  case zx_sa11_AuthenticationStatement_ELEM:
    if (!x->AuthenticationStatement)
      x->AuthenticationStatement = (struct zx_sa11_AuthenticationStatement_s*)el;
    return 1;
  case zx_sa11_AuthorizationDecisionStatement_ELEM:
    if (!x->AuthorizationDecisionStatement)
      x->AuthorizationDecisionStatement = (struct zx_sa11_AuthorizationDecisionStatement_s*)el;
    return 1;
  case zx_sa11_AttributeStatement_ELEM:
    if (!x->AttributeStatement)
      x->AttributeStatement = (struct zx_sa11_AttributeStatement_s*)el;
    return 1;
  case zx_xasa_XACMLAuthzDecisionStatement_ELEM:
    if (!x->XACMLAuthzDecisionStatement)
      x->XACMLAuthzDecisionStatement = (struct zx_xasa_XACMLAuthzDecisionStatement_s*)el;
    return 1;
  case zx_xasa_XACMLPolicyStatement_ELEM:
    if (!x->XACMLPolicyStatement)
      x->XACMLPolicyStatement = (struct zx_xasa_XACMLPolicyStatement_s*)el;
    return 1;
  case zx_xasacd1_XACMLAuthzDecisionStatement_ELEM:
    if (!x->xasacd1_XACMLAuthzDecisionStatement)
      x->xasacd1_XACMLAuthzDecisionStatement = (struct zx_xasacd1_XACMLAuthzDecisionStatement_s*)el;
    return 1;
  case zx_xasacd1_XACMLPolicyStatement_ELEM:
    if (!x->xasacd1_XACMLPolicyStatement)
      x->xasacd1_XACMLPolicyStatement = (struct zx_xasacd1_XACMLPolicyStatement_s*)el;
    return 1;
  case zx_ds_Signature_ELEM:
    if (!x->Signature)
      x->Signature = (struct zx_ds_Signature_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_ff12_AuthenticationStatement(struct zx_ctx* c, struct zx_ff12_AuthenticationStatement_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_AuthenticationInstant_ATTR:  x->AuthenticationInstant = x->gg.attr; return 1;
    case zx_AuthenticationMethod_ATTR:  x->AuthenticationMethod = x->gg.attr; return 1;
    case zx_ReauthenticateOnOrAfter_ATTR:  x->ReauthenticateOnOrAfter = x->gg.attr; return 1;
    case zx_SessionIndex_ATTR:  x->SessionIndex = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_ff12_AuthenticationStatement(struct zx_ctx* c, struct zx_ff12_AuthenticationStatement_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_sa11_Subject_ELEM:
    if (!x->Subject)
      x->Subject = (struct zx_sa11_Subject_s*)el;
    return 1;
  case zx_sa11_SubjectLocality_ELEM:
    if (!x->SubjectLocality)
      x->SubjectLocality = (struct zx_sa11_SubjectLocality_s*)el;
    return 1;
  case zx_sa11_AuthorityBinding_ELEM:
    if (!x->AuthorityBinding)
      x->AuthorityBinding = (struct zx_sa11_AuthorityBinding_s*)el;
    return 1;
  case zx_ff12_AuthnContext_ELEM:
    if (!x->AuthnContext)
      x->AuthnContext = (struct zx_ff12_AuthnContext_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_ff12_AuthnContext(struct zx_ctx* c, struct zx_ff12_AuthnContext_s* x)
{
  switch (x->gg.attr->g.tok) {

  default: return 0;
  }
}

int zx_DEC_ELEM_ff12_AuthnContext(struct zx_ctx* c, struct zx_ff12_AuthnContext_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_ff12_AuthnContextClassRef_ELEM:
    if (!x->AuthnContextClassRef)
      x->AuthnContextClassRef = el;
    return 1;
  case zx_ac_AuthenticationContextStatement_ELEM:
    if (!x->AuthenticationContextStatement)
      x->AuthenticationContextStatement = (struct zx_ac_AuthenticationContextStatement_s*)el;
    return 1;
  case zx_ff12_AuthnContextStatementRef_ELEM:
    if (!x->AuthnContextStatementRef)
      x->AuthnContextStatementRef = el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_ff12_AuthnRequest(struct zx_ctx* c, struct zx_ff12_AuthnRequest_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_IssueInstant_ATTR:  x->IssueInstant = x->gg.attr; return 1;
    case zx_MajorVersion_ATTR:  x->MajorVersion = x->gg.attr; return 1;
    case zx_MinorVersion_ATTR:  x->MinorVersion = x->gg.attr; return 1;
    case zx_RequestID_ATTR:  x->RequestID = x->gg.attr; return 1;
    case zx_consent_ATTR:  x->consent = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_ff12_AuthnRequest(struct zx_ctx* c, struct zx_ff12_AuthnRequest_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_sp11_RespondWith_ELEM:
    if (!x->RespondWith)
      x->RespondWith = el;
    return 1;
  case zx_ds_Signature_ELEM:
    if (!x->Signature)
      x->Signature = (struct zx_ds_Signature_s*)el;
    return 1;
  case zx_ff12_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_ff12_Extension_s*)el;
    return 1;
  case zx_ff12_ProviderID_ELEM:
    if (!x->ProviderID)
      x->ProviderID = el;
    return 1;
  case zx_ff12_AffiliationID_ELEM:
    if (!x->AffiliationID)
      x->AffiliationID = el;
    return 1;
  case zx_ff12_NameIDPolicy_ELEM:
    if (!x->NameIDPolicy)
      x->NameIDPolicy = el;
    return 1;
  case zx_ff12_ForceAuthn_ELEM:
    if (!x->ForceAuthn)
      x->ForceAuthn = el;
    return 1;
  case zx_ff12_IsPassive_ELEM:
    if (!x->IsPassive)
      x->IsPassive = el;
    return 1;
  case zx_ff12_ProtocolProfile_ELEM:
    if (!x->ProtocolProfile)
      x->ProtocolProfile = el;
    return 1;
  case zx_ff12_AssertionConsumerServiceID_ELEM:
    if (!x->AssertionConsumerServiceID)
      x->AssertionConsumerServiceID = el;
    return 1;
  case zx_ff12_RequestAuthnContext_ELEM:
    if (!x->RequestAuthnContext)
      x->RequestAuthnContext = (struct zx_ff12_RequestAuthnContext_s*)el;
    return 1;
  case zx_ff12_RelayState_ELEM:
    if (!x->RelayState)
      x->RelayState = el;
    return 1;
  case zx_ff12_Scoping_ELEM:
    if (!x->Scoping)
      x->Scoping = (struct zx_ff12_Scoping_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_ff12_AuthnRequestEnvelope(struct zx_ctx* c, struct zx_ff12_AuthnRequestEnvelope_s* x)
{
  switch (x->gg.attr->g.tok) {

  default: return 0;
  }
}

int zx_DEC_ELEM_ff12_AuthnRequestEnvelope(struct zx_ctx* c, struct zx_ff12_AuthnRequestEnvelope_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_ff12_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_ff12_Extension_s*)el;
    return 1;
  case zx_ff12_AuthnRequest_ELEM:
    if (!x->AuthnRequest)
      x->AuthnRequest = (struct zx_ff12_AuthnRequest_s*)el;
    return 1;
  case zx_ff12_ProviderID_ELEM:
    if (!x->ProviderID)
      x->ProviderID = el;
    return 1;
  case zx_ff12_ProviderName_ELEM:
    if (!x->ProviderName)
      x->ProviderName = el;
    return 1;
  case zx_ff12_AssertionConsumerServiceURL_ELEM:
    if (!x->AssertionConsumerServiceURL)
      x->AssertionConsumerServiceURL = el;
    return 1;
  case zx_ff12_IDPList_ELEM:
    if (!x->IDPList)
      x->IDPList = (struct zx_ff12_IDPList_s*)el;
    return 1;
  case zx_ff12_IsPassive_ELEM:
    if (!x->IsPassive)
      x->IsPassive = el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_ff12_AuthnResponse(struct zx_ctx* c, struct zx_ff12_AuthnResponse_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_InResponseTo_ATTR:  x->InResponseTo = x->gg.attr; return 1;
    case zx_IssueInstant_ATTR:  x->IssueInstant = x->gg.attr; return 1;
    case zx_MajorVersion_ATTR:  x->MajorVersion = x->gg.attr; return 1;
    case zx_MinorVersion_ATTR:  x->MinorVersion = x->gg.attr; return 1;
    case zx_Recipient_ATTR:  x->Recipient = x->gg.attr; return 1;
    case zx_ResponseID_ATTR:  x->ResponseID = x->gg.attr; return 1;
    case zx_consent_ATTR:  x->consent = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_ff12_AuthnResponse(struct zx_ctx* c, struct zx_ff12_AuthnResponse_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_ds_Signature_ELEM:
    if (!x->Signature)
      x->Signature = (struct zx_ds_Signature_s*)el;
    return 1;
  case zx_sp11_Status_ELEM:
    if (!x->Status)
      x->Status = (struct zx_sp11_Status_s*)el;
    return 1;
  case zx_sa11_Assertion_ELEM:
    if (!x->Assertion)
      x->Assertion = (struct zx_sa11_Assertion_s*)el;
    return 1;
  case zx_ff12_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_ff12_Extension_s*)el;
    return 1;
  case zx_ff12_ProviderID_ELEM:
    if (!x->ProviderID)
      x->ProviderID = el;
    return 1;
  case zx_ff12_RelayState_ELEM:
    if (!x->RelayState)
      x->RelayState = el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_ff12_AuthnResponseEnvelope(struct zx_ctx* c, struct zx_ff12_AuthnResponseEnvelope_s* x)
{
  switch (x->gg.attr->g.tok) {

  default: return 0;
  }
}

int zx_DEC_ELEM_ff12_AuthnResponseEnvelope(struct zx_ctx* c, struct zx_ff12_AuthnResponseEnvelope_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_ff12_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_ff12_Extension_s*)el;
    return 1;
  case zx_ff12_AuthnResponse_ELEM:
    if (!x->AuthnResponse)
      x->AuthnResponse = (struct zx_ff12_AuthnResponse_s*)el;
    return 1;
  case zx_ff12_AssertionConsumerServiceURL_ELEM:
    if (!x->AssertionConsumerServiceURL)
      x->AssertionConsumerServiceURL = el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_ff12_EncryptableNameIdentifier(struct zx_ctx* c, struct zx_ff12_EncryptableNameIdentifier_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_Format_ATTR:  x->Format = x->gg.attr; return 1;
    case zx_IssueInstant_ATTR:  x->IssueInstant = x->gg.attr; return 1;
    case zx_NameQualifier_ATTR:  x->NameQualifier = x->gg.attr; return 1;
    case zx_Nonce_ATTR:  x->Nonce = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_ff12_EncryptableNameIdentifier(struct zx_ctx* c, struct zx_ff12_EncryptableNameIdentifier_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_ff12_EncryptedNameIdentifier(struct zx_ctx* c, struct zx_ff12_EncryptedNameIdentifier_s* x)
{
  switch (x->gg.attr->g.tok) {

  default: return 0;
  }
}

int zx_DEC_ELEM_ff12_EncryptedNameIdentifier(struct zx_ctx* c, struct zx_ff12_EncryptedNameIdentifier_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_xenc_EncryptedData_ELEM:
    if (!x->EncryptedData)
      x->EncryptedData = (struct zx_xenc_EncryptedData_s*)el;
    return 1;
  case zx_xenc_EncryptedKey_ELEM:
    if (!x->EncryptedKey)
      x->EncryptedKey = (struct zx_xenc_EncryptedKey_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_ff12_Extension(struct zx_ctx* c, struct zx_ff12_Extension_s* x)
{
  switch (x->gg.attr->g.tok) {

  default: return 0;
  }
}

int zx_DEC_ELEM_ff12_Extension(struct zx_ctx* c, struct zx_ff12_Extension_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_ff12_FederationTerminationNotification(struct zx_ctx* c, struct zx_ff12_FederationTerminationNotification_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_IssueInstant_ATTR:  x->IssueInstant = x->gg.attr; return 1;
    case zx_MajorVersion_ATTR:  x->MajorVersion = x->gg.attr; return 1;
    case zx_MinorVersion_ATTR:  x->MinorVersion = x->gg.attr; return 1;
    case zx_RequestID_ATTR:  x->RequestID = x->gg.attr; return 1;
    case zx_consent_ATTR:  x->consent = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_ff12_FederationTerminationNotification(struct zx_ctx* c, struct zx_ff12_FederationTerminationNotification_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_sp11_RespondWith_ELEM:
    if (!x->RespondWith)
      x->RespondWith = el;
    return 1;
  case zx_ds_Signature_ELEM:
    if (!x->Signature)
      x->Signature = (struct zx_ds_Signature_s*)el;
    return 1;
  case zx_ff12_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_ff12_Extension_s*)el;
    return 1;
  case zx_ff12_ProviderID_ELEM:
    if (!x->ProviderID)
      x->ProviderID = el;
    return 1;
  case zx_sa11_NameIdentifier_ELEM:
    if (!x->NameIdentifier)
      x->NameIdentifier = (struct zx_sa11_NameIdentifier_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_ff12_IDPEntries(struct zx_ctx* c, struct zx_ff12_IDPEntries_s* x)
{
  switch (x->gg.attr->g.tok) {

  default: return 0;
  }
}

int zx_DEC_ELEM_ff12_IDPEntries(struct zx_ctx* c, struct zx_ff12_IDPEntries_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_ff12_IDPEntry_ELEM:
    if (!x->IDPEntry)
      x->IDPEntry = (struct zx_ff12_IDPEntry_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_ff12_IDPEntry(struct zx_ctx* c, struct zx_ff12_IDPEntry_s* x)
{
  switch (x->gg.attr->g.tok) {

  default: return 0;
  }
}

int zx_DEC_ELEM_ff12_IDPEntry(struct zx_ctx* c, struct zx_ff12_IDPEntry_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_ff12_ProviderID_ELEM:
    if (!x->ProviderID)
      x->ProviderID = el;
    return 1;
  case zx_ff12_ProviderName_ELEM:
    if (!x->ProviderName)
      x->ProviderName = el;
    return 1;
  case zx_ff12_Loc_ELEM:
    if (!x->Loc)
      x->Loc = el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_ff12_IDPList(struct zx_ctx* c, struct zx_ff12_IDPList_s* x)
{
  switch (x->gg.attr->g.tok) {

  default: return 0;
  }
}

int zx_DEC_ELEM_ff12_IDPList(struct zx_ctx* c, struct zx_ff12_IDPList_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_ff12_IDPEntries_ELEM:
    if (!x->IDPEntries)
      x->IDPEntries = (struct zx_ff12_IDPEntries_s*)el;
    return 1;
  case zx_ff12_GetComplete_ELEM:
    if (!x->GetComplete)
      x->GetComplete = el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_ff12_IDPProvidedNameIdentifier(struct zx_ctx* c, struct zx_ff12_IDPProvidedNameIdentifier_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_Format_ATTR:  x->Format = x->gg.attr; return 1;
    case zx_NameQualifier_ATTR:  x->NameQualifier = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_ff12_IDPProvidedNameIdentifier(struct zx_ctx* c, struct zx_ff12_IDPProvidedNameIdentifier_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_ff12_LogoutRequest(struct zx_ctx* c, struct zx_ff12_LogoutRequest_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_IssueInstant_ATTR:  x->IssueInstant = x->gg.attr; return 1;
    case zx_MajorVersion_ATTR:  x->MajorVersion = x->gg.attr; return 1;
    case zx_MinorVersion_ATTR:  x->MinorVersion = x->gg.attr; return 1;
    case zx_NotOnOrAfter_ATTR:  x->NotOnOrAfter = x->gg.attr; return 1;
    case zx_RequestID_ATTR:  x->RequestID = x->gg.attr; return 1;
    case zx_consent_ATTR:  x->consent = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_ff12_LogoutRequest(struct zx_ctx* c, struct zx_ff12_LogoutRequest_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_sp11_RespondWith_ELEM:
    if (!x->RespondWith)
      x->RespondWith = el;
    return 1;
  case zx_ds_Signature_ELEM:
    if (!x->Signature)
      x->Signature = (struct zx_ds_Signature_s*)el;
    return 1;
  case zx_ff12_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_ff12_Extension_s*)el;
    return 1;
  case zx_ff12_ProviderID_ELEM:
    if (!x->ProviderID)
      x->ProviderID = el;
    return 1;
  case zx_sa11_NameIdentifier_ELEM:
    if (!x->NameIdentifier)
      x->NameIdentifier = (struct zx_sa11_NameIdentifier_s*)el;
    return 1;
  case zx_ff12_SessionIndex_ELEM:
    if (!x->SessionIndex)
      x->SessionIndex = el;
    return 1;
  case zx_ff12_RelayState_ELEM:
    if (!x->RelayState)
      x->RelayState = el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_ff12_LogoutResponse(struct zx_ctx* c, struct zx_ff12_LogoutResponse_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_InResponseTo_ATTR:  x->InResponseTo = x->gg.attr; return 1;
    case zx_IssueInstant_ATTR:  x->IssueInstant = x->gg.attr; return 1;
    case zx_MajorVersion_ATTR:  x->MajorVersion = x->gg.attr; return 1;
    case zx_MinorVersion_ATTR:  x->MinorVersion = x->gg.attr; return 1;
    case zx_Recipient_ATTR:  x->Recipient = x->gg.attr; return 1;
    case zx_ResponseID_ATTR:  x->ResponseID = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_ff12_LogoutResponse(struct zx_ctx* c, struct zx_ff12_LogoutResponse_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_ds_Signature_ELEM:
    if (!x->Signature)
      x->Signature = (struct zx_ds_Signature_s*)el;
    return 1;
  case zx_ff12_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_ff12_Extension_s*)el;
    return 1;
  case zx_ff12_ProviderID_ELEM:
    if (!x->ProviderID)
      x->ProviderID = el;
    return 1;
  case zx_sp11_Status_ELEM:
    if (!x->Status)
      x->Status = (struct zx_sp11_Status_s*)el;
    return 1;
  case zx_ff12_RelayState_ELEM:
    if (!x->RelayState)
      x->RelayState = el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_ff12_NameIdentifierMappingRequest(struct zx_ctx* c, struct zx_ff12_NameIdentifierMappingRequest_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_IssueInstant_ATTR:  x->IssueInstant = x->gg.attr; return 1;
    case zx_MajorVersion_ATTR:  x->MajorVersion = x->gg.attr; return 1;
    case zx_MinorVersion_ATTR:  x->MinorVersion = x->gg.attr; return 1;
    case zx_RequestID_ATTR:  x->RequestID = x->gg.attr; return 1;
    case zx_consent_ATTR:  x->consent = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_ff12_NameIdentifierMappingRequest(struct zx_ctx* c, struct zx_ff12_NameIdentifierMappingRequest_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_sp11_RespondWith_ELEM:
    if (!x->RespondWith)
      x->RespondWith = el;
    return 1;
  case zx_ds_Signature_ELEM:
    if (!x->Signature)
      x->Signature = (struct zx_ds_Signature_s*)el;
    return 1;
  case zx_ff12_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_ff12_Extension_s*)el;
    return 1;
  case zx_ff12_ProviderID_ELEM:
    if (!x->ProviderID)
      x->ProviderID = el;
    return 1;
  case zx_sa11_NameIdentifier_ELEM:
    if (!x->NameIdentifier)
      x->NameIdentifier = (struct zx_sa11_NameIdentifier_s*)el;
    return 1;
  case zx_ff12_TargetNamespace_ELEM:
    if (!x->TargetNamespace)
      x->TargetNamespace = el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_ff12_NameIdentifierMappingResponse(struct zx_ctx* c, struct zx_ff12_NameIdentifierMappingResponse_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_InResponseTo_ATTR:  x->InResponseTo = x->gg.attr; return 1;
    case zx_IssueInstant_ATTR:  x->IssueInstant = x->gg.attr; return 1;
    case zx_MajorVersion_ATTR:  x->MajorVersion = x->gg.attr; return 1;
    case zx_MinorVersion_ATTR:  x->MinorVersion = x->gg.attr; return 1;
    case zx_Recipient_ATTR:  x->Recipient = x->gg.attr; return 1;
    case zx_ResponseID_ATTR:  x->ResponseID = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_ff12_NameIdentifierMappingResponse(struct zx_ctx* c, struct zx_ff12_NameIdentifierMappingResponse_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_ds_Signature_ELEM:
    if (!x->Signature)
      x->Signature = (struct zx_ds_Signature_s*)el;
    return 1;
  case zx_ff12_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_ff12_Extension_s*)el;
    return 1;
  case zx_ff12_ProviderID_ELEM:
    if (!x->ProviderID)
      x->ProviderID = el;
    return 1;
  case zx_sp11_Status_ELEM:
    if (!x->Status)
      x->Status = (struct zx_sp11_Status_s*)el;
    return 1;
  case zx_sa11_NameIdentifier_ELEM:
    if (!x->NameIdentifier)
      x->NameIdentifier = (struct zx_sa11_NameIdentifier_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_ff12_OldProvidedNameIdentifier(struct zx_ctx* c, struct zx_ff12_OldProvidedNameIdentifier_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_Format_ATTR:  x->Format = x->gg.attr; return 1;
    case zx_NameQualifier_ATTR:  x->NameQualifier = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_ff12_OldProvidedNameIdentifier(struct zx_ctx* c, struct zx_ff12_OldProvidedNameIdentifier_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_ff12_RegisterNameIdentifierRequest(struct zx_ctx* c, struct zx_ff12_RegisterNameIdentifierRequest_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_IssueInstant_ATTR:  x->IssueInstant = x->gg.attr; return 1;
    case zx_MajorVersion_ATTR:  x->MajorVersion = x->gg.attr; return 1;
    case zx_MinorVersion_ATTR:  x->MinorVersion = x->gg.attr; return 1;
    case zx_RequestID_ATTR:  x->RequestID = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_ff12_RegisterNameIdentifierRequest(struct zx_ctx* c, struct zx_ff12_RegisterNameIdentifierRequest_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_sp11_RespondWith_ELEM:
    if (!x->RespondWith)
      x->RespondWith = el;
    return 1;
  case zx_ds_Signature_ELEM:
    if (!x->Signature)
      x->Signature = (struct zx_ds_Signature_s*)el;
    return 1;
  case zx_ff12_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_ff12_Extension_s*)el;
    return 1;
  case zx_ff12_ProviderID_ELEM:
    if (!x->ProviderID)
      x->ProviderID = el;
    return 1;
  case zx_ff12_IDPProvidedNameIdentifier_ELEM:
    if (!x->IDPProvidedNameIdentifier)
      x->IDPProvidedNameIdentifier = (struct zx_ff12_IDPProvidedNameIdentifier_s*)el;
    return 1;
  case zx_ff12_SPProvidedNameIdentifier_ELEM:
    if (!x->SPProvidedNameIdentifier)
      x->SPProvidedNameIdentifier = (struct zx_ff12_SPProvidedNameIdentifier_s*)el;
    return 1;
  case zx_ff12_OldProvidedNameIdentifier_ELEM:
    if (!x->OldProvidedNameIdentifier)
      x->OldProvidedNameIdentifier = (struct zx_ff12_OldProvidedNameIdentifier_s*)el;
    return 1;
  case zx_ff12_RelayState_ELEM:
    if (!x->RelayState)
      x->RelayState = el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_ff12_RegisterNameIdentifierResponse(struct zx_ctx* c, struct zx_ff12_RegisterNameIdentifierResponse_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_InResponseTo_ATTR:  x->InResponseTo = x->gg.attr; return 1;
    case zx_IssueInstant_ATTR:  x->IssueInstant = x->gg.attr; return 1;
    case zx_MajorVersion_ATTR:  x->MajorVersion = x->gg.attr; return 1;
    case zx_MinorVersion_ATTR:  x->MinorVersion = x->gg.attr; return 1;
    case zx_Recipient_ATTR:  x->Recipient = x->gg.attr; return 1;
    case zx_ResponseID_ATTR:  x->ResponseID = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_ff12_RegisterNameIdentifierResponse(struct zx_ctx* c, struct zx_ff12_RegisterNameIdentifierResponse_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_ds_Signature_ELEM:
    if (!x->Signature)
      x->Signature = (struct zx_ds_Signature_s*)el;
    return 1;
  case zx_ff12_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_ff12_Extension_s*)el;
    return 1;
  case zx_ff12_ProviderID_ELEM:
    if (!x->ProviderID)
      x->ProviderID = el;
    return 1;
  case zx_sp11_Status_ELEM:
    if (!x->Status)
      x->Status = (struct zx_sp11_Status_s*)el;
    return 1;
  case zx_ff12_RelayState_ELEM:
    if (!x->RelayState)
      x->RelayState = el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_ff12_RequestAuthnContext(struct zx_ctx* c, struct zx_ff12_RequestAuthnContext_s* x)
{
  switch (x->gg.attr->g.tok) {

  default: return 0;
  }
}

int zx_DEC_ELEM_ff12_RequestAuthnContext(struct zx_ctx* c, struct zx_ff12_RequestAuthnContext_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_ff12_AuthnContextClassRef_ELEM:
    if (!x->AuthnContextClassRef)
      x->AuthnContextClassRef = el;
    return 1;
  case zx_ff12_AuthnContextStatementRef_ELEM:
    if (!x->AuthnContextStatementRef)
      x->AuthnContextStatementRef = el;
    return 1;
  case zx_ff12_AuthnContextComparison_ELEM:
    if (!x->AuthnContextComparison)
      x->AuthnContextComparison = el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_ff12_SPProvidedNameIdentifier(struct zx_ctx* c, struct zx_ff12_SPProvidedNameIdentifier_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_Format_ATTR:  x->Format = x->gg.attr; return 1;
    case zx_NameQualifier_ATTR:  x->NameQualifier = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_ff12_SPProvidedNameIdentifier(struct zx_ctx* c, struct zx_ff12_SPProvidedNameIdentifier_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_ff12_Scoping(struct zx_ctx* c, struct zx_ff12_Scoping_s* x)
{
  switch (x->gg.attr->g.tok) {

  default: return 0;
  }
}

int zx_DEC_ELEM_ff12_Scoping(struct zx_ctx* c, struct zx_ff12_Scoping_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_ff12_ProxyCount_ELEM:
    if (!x->ProxyCount)
      x->ProxyCount = el;
    return 1;
  case zx_ff12_IDPList_ELEM:
    if (!x->IDPList)
      x->IDPList = (struct zx_ff12_IDPList_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_ff12_Subject(struct zx_ctx* c, struct zx_ff12_Subject_s* x)
{
  switch (x->gg.attr->g.tok) {

  default: return 0;
  }
}

int zx_DEC_ELEM_ff12_Subject(struct zx_ctx* c, struct zx_ff12_Subject_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_sa11_NameIdentifier_ELEM:
    if (!x->NameIdentifier)
      x->NameIdentifier = (struct zx_sa11_NameIdentifier_s*)el;
    return 1;
  case zx_sa11_SubjectConfirmation_ELEM:
    if (!x->SubjectConfirmation)
      x->SubjectConfirmation = (struct zx_sa11_SubjectConfirmation_s*)el;
    return 1;
  case zx_ff12_IDPProvidedNameIdentifier_ELEM:
    if (!x->IDPProvidedNameIdentifier)
      x->IDPProvidedNameIdentifier = (struct zx_ff12_IDPProvidedNameIdentifier_s*)el;
    return 1;

  default: return 0;
  }
}


/* EOF -- c/zx-ff12-dec.c */
