/*======================================================================
 FILE: vcardderivedproperty.c
 CREATOR: Ken Murchison 24 Aug 2022 <murch@fastmailteam.com>

 SPDX-FileCopyrightText: 2022, Fastmail Pty. Ltd. (https://fastmail.com)
 SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
 ======================================================================*/

/**
 * @file vcardderivedproperty.c
 * @brief vCard properties.
 */

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include "vcardderivedproperty.h"
#include "vcardproperty.h"
#include "vcardproperty_p.h"
#include "icalerror_p.h"
#include "icalmemory.h"

#include <string.h>

LIBICAL_VCARD_EXPORT struct vcardproperty_impl *vcardproperty_new_impl(vcardproperty_kind kind);

/* This map associates the property kinds with:
   - the string representation of the property name;
   - the VALUE kind that libical uses internally;
   - the RFC 5545 VALUE kind that the property uses as a default (or NONE);
   - an array of RFC 5545 VALUE kinds that are legal for the property;
   - a bitmask of flags that further describe the property
*/

struct vcardproperty_map // NOLINT(clang-analyzer-optin.performance.Padding)
{
    vcardproperty_kind kind;
    const char *name;
    vcardvalue_kind libical_value;
    vcardvalue_kind default_value;

    /* The size of this array needs to be 1 greater than the maximum number
       of component values in any multi-typed value (e.g. DATE-TIME-PERIOD).
       This size SHOULD be calculated by the generating perl script(s). */
    vcardvalue_kind valid_values[4];

    unsigned int flags;
};

#define VCARD_PROPERTY_IS_STRUCTURED (1U << 0)
#define VCARD_PROPERTY_IS_MULTIVALUED (1U << 1)

/* This map associates the property enumerations with the king of
   property that they are used in and the string representation of the
   enumeration */

struct vcardproperty_enum_map {
    vcardproperty_kind prop;
    int prop_enum;
    const char *str;
};

#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wvarargs"
#endif
static const struct vcardproperty_map property_map[61] = {
    { VCARD_SOURCE_PROPERTY, "SOURCE",
      VCARD_URI_VALUE, VCARD_URI_VALUE,
      { VCARD_URI_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_KIND_PROPERTY, "KIND",
      VCARD_KIND_VALUE, VCARD_KIND_VALUE,
      { VCARD_KIND_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_XML_PROPERTY, "XML",
      VCARD_TEXT_VALUE, VCARD_TEXT_VALUE,
      { VCARD_TEXT_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_FN_PROPERTY, "FN",
      VCARD_TEXT_VALUE, VCARD_TEXT_VALUE,
      { VCARD_TEXT_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_N_PROPERTY, "N",
      VCARD_STRUCTURED_VALUE, VCARD_STRUCTURED_VALUE,
      { VCARD_STRUCTURED_VALUE, VCARD_NO_VALUE }, 
      VCARD_PROPERTY_IS_STRUCTURED | VCARD_PROPERTY_IS_MULTIVALUED },
    { VCARD_NICKNAME_PROPERTY, "NICKNAME",
      VCARD_TEXTLIST_VALUE, VCARD_TEXTLIST_VALUE,
      { VCARD_TEXTLIST_VALUE, VCARD_NO_VALUE }, 
      VCARD_PROPERTY_IS_MULTIVALUED },
    { VCARD_PHOTO_PROPERTY, "PHOTO",
      VCARD_URI_VALUE, VCARD_NO_VALUE,
      { VCARD_URI_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_BDAY_PROPERTY, "BDAY",
      VCARD_DATEANDORTIME_VALUE, VCARD_DATEANDORTIME_VALUE,
      { VCARD_DATEANDORTIME_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_ANNIVERSARY_PROPERTY, "ANNIVERSARY",
      VCARD_DATEANDORTIME_VALUE, VCARD_DATEANDORTIME_VALUE,
      { VCARD_DATEANDORTIME_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_GENDER_PROPERTY, "GENDER",
      VCARD_TEXTLIST_VALUE, VCARD_TEXTLIST_VALUE,
      { VCARD_TEXTLIST_VALUE, VCARD_NO_VALUE }, 
      VCARD_PROPERTY_IS_STRUCTURED },
    { VCARD_ADR_PROPERTY, "ADR",
      VCARD_STRUCTURED_VALUE, VCARD_STRUCTURED_VALUE,
      { VCARD_STRUCTURED_VALUE, VCARD_NO_VALUE }, 
      VCARD_PROPERTY_IS_STRUCTURED | VCARD_PROPERTY_IS_MULTIVALUED },
    { VCARD_TEL_PROPERTY, "TEL",
      VCARD_TEXT_VALUE, VCARD_TEXT_VALUE,
      { VCARD_TEXT_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_EMAIL_PROPERTY, "EMAIL",
      VCARD_TEXT_VALUE, VCARD_TEXT_VALUE,
      { VCARD_TEXT_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_IMPP_PROPERTY, "IMPP",
      VCARD_URI_VALUE, VCARD_URI_VALUE,
      { VCARD_URI_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_LANG_PROPERTY, "LANG",
      VCARD_LANGUAGETAG_VALUE, VCARD_LANGUAGETAG_VALUE,
      { VCARD_LANGUAGETAG_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_TZ_PROPERTY, "TZ",
      VCARD_TZ_VALUE, VCARD_TZ_VALUE,
      { VCARD_TZ_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_GEO_PROPERTY, "GEO",
      VCARD_GEO_VALUE, VCARD_NO_VALUE,
      { VCARD_GEO_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_TITLE_PROPERTY, "TITLE",
      VCARD_TEXT_VALUE, VCARD_TEXT_VALUE,
      { VCARD_TEXT_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_ROLE_PROPERTY, "ROLE",
      VCARD_TEXT_VALUE, VCARD_TEXT_VALUE,
      { VCARD_TEXT_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_LOGO_PROPERTY, "LOGO",
      VCARD_URI_VALUE, VCARD_NO_VALUE,
      { VCARD_URI_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_ORG_PROPERTY, "ORG",
      VCARD_TEXTLIST_VALUE, VCARD_TEXTLIST_VALUE,
      { VCARD_TEXTLIST_VALUE, VCARD_NO_VALUE }, 
      VCARD_PROPERTY_IS_STRUCTURED },
    { VCARD_MEMBER_PROPERTY, "MEMBER",
      VCARD_URI_VALUE, VCARD_URI_VALUE,
      { VCARD_URI_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_RELATED_PROPERTY, "RELATED",
      VCARD_URI_VALUE, VCARD_URI_VALUE,
      { VCARD_URI_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_CATEGORIES_PROPERTY, "CATEGORIES",
      VCARD_TEXTLIST_VALUE, VCARD_TEXTLIST_VALUE,
      { VCARD_TEXTLIST_VALUE, VCARD_NO_VALUE }, 
      VCARD_PROPERTY_IS_MULTIVALUED },
    { VCARD_NOTE_PROPERTY, "NOTE",
      VCARD_TEXT_VALUE, VCARD_TEXT_VALUE,
      { VCARD_TEXT_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_PRODID_PROPERTY, "PRODID",
      VCARD_TEXT_VALUE, VCARD_TEXT_VALUE,
      { VCARD_TEXT_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_REV_PROPERTY, "REV",
      VCARD_TIMESTAMP_VALUE, VCARD_TIMESTAMP_VALUE,
      { VCARD_TIMESTAMP_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_SOUND_PROPERTY, "SOUND",
      VCARD_URI_VALUE, VCARD_NO_VALUE,
      { VCARD_URI_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_UID_PROPERTY, "UID",
      VCARD_URI_VALUE, VCARD_NO_VALUE,
      { VCARD_URI_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_CLIENTPIDMAP_PROPERTY, "CLIENTPIDMAP",
      VCARD_TEXTLIST_VALUE, VCARD_TEXTLIST_VALUE,
      { VCARD_TEXTLIST_VALUE, VCARD_NO_VALUE }, 
      VCARD_PROPERTY_IS_STRUCTURED },
    { VCARD_URL_PROPERTY, "URL",
      VCARD_URI_VALUE, VCARD_URI_VALUE,
      { VCARD_URI_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_VERSION_PROPERTY, "VERSION",
      VCARD_VERSION_VALUE, VCARD_VERSION_VALUE,
      { VCARD_VERSION_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_KEY_PROPERTY, "KEY",
      VCARD_URI_VALUE, VCARD_NO_VALUE,
      { VCARD_URI_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_FBURL_PROPERTY, "FBURL",
      VCARD_URI_VALUE, VCARD_URI_VALUE,
      { VCARD_URI_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_CALADRURI_PROPERTY, "CALADRURI",
      VCARD_URI_VALUE, VCARD_URI_VALUE,
      { VCARD_URI_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_CALURI_PROPERTY, "CALURI",
      VCARD_URI_VALUE, VCARD_URI_VALUE,
      { VCARD_URI_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_X_PROPERTY, "X",
      VCARD_X_VALUE, VCARD_X_VALUE,
      { VCARD_X_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_NAME_PROPERTY, "NAME",
      VCARD_TEXT_VALUE, VCARD_TEXT_VALUE,
      { VCARD_TEXT_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_LABEL_PROPERTY, "LABEL",
      VCARD_TEXT_VALUE, VCARD_TEXT_VALUE,
      { VCARD_TEXT_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_MAILER_PROPERTY, "MAILER",
      VCARD_TEXT_VALUE, VCARD_TEXT_VALUE,
      { VCARD_TEXT_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_AGENT_PROPERTY, "AGENT",
      VCARD_TEXT_VALUE, VCARD_TEXT_VALUE,
      { VCARD_TEXT_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_SORTSTRING_PROPERTY, "SORT-STRING",
      VCARD_TEXT_VALUE, VCARD_TEXT_VALUE,
      { VCARD_TEXT_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_CLASS_PROPERTY, "CLASS",
      VCARD_TEXT_VALUE, VCARD_TEXT_VALUE,
      { VCARD_TEXT_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_BIRTHPLACE_PROPERTY, "BIRTHPLACE",
      VCARD_TEXT_VALUE, VCARD_TEXT_VALUE,
      { VCARD_TEXT_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_DEATHPLACE_PROPERTY, "DEATHPLACE",
      VCARD_TEXT_VALUE, VCARD_TEXT_VALUE,
      { VCARD_TEXT_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_DEATHDATE_PROPERTY, "DEATHDATE",
      VCARD_DATEANDORTIME_VALUE, VCARD_DATEANDORTIME_VALUE,
      { VCARD_DATEANDORTIME_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_EXPERTISE_PROPERTY, "EXPERTISE",
      VCARD_TEXT_VALUE, VCARD_TEXT_VALUE,
      { VCARD_TEXT_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_HOBBY_PROPERTY, "HOBBY",
      VCARD_TEXT_VALUE, VCARD_TEXT_VALUE,
      { VCARD_TEXT_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_INTEREST_PROPERTY, "INTEREST",
      VCARD_TEXT_VALUE, VCARD_TEXT_VALUE,
      { VCARD_TEXT_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_ORGDIRECTORY_PROPERTY, "ORG-DIRECTORY",
      VCARD_URI_VALUE, VCARD_URI_VALUE,
      { VCARD_URI_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_CONTACTURI_PROPERTY, "CONTACT-URI",
      VCARD_URI_VALUE, VCARD_URI_VALUE,
      { VCARD_URI_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_JSPROP_PROPERTY, "JSPROP",
      VCARD_TEXT_VALUE, VCARD_TEXT_VALUE,
      { VCARD_TEXT_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_CREATED_PROPERTY, "CREATED",
      VCARD_TIMESTAMP_VALUE, VCARD_TIMESTAMP_VALUE,
      { VCARD_TIMESTAMP_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_LANGUAGE_PROPERTY, "LANGUAGE",
      VCARD_TEXT_VALUE, VCARD_TEXT_VALUE,
      { VCARD_TEXT_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_GRAMGENDER_PROPERTY, "GRAMGENDER",
      VCARD_GRAMGENDER_VALUE, VCARD_GRAMGENDER_VALUE,
      { VCARD_GRAMGENDER_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_PRONOUNS_PROPERTY, "PRONOUNS",
      VCARD_TEXT_VALUE, VCARD_TEXT_VALUE,
      { VCARD_TEXT_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_SOCIALPROFILE_PROPERTY, "SOCIALPROFILE",
      VCARD_URI_VALUE, VCARD_URI_VALUE,
      { VCARD_URI_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_XLICERROR_PROPERTY, "X-LIC-ERROR",
      VCARD_TEXT_VALUE, VCARD_TEXT_VALUE,
      { VCARD_TEXT_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_BEGIN_PROPERTY, "BEGIN",
      VCARD_TEXT_VALUE, VCARD_TEXT_VALUE,
      { VCARD_TEXT_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_END_PROPERTY, "END",
      VCARD_TEXT_VALUE, VCARD_TEXT_VALUE,
      { VCARD_TEXT_VALUE, VCARD_NO_VALUE }, 0 },
    { VCARD_NO_PROPERTY, "",      VCARD_NO_VALUE, VCARD_NO_VALUE,
      { VCARD_NO_VALUE }, 0 }
};

static const struct vcardproperty_enum_map enum_map[301] = {
    {VCARD_KIND_PROPERTY,VCARD_KIND_X, "" }, /*10000*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_INDIVIDUAL, "INDIVIDUAL" }, /*10001*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_GROUP, "GROUP" }, /*10002*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_ORG, "ORG" }, /*10003*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_LOCATION, "LOCATION" }, /*10004*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_APPLICATION, "APPLICATION" }, /*10005*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_DEVICE, "DEVICE" }, /*10006*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10007*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10008*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10009*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10010*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10011*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10012*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10013*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10014*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10015*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10016*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10017*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10018*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10019*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10020*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10021*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10022*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10023*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10024*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10025*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10026*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10027*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10028*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10029*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10030*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10031*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10032*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10033*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10034*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10035*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10036*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10037*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10038*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10039*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10040*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10041*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10042*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10043*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10044*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10045*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10046*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10047*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10048*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10049*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10050*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10051*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10052*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10053*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10054*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10055*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10056*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10057*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10058*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10059*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10060*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10061*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10062*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10063*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10064*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10065*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10066*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10067*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10068*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10069*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10070*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10071*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10072*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10073*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10074*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10075*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10076*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10077*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10078*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10079*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10080*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10081*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10082*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10083*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10084*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10085*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10086*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10087*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10088*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10089*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10090*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10091*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10092*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10093*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10094*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10095*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10096*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10097*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10098*/
    {VCARD_KIND_PROPERTY,VCARD_KIND_NONE, "" }, /*10099*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_X, "" }, /*10100*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_21, "2.1" }, /*10101*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_30, "3.0" }, /*10102*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_40, "4.0" }, /*10103*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10104*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10105*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10106*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10107*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10108*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10109*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10110*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10111*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10112*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10113*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10114*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10115*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10116*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10117*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10118*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10119*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10120*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10121*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10122*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10123*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10124*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10125*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10126*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10127*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10128*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10129*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10130*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10131*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10132*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10133*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10134*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10135*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10136*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10137*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10138*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10139*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10140*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10141*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10142*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10143*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10144*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10145*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10146*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10147*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10148*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10149*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10150*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10151*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10152*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10153*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10154*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10155*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10156*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10157*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10158*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10159*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10160*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10161*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10162*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10163*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10164*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10165*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10166*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10167*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10168*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10169*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10170*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10171*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10172*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10173*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10174*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10175*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10176*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10177*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10178*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10179*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10180*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10181*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10182*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10183*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10184*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10185*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10186*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10187*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10188*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10189*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10190*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10191*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10192*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10193*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10194*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10195*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10196*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10197*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10198*/
    {VCARD_VERSION_PROPERTY,VCARD_VERSION_NONE, "" }, /*10199*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_X, "" }, /*10200*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_ANIMATE, "ANIMATE" }, /*10201*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_COMMON, "COMMON" }, /*10202*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_FEMININE, "FEMININE" }, /*10203*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_INANIMATE, "INANIMATE" }, /*10204*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_MASCULINE, "MASCULINE" }, /*10205*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NEUTER, "NEUTER" }, /*10206*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10207*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10208*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10209*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10210*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10211*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10212*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10213*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10214*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10215*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10216*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10217*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10218*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10219*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10220*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10221*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10222*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10223*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10224*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10225*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10226*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10227*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10228*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10229*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10230*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10231*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10232*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10233*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10234*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10235*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10236*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10237*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10238*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10239*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10240*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10241*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10242*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10243*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10244*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10245*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10246*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10247*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10248*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10249*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10250*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10251*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10252*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10253*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10254*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10255*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10256*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10257*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10258*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10259*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10260*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10261*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10262*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10263*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10264*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10265*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10266*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10267*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10268*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10269*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10270*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10271*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10272*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10273*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10274*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10275*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10276*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10277*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10278*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10279*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10280*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10281*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10282*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10283*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10284*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10285*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10286*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10287*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10288*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10289*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10290*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10291*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10292*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10293*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10294*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10295*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10296*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10297*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10298*/
    {VCARD_GRAMGENDER_PROPERTY,VCARD_GRAMGENDER_NONE, "" }, /*10299*/
    {VCARD_NO_PROPERTY, 0, ""}
};

vcardproperty *vcardproperty_vanew_adr(vcardstructuredtype* v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_ADR_PROPERTY);
    vcardproperty_set_adr((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* ADR */
vcardproperty *vcardproperty_new_adr(vcardstructuredtype* v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_ADR_PROPERTY);
    vcardproperty_set_adr((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_adr(vcardproperty *prop, vcardstructuredtype* v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_structured(v));
}

vcardstructuredtype* vcardproperty_get_adr(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_structured(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_agent(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_AGENT_PROPERTY);
    vcardproperty_set_agent((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* AGENT */
vcardproperty *vcardproperty_new_agent(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_AGENT_PROPERTY);
    vcardproperty_set_agent((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_agent(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_text(v));
}

const char * vcardproperty_get_agent(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_text(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_anniversary(vcardtimetype v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;

    impl = vcardproperty_new_impl(VCARD_ANNIVERSARY_PROPERTY);
    vcardproperty_set_anniversary((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* ANNIVERSARY */
vcardproperty *vcardproperty_new_anniversary(vcardtimetype v)
{
    struct vcardproperty_impl *impl;

    impl = vcardproperty_new_impl(VCARD_ANNIVERSARY_PROPERTY);
    vcardproperty_set_anniversary((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_anniversary(vcardproperty *prop, vcardtimetype v)
{
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_dateandortime(v));
}

vcardtimetype vcardproperty_get_anniversary(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_dateandortime(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_bday(vcardtimetype v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;

    impl = vcardproperty_new_impl(VCARD_BDAY_PROPERTY);
    vcardproperty_set_bday((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* BDAY */
vcardproperty *vcardproperty_new_bday(vcardtimetype v)
{
    struct vcardproperty_impl *impl;

    impl = vcardproperty_new_impl(VCARD_BDAY_PROPERTY);
    vcardproperty_set_bday((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_bday(vcardproperty *prop, vcardtimetype v)
{
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_dateandortime(v));
}

vcardtimetype vcardproperty_get_bday(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_dateandortime(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_birthplace(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_BIRTHPLACE_PROPERTY);
    vcardproperty_set_birthplace((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* BIRTHPLACE */
vcardproperty *vcardproperty_new_birthplace(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_BIRTHPLACE_PROPERTY);
    vcardproperty_set_birthplace((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_birthplace(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_text(v));
}

const char * vcardproperty_get_birthplace(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_text(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_caladruri(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_CALADRURI_PROPERTY);
    vcardproperty_set_caladruri((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* CALADRURI */
vcardproperty *vcardproperty_new_caladruri(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_CALADRURI_PROPERTY);
    vcardproperty_set_caladruri((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_caladruri(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_uri(v));
}

const char * vcardproperty_get_caladruri(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_uri(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_caluri(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_CALURI_PROPERTY);
    vcardproperty_set_caluri((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* CALURI */
vcardproperty *vcardproperty_new_caluri(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_CALURI_PROPERTY);
    vcardproperty_set_caluri((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_caluri(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_uri(v));
}

const char * vcardproperty_get_caluri(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_uri(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_categories(vcardstrarray* v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_CATEGORIES_PROPERTY);
    vcardproperty_set_categories((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* CATEGORIES */
vcardproperty *vcardproperty_new_categories(vcardstrarray* v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_CATEGORIES_PROPERTY);
    vcardproperty_set_categories((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_categories(vcardproperty *prop, vcardstrarray* v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_textlist(v));
}

vcardstrarray* vcardproperty_get_categories(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_textlist(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_class(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_CLASS_PROPERTY);
    vcardproperty_set_class((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* CLASS */
vcardproperty *vcardproperty_new_class(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_CLASS_PROPERTY);
    vcardproperty_set_class((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_class(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_text(v));
}

const char * vcardproperty_get_class(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_text(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_clientpidmap(vcardstrarray* v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_CLIENTPIDMAP_PROPERTY);
    vcardproperty_set_clientpidmap((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* CLIENTPIDMAP */
vcardproperty *vcardproperty_new_clientpidmap(vcardstrarray* v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_CLIENTPIDMAP_PROPERTY);
    vcardproperty_set_clientpidmap((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_clientpidmap(vcardproperty *prop, vcardstrarray* v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_textlist(v));
}

vcardstrarray* vcardproperty_get_clientpidmap(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_textlist(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_contacturi(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_CONTACTURI_PROPERTY);
    vcardproperty_set_contacturi((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* CONTACT-URI */
vcardproperty *vcardproperty_new_contacturi(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_CONTACTURI_PROPERTY);
    vcardproperty_set_contacturi((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_contacturi(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_uri(v));
}

const char * vcardproperty_get_contacturi(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_uri(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_created(vcardtimetype v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;

    impl = vcardproperty_new_impl(VCARD_CREATED_PROPERTY);
    vcardproperty_set_created((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* CREATED */
vcardproperty *vcardproperty_new_created(vcardtimetype v)
{
    struct vcardproperty_impl *impl;

    impl = vcardproperty_new_impl(VCARD_CREATED_PROPERTY);
    vcardproperty_set_created((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_created(vcardproperty *prop, vcardtimetype v)
{
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_timestamp(v));
}

vcardtimetype vcardproperty_get_created(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_timestamp(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_deathdate(vcardtimetype v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;

    impl = vcardproperty_new_impl(VCARD_DEATHDATE_PROPERTY);
    vcardproperty_set_deathdate((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* DEATHDATE */
vcardproperty *vcardproperty_new_deathdate(vcardtimetype v)
{
    struct vcardproperty_impl *impl;

    impl = vcardproperty_new_impl(VCARD_DEATHDATE_PROPERTY);
    vcardproperty_set_deathdate((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_deathdate(vcardproperty *prop, vcardtimetype v)
{
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_dateandortime(v));
}

vcardtimetype vcardproperty_get_deathdate(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_dateandortime(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_deathplace(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_DEATHPLACE_PROPERTY);
    vcardproperty_set_deathplace((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* DEATHPLACE */
vcardproperty *vcardproperty_new_deathplace(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_DEATHPLACE_PROPERTY);
    vcardproperty_set_deathplace((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_deathplace(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_text(v));
}

const char * vcardproperty_get_deathplace(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_text(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_email(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_EMAIL_PROPERTY);
    vcardproperty_set_email((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* EMAIL */
vcardproperty *vcardproperty_new_email(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_EMAIL_PROPERTY);
    vcardproperty_set_email((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_email(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_text(v));
}

const char * vcardproperty_get_email(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_text(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_expertise(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_EXPERTISE_PROPERTY);
    vcardproperty_set_expertise((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* EXPERTISE */
vcardproperty *vcardproperty_new_expertise(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_EXPERTISE_PROPERTY);
    vcardproperty_set_expertise((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_expertise(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_text(v));
}

const char * vcardproperty_get_expertise(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_text(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_fburl(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_FBURL_PROPERTY);
    vcardproperty_set_fburl((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* FBURL */
vcardproperty *vcardproperty_new_fburl(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_FBURL_PROPERTY);
    vcardproperty_set_fburl((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_fburl(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_uri(v));
}

const char * vcardproperty_get_fburl(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_uri(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_fn(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_FN_PROPERTY);
    vcardproperty_set_fn((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* FN */
vcardproperty *vcardproperty_new_fn(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_FN_PROPERTY);
    vcardproperty_set_fn((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_fn(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_text(v));
}

const char * vcardproperty_get_fn(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_text(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_gender(vcardstrarray* v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_GENDER_PROPERTY);
    vcardproperty_set_gender((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* GENDER */
vcardproperty *vcardproperty_new_gender(vcardstrarray* v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_GENDER_PROPERTY);
    vcardproperty_set_gender((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_gender(vcardproperty *prop, vcardstrarray* v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_textlist(v));
}

vcardstrarray* vcardproperty_get_gender(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_textlist(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_geo(vcardgeotype v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;

    impl = vcardproperty_new_impl(VCARD_GEO_PROPERTY);
    vcardproperty_set_geo((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* GEO */
vcardproperty *vcardproperty_new_geo(vcardgeotype v)
{
    struct vcardproperty_impl *impl;

    impl = vcardproperty_new_impl(VCARD_GEO_PROPERTY);
    vcardproperty_set_geo((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_geo(vcardproperty *prop, vcardgeotype v)
{
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_geo(v));
}

vcardgeotype vcardproperty_get_geo(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_geo(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_gramgender(enum vcardproperty_gramgender v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;

    impl = vcardproperty_new_impl(VCARD_GRAMGENDER_PROPERTY);
    vcardproperty_set_gramgender((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* GRAMGENDER */
vcardproperty *vcardproperty_new_gramgender(enum vcardproperty_gramgender v)
{
    struct vcardproperty_impl *impl;

    impl = vcardproperty_new_impl(VCARD_GRAMGENDER_PROPERTY);
    vcardproperty_set_gramgender((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_gramgender(vcardproperty *prop, enum vcardproperty_gramgender v)
{
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_gramgender(v));
}

enum vcardproperty_gramgender vcardproperty_get_gramgender(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_gramgender(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_hobby(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_HOBBY_PROPERTY);
    vcardproperty_set_hobby((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* HOBBY */
vcardproperty *vcardproperty_new_hobby(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_HOBBY_PROPERTY);
    vcardproperty_set_hobby((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_hobby(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_text(v));
}

const char * vcardproperty_get_hobby(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_text(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_impp(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_IMPP_PROPERTY);
    vcardproperty_set_impp((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* IMPP */
vcardproperty *vcardproperty_new_impp(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_IMPP_PROPERTY);
    vcardproperty_set_impp((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_impp(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_uri(v));
}

const char * vcardproperty_get_impp(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_uri(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_interest(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_INTEREST_PROPERTY);
    vcardproperty_set_interest((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* INTEREST */
vcardproperty *vcardproperty_new_interest(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_INTEREST_PROPERTY);
    vcardproperty_set_interest((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_interest(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_text(v));
}

const char * vcardproperty_get_interest(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_text(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_jsprop(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_JSPROP_PROPERTY);
    vcardproperty_set_jsprop((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* JSPROP */
vcardproperty *vcardproperty_new_jsprop(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_JSPROP_PROPERTY);
    vcardproperty_set_jsprop((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_jsprop(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_text(v));
}

const char * vcardproperty_get_jsprop(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_text(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_key(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_KEY_PROPERTY);
    vcardproperty_set_key((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* KEY */
vcardproperty *vcardproperty_new_key(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_KEY_PROPERTY);
    vcardproperty_set_key((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_key(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_uri(v));
}

const char * vcardproperty_get_key(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_uri(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_kind(enum vcardproperty_kindenum v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;

    impl = vcardproperty_new_impl(VCARD_KIND_PROPERTY);
    vcardproperty_set_kind((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* KIND */
vcardproperty *vcardproperty_new_kind(enum vcardproperty_kindenum v)
{
    struct vcardproperty_impl *impl;

    impl = vcardproperty_new_impl(VCARD_KIND_PROPERTY);
    vcardproperty_set_kind((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_kind(vcardproperty *prop, enum vcardproperty_kindenum v)
{
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_kind(v));
}

enum vcardproperty_kindenum vcardproperty_get_kind(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_kind(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_label(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_LABEL_PROPERTY);
    vcardproperty_set_label((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* LABEL */
vcardproperty *vcardproperty_new_label(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_LABEL_PROPERTY);
    vcardproperty_set_label((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_label(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_text(v));
}

const char * vcardproperty_get_label(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_text(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_lang(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_LANG_PROPERTY);
    vcardproperty_set_lang((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* LANG */
vcardproperty *vcardproperty_new_lang(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_LANG_PROPERTY);
    vcardproperty_set_lang((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_lang(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_languagetag(v));
}

const char * vcardproperty_get_lang(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_languagetag(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_language(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_LANGUAGE_PROPERTY);
    vcardproperty_set_language((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* LANGUAGE */
vcardproperty *vcardproperty_new_language(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_LANGUAGE_PROPERTY);
    vcardproperty_set_language((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_language(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_text(v));
}

const char * vcardproperty_get_language(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_text(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_logo(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_LOGO_PROPERTY);
    vcardproperty_set_logo((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* LOGO */
vcardproperty *vcardproperty_new_logo(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_LOGO_PROPERTY);
    vcardproperty_set_logo((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_logo(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_uri(v));
}

const char * vcardproperty_get_logo(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_uri(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_mailer(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_MAILER_PROPERTY);
    vcardproperty_set_mailer((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* MAILER */
vcardproperty *vcardproperty_new_mailer(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_MAILER_PROPERTY);
    vcardproperty_set_mailer((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_mailer(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_text(v));
}

const char * vcardproperty_get_mailer(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_text(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_member(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_MEMBER_PROPERTY);
    vcardproperty_set_member((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* MEMBER */
vcardproperty *vcardproperty_new_member(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_MEMBER_PROPERTY);
    vcardproperty_set_member((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_member(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_uri(v));
}

const char * vcardproperty_get_member(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_uri(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_n(vcardstructuredtype* v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_N_PROPERTY);
    vcardproperty_set_n((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* N */
vcardproperty *vcardproperty_new_n(vcardstructuredtype* v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_N_PROPERTY);
    vcardproperty_set_n((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_n(vcardproperty *prop, vcardstructuredtype* v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_structured(v));
}

vcardstructuredtype* vcardproperty_get_n(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_structured(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_name(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_NAME_PROPERTY);
    vcardproperty_set_name((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* NAME */
vcardproperty *vcardproperty_new_name(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_NAME_PROPERTY);
    vcardproperty_set_name((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_name(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_text(v));
}

const char * vcardproperty_get_name(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_text(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_nickname(vcardstrarray* v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_NICKNAME_PROPERTY);
    vcardproperty_set_nickname((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* NICKNAME */
vcardproperty *vcardproperty_new_nickname(vcardstrarray* v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_NICKNAME_PROPERTY);
    vcardproperty_set_nickname((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_nickname(vcardproperty *prop, vcardstrarray* v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_textlist(v));
}

vcardstrarray* vcardproperty_get_nickname(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_textlist(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_note(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_NOTE_PROPERTY);
    vcardproperty_set_note((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* NOTE */
vcardproperty *vcardproperty_new_note(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_NOTE_PROPERTY);
    vcardproperty_set_note((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_note(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_text(v));
}

const char * vcardproperty_get_note(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_text(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_org(vcardstrarray* v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_ORG_PROPERTY);
    vcardproperty_set_org((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* ORG */
vcardproperty *vcardproperty_new_org(vcardstrarray* v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_ORG_PROPERTY);
    vcardproperty_set_org((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_org(vcardproperty *prop, vcardstrarray* v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_textlist(v));
}

vcardstrarray* vcardproperty_get_org(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_textlist(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_orgdirectory(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_ORGDIRECTORY_PROPERTY);
    vcardproperty_set_orgdirectory((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* ORG-DIRECTORY */
vcardproperty *vcardproperty_new_orgdirectory(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_ORGDIRECTORY_PROPERTY);
    vcardproperty_set_orgdirectory((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_orgdirectory(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_uri(v));
}

const char * vcardproperty_get_orgdirectory(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_uri(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_photo(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_PHOTO_PROPERTY);
    vcardproperty_set_photo((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* PHOTO */
vcardproperty *vcardproperty_new_photo(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_PHOTO_PROPERTY);
    vcardproperty_set_photo((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_photo(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_uri(v));
}

const char * vcardproperty_get_photo(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_uri(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_prodid(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_PRODID_PROPERTY);
    vcardproperty_set_prodid((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* PRODID */
vcardproperty *vcardproperty_new_prodid(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_PRODID_PROPERTY);
    vcardproperty_set_prodid((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_prodid(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_text(v));
}

const char * vcardproperty_get_prodid(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_text(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_pronouns(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_PRONOUNS_PROPERTY);
    vcardproperty_set_pronouns((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* PRONOUNS */
vcardproperty *vcardproperty_new_pronouns(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_PRONOUNS_PROPERTY);
    vcardproperty_set_pronouns((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_pronouns(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_text(v));
}

const char * vcardproperty_get_pronouns(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_text(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_related(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_RELATED_PROPERTY);
    vcardproperty_set_related((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* RELATED */
vcardproperty *vcardproperty_new_related(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_RELATED_PROPERTY);
    vcardproperty_set_related((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_related(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_uri(v));
}

const char * vcardproperty_get_related(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_uri(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_rev(vcardtimetype v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;

    impl = vcardproperty_new_impl(VCARD_REV_PROPERTY);
    vcardproperty_set_rev((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* REV */
vcardproperty *vcardproperty_new_rev(vcardtimetype v)
{
    struct vcardproperty_impl *impl;

    impl = vcardproperty_new_impl(VCARD_REV_PROPERTY);
    vcardproperty_set_rev((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_rev(vcardproperty *prop, vcardtimetype v)
{
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_timestamp(v));
}

vcardtimetype vcardproperty_get_rev(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_timestamp(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_role(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_ROLE_PROPERTY);
    vcardproperty_set_role((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* ROLE */
vcardproperty *vcardproperty_new_role(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_ROLE_PROPERTY);
    vcardproperty_set_role((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_role(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_text(v));
}

const char * vcardproperty_get_role(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_text(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_socialprofile(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_SOCIALPROFILE_PROPERTY);
    vcardproperty_set_socialprofile((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* SOCIALPROFILE */
vcardproperty *vcardproperty_new_socialprofile(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_SOCIALPROFILE_PROPERTY);
    vcardproperty_set_socialprofile((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_socialprofile(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_uri(v));
}

const char * vcardproperty_get_socialprofile(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_uri(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_sortstring(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_SORTSTRING_PROPERTY);
    vcardproperty_set_sortstring((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* SORT-STRING */
vcardproperty *vcardproperty_new_sortstring(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_SORTSTRING_PROPERTY);
    vcardproperty_set_sortstring((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_sortstring(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_text(v));
}

const char * vcardproperty_get_sortstring(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_text(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_sound(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_SOUND_PROPERTY);
    vcardproperty_set_sound((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* SOUND */
vcardproperty *vcardproperty_new_sound(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_SOUND_PROPERTY);
    vcardproperty_set_sound((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_sound(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_uri(v));
}

const char * vcardproperty_get_sound(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_uri(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_source(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_SOURCE_PROPERTY);
    vcardproperty_set_source((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* SOURCE */
vcardproperty *vcardproperty_new_source(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_SOURCE_PROPERTY);
    vcardproperty_set_source((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_source(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_uri(v));
}

const char * vcardproperty_get_source(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_uri(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_tel(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_TEL_PROPERTY);
    vcardproperty_set_tel((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* TEL */
vcardproperty *vcardproperty_new_tel(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_TEL_PROPERTY);
    vcardproperty_set_tel((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_tel(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_text(v));
}

const char * vcardproperty_get_tel(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_text(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_title(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_TITLE_PROPERTY);
    vcardproperty_set_title((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* TITLE */
vcardproperty *vcardproperty_new_title(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_TITLE_PROPERTY);
    vcardproperty_set_title((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_title(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_text(v));
}

const char * vcardproperty_get_title(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_text(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_tz(vcardtztype v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;

    impl = vcardproperty_new_impl(VCARD_TZ_PROPERTY);
    vcardproperty_set_tz((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* TZ */
vcardproperty *vcardproperty_new_tz(vcardtztype v)
{
    struct vcardproperty_impl *impl;

    impl = vcardproperty_new_impl(VCARD_TZ_PROPERTY);
    vcardproperty_set_tz((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_tz(vcardproperty *prop, vcardtztype v)
{
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_tz(v));
}

vcardtztype vcardproperty_get_tz(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_tz(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_uid(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_UID_PROPERTY);
    vcardproperty_set_uid((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* UID */
vcardproperty *vcardproperty_new_uid(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_UID_PROPERTY);
    vcardproperty_set_uid((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_uid(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_uri(v));
}

const char * vcardproperty_get_uid(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_uri(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_url(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_URL_PROPERTY);
    vcardproperty_set_url((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* URL */
vcardproperty *vcardproperty_new_url(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_URL_PROPERTY);
    vcardproperty_set_url((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_url(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_uri(v));
}

const char * vcardproperty_get_url(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_uri(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_version(enum vcardproperty_version v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;

    impl = vcardproperty_new_impl(VCARD_VERSION_PROPERTY);
    vcardproperty_set_version((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* VERSION */
vcardproperty *vcardproperty_new_version(enum vcardproperty_version v)
{
    struct vcardproperty_impl *impl;

    impl = vcardproperty_new_impl(VCARD_VERSION_PROPERTY);
    vcardproperty_set_version((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_version(vcardproperty *prop, enum vcardproperty_version v)
{
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_version(v));
}

enum vcardproperty_version vcardproperty_get_version(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_version(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_x(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_X_PROPERTY);
    vcardproperty_set_x((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* X */
vcardproperty *vcardproperty_new_x(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_X_PROPERTY);
    vcardproperty_set_x((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_x(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_x(v));
}

const char * vcardproperty_get_x(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_x(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_xlicerror(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_XLICERROR_PROPERTY);
    vcardproperty_set_xlicerror((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* X-LIC-ERROR */
vcardproperty *vcardproperty_new_xlicerror(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_XLICERROR_PROPERTY);
    vcardproperty_set_xlicerror((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_xlicerror(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_text(v));
}

const char * vcardproperty_get_xlicerror(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_text(vcardproperty_get_value(prop));
}

vcardproperty *vcardproperty_vanew_xml(const char * v, ...)
{
    va_list args;
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_XML_PROPERTY);
    vcardproperty_set_xml((vcardproperty*)impl, v);
    va_start(args, v);
    vcardproperty_add_parameters(impl, args);
    va_end(args);
    return (vcardproperty*)impl;
}

/* XML */
vcardproperty *vcardproperty_new_xml(const char * v)
{
    struct vcardproperty_impl *impl;
    icalerror_check_arg_rz((v != 0), "v");

    impl = vcardproperty_new_impl(VCARD_XML_PROPERTY);
    vcardproperty_set_xml((vcardproperty*)impl, v);
    return (vcardproperty*)impl;
}

void vcardproperty_set_xml(vcardproperty *prop, const char * v)
{
    icalerror_check_arg_rv((v != 0), "v");
    icalerror_check_arg_rv((prop != 0), "prop");
    vcardproperty_set_value(prop, vcardvalue_new_text(v));
}

const char * vcardproperty_get_xml(const vcardproperty *prop)
{
    icalerror_check_arg((prop != 0), "prop");
    return vcardvalue_get_text(vcardproperty_get_value(prop));
}

#if defined(__clang__)
#pragma clang diagnostic pop
#endif

    bool vcardproperty_kind_is_valid(const vcardproperty_kind kind)
{
    int i = 0;
    int num_props = (int)(sizeof(property_map) / sizeof(property_map[0]));

    if (kind == VCARD_ANY_PROPERTY) {
        return false;
    }

    num_props--;
    do {
        if (property_map[i].kind == kind) {
            return true;
        }
    } while (i++ < num_props);

    return false;
}

const char *vcardproperty_kind_to_string(vcardproperty_kind kind)
{
    int i, num_props;

    num_props = (int)(sizeof(property_map) / sizeof(property_map[0]));
    for (i = 0; i < num_props; i++) {
        if (property_map[i].kind == kind) {
            return property_map[i].name;
        }
    }

    return 0;
}

vcardproperty_kind vcardproperty_string_to_kind(const char *string)
{
    int i, num_props;

    if (string == 0) {
        return VCARD_NO_PROPERTY;
    }

    num_props = (int)(sizeof(property_map) / sizeof(property_map[0]));
    for (i = 0; i < num_props; i++) {
        if (property_map[i].name && (strcasecmp(property_map[i].name, string) == 0)) {
            return property_map[i].kind;
        }
    }

    if (strncasecmp(string, "X-", 2) == 0) {
        return VCARD_X_PROPERTY;
    }

    return VCARD_NO_PROPERTY;
}

vcardproperty_kind vcardproperty_value_kind_to_kind(vcardvalue_kind kind)
{
    int i, num_props;

    num_props = (int)(sizeof(property_map) / sizeof(property_map[0]));
    for (i = 0; i < num_props; i++) {
        if (property_map[i].libical_value == kind) {
            return property_map[i].kind;
        }
    }

    return VCARD_NO_PROPERTY;
}

vcardvalue_kind vcardproperty_kind_to_value_kind(vcardproperty_kind kind)
{
    int i, num_props;

    num_props = (int)(sizeof(property_map) / sizeof(property_map[0]));
    for (i = 0; i < num_props; i++) {
        const struct vcardproperty_map *map = &property_map[i];

        if (map->kind == kind) {
            /* Return default value type if possible,
               otherwise return first legal value type */
            return (map->default_value != VCARD_NO_VALUE) ? map->default_value : map->valid_values[0];
        }
    }

    return VCARD_NO_VALUE;
}

bool vcardproperty_value_kind_is_valid(vcardproperty_kind pkind,
                                       vcardvalue_kind vkind)
{
    int i, j;
    int num_props;

    if (vkind == VCARD_NO_VALUE) {
        return false;
    }

    if (pkind == VCARD_X_PROPERTY) {
        return true;
    }

    num_props = (int)(sizeof(property_map) / sizeof(property_map[0]));
    for (i = 0; i < num_props; i++) {
        const struct vcardproperty_map *map = &property_map[i];

        if (map->kind == pkind) {
            const vcardvalue_kind *valid = map->valid_values;
            for (j = 0; valid[j] != VCARD_NO_VALUE; j++) {
                if (valid[j] == vkind) {
                    return true;
                }
            }
            break;
        }
    }

    return false;
}

bool vcardproperty_is_structured(vcardproperty_kind pkind)
{
    int i, num_props;

    num_props = (int)(sizeof(property_map) / sizeof(property_map[0]));
    for (i = 0; i < num_props; i++) {
        const struct vcardproperty_map *map = &property_map[i];

        if (map->kind == pkind) {
            return (map->flags & VCARD_PROPERTY_IS_STRUCTURED);
        }
    }

    return false;
}

bool vcardproperty_is_multivalued(vcardproperty_kind pkind)
{
    int i, num_props;

    num_props = (int)(sizeof(property_map) / sizeof(property_map[0]));
    for (i = 0; i < num_props; i++) {
        const struct vcardproperty_map *map = &property_map[i];

        if (map->kind == pkind) {
            return (map->flags & VCARD_PROPERTY_IS_MULTIVALUED);
        }
    }

    return false;
}

bool vcardproperty_value_kind_is_default(vcardproperty_kind pkind,
                                         vcardvalue_kind vkind)
{
    int i, num_props;

    num_props = (int)(sizeof(property_map) / sizeof(property_map[0]));
    for (i = 0; i < num_props; i++) {
        const struct vcardproperty_map *map = &property_map[i];

        if (map->kind == pkind) {
            return ((vkind == map->default_value) ||
                    ((map->flags & VCARD_PROPERTY_IS_STRUCTURED) &&
                     (vkind == map->libical_value)));
        }
    }

    return false;
}

const char *vcardproperty_enum_to_string(int e)
{
    icalerror_check_arg_rz(e >= VCARDPROPERTY_FIRST_ENUM, "e");
    icalerror_check_arg_rz(e <= VCARDPROPERTY_LAST_ENUM, "e");

    return enum_map[e - VCARDPROPERTY_FIRST_ENUM].str;
}

char *vcardproperty_enum_to_string_r(int e)
{
    return icalmemory_strdup(vcardproperty_enum_to_string(e));
}

int vcardproperty_kind_and_string_to_enum(const int kind, const char *str)
{
    vcardproperty_kind pkind;
    int i;

    icalerror_check_arg_rz(str != 0, "str");

    if ((pkind = vcardproperty_value_kind_to_kind((vcardvalue_kind)kind)) == VCARD_NO_PROPERTY) {
        return 0;
    }

    while (*str == ' ') {
        str++;
    }

    for (i = VCARDPROPERTY_FIRST_ENUM; i != VCARDPROPERTY_LAST_ENUM; i++) {
        if (enum_map[i - VCARDPROPERTY_FIRST_ENUM].prop == pkind) {
            break;
        }
    }
    if (i == VCARDPROPERTY_LAST_ENUM) {
        return 0;
    }

    for (; i != VCARDPROPERTY_LAST_ENUM; i++) {
        if (enum_map[i - VCARDPROPERTY_FIRST_ENUM].prop == pkind &&
            strcasecmp(enum_map[i - VCARDPROPERTY_FIRST_ENUM].str, str) == 0) {
            return enum_map[i - VCARDPROPERTY_FIRST_ENUM].prop_enum;
        }
    }

    return 0;
}

bool vcardproperty_enum_belongs_to_property(vcardproperty_kind kind, int e)
{
    int i;

    for (i = VCARDPROPERTY_FIRST_ENUM; i != VCARDPROPERTY_LAST_ENUM; i++) {
        if (enum_map[i - VCARDPROPERTY_FIRST_ENUM].prop_enum == e &&
            enum_map[i - VCARDPROPERTY_FIRST_ENUM].prop == kind) {
            return true;
        }
    }

    return false;
}
