From 938b04846f9298af9d6913e4e07b847fa839c82d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Pinson?= Date: Wed, 26 Feb 2020 10:12:40 +0100 Subject: [PATCH 1/5] Update schema to 2.231 --- data/schema.json | 71896 ++++++++++++++++++++++++--------------------- 1 file changed, 39058 insertions(+), 32838 deletions(-) diff --git a/data/schema.json b/data/schema.json index 10281fa..c9bfc38 100644 --- a/data/schema.json +++ b/data/schema.json @@ -1,35158 +1,40944 @@ { - "error": null, - "id": null, - "principal": "admin@TEST.LOCAL", "result": { "result": { - "classes": [ + "commands": [ { - "full_name": "aci/1", - "name": "aci", + "exclude": [ + "cli" + ], + "name": "aci_add", + "doc": "\n Create new ACI.\n ", + "attr_name": "add", + "version": "1", "params": [ { - "label": "ACI name", + "type": "str", + "cli_name": "name", "name": "aciname", - "type": "str" + "label": "ACI name" }, { - "doc": "Permission ACI grants access to", - "label": "Permission", + "cli_name": "permission", "name": "permission", + "doc": "Permission ACI grants access to", "required": false, + "label": "Permission", "type": "str" }, { - "doc": "User group ACI grants access to", - "label": "User group", + "cli_name": "group", "name": "group", + "doc": "User group ACI grants access to", "required": false, + "label": "User group", "type": "str" }, { + "cli_name": "permissions", + "name": "permissions", "doc": "Permissions to grant(read, write, add, delete, all)", "label": "Permissions", + "positional": false, "multivalue": true, - "name": "permissions", - "type": "str" + "type": "str", + "no_convert": true }, { + "cli_name": "attrs", + "name": "attrs", "doc": "Attributes", + "required": false, "label": "Attributes to which the permission applies", "multivalue": true, - "name": "attrs", - "required": false, "type": "str" }, { - "doc": - "type of IPA object (user, group, host, hostgroup, service, netgroup)", - "label": "Type", + "cli_name": "type", "name": "type", + "cli_metavar": "['user', 'group', 'host', 'service', 'hostgroup', 'netgroup', 'dnsrecord']", + "doc": "type of IPA object (user, group, host, hostgroup, service, netgroup)", "required": false, + "label": "Type", "type": "str" }, { - "doc": "Member of a group", - "label": "Member of", + "cli_name": "memberof", "name": "memberof", + "doc": "Member of a group", "required": false, + "label": "Member of", "type": "str" }, { - "doc": "Legal LDAP filter (e.g. ou=Engineering)", - "label": "Filter", + "cli_name": "filter", "name": "filter", + "doc": "Legal LDAP filter (e.g. ou=Engineering)", "required": false, + "label": "Filter", "type": "str" }, { - "doc": "Subtree to apply ACI to", - "label": "Subtree", + "cli_name": "subtree", "name": "subtree", + "doc": "Subtree to apply ACI to", "required": false, + "label": "Subtree", "type": "str" }, { - "doc": "Group to apply ACI to", - "label": "Target group", + "cli_name": "targetgroup", "name": "targetgroup", + "doc": "Group to apply ACI to", "required": false, + "label": "Target group", "type": "str" }, { - "doc": "Apply ACI to your own entry (self)", - "label": "Target your own entry (self)", + "cli_name": "self", "name": "selfaci", + "default": [ + "False" + ], + "doc": "Apply ACI to your own entry (self)", "required": false, + "label": "Target your own entry (self)", "type": "bool" }, { - "doc": - "Prefix used to distinguish ACI types (permission, delegation, selfservice, none)", - "label": "ACI prefix", + "cli_name": "prefix", "name": "aciprefix", + "cli_metavar": "['permission', 'delegation', 'selfservice', 'none']", + "doc": "Prefix used to distinguish ACI types (permission, delegation, selfservice, none)", + "label": "ACI prefix", + "positional": false, "type": "str" }, { - "label": "ACI", - "name": "aci", - "type": "str" + "default": [ + "False" + ], + "doc": "Test the ACI syntax but don't write anything", + "required": false, + "type": "bool", + "name": "test" + }, + { + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "aci_add/1", + "output": [ + { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" + }, + { + "type": "dict", + "name": "result" + }, + { + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "version": "1" + "obj_class": "aci/1", + "topic_topic": "aci/1" }, { - "full_name": "automember/1", - "name": "automember", + "exclude": [ + "cli" + ], + "name": "aci_del", + "doc": "\n Delete ACI.\n ", + "attr_name": "del", + "version": "1", "params": [ { - "doc": "Automember Rule", - "label": "Automember Rule", - "name": "cn", - "type": "str" + "type": "str", + "cli_name": "name", + "name": "aciname", + "label": "ACI name" }, { - "doc": "A description of this auto member rule", - "label": "Description", - "name": "description", - "required": false, + "cli_name": "prefix", + "name": "aciprefix", + "cli_metavar": "['permission', 'delegation', 'selfservice', 'none']", + "doc": "Prefix used to distinguish ACI types (permission, delegation, selfservice, none)", + "label": "ACI prefix", + "positional": false, "type": "str" - }, + } + ], + "full_name": "aci_del/1", + "output": [ { - "doc": "Default group for entries to land", - "label": "Default (fallback) Group", - "name": "automemberdefaultgroup", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "Inclusive Regex", - "label": "Inclusive Regex", - "multivalue": true, - "name": "automemberinclusiveregex", - "required": false, - "type": "str" + "doc": "True means the operation was successful", + "type": "bool", + "name": "result" }, { - "doc": "Exclusive Regex", - "label": "Exclusive Regex", - "multivalue": true, - "name": "automemberexclusiveregex", - "required": false, - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "version": "1" + "obj_class": "aci/1", + "topic_topic": "aci/1" }, { - "full_name": "automember_default_group/1", - "name": "automember_default_group", + "exclude": [ + "cli" + ], + "name": "aci_find", + "doc": "\n Search for ACIs.\n\n Returns a list of ACIs\n\n EXAMPLES:\n\n To find all ACIs that apply directly to members of the group ipausers:\n ipa aci-find --memberof=ipausers\n\n To find all ACIs that grant add access:\n ipa aci-find --permissions=add\n\n Note that the find command only looks for the given text in the set of\n ACIs, it does not evaluate the ACIs to see if something would apply.\n For example, searching on memberof=ipausers will find all ACIs that\n have ipausers as a memberof. There may be other ACIs that apply to\n members of that group indirectly.\n ", + "attr_name": "find", + "version": "1", "params": [ { - "doc": "A description of this auto member rule", - "label": "Description", - "name": "description", + "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, - "type": "str" + "type": "str", + "name": "criteria" }, { - "doc": "Default group for entries to land", - "label": "Default (fallback) Group", - "name": "automemberdefaultgroup", + "type": "str", "required": false, - "type": "str" + "cli_name": "name", + "name": "aciname", + "label": "ACI name" }, { - "doc": "Inclusive Regex", - "label": "Inclusive Regex", - "multivalue": true, - "name": "automemberinclusiveregex", + "cli_name": "permission", + "name": "permission", + "doc": "Permission ACI grants access to", "required": false, + "label": "Permission", "type": "str" }, { - "doc": "Exclusive Regex", - "label": "Exclusive Regex", - "multivalue": true, - "name": "automemberexclusiveregex", + "cli_name": "group", + "name": "group", + "doc": "User group ACI grants access to", "required": false, + "label": "User group", "type": "str" - } - ], - "version": "1" - }, - { - "full_name": "automember_task/1", - "name": "automember_task", - "params": [ + }, { - "doc": "DN of the started task", - "label": "Task DN", - "name": "dn", - "type": "DN" - } - ], - "version": "1" - }, - { - "full_name": "automountkey/1", - "name": "automountkey", - "params": [ + "cli_name": "permissions", + "name": "permissions", + "doc": "Permissions to grant(read, write, add, delete, all)", + "required": false, + "label": "Permissions", + "multivalue": true, + "type": "str", + "no_convert": true + }, { - "doc": "Automount key name.", - "label": "Key", - "name": "automountkey", + "cli_name": "attrs", + "name": "attrs", + "doc": "Attributes", + "required": false, + "label": "Attributes to which the permission applies", + "multivalue": true, "type": "str" }, { - "label": "Mount information", - "name": "automountinformation", + "cli_name": "type", + "name": "type", + "cli_metavar": "['user', 'group', 'host', 'service', 'hostgroup', 'netgroup', 'dnsrecord']", + "doc": "type of IPA object (user, group, host, hostgroup, service, netgroup)", + "required": false, + "label": "Type", "type": "str" }, { - "exclude": ["webui", "cli"], - "label": "description", - "name": "description", + "cli_name": "memberof", + "name": "memberof", + "doc": "Member of a group", "required": false, + "label": "Member of", "type": "str" - } - ], - "version": "1" - }, - { - "full_name": "automountlocation/1", - "name": "automountlocation", - "params": [ + }, { - "doc": "Automount location name.", - "label": "Location", - "name": "cn", + "cli_name": "filter", + "name": "filter", + "doc": "Legal LDAP filter (e.g. ou=Engineering)", + "required": false, + "label": "Filter", "type": "str" - } - ], - "version": "1" - }, - { - "full_name": "automountmap/1", - "name": "automountmap", - "params": [ + }, { - "doc": "Automount map name.", - "label": "Map", - "name": "automountmapname", + "cli_name": "subtree", + "name": "subtree", + "doc": "Subtree to apply ACI to", + "required": false, + "label": "Subtree", "type": "str" }, { - "label": "Description", - "name": "description", + "cli_name": "targetgroup", + "name": "targetgroup", + "doc": "Group to apply ACI to", "required": false, + "label": "Target group", "type": "str" - } - ], - "version": "1" - }, - { - "full_name": "ca/1", - "name": "ca", - "params": [ + }, { - "doc": "Name for referencing the CA", - "label": "Name", - "name": "cn", - "type": "str" + "cli_name": "self", + "name": "selfaci", + "alwaysask": true, + "default": [ + "False" + ], + "doc": "Apply ACI to your own entry (self)", + "required": false, + "label": "Target your own entry (self)", + "type": "bool" }, { - "doc": "Description of the purpose of the CA", - "label": "Description", - "name": "description", + "cli_name": "prefix", + "name": "aciprefix", + "cli_metavar": "['permission', 'delegation', 'selfservice', 'none']", + "doc": "Prefix used to distinguish ACI types (permission, delegation, selfservice, none)", "required": false, + "label": "ACI prefix", "type": "str" }, { - "doc": "Dogtag Authority ID", - "label": "Authority ID", - "name": "ipacaid", - "type": "str" + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"name\")", + "required": false, + "label": "Primary key only", + "type": "bool" }, { - "doc": "Subject Distinguished Name", - "label": "Subject DN", - "name": "ipacasubjectdn", - "type": "DN" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": "Issuer Distinguished Name", - "label": "Issuer DN", - "name": "ipacaissuerdn", - "type": "DN" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "aci_find/1", + "output": [ + { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" + }, + { + "type": "dict", + "multivalue": true, + "name": "result" + }, + { + "doc": "Number of entries returned", + "type": "int", + "name": "count" + }, + { + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], - "version": "1" + "obj_class": "aci/1", + "topic_topic": "aci/1" }, { - "full_name": "caacl/1", - "name": "caacl", + "exclude": [ + "cli" + ], + "name": "aci_mod", + "doc": "\n Modify ACI.\n ", + "attr_name": "mod", + "version": "1", "params": [ { - "label": "ACL name", - "name": "cn", - "type": "str" + "type": "str", + "cli_name": "name", + "name": "aciname", + "label": "ACI name" }, { - "label": "Description", - "name": "description", + "cli_name": "permission", + "name": "permission", + "doc": "Permission ACI grants access to", "required": false, + "label": "Permission", "type": "str" }, { - "label": "Enabled", - "name": "ipaenabledflag", - "required": false, - "type": "bool" - }, - { - "doc": "CA category the ACL applies to", - "label": "CA category", - "name": "ipacacategory", + "cli_name": "group", + "name": "group", + "doc": "User group ACI grants access to", "required": false, + "label": "User group", "type": "str" }, { - "doc": "Profile category the ACL applies to", - "label": "Profile category", - "name": "ipacertprofilecategory", + "cli_name": "permissions", + "name": "permissions", + "doc": "Permissions to grant(read, write, add, delete, all)", "required": false, - "type": "str" + "label": "Permissions", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "doc": "User category the ACL applies to", - "label": "User category", - "name": "usercategory", + "cli_name": "attrs", + "name": "attrs", + "doc": "Attributes", "required": false, + "label": "Attributes to which the permission applies", + "multivalue": true, "type": "str" }, { - "doc": "Host category the ACL applies to", - "label": "Host category", - "name": "hostcategory", + "cli_name": "type", + "name": "type", + "cli_metavar": "['user', 'group', 'host', 'service', 'hostgroup', 'netgroup', 'dnsrecord']", + "doc": "type of IPA object (user, group, host, hostgroup, service, netgroup)", "required": false, + "label": "Type", "type": "str" }, { - "doc": "Service category the ACL applies to", - "label": "Service category", - "name": "servicecategory", + "cli_name": "memberof", + "name": "memberof", + "doc": "Member of a group", "required": false, + "label": "Member of", "type": "str" }, { - "label": "CAs", - "name": "ipamemberca_ca", + "cli_name": "filter", + "name": "filter", + "doc": "Legal LDAP filter (e.g. ou=Engineering)", "required": false, + "label": "Filter", "type": "str" }, { - "label": "Profiles", - "name": "ipamembercertprofile_certprofile", + "cli_name": "subtree", + "name": "subtree", + "doc": "Subtree to apply ACI to", "required": false, + "label": "Subtree", "type": "str" }, { - "label": "Users", - "name": "memberuser_user", + "cli_name": "targetgroup", + "name": "targetgroup", + "doc": "Group to apply ACI to", "required": false, + "label": "Target group", "type": "str" }, { - "label": "User Groups", - "name": "memberuser_group", + "cli_name": "self", + "name": "selfaci", + "default": [ + "False" + ], + "doc": "Apply ACI to your own entry (self)", "required": false, - "type": "str" + "label": "Target your own entry (self)", + "type": "bool" }, { - "label": "Hosts", - "name": "memberhost_host", - "required": false, + "cli_name": "prefix", + "name": "aciprefix", + "cli_metavar": "['permission', 'delegation', 'selfservice', 'none']", + "doc": "Prefix used to distinguish ACI types (permission, delegation, selfservice, none)", + "label": "ACI prefix", + "positional": false, "type": "str" }, { - "label": "Host Groups", - "name": "memberhost_hostgroup", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Services", - "name": "memberservice_service", - "required": false, - "type": "str" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" } ], - "version": "1" - }, - { - "full_name": "cert/1", - "name": "cert", - "params": [ + "full_name": "aci_mod/1", + "output": [ { - "doc": "Name of issuing CA", - "label": "Issuing CA", - "name": "cacn", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "Base-64 encoded certificate.", - "label": "Certificate", - "name": "certificate", - "type": "bytes" + "type": "dict", + "name": "result" }, { - "label": "Subject", - "name": "subject", - "type": "DN" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "aci/1", + "topic_topic": "aci/1" + }, + { + "exclude": [ + "cli" + ], + "name": "aci_rename", + "doc": "\n Rename an ACI.\n ", + "attr_name": "rename", + "version": "1", + "params": [ + { + "type": "str", + "cli_name": "name", + "name": "aciname", + "label": "ACI name" }, { - "label": "Subject email address", - "multivalue": true, - "name": "san_rfc822name", + "cli_name": "permission", + "name": "permission", + "doc": "Permission ACI grants access to", "required": false, + "label": "Permission", "type": "str" }, { - "label": "Subject DNS name", - "multivalue": true, - "name": "san_dnsname", + "cli_name": "group", + "name": "group", + "doc": "User group ACI grants access to", "required": false, - "type": "DNSName" + "label": "User group", + "type": "str" }, { - "label": "Subject X.400 address", - "multivalue": true, - "name": "san_x400address", + "cli_name": "permissions", + "name": "permissions", + "doc": "Permissions to grant(read, write, add, delete, all)", "required": false, - "type": "str" + "label": "Permissions", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "label": "Subject directory name", - "multivalue": true, - "name": "san_directoryname", + "cli_name": "attrs", + "name": "attrs", + "doc": "Attributes", "required": false, - "type": "DN" + "label": "Attributes to which the permission applies", + "multivalue": true, + "type": "str" }, { - "label": "Subject EDI Party name", - "multivalue": true, - "name": "san_edipartyname", + "cli_name": "type", + "name": "type", + "cli_metavar": "['user', 'group', 'host', 'service', 'hostgroup', 'netgroup', 'dnsrecord']", + "doc": "type of IPA object (user, group, host, hostgroup, service, netgroup)", "required": false, + "label": "Type", "type": "str" }, { - "label": "Subject URI", - "multivalue": true, - "name": "san_uri", + "cli_name": "memberof", + "name": "memberof", + "doc": "Member of a group", "required": false, + "label": "Member of", "type": "str" }, { - "label": "Subject IP Address", - "multivalue": true, - "name": "san_ipaddress", + "cli_name": "filter", + "name": "filter", + "doc": "Legal LDAP filter (e.g. ou=Engineering)", "required": false, + "label": "Filter", "type": "str" }, { - "label": "Subject OID", - "multivalue": true, - "name": "san_oid", + "cli_name": "subtree", + "name": "subtree", + "doc": "Subtree to apply ACI to", "required": false, + "label": "Subtree", "type": "str" }, { - "label": "Subject UPN", - "multivalue": true, - "name": "san_other_upn", + "cli_name": "targetgroup", + "name": "targetgroup", + "doc": "Group to apply ACI to", "required": false, - "type": "Principal" + "label": "Target group", + "type": "str" }, { - "label": "Subject Kerberos principal name", - "multivalue": true, - "name": "san_other_kpn", + "cli_name": "self", + "name": "selfaci", + "default": [ + "False" + ], + "doc": "Apply ACI to your own entry (self)", "required": false, - "type": "Principal" + "label": "Target your own entry (self)", + "type": "bool" }, { - "label": "Subject Other Name", - "multivalue": true, - "name": "san_other", - "required": false, + "cli_name": "prefix", + "name": "aciprefix", + "cli_metavar": "['permission', 'delegation', 'selfservice', 'none']", + "doc": "Prefix used to distinguish ACI types (permission, delegation, selfservice, none)", + "label": "ACI prefix", + "positional": false, "type": "str" }, { - "doc": "Issuer DN", - "label": "Issuer", - "name": "issuer", - "type": "DN" + "positional": false, + "doc": "New ACI name", + "type": "str", + "name": "newname" }, { - "label": "Not Before", - "name": "valid_not_before", - "type": "datetime" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Not After", - "name": "valid_not_after", - "type": "datetime" - }, + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "aci_rename/1", + "output": [ { - "label": "Fingerprint (MD5)", - "name": "md5_fingerprint", - "type": "str" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "label": "Fingerprint (SHA1)", - "name": "sha1_fingerprint", - "type": "str" + "type": "dict", + "name": "result" }, { - "doc": - "Serial number in decimal or if prefixed with 0x in hexadecimal", - "label": "Serial number", - "name": "serial_number", - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "aci/1", + "topic_topic": "aci/1" + }, + { + "exclude": [ + "cli" + ], + "name": "aci_show", + "doc": "\n Display a single ACI given an ACI name.\n ", + "attr_name": "show", + "version": "1", + "params": [ + { + "type": "str", + "cli_name": "name", + "name": "aciname", + "label": "ACI name" }, { - "label": "Serial number (hex)", - "name": "serial_number_hex", + "cli_name": "prefix", + "name": "aciprefix", + "cli_metavar": "['permission', 'delegation', 'selfservice', 'none']", + "doc": "Prefix used to distinguish ACI types (permission, delegation, selfservice, none)", + "label": "ACI prefix", + "positional": false, "type": "str" }, { - "label": "Status", - "name": "status", - "type": "str" + "required": false, + "type": "DN", + "name": "location", + "label": "Location of the ACI" }, { - "label": "Revoked", - "name": "revoked", + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "doc": - "Reason for revoking the certificate (0-10). Type \"ipa help cert\" for revocation reason details. ", - "label": "Revocation reason", - "name": "revocation_reason", - "type": "int" - }, + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "aci_show/1", + "output": [ { - "label": "Owner user", - "multivalue": true, - "name": "owner_user", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "label": "Owner host", - "multivalue": true, - "name": "owner_host", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "doc": "Service principal", - "label": "Owner service", - "multivalue": true, - "name": "owner_service", - "required": false, - "type": "Principal" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "version": "1" + "obj_class": "aci/1", + "topic_topic": "aci/1" }, { - "full_name": "certprofile/1", - "name": "certprofile", + "name": "adtrust_is_enabled", + "doc": "Determine whether ipa-adtrust-install has been run on this system", + "version": "1", + "params": [], + "full_name": "adtrust_is_enabled/1", + "exclude": [ + "cli" + ], + "output": [ + { + "name": "result" + } + ], + "topic_topic": "trust/1" + }, + { + "name": "automember_add", + "doc": "\n Add an automember rule.\n ", + "attr_name": "add", + "version": "1", "params": [ { - "doc": "Profile ID for referring to this profile", - "label": "Profile ID", + "cli_name": "automember_rule", "name": "cn", + "doc": "Automember Rule", + "label": "Automember Rule", + "type": "str", + "no_convert": true + }, + { + "cli_name": "desc", + "name": "description", + "doc": "A description of this auto member rule", + "required": false, + "label": "Description", "type": "str" }, { - "label": "Profile configuration", - "name": "config", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "doc": "Brief description of this profile", - "label": "Profile description", - "name": "description", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "doc": "Whether to store certs issued using this profile", - "label": "Store issued certificates", - "name": "ipacertprofilestoreissued", + "name": "type", + "cli_metavar": "['group', 'hostgroup']", + "doc": "Grouping to which the rule applies", + "label": "Grouping Type", + "positional": false, + "type": "str" + }, + { + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "version": "1" - }, - { - "full_name": "certreq/1", - "name": "certreq", - "params": [ + "full_name": "automember_add/1", + "output": [ { - "doc": "Name of issuing CA", - "label": "Issuing CA", - "name": "cacn", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "Base-64 encoded certificate.", - "label": "Certificate", - "name": "certificate", - "type": "bytes" + "type": "dict", + "name": "result" }, { - "label": "Subject", - "name": "subject", - "type": "DN" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "automember/1", + "topic_topic": "automember/1" + }, + { + "name": "automember_add_condition", + "doc": "\n Add conditions to an automember rule.\n ", + "attr_name": "add_condition", + "version": "1", + "params": [ + { + "cli_name": "automember_rule", + "name": "cn", + "doc": "Automember Rule", + "label": "Automember Rule", + "type": "str", + "no_convert": true }, { - "label": "Subject email address", - "multivalue": true, - "name": "san_rfc822name", + "cli_name": "desc", + "name": "description", + "doc": "A description of this auto member rule", "required": false, + "label": "Description", "type": "str" }, { - "label": "Subject DNS name", - "multivalue": true, - "name": "san_dnsname", + "cli_name": "inclusive_regex", + "name": "automemberinclusiveregex", + "alwaysask": true, + "doc": "Inclusive Regex", "required": false, - "type": "DNSName" - }, - { - "label": "Subject X.400 address", + "label": "Inclusive Regex", "multivalue": true, - "name": "san_x400address", - "required": false, "type": "str" }, { - "label": "Subject directory name", - "multivalue": true, - "name": "san_directoryname", + "cli_name": "exclusive_regex", + "name": "automemberexclusiveregex", + "alwaysask": true, + "doc": "Exclusive Regex", "required": false, - "type": "DN" - }, - { - "label": "Subject EDI Party name", + "label": "Exclusive Regex", "multivalue": true, - "name": "san_edipartyname", - "required": false, "type": "str" }, { - "label": "Subject URI", - "multivalue": true, - "name": "san_uri", - "required": false, - "type": "str" + "positional": false, + "doc": "Attribute to filter via regex. For example fqdn for a host, or manager for a user", + "type": "str", + "name": "key", + "label": "Attribute Key" }, { - "label": "Subject IP Address", - "multivalue": true, - "name": "san_ipaddress", - "required": false, + "name": "type", + "cli_metavar": "['group', 'hostgroup']", + "doc": "Grouping to which the rule applies", + "label": "Grouping Type", + "positional": false, "type": "str" }, { - "label": "Subject OID", - "multivalue": true, - "name": "san_oid", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Subject UPN", - "multivalue": true, - "name": "san_other_upn", - "required": false, - "type": "Principal" - }, + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "automember_add_condition/1", + "output": [ { - "label": "Subject Kerberos principal name", - "multivalue": true, - "name": "san_other_kpn", + "doc": "User-friendly description of action performed", "required": false, - "type": "Principal" + "type": "str", + "name": "summary" }, { - "label": "Subject Other Name", - "multivalue": true, - "name": "san_other", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "doc": "Issuer DN", - "label": "Issuer", - "name": "issuer", - "type": "DN" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" }, { - "label": "Not Before", - "name": "valid_not_before", - "type": "datetime" + "doc": "Conditions that could not be added", + "type": "dict", + "name": "failed" }, { - "label": "Not After", - "name": "valid_not_after", - "type": "datetime" - }, + "doc": "Number of conditions added", + "type": "int", + "name": "completed" + } + ], + "obj_class": "automember/1", + "topic_topic": "automember/1" + }, + { + "name": "automember_default_group_remove", + "doc": "\n Remove default (fallback) group for all unmatched entries.\n ", + "attr_name": "remove", + "version": "1", + "params": [ { - "label": "Fingerprint (MD5)", - "name": "md5_fingerprint", + "cli_name": "desc", + "name": "description", + "doc": "A description of this auto member rule", + "required": false, + "label": "Description", "type": "str" }, { - "label": "Fingerprint (SHA1)", - "name": "sha1_fingerprint", + "name": "type", + "cli_metavar": "['group', 'hostgroup']", + "doc": "Grouping to which the rule applies", + "label": "Grouping Type", + "positional": false, "type": "str" }, { - "doc": - "Serial number in decimal or if prefixed with 0x in hexadecimal", - "label": "Serial number", - "name": "serial_number", - "type": "int" - }, - { - "label": "Serial number (hex)", - "name": "serial_number_hex", - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "name": "request_type", - "type": "str" - }, + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "automember_default_group_remove/1", + "output": [ { - "doc": "Certificate Profile to use", - "label": "Profile ID", - "name": "profile_id", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "label": "Request status", - "name": "cert_request_status", - "type": "str" + "type": "dict", + "name": "result" }, { - "exclude": ["cli", "webui"], - "label": "Request id", - "name": "request_id", - "type": "int" + "type": "str", + "name": "value" } ], - "version": "1" + "obj_class": "automember_default_group/1", + "topic_topic": "automember/1" }, { - "full_name": "class/1", - "name": "class", + "name": "automember_default_group_set", + "doc": "\n Set default (fallback) group for all unmatched entries.\n ", + "attr_name": "set", + "version": "1", "params": [ { - "label": "Name", - "name": "name", + "cli_name": "desc", + "name": "description", + "doc": "A description of this auto member rule", + "required": false, + "label": "Description", "type": "str" }, { - "label": "Version", - "name": "version", + "cli_name": "default_group", + "name": "automemberdefaultgroup", + "doc": "Default (fallback) group for entries to land", + "label": "Default (fallback) Group", + "positional": false, "type": "str" }, { - "label": "Full name", - "name": "full_name", + "name": "type", + "cli_metavar": "['group', 'hostgroup']", + "doc": "Grouping to which the rule applies", + "label": "Grouping Type", + "positional": false, "type": "str" }, { - "label": "Documentation", - "name": "doc", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Exclude from", - "multivalue": true, - "name": "exclude", - "required": false, - "type": "str" - }, + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "automember_default_group_set/1", + "output": [ { - "label": "Include in", - "multivalue": true, - "name": "include", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "label": "Help topic", - "name": "topic_topic", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "label": "Parameters", - "multivalue": true, - "name": "params_param", - "required": false, - "type": "str" + "type": "str", + "name": "value" } ], - "version": "1" + "obj_class": "automember_default_group/1", + "topic_topic": "automember/1" }, { - "full_name": "command/1", - "name": "command", + "name": "automember_default_group_show", + "doc": "\n Display information about the default (fallback) automember groups.\n ", + "attr_name": "show", + "version": "1", "params": [ { - "label": "Name", - "name": "name", + "name": "type", + "cli_metavar": "['group', 'hostgroup']", + "doc": "Grouping to which the rule applies", + "label": "Grouping Type", + "positional": false, "type": "str" }, { - "label": "Version", - "name": "version", - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Full name", - "name": "full_name", - "type": "str" - }, + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "automember_default_group_show/1", + "output": [ { - "label": "Documentation", - "name": "doc", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "label": "Exclude from", - "multivalue": true, - "name": "exclude", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "label": "Include in", + "type": "str", + "name": "value" + } + ], + "obj_class": "automember_default_group/1", + "topic_topic": "automember/1" + }, + { + "name": "automember_del", + "doc": "\n Delete an automember rule.\n ", + "attr_name": "del", + "version": "1", + "params": [ + { + "cli_name": "automember_rule", + "name": "cn", + "doc": "Automember Rule", + "label": "Automember Rule", "multivalue": true, - "name": "include", - "required": false, - "type": "str" + "type": "str", + "no_convert": true }, { - "label": "Help topic", - "name": "topic_topic", - "required": false, + "name": "type", + "cli_metavar": "['group', 'hostgroup']", + "doc": "Grouping to which the rule applies", + "label": "Grouping Type", + "positional": false, "type": "str" - }, + } + ], + "full_name": "automember_del/1", + "output": [ { - "label": "Parameters", - "multivalue": true, - "name": "params_param", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "label": "Method of", - "name": "obj_class", - "required": false, - "type": "str" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "label": "Method name", - "name": "attr_name", - "required": false, - "type": "str" + "type": "str", + "multivalue": true, + "name": "value" } ], - "version": "1" + "obj_class": "automember/1", + "topic_topic": "automember/1" }, { - "full_name": "config/1", - "name": "config", + "name": "automember_find", + "doc": "\n Search for automember rules.\n ", + "attr_name": "find", + "version": "1", "params": [ { - "label": "Maximum username length", - "name": "ipamaxusernamelength", - "type": "int" + "positional": true, + "doc": "A string searched in all relevant object attributes", + "required": false, + "type": "str", + "name": "criteria" }, { - "doc": "Default location of home directories", - "label": "Home directory base", - "name": "ipahomesrootdir", + "cli_name": "desc", + "name": "description", + "doc": "A description of this auto member rule", + "required": false, + "label": "Description", "type": "str" }, { - "doc": "Default shell for new users", - "label": "Default shell", - "name": "ipadefaultloginshell", + "name": "type", + "cli_metavar": "['group', 'hostgroup']", + "doc": "Grouping to which the rule applies", + "label": "Grouping Type", + "positional": false, "type": "str" }, { - "doc": "Default group for new users", - "label": "Default users group", - "name": "ipadefaultprimarygroup", - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": "Default e-mail domain", - "label": "Default e-mail domain", - "name": "ipadefaultemaildomain", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"automember-rule\")", "required": false, - "type": "str" + "label": "Primary key only", + "type": "bool" + } + ], + "full_name": "automember_find/1", + "output": [ + { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": - "Maximum amount of time (seconds) for a search (-1 or 0 is unlimited)", - "label": "Search time limit", - "name": "ipasearchtimelimit", - "type": "int" + "type": "dict", + "multivalue": true, + "name": "result" }, { - "doc": - "Maximum number of records to search (-1 or 0 is unlimited)", - "label": "Search size limit", - "name": "ipasearchrecordslimit", - "type": "int" + "doc": "Number of entries returned", + "type": "int", + "name": "count" }, { - "doc": - "A comma-separated list of fields to search in when searching for users", - "label": "User search fields", - "name": "ipausersearchfields", + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" + } + ], + "obj_class": "automember/1", + "topic_topic": "automember/1" + }, + { + "name": "automember_find_orphans", + "doc": "\n Search for orphan automember rules. The command might need to be run as\n a privileged user user to get all orphan rules.\n ", + "attr_name": "find_orphans", + "version": "1", + "params": [ + { + "positional": true, + "doc": "A string searched in all relevant object attributes", + "required": false, + "type": "str", + "name": "criteria" + }, + { + "cli_name": "desc", + "name": "description", + "doc": "A description of this auto member rule", + "required": false, + "label": "Description", "type": "str" }, { - "doc": - "A comma-separated list of fields to search in when searching for groups", - "label": "Group search fields", - "name": "ipagroupsearchfields", + "name": "type", + "cli_metavar": "['group', 'hostgroup']", + "doc": "Grouping to which the rule applies", + "label": "Grouping Type", + "positional": false, "type": "str" }, { - "doc": "Enable migration mode", - "label": "Enable migration mode", - "name": "ipamigrationenabled", + "default": [ + "False" + ], + "doc": "Remove orphan automember rules", + "required": false, + "type": "bool", + "name": "remove" + }, + { + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "doc": "Base for certificate subjects (OU=Test,O=Example)", - "label": "Certificate Subject base", - "name": "ipacertificatesubjectbase", - "type": "DN" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": "Default group objectclasses (comma-separated list)", - "label": "Default group objectclasses", - "multivalue": true, - "name": "ipagroupobjectclasses", - "type": "str" + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"automember-rule\")", + "required": false, + "label": "Primary key only", + "type": "bool" + } + ], + "full_name": "automember_find_orphans/1", + "output": [ + { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Default user objectclasses (comma-separated list)", - "label": "Default user objectclasses", + "type": "dict", "multivalue": true, - "name": "ipauserobjectclasses", - "type": "str" + "name": "result" }, { - "doc": "Number of days's notice of impending password expiration", - "label": "Password Expiration Notification (days)", - "name": "ipapwdexpadvnotify", - "type": "int" + "doc": "Number of entries returned", + "type": "int", + "name": "count" }, { - "doc": "Extra hashes to generate in password plug-in", - "label": "Password plugin features", - "multivalue": true, - "name": "ipaconfigstring", - "required": false, - "type": "str" - }, + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" + } + ], + "obj_class": "automember/1", + "topic_topic": "automember/1" + }, + { + "name": "automember_mod", + "doc": "\n Modify an automember rule.\n ", + "attr_name": "mod", + "version": "1", + "params": [ { - "doc": - "Order in increasing priority of SELinux users, delimited by $", - "label": "SELinux user map order", - "name": "ipaselinuxusermaporder", - "type": "str" + "cli_name": "automember_rule", + "name": "cn", + "doc": "Automember Rule", + "label": "Automember Rule", + "type": "str", + "no_convert": true }, { - "doc": - "Default SELinux user when no match is found in SELinux map rule", - "label": "Default SELinux user", - "name": "ipaselinuxusermapdefault", + "cli_name": "desc", + "name": "description", + "doc": "A description of this auto member rule", "required": false, + "label": "Description", "type": "str" }, { - "doc": "Default types of PAC supported for services", - "label": "Default PAC types", - "multivalue": true, - "name": "ipakrbauthzdata", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "doc": "Default types of supported user authentication", - "label": "Default user authentication types", - "multivalue": true, - "name": "ipauserauthtype", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "doc": "List of all IPA masters", - "label": "IPA masters", - "multivalue": true, - "name": "ipa_master_server", + "cli_name": "delattr", + "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "doc": "IPA servers configured as certificate authority", - "label": "IPA CA servers", - "multivalue": true, - "name": "ca_server_server", - "required": false, - "type": "str" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { - "doc": "IPA servers with enabled NTP", - "label": "IPA NTP servers", - "multivalue": true, - "name": "ntp_server_server", - "required": false, + "name": "type", + "cli_metavar": "['group', 'hostgroup']", + "doc": "Grouping to which the rule applies", + "label": "Grouping Type", + "positional": false, "type": "str" }, { - "doc": "Renewal master for IPA certificate authority", - "label": "IPA CA renewal master", - "name": "ca_renewal_master_server", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" } ], - "version": "1" - }, - { - "full_name": "cosentry/1", - "name": "cosentry", - "params": [ + "full_name": "automember_mod/1", + "output": [ { - "name": "cn", - "type": "str" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "name": "krbpwdpolicyreference", - "type": "DN" + "type": "dict", + "name": "result" }, { - "name": "cospriority", - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "version": "1" + "obj_class": "automember/1", + "topic_topic": "automember/1" }, { - "full_name": "delegation/1", - "name": "delegation", + "name": "automember_rebuild", + "doc": "Rebuild auto membership.", + "attr_name": "rebuild", + "version": "1", "params": [ { - "doc": "Delegation name", - "label": "Delegation name", - "name": "aciname", + "name": "type", + "cli_metavar": "['group', 'hostgroup']", + "doc": "Grouping to which the rule applies", + "required": false, + "label": "Rebuild membership for all members of a grouping", "type": "str" }, { - "doc": "Permissions to grant (read, write). Default is write.", - "label": "Permissions", - "multivalue": true, - "name": "permissions", + "name": "users", + "doc": "Rebuild membership for specified users", "required": false, + "label": "Users", + "multivalue": true, "type": "str" }, { - "doc": "Attributes to which the delegation applies", - "label": "Attributes", + "name": "hosts", + "doc": "Rebuild membership for specified hosts", + "required": false, + "label": "Hosts", "multivalue": true, - "name": "attrs", "type": "str" }, { - "doc": "User group to apply delegation to", - "label": "Member user group", - "name": "memberof", - "type": "str" + "name": "no_wait", + "default": [ + "False" + ], + "doc": "Don't wait for rebuilding membership", + "required": false, + "label": "No wait", + "type": "bool" }, { - "doc": "User group ACI grants access to", - "label": "User group", - "name": "group", - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "ACI", - "name": "aci", - "type": "str" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" } ], - "version": "1" - }, - { - "full_name": "dns_system_records/1", - "name": "dns_system_records", - "params": [ + "full_name": "automember_rebuild/1", + "output": [ { - "label": "IPA DNS records", - "multivalue": true, - "name": "ipa_records", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "label": "IPA location records", - "multivalue": true, - "name": "location_records", - "required": false, - "type": "str" - } - ], - "version": "1" - }, - { - "full_name": "dnsa6record/1", - "name": "dnsa6record", - "params": [ + "type": "dict", + "name": "result" + }, { - "label": "Record data", - "name": "data", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "NoneType", + "name": "value" } ], - "version": "1" + "obj_class": "automember_task/1", + "topic_topic": "automember/1" }, { - "full_name": "dnsaaaarecord/1", - "name": "dnsaaaarecord", + "name": "automember_remove_condition", + "doc": "\n Remove conditions from an automember rule.\n ", + "attr_name": "remove_condition", + "version": "1", "params": [ { - "label": "IP Address", - "name": "ip_address", + "cli_name": "automember_rule", + "name": "cn", + "doc": "Automember Rule", + "label": "Automember Rule", + "type": "str", + "no_convert": true + }, + { + "cli_name": "desc", + "name": "description", + "doc": "A description of this auto member rule", + "required": false, + "label": "Description", "type": "str" }, { - "doc": "Create reverse record for this IP Address", - "label": "Create reverse", - "name": "create_reverse", + "cli_name": "inclusive_regex", + "name": "automemberinclusiveregex", + "alwaysask": true, + "doc": "Inclusive Regex", "required": false, - "type": "bool" - } - ], - "version": "1" - }, - { - "full_name": "dnsafsdbrecord/1", - "name": "dnsafsdbrecord", - "params": [ + "label": "Inclusive Regex", + "multivalue": true, + "type": "str" + }, { - "label": "Subtype", - "name": "subtype", + "cli_name": "exclusive_regex", + "name": "automemberexclusiveregex", + "alwaysask": true, + "doc": "Exclusive Regex", "required": false, - "type": "int" + "label": "Exclusive Regex", + "multivalue": true, + "type": "str" }, { - "label": "Hostname", - "name": "hostname", - "type": "DNSName" - } - ], - "version": "1" - }, - { - "full_name": "dnsaplrecord/1", - "name": "dnsaplrecord", - "params": [], - "version": "1" - }, - { - "full_name": "dnsarecord/1", - "name": "dnsarecord", - "params": [ + "positional": false, + "doc": "Attribute to filter via regex. For example fqdn for a host, or manager for a user", + "type": "str", + "name": "key", + "label": "Attribute Key" + }, { - "label": "IP Address", - "name": "ip_address", + "name": "type", + "cli_metavar": "['group', 'hostgroup']", + "doc": "Grouping to which the rule applies", + "label": "Grouping Type", + "positional": false, "type": "str" }, { - "doc": "Create reverse record for this IP Address", - "label": "Create reverse", - "name": "create_reverse", - "required": false, + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "version": "1" - }, - { - "full_name": "dnscertrecord/1", - "name": "dnscertrecord", - "params": [ + "full_name": "automember_remove_condition/1", + "output": [ { - "label": "Certificate Type", - "name": "type", - "type": "int" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "label": "Key Tag", - "name": "key_tag", - "type": "int" + "type": "dict", + "name": "result" }, { - "label": "Algorithm", - "name": "algorithm", - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" }, { - "label": "Certificate/CRL", - "name": "certificate_or_crl", - "type": "str" - } - ], - "version": "1" - }, - { - "full_name": "dnscnamerecord/1", - "name": "dnscnamerecord", - "params": [ + "doc": "Conditions that could not be removed", + "type": "dict", + "name": "failed" + }, { - "doc": "A hostname which this alias hostname points to", - "label": "Hostname", - "name": "hostname", - "type": "DNSName" + "doc": "Number of conditions removed", + "type": "int", + "name": "completed" } ], - "version": "1" + "obj_class": "automember/1", + "topic_topic": "automember/1" }, { - "full_name": "dnsconfig/1", - "name": "dnsconfig", + "name": "automember_show", + "doc": "\n Display information about an automember rule.\n ", + "attr_name": "show", + "version": "1", "params": [ { - "doc": - "Global forwarders. A custom port can be specified for each forwarder using a standard format \"IP_ADDRESS port PORT\"", - "label": "Global forwarders", - "multivalue": true, - "name": "idnsforwarders", - "required": false, - "type": "str" + "cli_name": "automember_rule", + "name": "cn", + "doc": "Automember Rule", + "label": "Automember Rule", + "type": "str", + "no_convert": true }, { - "doc": - "Global forwarding policy. Set to \"none\" to disable any configured global forwarders.", - "label": "Forward policy", - "name": "idnsforwardpolicy", - "required": false, + "name": "type", + "cli_metavar": "['group', 'hostgroup']", + "doc": "Grouping to which the rule applies", + "label": "Grouping Type", + "positional": false, "type": "str" }, { - "doc": - "Allow synchronization of forward (A, AAAA) and reverse (PTR) records", - "label": "Allow PTR sync", - "name": "idnsallowsyncptr", - "required": false, + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "doc": - "An interval between regular polls of the name server for new DNS zones", - "label": "Zone refresh interval", - "name": "idnszonerefresh", - "required": false, - "type": "int" - }, + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "automember_show/1", + "output": [ { - "label": "IPA DNS version", - "name": "ipadnsversion", + "doc": "User-friendly description of action performed", "required": false, - "type": "int" + "type": "str", + "name": "summary" }, { - "doc": "List of IPA masters configured as DNS servers", - "label": "IPA DNS servers", - "multivalue": true, - "name": "dns_server_server", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "doc": "IPA server configured as DNSSec key master", - "label": "IPA DNSSec key master", - "name": "dnssec_key_master_server", - "required": false, - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "version": "1" - }, - { - "full_name": "dnsdhcidrecord/1", - "name": "dnsdhcidrecord", - "params": [], - "version": "1" + "obj_class": "automember/1", + "topic_topic": "automember/1" }, { - "full_name": "dnsdlvrecord/1", - "name": "dnsdlvrecord", + "name": "automountkey_add", + "doc": "Create a new automount key.", + "attr_name": "add", + "version": "1", "params": [ { - "label": "Key Tag", - "name": "key_tag", - "type": "int" + "type": "str", + "doc": "Automount location name.", + "cli_name": "automountlocation", + "name": "automountlocationcn", + "label": "Location" }, { - "label": "Algorithm", - "name": "algorithm", - "type": "int" + "type": "str", + "doc": "Automount map name.", + "cli_name": "automountmap", + "name": "automountmapautomountmapname", + "label": "Map" }, { - "label": "Digest Type", - "name": "digest_type", - "type": "int" - }, + "cli_name": "key", + "name": "automountkey", + "doc": "Automount key name.", + "label": "Key", + "positional": false, + "type": "str" + }, { - "label": "Digest", - "name": "digest", + "positional": false, + "type": "str", + "cli_name": "info", + "name": "automountinformation", + "label": "Mount information" + }, + { + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" + }, + { + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" + }, + { + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" } ], - "version": "1" - }, - { - "full_name": "dnsdnamerecord/1", - "name": "dnsdnamerecord", - "params": [ + "full_name": "automountkey_add/1", + "output": [ { - "label": "Target", - "name": "target", - "type": "DNSName" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" + }, + { + "type": "dict", + "name": "result" + }, + { + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "version": "1" + "obj_class": "automountkey/1", + "topic_topic": "automount/1" }, { - "full_name": "dnsdsrecord/1", - "name": "dnsdsrecord", + "name": "automountkey_del", + "doc": "Delete an automount key.", + "attr_name": "del", + "version": "1", "params": [ { - "label": "Key Tag", - "name": "key_tag", - "type": "int" + "type": "str", + "doc": "Automount location name.", + "cli_name": "automountlocation", + "name": "automountlocationcn", + "label": "Location" }, { - "label": "Algorithm", - "name": "algorithm", - "type": "int" + "type": "str", + "doc": "Automount map name.", + "cli_name": "automountmap", + "name": "automountmapautomountmapname", + "label": "Map" }, { - "label": "Digest Type", - "name": "digest_type", - "type": "int" + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", + "positional": false, + "exclude": [ + "webui", + "cli" + ], + "type": "bool" }, { - "label": "Digest", - "name": "digest", + "cli_name": "key", + "name": "automountkey", + "doc": "Automount key name.", + "label": "Key", + "positional": false, "type": "str" + }, + { + "type": "str", + "required": false, + "cli_name": "info", + "name": "automountinformation", + "label": "Mount information" + } + ], + "full_name": "automountkey_del/1", + "output": [ + { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" + }, + { + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" + }, + { + "type": "str", + "multivalue": true, + "name": "value" } ], - "version": "1" + "obj_class": "automountkey/1", + "topic_topic": "automount/1" }, { - "full_name": "dnsforwardzone/1", - "name": "dnsforwardzone", + "name": "automountkey_find", + "doc": "Search for an automount key.", + "attr_name": "find", + "version": "1", "params": [ { - "doc": "Zone name (FQDN)", - "label": "Zone name", - "name": "idnsname", - "type": "DNSName" + "type": "str", + "doc": "Automount location name.", + "cli_name": "automountlocation", + "name": "automountlocationcn", + "label": "Location" }, { - "doc": "IP network to create reverse zone name from", - "label": "Reverse zone IP network", - "name": "name_from_ip", + "type": "str", + "doc": "Automount map name.", + "cli_name": "automountmap", + "name": "automountmapautomountmapname", + "label": "Map" + }, + { + "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, + "type": "str", + "name": "criteria" + }, + { + "cli_name": "key", + "name": "automountkey", + "doc": "Automount key name.", + "required": false, + "label": "Key", "type": "str" }, { - "doc": "Is zone active?", - "label": "Active zone", - "name": "idnszoneactive", + "type": "str", "required": false, - "type": "bool" + "cli_name": "info", + "name": "automountinformation", + "label": "Mount information" }, { - "doc": - "Per-zone forwarders. A custom port can be specified for each forwarder using a standard format \"IP_ADDRESS port PORT\"", - "label": "Zone forwarders", - "multivalue": true, - "name": "idnsforwarders", + "doc": "Time limit of search in seconds (0 is unlimited)", "required": false, - "type": "str" + "type": "int", + "name": "timelimit", + "label": "Time Limit" }, { - "doc": - "Per-zone conditional forwarding policy. Set to \"none\" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded.", - "label": "Forward policy", - "name": "idnsforwardpolicy", + "doc": "Maximum number of entries returned (0 is unlimited)", "required": false, - "type": "str" + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { - "label": "Managedby permission", - "name": "managedby", - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" } ], - "version": "1" - }, - { - "full_name": "dnshiprecord/1", - "name": "dnshiprecord", - "params": [], - "version": "1" - }, - { - "full_name": "dnsipseckeyrecord/1", - "name": "dnsipseckeyrecord", - "params": [], - "version": "1" - }, - { - "full_name": "dnskeyrecord/1", - "name": "dnskeyrecord", - "params": [], - "version": "1" - }, - { - "full_name": "dnskxrecord/1", - "name": "dnskxrecord", - "params": [ + "full_name": "automountkey_find/1", + "output": [ { - "doc": - "Preference given to this exchanger. Lower values are more preferred", - "label": "Preference", - "name": "preference", - "type": "int" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "A host willing to act as a key exchanger", - "label": "Exchanger", - "name": "exchanger", - "type": "DNSName" + "type": "dict", + "multivalue": true, + "name": "result" + }, + { + "doc": "Number of entries returned", + "type": "int", + "name": "count" + }, + { + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], - "version": "1" + "obj_class": "automountkey/1", + "topic_topic": "automount/1" }, { - "full_name": "dnslocrecord/1", - "name": "dnslocrecord", + "name": "automountkey_mod", + "doc": "Modify an automount key.", + "attr_name": "mod", + "version": "1", "params": [ { - "label": "Degrees Latitude", - "name": "lat_deg", - "type": "int" - }, - { - "label": "Minutes Latitude", - "name": "lat_min", - "required": false, - "type": "int" + "type": "str", + "doc": "Automount location name.", + "cli_name": "automountlocation", + "name": "automountlocationcn", + "label": "Location" }, { - "label": "Seconds Latitude", - "name": "lat_sec", - "required": false, - "type": "Decimal" + "type": "str", + "doc": "Automount map name.", + "cli_name": "automountmap", + "name": "automountmapautomountmapname", + "label": "Map" }, { - "label": "Direction Latitude", - "name": "lat_dir", + "cli_name": "key", + "name": "automountkey", + "alwaysask": false, + "doc": "Automount key name.", + "label": "Key", + "positional": false, "type": "str" }, { - "label": "Degrees Longitude", - "name": "lon_deg", - "type": "int" + "type": "str", + "required": false, + "cli_name": "info", + "name": "automountinformation", + "label": "Mount information" }, { - "label": "Minutes Longitude", - "name": "lon_min", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, - "type": "int" + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" }, { - "label": "Seconds Longitude", - "name": "lon_sec", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, - "type": "Decimal" + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" }, { - "label": "Direction Longitude", - "name": "lon_dir", + "cli_name": "delattr", + "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "label": "Altitude", - "name": "altitude", - "type": "Decimal" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { - "label": "Size", - "name": "size", + "type": "str", "required": false, - "type": "Decimal" + "cli_name": "newinfo", + "name": "newautomountinformation", + "label": "New mount information" }, { - "label": "Horizontal Precision", - "name": "h_precision", - "required": false, - "type": "Decimal" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Vertical Precision", - "name": "v_precision", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "rename", + "name": "rename", + "doc": "Rename the automount key object", "required": false, - "type": "Decimal" + "label": "Rename", + "exclude": [ + "webui" + ], + "type": "str" } ], - "version": "1" - }, - { - "full_name": "dnsmxrecord/1", - "name": "dnsmxrecord", - "params": [ + "full_name": "automountkey_mod/1", + "output": [ { - "doc": - "Preference given to this exchanger. Lower values are more preferred", - "label": "Preference", - "name": "preference", - "type": "int" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "A host willing to act as a mail exchanger", - "label": "Exchanger", - "name": "exchanger", - "type": "DNSName" + "type": "dict", + "name": "result" + }, + { + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "version": "1" + "obj_class": "automountkey/1", + "topic_topic": "automount/1" }, { - "full_name": "dnsnaptrrecord/1", - "name": "dnsnaptrrecord", + "name": "automountkey_show", + "doc": "Display an automount key.", + "attr_name": "show", + "version": "1", "params": [ { - "label": "Order", - "name": "order", - "type": "int" + "type": "str", + "doc": "Automount location name.", + "cli_name": "automountlocation", + "name": "automountlocationcn", + "label": "Location" }, { - "label": "Preference", - "name": "preference", - "type": "int" + "type": "str", + "doc": "Automount map name.", + "cli_name": "automountmap", + "name": "automountmapautomountmapname", + "label": "Map" }, { - "label": "Flags", - "name": "flags", - "type": "str" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { - "label": "Service", - "name": "service", + "cli_name": "key", + "name": "automountkey", + "doc": "Automount key name.", + "label": "Key", + "positional": false, "type": "str" }, { - "label": "Regular Expression", - "name": "regexp", - "type": "str" + "type": "str", + "required": false, + "cli_name": "info", + "name": "automountinformation", + "label": "Mount information" }, { - "label": "Replacement", - "name": "replacement", - "type": "str" - } - ], - "version": "1" - }, - { - "full_name": "dnsnsecrecord/1", - "name": "dnsnsecrecord", - "params": [], - "version": "1" - }, - { - "full_name": "dnsnsrecord/1", - "name": "dnsnsrecord", - "params": [ + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, { - "label": "Hostname", - "name": "hostname", - "type": "DNSName" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" } ], - "version": "1" - }, - { - "full_name": "dnsptrrecord/1", - "name": "dnsptrrecord", - "params": [ + "full_name": "automountkey_show/1", + "output": [ { - "doc": "The hostname this reverse record points to", - "label": "Hostname", - "name": "hostname", - "type": "DNSName" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" + }, + { + "type": "dict", + "name": "result" + }, + { + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "version": "1" + "obj_class": "automountkey/1", + "topic_topic": "automount/1" }, { - "full_name": "dnsrecord/1", - "name": "dnsrecord", + "name": "automountlocation_add", + "doc": "Create a new automount location.", + "attr_name": "add", + "version": "1", "params": [ { - "doc": "Record name", - "label": "Record name", - "name": "idnsname", - "type": "DNSName" + "type": "str", + "doc": "Automount location name.", + "cli_name": "location", + "name": "cn", + "label": "Location" }, { - "doc": "Time to live", - "label": "Time to live", - "name": "dnsttl", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, - "type": "int" + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" }, { - "name": "dnsclass", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "label": "Records", - "name": "dnsrecords", - "required": false, - "type": "object" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Record type", - "name": "dnstype", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "automountlocation_add/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "label": "Record data", - "name": "dnsdata", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "doc": "Raw A records", - "label": "A record", + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "automountlocation/1", + "topic_topic": "automount/1" + }, + { + "name": "automountlocation_del", + "doc": "Delete an automount location.", + "attr_name": "del", + "version": "1", + "params": [ + { + "cli_name": "location", + "name": "cn", + "doc": "Automount location name.", + "label": "Location", "multivalue": true, - "name": "arecord", - "required": false, "type": "str" }, { - "label": "A IP Address", - "name": "a_part_ip_address", + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", + "positional": false, + "type": "bool" + } + ], + "full_name": "automountlocation_del/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "Create reverse record for this IP Address", - "label": "A Create reverse", - "name": "a_extra_create_reverse", - "required": false, - "type": "bool" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "doc": "Raw AAAA records", - "label": "AAAA record", + "type": "str", "multivalue": true, - "name": "aaaarecord", - "required": false, - "type": "str" - }, + "name": "value" + } + ], + "obj_class": "automountlocation/1", + "topic_topic": "automount/1" + }, + { + "name": "automountlocation_find", + "doc": "Search for an automount location.", + "attr_name": "find", + "version": "1", + "params": [ { - "label": "AAAA IP Address", - "name": "aaaa_part_ip_address", + "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, - "type": "str" + "type": "str", + "name": "criteria" }, { - "doc": "Create reverse record for this IP Address", - "label": "AAAA Create reverse", - "name": "aaaa_extra_create_reverse", + "cli_name": "location", + "name": "cn", + "doc": "Automount location name.", "required": false, - "type": "bool" + "label": "Location", + "type": "str" }, { - "doc": "Raw A6 records", - "label": "A6 record", - "multivalue": true, - "name": "a6record", + "doc": "Time limit of search in seconds (0 is unlimited)", "required": false, - "type": "str" + "type": "int", + "name": "timelimit", + "label": "Time Limit" }, { - "label": "A6 Record data", - "name": "a6_part_data", + "doc": "Maximum number of entries returned (0 is unlimited)", "required": false, - "type": "str" + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { - "doc": "Raw AFSDB records", - "label": "AFSDB record", - "multivalue": true, - "name": "afsdbrecord", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "AFSDB Subtype", - "name": "afsdb_part_subtype", - "required": false, - "type": "int" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "AFSDB Hostname", - "name": "afsdb_part_hostname", + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"location\")", "required": false, - "type": "DNSName" - }, + "label": "Primary key only", + "type": "bool" + } + ], + "full_name": "automountlocation_find/1", + "output": [ { - "doc": "Raw APL records", - "label": "APL record", - "multivalue": true, - "name": "aplrecord", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "Raw CERT records", - "label": "CERT record", + "type": "dict", "multivalue": true, - "name": "certrecord", - "required": false, - "type": "str" + "name": "result" }, { - "label": "CERT Certificate Type", - "name": "cert_part_type", - "required": false, - "type": "int" + "doc": "Number of entries returned", + "type": "int", + "name": "count" }, { - "label": "CERT Key Tag", - "name": "cert_part_key_tag", - "required": false, - "type": "int" - }, + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" + } + ], + "obj_class": "automountlocation/1", + "topic_topic": "automount/1" + }, + { + "name": "automountlocation_show", + "doc": "Display an automount location.", + "attr_name": "show", + "version": "1", + "params": [ { - "label": "CERT Algorithm", - "name": "cert_part_algorithm", - "required": false, - "type": "int" + "doc": "Automount location name.", + "label": "Location", + "cli_name": "location", + "name": "cn", + "type": "str" }, { - "label": "CERT Certificate/CRL", - "name": "cert_part_certificate_or_crl", - "required": false, - "type": "str" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { - "doc": "Raw CNAME records", - "label": "CNAME record", - "multivalue": true, - "name": "cnamerecord", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": "A hostname which this alias hostname points to", - "label": "CNAME Hostname", - "name": "cname_part_hostname", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "automountlocation_show/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "DNSName" + "type": "str", + "name": "summary" }, { - "doc": "Raw DHCID records", - "label": "DHCID record", - "multivalue": true, - "name": "dhcidrecord", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "doc": "Raw DLV records", - "label": "DLV record", - "multivalue": true, - "name": "dlvrecord", - "required": false, + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "automountlocation/1", + "topic_topic": "automount/1" + }, + { + "name": "automountlocation_tofiles", + "doc": "Generate automount files for a specific location.", + "attr_name": "tofiles", + "version": "1", + "params": [ + { + "doc": "Automount location name.", + "label": "Location", + "cli_name": "location", + "name": "cn", "type": "str" - }, + } + ], + "full_name": "automountlocation_tofiles/1", + "output": [ { - "label": "DLV Key Tag", - "name": "dlv_part_key_tag", - "required": false, - "type": "int" + "name": "result" + } + ], + "obj_class": "automountlocation/1", + "topic_topic": "automount/1" + }, + { + "name": "automountmap_add", + "doc": "Create a new automount map.", + "attr_name": "add", + "version": "1", + "params": [ + { + "type": "str", + "doc": "Automount location name.", + "cli_name": "automountlocation", + "name": "automountlocationcn", + "label": "Location" }, { - "label": "DLV Algorithm", - "name": "dlv_part_algorithm", - "required": false, - "type": "int" + "type": "str", + "doc": "Automount map name.", + "cli_name": "map", + "name": "automountmapname", + "label": "Map" }, { - "label": "DLV Digest Type", - "name": "dlv_part_digest_type", + "type": "str", "required": false, - "type": "int" + "cli_name": "desc", + "name": "description", + "label": "Description" }, { - "label": "DLV Digest", - "name": "dlv_part_digest", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "doc": "Raw DNAME records", - "label": "DNAME record", - "multivalue": true, - "name": "dnamerecord", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "label": "DNAME Target", - "name": "dname_part_target", - "required": false, - "type": "DNSName" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": "Raw DS records", - "label": "DS record", - "multivalue": true, - "name": "dsrecord", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "automountmap_add/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "label": "DS Key Tag", - "name": "ds_part_key_tag", - "required": false, - "type": "int" + "type": "dict", + "name": "result" }, { - "label": "DS Algorithm", - "name": "ds_part_algorithm", - "required": false, - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "automountmap/1", + "topic_topic": "automount/1" + }, + { + "name": "automountmap_add_indirect", + "doc": "Create a new indirect mount point.", + "attr_name": "add_indirect", + "version": "1", + "params": [ + { + "type": "str", + "doc": "Automount location name.", + "cli_name": "automountlocation", + "name": "automountlocationcn", + "label": "Location" }, { - "label": "DS Digest Type", - "name": "ds_part_digest_type", - "required": false, - "type": "int" + "type": "str", + "doc": "Automount map name.", + "cli_name": "map", + "name": "automountmapname", + "label": "Map" }, { - "label": "DS Digest", - "name": "ds_part_digest", + "type": "str", "required": false, - "type": "str" + "cli_name": "desc", + "name": "description", + "label": "Description" }, { - "doc": "Raw HIP records", - "label": "HIP record", - "multivalue": true, - "name": "hiprecord", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "doc": "Raw IPSECKEY records", - "label": "IPSECKEY record", - "multivalue": true, - "name": "ipseckeyrecord", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "doc": "Raw KEY records", - "label": "KEY record", - "multivalue": true, - "name": "keyrecord", - "required": false, - "type": "str" + "positional": false, + "type": "str", + "cli_name": "mount", + "name": "key", + "label": "Mount point" }, { - "doc": "Raw KX records", - "label": "KX record", - "multivalue": true, - "name": "kxrecord", + "cli_name": "parentmap", + "name": "parentmap", + "default": [ + "auto.master" + ], + "doc": "Name of parent automount map (default: auto.master).", "required": false, + "label": "Parent map", "type": "str" }, { - "doc": - "Preference given to this exchanger. Lower values are more preferred", - "label": "KX Preference", - "name": "kx_part_preference", - "required": false, - "type": "int" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": "A host willing to act as a key exchanger", - "label": "KX Exchanger", - "name": "kx_part_exchanger", - "required": false, - "type": "DNSName" - }, + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "automountmap_add_indirect/1", + "output": [ { - "doc": "Raw LOC records", - "label": "LOC record", - "multivalue": true, - "name": "locrecord", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "label": "LOC Degrees Latitude", - "name": "loc_part_lat_deg", - "required": false, - "type": "int" + "type": "dict", + "name": "result" }, { - "label": "LOC Minutes Latitude", - "name": "loc_part_lat_min", - "required": false, - "type": "int" - }, + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "automountmap/1", + "topic_topic": "automount/1" + }, + { + "name": "automountmap_del", + "doc": "Delete an automount map.", + "attr_name": "del", + "version": "1", + "params": [ { - "label": "LOC Seconds Latitude", - "name": "loc_part_lat_sec", - "required": false, - "type": "Decimal" + "type": "str", + "doc": "Automount location name.", + "cli_name": "automountlocation", + "name": "automountlocationcn", + "label": "Location" }, { - "label": "LOC Direction Latitude", - "name": "loc_part_lat_dir", - "required": false, + "cli_name": "map", + "name": "automountmapname", + "doc": "Automount map name.", + "label": "Map", + "multivalue": true, "type": "str" }, { - "label": "LOC Degrees Longitude", - "name": "loc_part_lon_deg", + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", + "positional": false, + "type": "bool" + } + ], + "full_name": "automountmap_del/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "int" + "type": "str", + "name": "summary" }, { - "label": "LOC Minutes Longitude", - "name": "loc_part_lon_min", - "required": false, - "type": "int" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "label": "LOC Seconds Longitude", - "name": "loc_part_lon_sec", + "type": "str", + "multivalue": true, + "name": "value" + } + ], + "obj_class": "automountmap/1", + "topic_topic": "automount/1" + }, + { + "name": "automountmap_find", + "doc": "Search for an automount map.", + "attr_name": "find", + "version": "1", + "params": [ + { + "type": "str", + "doc": "Automount location name.", + "cli_name": "automountlocation", + "name": "automountlocationcn", + "label": "Location" + }, + { + "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, - "type": "Decimal" + "type": "str", + "name": "criteria" }, { - "label": "LOC Direction Longitude", - "name": "loc_part_lon_dir", + "cli_name": "map", + "name": "automountmapname", + "doc": "Automount map name.", "required": false, + "label": "Map", "type": "str" }, { - "label": "LOC Altitude", - "name": "loc_part_altitude", + "type": "str", "required": false, - "type": "Decimal" + "cli_name": "desc", + "name": "description", + "label": "Description" }, { - "label": "LOC Size", - "name": "loc_part_size", + "doc": "Time limit of search in seconds (0 is unlimited)", "required": false, - "type": "Decimal" + "type": "int", + "name": "timelimit", + "label": "Time Limit" }, { - "label": "LOC Horizontal Precision", - "name": "loc_part_h_precision", + "doc": "Maximum number of entries returned (0 is unlimited)", "required": false, - "type": "Decimal" + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { - "label": "LOC Vertical Precision", - "name": "loc_part_v_precision", - "required": false, - "type": "Decimal" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": "Raw MX records", - "label": "MX record", - "multivalue": true, - "name": "mxrecord", - "required": false, - "type": "str" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": - "Preference given to this exchanger. Lower values are more preferred", - "label": "MX Preference", - "name": "mx_part_preference", + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"map\")", "required": false, - "type": "int" - }, + "label": "Primary key only", + "type": "bool" + } + ], + "full_name": "automountmap_find/1", + "output": [ { - "doc": "A host willing to act as a mail exchanger", - "label": "MX Exchanger", - "name": "mx_part_exchanger", + "doc": "User-friendly description of action performed", "required": false, - "type": "DNSName" + "type": "str", + "name": "summary" }, { - "doc": "Raw NAPTR records", - "label": "NAPTR record", + "type": "dict", "multivalue": true, - "name": "naptrrecord", - "required": false, - "type": "str" + "name": "result" }, { - "label": "NAPTR Order", - "name": "naptr_part_order", - "required": false, - "type": "int" + "doc": "Number of entries returned", + "type": "int", + "name": "count" }, { - "label": "NAPTR Preference", - "name": "naptr_part_preference", - "required": false, - "type": "int" - }, + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" + } + ], + "obj_class": "automountmap/1", + "topic_topic": "automount/1" + }, + { + "name": "automountmap_mod", + "doc": "Modify an automount map.", + "attr_name": "mod", + "version": "1", + "params": [ { - "label": "NAPTR Flags", - "name": "naptr_part_flags", - "required": false, - "type": "str" + "type": "str", + "doc": "Automount location name.", + "cli_name": "automountlocation", + "name": "automountlocationcn", + "label": "Location" }, { - "label": "NAPTR Service", - "name": "naptr_part_service", - "required": false, + "doc": "Automount map name.", + "label": "Map", + "cli_name": "map", + "name": "automountmapname", "type": "str" }, { - "label": "NAPTR Regular Expression", - "name": "naptr_part_regexp", + "type": "str", "required": false, - "type": "str" + "cli_name": "desc", + "name": "description", + "label": "Description" }, { - "label": "NAPTR Replacement", - "name": "naptr_part_replacement", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "doc": "Raw NS records", - "label": "NS record", - "multivalue": true, - "name": "nsrecord", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "label": "NS Hostname", - "name": "ns_part_hostname", + "cli_name": "delattr", + "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, - "type": "DNSName" - }, - { - "doc": "Raw NSEC records", - "label": "NSEC record", "multivalue": true, - "name": "nsecrecord", - "required": false, + "exclude": [ + "webui" + ], "type": "str" }, { - "doc": "Raw PTR records", - "label": "PTR record", - "multivalue": true, - "name": "ptrrecord", - "required": false, - "type": "str" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { - "doc": "The hostname this reverse record points to", - "label": "PTR Hostname", - "name": "ptr_part_hostname", - "required": false, - "type": "DNSName" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": "Raw RRSIG records", - "label": "RRSIG record", - "multivalue": true, - "name": "rrsigrecord", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "automountmap_mod/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "Raw RP records", - "label": "RP record", - "multivalue": true, - "name": "rprecord", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "doc": "Raw SIG records", - "label": "SIG record", - "multivalue": true, - "name": "sigrecord", - "required": false, - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "automountmap/1", + "topic_topic": "automount/1" + }, + { + "name": "automountmap_show", + "doc": "Display an automount map.", + "attr_name": "show", + "version": "1", + "params": [ + { + "type": "str", + "doc": "Automount location name.", + "cli_name": "automountlocation", + "name": "automountlocationcn", + "label": "Location" }, { - "doc": "Raw SPF records", - "label": "SPF record", - "multivalue": true, - "name": "spfrecord", - "required": false, + "doc": "Automount map name.", + "label": "Map", + "cli_name": "map", + "name": "automountmapname", "type": "str" }, { - "doc": "Raw SRV records", - "label": "SRV record", - "multivalue": true, - "name": "srvrecord", - "required": false, - "type": "str" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { - "label": "SRV Priority", - "name": "srv_part_priority", - "required": false, - "type": "int" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "SRV Weight", - "name": "srv_part_weight", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "automountmap_show/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "int" + "type": "str", + "name": "summary" }, { - "label": "SRV Port", - "name": "srv_part_port", - "required": false, - "type": "int" + "type": "dict", + "name": "result" }, { - "doc": - "The domain name of the target host or '.' if the service is decidedly not available at this domain", - "label": "SRV Target", - "name": "srv_part_target", + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "automountmap/1", + "topic_topic": "automount/1" + }, + { + "name": "batch", + "version": "1", + "params": [ + { + "name": "methods", + "doc": "Nested Methods to execute", "required": false, - "type": "DNSName" + "positional": true, + "multivalue": true, + "type": "dict" + } + ], + "full_name": "batch/1", + "exclude": [ + "cli" + ], + "output": [ + { + "doc": "", + "type": "int", + "name": "count" }, { - "doc": "Raw SSHFP records", - "label": "SSHFP record", + "doc": "", "multivalue": true, - "name": "sshfprecord", - "required": false, - "type": "str" + "name": "results" + } + ], + "topic_topic": "batch/1" + }, + { + "name": "ca_add", + "doc": "Create a CA.", + "attr_name": "add", + "version": "1", + "params": [ + { + "type": "str", + "doc": "Name for referencing the CA", + "cli_name": "name", + "name": "cn", + "label": "Name" }, { - "label": "SSHFP Algorithm", - "name": "sshfp_part_algorithm", + "cli_name": "desc", + "name": "description", + "doc": "Description of the purpose of the CA", "required": false, - "type": "int" + "label": "Description", + "type": "str" }, { - "label": "SSHFP Fingerprint Type", - "name": "sshfp_part_fp_type", - "required": false, - "type": "int" + "cli_name": "subject", + "name": "ipacasubjectdn", + "doc": "Subject Distinguished Name", + "label": "Subject DN", + "positional": false, + "type": "DN" }, { - "label": "SSHFP Fingerprint", - "name": "sshfp_part_fingerprint", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "doc": "Raw TLSA records", - "label": "TLSA record", - "multivalue": true, - "name": "tlsarecord", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "label": "TLSA Certificate Usage", - "name": "tlsa_part_cert_usage", - "required": false, - "type": "int" + "positional": false, + "default": [ + "False" + ], + "type": "bool", + "name": "chain", + "doc": "Include certificate chain in output" }, { - "label": "TLSA Selector", - "name": "tlsa_part_selector", - "required": false, - "type": "int" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "TLSA Matching Type", - "name": "tlsa_part_matching_type", - "required": false, - "type": "int" - }, + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "ca_add/1", + "output": [ { - "label": "TLSA Certificate Association Data", - "name": "tlsa_part_cert_association_data", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "Raw TXT records", - "label": "TXT record", - "multivalue": true, - "name": "txtrecord", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "label": "TXT Text Data", - "name": "txt_part_data", - "required": false, - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "version": "1" - }, - { - "full_name": "dnsrprecord/1", - "name": "dnsrprecord", - "params": [], - "version": "1" - }, - { - "full_name": "dnsrrsigrecord/1", - "name": "dnsrrsigrecord", - "params": [], - "version": "1" + "obj_class": "ca/1", + "topic_topic": "ca/1" }, { - "full_name": "dnsserver/1", - "name": "dnsserver", + "name": "ca_del", + "doc": "Delete a CA.", + "attr_name": "del", + "version": "1", "params": [ { - "doc": "DNS Server name", - "label": "Server name", - "name": "idnsserverid", + "cli_name": "name", + "name": "cn", + "doc": "Name for referencing the CA", + "label": "Name", + "multivalue": true, "type": "str" }, { - "doc": "SOA mname (authoritative server) override", - "label": "SOA mname override", - "name": "idnssoamname", + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", + "positional": false, + "type": "bool" + } + ], + "full_name": "ca_del/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "DNSName" + "type": "str", + "name": "summary" }, { - "doc": - "Per-server forwarders. A custom port can be specified for each forwarder using a standard format \"IP_ADDRESS port PORT\"", - "label": "Forwarders", - "multivalue": true, - "name": "idnsforwarders", - "required": false, - "type": "str" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "doc": - "Per-server conditional forwarding policy. Set to \"none\" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded.", - "label": "Forward policy", - "name": "idnsforwardpolicy", - "required": false, - "type": "str" + "type": "str", + "multivalue": true, + "name": "value" } ], - "version": "1" - }, - { - "full_name": "dnssigrecord/1", - "name": "dnssigrecord", - "params": [], - "version": "1" - }, - { - "full_name": "dnsspfrecord/1", - "name": "dnsspfrecord", - "params": [], - "version": "1" + "obj_class": "ca/1", + "topic_topic": "ca/1" }, { - "full_name": "dnssrvrecord/1", - "name": "dnssrvrecord", + "name": "ca_disable", + "doc": "Disable a CA.", + "attr_name": "disable", + "version": "1", "params": [ { - "label": "Priority", - "name": "priority", - "type": "int" - }, + "doc": "Name for referencing the CA", + "label": "Name", + "cli_name": "name", + "name": "cn", + "type": "str" + } + ], + "full_name": "ca_disable/1", + "output": [ { - "label": "Weight", - "name": "weight", - "type": "int" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "label": "Port", - "name": "port", - "type": "int" + "doc": "True means the operation was successful", + "type": "bool", + "name": "result" }, { - "doc": - "The domain name of the target host or '.' if the service is decidedly not available at this domain", - "label": "Target", - "name": "target", - "type": "DNSName" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "version": "1" + "obj_class": "ca/1", + "topic_topic": "ca/1" }, { - "full_name": "dnssshfprecord/1", - "name": "dnssshfprecord", + "name": "ca_enable", + "doc": "Enable a CA.", + "attr_name": "enable", + "version": "1", "params": [ { - "label": "Algorithm", - "name": "algorithm", - "type": "int" - }, - { - "label": "Fingerprint Type", - "name": "fp_type", - "type": "int" - }, - { - "label": "Fingerprint", - "name": "fingerprint", + "doc": "Name for referencing the CA", + "label": "Name", + "cli_name": "name", + "name": "cn", "type": "str" } ], - "version": "1" - }, - { - "full_name": "dnstlsarecord/1", - "name": "dnstlsarecord", - "params": [ - { - "label": "Certificate Usage", - "name": "cert_usage", - "type": "int" - }, + "full_name": "ca_enable/1", + "output": [ { - "label": "Selector", - "name": "selector", - "type": "int" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "label": "Matching Type", - "name": "matching_type", - "type": "int" + "doc": "True means the operation was successful", + "type": "bool", + "name": "result" }, { - "label": "Certificate Association Data", - "name": "cert_association_data", - "type": "str" - } - ], - "version": "1" - }, - { - "full_name": "dnstxtrecord/1", - "name": "dnstxtrecord", - "params": [ - { - "label": "Text Data", - "name": "data", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "version": "1" + "obj_class": "ca/1", + "topic_topic": "ca/1" }, { - "full_name": "dnszone/1", - "name": "dnszone", + "name": "ca_find", + "doc": "Search for CAs.", + "attr_name": "find", + "version": "1", "params": [ { - "doc": "Zone name (FQDN)", - "label": "Zone name", - "name": "idnsname", - "type": "DNSName" + "positional": true, + "doc": "A string searched in all relevant object attributes", + "required": false, + "type": "str", + "name": "criteria" }, { - "doc": "IP network to create reverse zone name from", - "label": "Reverse zone IP network", - "name": "name_from_ip", + "cli_name": "name", + "name": "cn", + "doc": "Name for referencing the CA", "required": false, + "label": "Name", "type": "str" }, { - "doc": "Is zone active?", - "label": "Active zone", - "name": "idnszoneactive", + "cli_name": "desc", + "name": "description", + "doc": "Description of the purpose of the CA", "required": false, - "type": "bool" + "label": "Description", + "type": "str" }, { - "doc": - "Per-zone forwarders. A custom port can be specified for each forwarder using a standard format \"IP_ADDRESS port PORT\"", - "label": "Zone forwarders", - "multivalue": true, - "name": "idnsforwarders", + "cli_name": "id", + "name": "ipacaid", + "doc": "Dogtag Authority ID", "required": false, + "label": "Authority ID", "type": "str" }, { - "doc": - "Per-zone conditional forwarding policy. Set to \"none\" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded.", - "label": "Forward policy", - "name": "idnsforwardpolicy", + "cli_name": "subject", + "name": "ipacasubjectdn", + "doc": "Subject Distinguished Name", "required": false, - "type": "str" + "label": "Subject DN", + "type": "DN" }, { - "label": "Managedby permission", - "name": "managedby", - "type": "str" + "cli_name": "issuer", + "name": "ipacaissuerdn", + "doc": "Issuer Distinguished Name", + "required": false, + "label": "Issuer DN", + "type": "DN" }, { - "doc": "Authoritative nameserver domain name", - "label": "Authoritative nameserver", - "name": "idnssoamname", + "doc": "Time limit of search in seconds (0 is unlimited)", "required": false, - "type": "DNSName" + "type": "int", + "name": "timelimit", + "label": "Time Limit" }, { - "doc": "Administrator e-mail address", - "label": "Administrator e-mail address", - "name": "idnssoarname", - "type": "DNSName" + "doc": "Maximum number of entries returned (0 is unlimited)", + "required": false, + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { - "doc": "SOA record serial number", - "label": "SOA serial", - "name": "idnssoaserial", - "type": "int" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": "SOA record refresh time", - "label": "SOA refresh", - "name": "idnssoarefresh", - "type": "int" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": "SOA record retry time", - "label": "SOA retry", - "name": "idnssoaretry", - "type": "int" - }, + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"name\")", + "required": false, + "label": "Primary key only", + "type": "bool" + } + ], + "full_name": "ca_find/1", + "output": [ { - "doc": "SOA record expire time", - "label": "SOA expire", - "name": "idnssoaexpire", - "type": "int" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "How long should negative responses be cached", - "label": "SOA minimum", - "name": "idnssoaminimum", - "type": "int" + "type": "dict", + "multivalue": true, + "name": "result" }, { - "doc": "Time to live for records at zone apex", - "label": "Time to live", - "name": "dnsttl", - "required": false, - "type": "int" + "doc": "Number of entries returned", + "type": "int", + "name": "count" }, { - "doc": "Time to live for records without explicit TTL definition", - "label": "Default time to live", - "name": "dnsdefaultttl", - "required": false, - "type": "int" - }, + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" + } + ], + "obj_class": "ca/1", + "topic_topic": "ca/1" + }, + { + "name": "ca_is_enabled", + "doc": "\n Checks if any of the servers has the CA service enabled.\n ", + "version": "1", + "params": [], + "full_name": "ca_is_enabled/1", + "exclude": [ + "cli" + ], + "output": [ { - "name": "dnsclass", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "BIND update policy", - "label": "BIND update policy", - "name": "idnsupdatepolicy", - "required": false, - "type": "str" + "doc": "True means the operation was successful", + "type": "bool", + "name": "result" }, { - "doc": "Allow dynamic updates.", - "label": "Dynamic update", - "name": "idnsallowdynupdate", - "required": false, - "type": "bool" - }, - { - "doc": - "Semicolon separated list of IP addresses or networks which are allowed to issue queries", - "label": "Allow query", - "name": "idnsallowquery", - "required": false, - "type": "str" - }, - { - "doc": - "Semicolon separated list of IP addresses or networks which are allowed to transfer the zone", - "label": "Allow transfer", - "name": "idnsallowtransfer", - "required": false, - "type": "str" - }, - { - "doc": - "Allow synchronization of forward (A, AAAA) and reverse (PTR) records in the zone", - "label": "Allow PTR sync", - "name": "idnsallowsyncptr", - "required": false, - "type": "bool" - }, - { - "doc": "Allow inline DNSSEC signing of records in the zone", - "label": "Allow in-line DNSSEC signing", - "name": "idnssecinlinesigning", - "required": false, - "type": "bool" - }, - { - "doc": - "NSEC3PARAM record for zone in format: hash_algorithm flags iterations salt", - "label": "NSEC3PARAM record", - "name": "nsec3paramrecord", - "required": false, - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "NoneType", + "name": "value" } ], - "version": "1" + "topic_topic": "cert/1" }, { - "full_name": "group/1", - "name": "group", + "name": "ca_mod", + "doc": "Modify CA configuration.", + "attr_name": "mod", + "version": "1", "params": [ { - "label": "Group name", + "doc": "Name for referencing the CA", + "label": "Name", + "cli_name": "name", "name": "cn", "type": "str" }, { - "doc": "Group description", - "label": "Description", + "cli_name": "desc", "name": "description", + "doc": "Description of the purpose of the CA", "required": false, + "label": "Description", "type": "str" }, { - "doc": "GID (use this option to set it manually)", - "label": "GID", - "name": "gidnumber", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, - "type": "int" - }, - { - "doc": - "Members of a trusted domain in DOM\\name or name@domain form", - "label": "External member", "multivalue": true, - "name": "ipaexternalmember", - "required": false, + "exclude": [ + "webui" + ], "type": "str" }, { - "label": "Member users", - "name": "member_user", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "label": "Member groups", - "name": "member_group", + "cli_name": "delattr", + "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "label": "Member of groups", - "name": "memberof_group", - "required": false, - "type": "str" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { - "label": "Roles", - "name": "memberof_role", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Member of netgroups", - "name": "memberof_netgroup", - "required": false, - "type": "str" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Member of Sudo rule", - "name": "memberof_sudorule", + "cli_name": "rename", + "name": "rename", + "doc": "Rename the Certificate Authority object", "required": false, + "label": "Rename", "type": "str" - }, + } + ], + "full_name": "ca_mod/1", + "output": [ { - "label": "Member of HBAC rule", - "name": "memberof_hbacrule", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "label": "Indirect Member users", - "name": "memberindirect_user", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "label": "Indirect Member groups", - "name": "memberindirect_group", - "required": false, + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "ca/1", + "topic_topic": "ca/1" + }, + { + "name": "ca_show", + "doc": "Display the properties of a CA.", + "attr_name": "show", + "version": "1", + "params": [ + { + "doc": "Name for referencing the CA", + "label": "Name", + "cli_name": "name", + "name": "cn", "type": "str" }, { - "label": "Indirect Member of group", - "name": "memberofindirect_group", - "required": false, - "type": "str" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { - "label": "Indirect Member of netgroup", - "name": "memberofindirect_netgroup", - "required": false, - "type": "str" + "positional": false, + "default": [ + "False" + ], + "type": "bool", + "name": "chain", + "doc": "Include certificate chain in output" }, { - "label": "Indirect Member of role", - "name": "memberofindirect_role", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Indirect Member of Sudo rule", - "name": "memberofindirect_sudorule", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "ca_show/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "label": "Indirect Member of HBAC rule", - "name": "memberofindirect_hbacrule", - "required": false, - "type": "str" + "type": "dict", + "name": "result" + }, + { + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "version": "1" + "obj_class": "ca/1", + "topic_topic": "ca/1" }, { - "full_name": "hbacrule/1", - "name": "hbacrule", + "name": "caacl_add", + "doc": "Create a new CA ACL.", + "attr_name": "add", + "version": "1", "params": [ { - "label": "Rule name", + "type": "str", + "cli_name": "name", "name": "cn", - "type": "str" - }, - { - "doc": "Rule type (allow)", - "exclude": ["webui", "cli"], - "label": "Rule type", - "name": "accessruletype", - "type": "str" + "label": "ACL name" }, { - "doc": "User category the rule applies to", - "label": "User category", - "name": "usercategory", + "type": "str", "required": false, - "type": "str" + "cli_name": "desc", + "name": "description", + "label": "Description" }, { - "doc": "Host category the rule applies to", - "label": "Host category", - "name": "hostcategory", + "exclude": [ + "cli", + "webui" + ], "required": false, - "type": "str" + "type": "bool", + "name": "ipaenabledflag", + "label": "Enabled" }, { - "doc": "Source host category the rule applies to", - "label": "Source host category", - "name": "sourcehostcategory", + "cli_name": "cacat", + "name": "ipacacategory", + "cli_metavar": "['all']", + "doc": "CA category the ACL applies to", "required": false, + "label": "CA category", "type": "str" }, { - "doc": "Service category the rule applies to", - "label": "Service category", - "name": "servicecategory", + "cli_name": "profilecat", + "name": "ipacertprofilecategory", + "cli_metavar": "['all']", + "doc": "Profile category the ACL applies to", "required": false, + "label": "Profile category", "type": "str" }, { - "label": "Description", - "name": "description", + "cli_name": "usercat", + "name": "usercategory", + "cli_metavar": "['all']", + "doc": "User category the ACL applies to", "required": false, + "label": "User category", "type": "str" }, { - "label": "Enabled", - "name": "ipaenabledflag", - "required": false, - "type": "bool" - }, - { - "label": "Users", - "name": "memberuser_user", + "cli_name": "hostcat", + "name": "hostcategory", + "cli_metavar": "['all']", + "doc": "Host category the ACL applies to", "required": false, + "label": "Host category", "type": "str" }, { - "label": "User Groups", - "name": "memberuser_group", + "cli_name": "servicecat", + "name": "servicecategory", + "cli_metavar": "['all']", + "doc": "Service category the ACL applies to", "required": false, + "label": "Service category", "type": "str" }, { - "label": "Hosts", - "name": "memberhost_host", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "label": "Host Groups", - "name": "memberhost_hostgroup", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "label": "Source Hosts", - "name": "sourcehost_host", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Source Host Groups", - "name": "sourcehost_hostgroup", - "required": false, - "type": "str" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Services", - "name": "memberservice_hbacsvc", + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "caacl_add/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "label": "Service Groups", - "name": "memberservice_hbacsvcgroup", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "label": "External host", - "multivalue": true, - "name": "externalhost", - "required": false, - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "version": "1" + "obj_class": "caacl/1", + "topic_topic": "caacl/1" }, { - "full_name": "hbacsvc/1", - "name": "hbacsvc", + "name": "caacl_add_ca", + "doc": "Add CAs to a CA ACL.", + "attr_name": "add_ca", + "version": "1", "params": [ { - "doc": "HBAC service", - "label": "Service name", + "type": "str", + "cli_name": "name", "name": "cn", - "type": "str" + "label": "ACL name" }, { - "doc": "HBAC service description", - "label": "Description", - "name": "description", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Member of HBAC service groups", - "name": "memberof_hbacsvcgroup", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "cas", + "name": "ca", + "alwaysask": true, + "doc": "Certificate Authorities to add", "required": false, + "label": "member Certificate Authority", + "multivalue": true, "type": "str" } ], - "version": "1" - }, - { - "full_name": "hbacsvcgroup/1", - "name": "hbacsvcgroup", - "params": [ + "full_name": "caacl_add_ca/1", + "output": [ { - "label": "Service group name", - "name": "cn", - "type": "str" + "type": "dict", + "name": "result" }, { - "doc": "HBAC service group description", - "label": "Description", - "name": "description", - "required": false, - "type": "str" + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" }, { - "label": "Member HBAC service", - "name": "member_hbacsvc", - "required": false, - "type": "str" + "doc": "Number of members added", + "type": "int", + "name": "completed" } ], - "version": "1" + "obj_class": "caacl/1", + "topic_topic": "caacl/1" }, { - "full_name": "host/1", - "name": "host", + "name": "caacl_add_host", + "doc": "Add target hosts and hostgroups to a CA ACL.", + "attr_name": "add_host", + "version": "1", "params": [ { - "label": "Host name", - "name": "fqdn", - "type": "str" + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "ACL name" }, { - "doc": "A description of this host", - "label": "Description", - "name": "description", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": "Host locality (e.g. \"Baltimore, MD\")", - "label": "Locality", - "name": "l", - "required": false, - "type": "str" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": "Host location (e.g. \"Lab 2\")", - "label": "Location", - "name": "nshostlocation", - "required": false, - "type": "str" + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": "Host hardware platform (e.g. \"Lenovo T61\")", - "label": "Platform", - "name": "nshardwareplatform", + "cli_name": "hosts", + "name": "host", + "alwaysask": true, + "doc": "hosts to add", "required": false, + "label": "member host", + "multivalue": true, "type": "str" }, { - "doc": "Host operating system and version (e.g. \"Fedora 9\")", - "label": "Operating system", - "name": "nsosversion", + "cli_name": "hostgroups", + "name": "hostgroup", + "alwaysask": true, + "doc": "host groups to add", "required": false, + "label": "member host group", + "multivalue": true, "type": "str" - }, + } + ], + "full_name": "caacl_add_host/1", + "output": [ { - "doc": "Password used in bulk enrollment", - "label": "User password", - "name": "userpassword", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "doc": "Generate a random password to be used in bulk enrollment", - "name": "random", - "required": false, - "type": "bool" + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" }, { - "label": "Random password", - "name": "randompassword", - "required": false, - "type": "str" - }, + "doc": "Number of members added", + "type": "int", + "name": "completed" + } + ], + "obj_class": "caacl/1", + "topic_topic": "caacl/1" + }, + { + "name": "caacl_add_profile", + "doc": "Add profiles to a CA ACL.", + "attr_name": "add_profile", + "version": "1", + "params": [ { - "doc": "Base-64 encoded host certificate", - "label": "Certificate", - "multivalue": true, - "name": "usercertificate", - "required": false, - "type": "bytes" + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "ACL name" }, { - "label": "Subject", - "name": "subject", - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Serial Number", - "name": "serial_number", - "type": "str" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Serial Number (hex)", - "name": "serial_number_hex", - "type": "str" + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Issuer", - "name": "issuer", + "cli_name": "certprofiles", + "name": "certprofile", + "alwaysask": true, + "doc": "Certificate Profiles to add", + "required": false, + "label": "member Certificate Profile", + "multivalue": true, "type": "str" - }, + } + ], + "full_name": "caacl_add_profile/1", + "output": [ { - "label": "Not Before", - "name": "valid_not_before", - "type": "str" + "type": "dict", + "name": "result" }, { - "label": "Not After", - "name": "valid_not_after", - "type": "str" + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" }, { - "label": "Fingerprint (MD5)", - "name": "md5_fingerprint", - "type": "str" + "doc": "Number of members added", + "type": "int", + "name": "completed" + } + ], + "obj_class": "caacl/1", + "topic_topic": "caacl/1" + }, + { + "name": "caacl_add_service", + "doc": "Add services to a CA ACL.", + "attr_name": "add_service", + "version": "1", + "params": [ + { + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "ACL name" }, { - "label": "Fingerprint (SHA1)", - "name": "sha1_fingerprint", - "type": "str" - }, - { - "label": "Revocation reason", - "name": "revocation_reason", - "required": false, - "type": "str" - }, - { - "label": "Principal name", - "name": "krbcanonicalname", - "required": false, - "type": "Principal" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Principal alias", - "multivalue": true, - "name": "krbprincipalname", - "required": false, - "type": "Principal" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": "Hardware MAC address(es) on this host", - "label": "MAC address", - "multivalue": true, - "name": "macaddress", - "required": false, - "type": "str" + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "SSH public key", - "multivalue": true, - "name": "ipasshpubkey", + "cli_name": "services", + "name": "service", + "alwaysask": true, + "doc": "services to add", "required": false, - "type": "str" - }, - { - "label": "SSH public key fingerprint", + "label": "member service", "multivalue": true, - "name": "sshpubkeyfp", - "required": false, "type": "str" - }, + } + ], + "full_name": "caacl_add_service/1", + "output": [ { - "doc": - "Host category (semantics placed on this attribute are for local interpretation)", - "label": "Class", - "multivalue": true, - "name": "userclass", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "label": "Assigned ID View", - "name": "ipaassignedidview", - "required": false, - "type": "str" + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" }, { - "doc": - "Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations.", - "label": "Authentication Indicators", - "multivalue": true, - "name": "krbprincipalauthind", - "required": false, - "type": "str" - }, + "doc": "Number of members added", + "type": "int", + "name": "completed" + } + ], + "obj_class": "caacl/1", + "topic_topic": "caacl/1" + }, + { + "name": "caacl_add_user", + "doc": "Add users and groups to a CA ACL.", + "attr_name": "add_user", + "version": "1", + "params": [ { - "doc": "Pre-authentication is required for the service", - "label": "Requires pre-authentication", - "name": "ipakrbrequirespreauth", - "required": false, - "type": "bool" + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "ACL name" }, { - "doc": "Client credentials may be delegated to the service", - "label": "Trusted for delegation", - "name": "ipakrbokasdelegate", - "required": false, + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "doc": - "The service is allowed to authenticate on behalf of a client", - "label": "Trusted to authenticate as user", - "name": "ipakrboktoauthasdelegate", - "required": false, + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "label": "Password", - "name": "has_password", + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "label": "Member of host-groups", - "name": "memberof_hostgroup", - "required": false, - "type": "str" - }, - { - "label": "Roles", - "name": "memberof_role", - "required": false, - "type": "str" - }, - { - "label": "Member of netgroups", - "name": "memberof_netgroup", + "cli_name": "users", + "name": "user", + "alwaysask": true, + "doc": "users to add", "required": false, + "label": "member user", + "multivalue": true, "type": "str" }, { - "label": "Member of Sudo rule", - "name": "memberof_sudorule", + "cli_name": "groups", + "name": "group", + "alwaysask": true, + "doc": "groups to add", "required": false, + "label": "member group", + "multivalue": true, "type": "str" - }, + } + ], + "full_name": "caacl_add_user/1", + "output": [ { - "label": "Member of HBAC rule", - "name": "memberof_hbacrule", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "label": "Indirect Member of netgroup", - "name": "memberofindirect_netgroup", - "required": false, - "type": "str" + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" }, { - "label": "Indirect Member of host-group", - "name": "memberofindirect_hostgroup", - "required": false, - "type": "str" - }, + "doc": "Number of members added", + "type": "int", + "name": "completed" + } + ], + "obj_class": "caacl/1", + "topic_topic": "caacl/1" + }, + { + "name": "caacl_del", + "doc": "Delete a CA ACL.", + "attr_name": "del", + "version": "1", + "params": [ { - "label": "Indirect Member of role", - "name": "memberofindirect_role", - "required": false, + "cli_name": "name", + "label": "ACL name", + "multivalue": true, + "name": "cn", "type": "str" }, { - "label": "Indirect Member of Sudo rule", - "name": "memberofindirect_sudorule", - "required": false, - "type": "str" - }, + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", + "positional": false, + "type": "bool" + } + ], + "full_name": "caacl_del/1", + "output": [ { - "label": "Indirect Member of HBAC rule", - "name": "memberofindirect_hbacrule", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "label": "Keytab", - "name": "has_keytab", - "type": "bool" - }, - { - "label": "Managed by", - "name": "managedby_host", - "type": "str" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "label": "Managing", - "name": "managing_host", - "type": "str" - }, + "type": "str", + "multivalue": true, + "name": "value" + } + ], + "obj_class": "caacl/1", + "topic_topic": "caacl/1" + }, + { + "name": "caacl_disable", + "doc": "Disable a CA ACL.", + "attr_name": "disable", + "version": "1", + "params": [ { - "label": "Users allowed to retrieve keytab", - "name": "ipaallowedtoperform_read_keys_user", - "type": "str" - }, + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "ACL name" + } + ], + "full_name": "caacl_disable/1", + "output": [ { - "label": "Groups allowed to retrieve keytab", - "name": "ipaallowedtoperform_read_keys_group", - "type": "str" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "label": "Hosts allowed to retrieve keytab", - "name": "ipaallowedtoperform_read_keys_host", - "type": "str" + "doc": "True means the operation was successful", + "type": "bool", + "name": "result" }, { - "label": "Host Groups allowed to retrieve keytab", - "name": "ipaallowedtoperform_read_keys_hostgroup", - "type": "str" - }, + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "caacl/1", + "topic_topic": "caacl/1" + }, + { + "name": "caacl_enable", + "doc": "Enable a CA ACL.", + "attr_name": "enable", + "version": "1", + "params": [ { - "label": "Users allowed to create keytab", - "name": "ipaallowedtoperform_write_keys_user", - "type": "str" - }, + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "ACL name" + } + ], + "full_name": "caacl_enable/1", + "output": [ { - "label": "Groups allowed to create keytab", - "name": "ipaallowedtoperform_write_keys_group", - "type": "str" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "label": "Hosts allowed to create keytab", - "name": "ipaallowedtoperform_write_keys_host", - "type": "str" + "doc": "True means the operation was successful", + "type": "bool", + "name": "result" }, { - "label": "Host Groups allowed to create keytab", - "name": "ipaallowedtoperform_write_keys_hostgroup", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "version": "1" + "obj_class": "caacl/1", + "topic_topic": "caacl/1" }, { - "full_name": "hostgroup/1", - "name": "hostgroup", + "name": "caacl_find", + "doc": "Search for CA ACLs.", + "attr_name": "find", + "version": "1", "params": [ { - "doc": "Name of host-group", - "label": "Host-group", - "name": "cn", - "type": "str" + "positional": true, + "doc": "A string searched in all relevant object attributes", + "required": false, + "type": "str", + "name": "criteria" }, { - "doc": "A description of this host-group", - "label": "Description", - "name": "description", + "type": "str", "required": false, - "type": "str" + "cli_name": "name", + "name": "cn", + "label": "ACL name" }, { - "label": "Member hosts", - "name": "member_host", + "type": "str", "required": false, - "type": "str" + "cli_name": "desc", + "name": "description", + "label": "Description" }, { - "label": "Member host-groups", - "name": "member_hostgroup", + "exclude": [ + "cli", + "webui" + ], "required": false, - "type": "str" + "type": "bool", + "name": "ipaenabledflag", + "label": "Enabled" }, { - "label": "Member of host-groups", - "name": "memberof_hostgroup", + "cli_name": "cacat", + "name": "ipacacategory", + "cli_metavar": "['all']", + "doc": "CA category the ACL applies to", "required": false, + "label": "CA category", "type": "str" }, { - "label": "Member of netgroups", - "name": "memberof_netgroup", + "cli_name": "profilecat", + "name": "ipacertprofilecategory", + "cli_metavar": "['all']", + "doc": "Profile category the ACL applies to", "required": false, + "label": "Profile category", "type": "str" }, { - "label": "Member of Sudo rule", - "name": "memberof_sudorule", + "cli_name": "usercat", + "name": "usercategory", + "cli_metavar": "['all']", + "doc": "User category the ACL applies to", "required": false, + "label": "User category", "type": "str" }, { - "label": "Member of HBAC rule", - "name": "memberof_hbacrule", + "cli_name": "hostcat", + "name": "hostcategory", + "cli_metavar": "['all']", + "doc": "Host category the ACL applies to", "required": false, + "label": "Host category", "type": "str" }, { - "label": "Indirect Member hosts", - "name": "memberindirect_host", + "cli_name": "servicecat", + "name": "servicecategory", + "cli_metavar": "['all']", + "doc": "Service category the ACL applies to", "required": false, + "label": "Service category", "type": "str" }, { - "label": "Indirect Member host-groups", - "name": "memberindirect_hostgroup", + "doc": "Time limit of search in seconds (0 is unlimited)", "required": false, - "type": "str" + "type": "int", + "name": "timelimit", + "label": "Time Limit" }, { - "label": "Indirect Member of host-group", - "name": "memberofindirect_hostgroup", + "doc": "Maximum number of entries returned (0 is unlimited)", "required": false, - "type": "str" + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { - "label": "Indirect Member of Sudo rule", - "name": "memberofindirect_sudorule", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Indirect Member of HBAC rule", - "name": "memberofindirect_hbacrule", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "True" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui", + "cli" + ], + "type": "bool" + }, + { + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"name\")", "required": false, - "type": "str" + "label": "Primary key only", + "type": "bool" } ], - "version": "1" - }, - { - "full_name": "idoverridegroup/1", - "name": "idoverridegroup", - "params": [ + "full_name": "caacl_find/1", + "output": [ { - "label": "Anchor to override", - "name": "ipaanchoruuid", - "type": "str" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "label": "Description", - "name": "description", - "required": false, - "type": "str" + "type": "dict", + "multivalue": true, + "name": "result" }, { - "label": "Group name", - "name": "cn", - "required": false, - "type": "str" + "doc": "Number of entries returned", + "type": "int", + "name": "count" }, { - "doc": "Group ID Number", - "label": "GID", - "name": "gidnumber", - "required": false, - "type": "int" + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], - "version": "1" + "obj_class": "caacl/1", + "topic_topic": "caacl/1" }, { - "full_name": "idoverrideuser/1", - "name": "idoverrideuser", + "name": "caacl_mod", + "doc": "Modify a CA ACL.", + "attr_name": "mod", + "version": "1", "params": [ { - "label": "Anchor to override", - "name": "ipaanchoruuid", - "type": "str" + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "ACL name" }, { - "label": "Description", - "name": "description", + "type": "str", "required": false, - "type": "str" + "cli_name": "desc", + "name": "description", + "label": "Description" }, { - "label": "User login", - "name": "uid", + "exclude": [ + "cli", + "webui" + ], "required": false, - "type": "str" + "type": "bool", + "name": "ipaenabledflag", + "label": "Enabled" }, { - "doc": "User ID Number", - "label": "UID", - "name": "uidnumber", + "cli_name": "cacat", + "name": "ipacacategory", + "cli_metavar": "['all']", + "doc": "CA category the ACL applies to", "required": false, - "type": "int" + "label": "CA category", + "type": "str" }, { - "label": "GECOS", - "name": "gecos", + "cli_name": "profilecat", + "name": "ipacertprofilecategory", + "cli_metavar": "['all']", + "doc": "Profile category the ACL applies to", "required": false, + "label": "Profile category", "type": "str" }, { - "doc": "Group ID Number", - "label": "GID", - "name": "gidnumber", + "cli_name": "usercat", + "name": "usercategory", + "cli_metavar": "['all']", + "doc": "User category the ACL applies to", "required": false, - "type": "int" + "label": "User category", + "type": "str" }, { - "label": "Home directory", - "name": "homedirectory", + "cli_name": "hostcat", + "name": "hostcategory", + "cli_metavar": "['all']", + "doc": "Host category the ACL applies to", "required": false, + "label": "Host category", "type": "str" }, { - "label": "Login shell", - "name": "loginshell", + "cli_name": "servicecat", + "name": "servicecategory", + "cli_metavar": "['all']", + "doc": "Service category the ACL applies to", "required": false, + "label": "Service category", "type": "str" }, { - "exclude": ["cli", "webui"], - "name": "ipaoriginaluid", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "label": "SSH public key", - "multivalue": true, - "name": "ipasshpubkey", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "doc": "Base-64 encoded user certificate", - "label": "Certificate", - "multivalue": true, - "name": "usercertificate", + "cli_name": "delattr", + "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, - "type": "bytes" - } - ], - "version": "1" - }, - { - "full_name": "idrange/1", - "name": "idrange", - "params": [ - { - "label": "Range name", - "name": "cn", + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "label": "First Posix ID of the range", - "name": "ipabaseid", - "type": "int" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { - "label": "Number of IDs in the range", - "name": "ipaidrangesize", - "type": "int" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "First RID of the corresponding RID range", - "name": "ipabaserid", - "required": false, - "type": "int" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "First RID of the secondary RID range", - "name": "ipasecondarybaserid", + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "caacl_mod/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "int" + "type": "str", + "name": "summary" }, { - "label": "Domain SID of the trusted domain", - "name": "ipanttrusteddomainsid", - "required": false, - "type": "str" - }, - { - "label": "Name of the trusted domain", - "name": "ipanttrusteddomainname", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "doc": - "ID range type, one of ipa-ad-trust-posix, ipa-ad-trust, ipa-local", - "label": "Range type", - "name": "iparangetype", - "required": false, - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "version": "1" + "obj_class": "caacl/1", + "topic_topic": "caacl/1" }, { - "full_name": "idview/1", - "name": "idview", + "name": "caacl_remove_ca", + "doc": "Remove CAs from a CA ACL.", + "attr_name": "remove_ca", + "version": "1", "params": [ { - "label": "ID View Name", + "type": "str", + "cli_name": "name", "name": "cn", - "type": "str" + "label": "ACL name" }, { - "label": "Description", - "name": "description", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "User object overrides", - "name": "useroverrides", - "type": "str" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Group object overrides", - "name": "groupoverrides", - "type": "str" + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Hosts the view applies to", - "name": "appliedtohosts", + "cli_name": "cas", + "name": "ca", + "alwaysask": true, + "doc": "Certificate Authorities to remove", + "required": false, + "label": "member Certificate Authority", + "multivalue": true, "type": "str" } ], - "version": "1" - }, - { - "full_name": "krbtpolicy/1", - "name": "krbtpolicy", - "params": [ + "full_name": "caacl_remove_ca/1", + "output": [ { - "doc": "Manage ticket policy for specific user", - "label": "User name", - "name": "uid", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "doc": "Maximum ticket life (seconds)", - "label": "Max life", - "name": "krbmaxticketlife", - "required": false, - "type": "int" + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" }, { - "doc": "Maximum renewable age (seconds)", - "label": "Max renew", - "name": "krbmaxrenewableage", - "required": false, - "type": "int" + "doc": "Number of members removed", + "type": "int", + "name": "completed" } ], - "version": "1" + "obj_class": "caacl/1", + "topic_topic": "caacl/1" }, { - "full_name": "location/1", - "name": "location", + "name": "caacl_remove_host", + "doc": "Remove target hosts and hostgroups from a CA ACL.", + "attr_name": "remove_host", + "version": "1", "params": [ { - "doc": "IPA location name", - "label": "Location name", - "name": "idnsname", - "type": "DNSName" + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "ACL name" }, { - "doc": "IPA Location description", - "label": "Description", - "name": "description", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": "Servers that belongs to the IPA location", - "label": "Servers", - "multivalue": true, - "name": "servers_server", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "hosts", + "name": "host", + "alwaysask": true, + "doc": "hosts to remove", "required": false, + "label": "member host", + "multivalue": true, "type": "str" }, { - "doc": "List of servers which advertise the given location", - "label": "Advertised by servers", - "multivalue": true, - "name": "dns_server", + "cli_name": "hostgroups", + "name": "hostgroup", + "alwaysask": true, + "doc": "host groups to remove", "required": false, + "label": "member host group", + "multivalue": true, "type": "str" } ], - "version": "1" + "full_name": "caacl_remove_host/1", + "output": [ + { + "type": "dict", + "name": "result" + }, + { + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" + }, + { + "doc": "Number of members removed", + "type": "int", + "name": "completed" + } + ], + "obj_class": "caacl/1", + "topic_topic": "caacl/1" }, { - "full_name": "metaobject/1", - "name": "metaobject", + "name": "caacl_remove_profile", + "doc": "Remove profiles from a CA ACL.", + "attr_name": "remove_profile", + "version": "1", "params": [ { - "label": "Name", - "name": "name", - "type": "str" + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "ACL name" }, { - "label": "Version", - "name": "version", - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Full name", - "name": "full_name", - "type": "str" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Documentation", - "name": "doc", - "required": false, - "type": "str" + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Exclude from", - "multivalue": true, - "name": "exclude", + "cli_name": "certprofiles", + "name": "certprofile", + "alwaysask": true, + "doc": "Certificate Profiles to remove", "required": false, - "type": "str" - }, - { - "label": "Include in", + "label": "member Certificate Profile", "multivalue": true, - "name": "include", - "required": false, "type": "str" + } + ], + "full_name": "caacl_remove_profile/1", + "output": [ + { + "type": "dict", + "name": "result" }, { - "label": "Help topic", - "name": "topic_topic", - "required": false, - "type": "str" + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" }, { - "label": "Parameters", - "multivalue": true, - "name": "params_param", - "required": false, - "type": "str" + "doc": "Number of members removed", + "type": "int", + "name": "completed" } ], - "version": "1" + "obj_class": "caacl/1", + "topic_topic": "caacl/1" }, { - "full_name": "netgroup/1", - "name": "netgroup", + "name": "caacl_remove_service", + "doc": "Remove services from a CA ACL.", + "attr_name": "remove_service", + "version": "1", "params": [ { - "label": "Netgroup name", + "type": "str", + "cli_name": "name", "name": "cn", - "type": "str" + "label": "ACL name" }, { - "doc": "Netgroup description", - "label": "Description", - "name": "description", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "NIS domain name", - "name": "nisdomainname", - "required": false, - "type": "str" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": "IPA unique ID", - "label": "IPA unique ID", - "name": "ipauniqueid", - "required": false, - "type": "str" + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": "User category the rule applies to", - "label": "User category", - "name": "usercategory", + "cli_name": "services", + "name": "service", + "alwaysask": true, + "doc": "services to remove", "required": false, + "label": "member service", + "multivalue": true, "type": "str" + } + ], + "full_name": "caacl_remove_service/1", + "output": [ + { + "type": "dict", + "name": "result" }, { - "doc": "Host category the rule applies to", - "label": "Host category", - "name": "hostcategory", - "required": false, - "type": "str" + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" }, { - "label": "External host", - "multivalue": true, - "name": "externalhost", - "required": false, - "type": "str" + "doc": "Number of members removed", + "type": "int", + "name": "completed" + } + ], + "obj_class": "caacl/1", + "topic_topic": "caacl/1" + }, + { + "name": "caacl_remove_user", + "doc": "Remove users and groups from a CA ACL.", + "attr_name": "remove_user", + "version": "1", + "params": [ + { + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "ACL name" }, { - "label": "Member netgroups", - "name": "member_netgroup", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Member of netgroups", - "name": "memberof_netgroup", - "required": false, - "type": "str" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Indirect Member netgroups", - "name": "memberindirect_netgroup", - "required": false, - "type": "str" + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Member User", - "name": "memberuser_user", + "cli_name": "users", + "name": "user", + "alwaysask": true, + "doc": "users to remove", "required": false, + "label": "member user", + "multivalue": true, "type": "str" }, { - "label": "Member Group", - "name": "memberuser_group", + "cli_name": "groups", + "name": "group", + "alwaysask": true, + "doc": "groups to remove", "required": false, + "label": "member group", + "multivalue": true, "type": "str" + } + ], + "full_name": "caacl_remove_user/1", + "output": [ + { + "type": "dict", + "name": "result" }, { - "label": "Member Host", - "name": "memberhost_host", - "required": false, - "type": "str" + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" }, { - "label": "Member Hostgroup", - "name": "memberhost_hostgroup", - "required": false, - "type": "str" + "doc": "Number of members removed", + "type": "int", + "name": "completed" } ], - "version": "1" + "obj_class": "caacl/1", + "topic_topic": "caacl/1" }, { - "full_name": "otpconfig/1", - "name": "otpconfig", + "name": "caacl_show", + "doc": "Display the properties of a CA ACL.", + "attr_name": "show", + "version": "1", "params": [ { - "doc": "TOTP authentication time variance (seconds)", - "label": "TOTP authentication Window", - "name": "ipatokentotpauthwindow", - "type": "int" + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "ACL name" }, { - "doc": "TOTP synchronization time variance (seconds)", - "label": "TOTP Synchronization Window", - "name": "ipatokentotpsyncwindow", - "type": "int" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { - "doc": "HOTP authentication skip-ahead", - "label": "HOTP Authentication Window", - "name": "ipatokenhotpauthwindow", - "type": "int" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": "HOTP synchronization skip-ahead", - "label": "HOTP Synchronization Window", - "name": "ipatokenhotpsyncwindow", - "type": "int" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "caacl_show/1", + "output": [ + { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" + }, + { + "type": "dict", + "name": "result" + }, + { + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "version": "1" + "obj_class": "caacl/1", + "topic_topic": "caacl/1" }, { - "full_name": "otptoken/1", - "name": "otptoken", + "name": "cert_find", + "doc": "Search for existing certificates.", + "attr_name": "find", + "version": "1", "params": [ { - "label": "Unique ID", - "name": "ipatokenuniqueid", - "type": "str" + "positional": true, + "doc": "A string searched in all relevant object attributes", + "required": false, + "type": "str", + "name": "criteria" }, { - "doc": "Type of the token", - "label": "Type", - "name": "type", + "doc": "Base-64 encoded certificate.", "required": false, - "type": "str" + "type": "Certificate", + "name": "certificate", + "label": "Certificate" }, { - "doc": "Token description (informational only)", - "label": "Description", - "name": "description", + "doc": "Issuer DN", "required": false, - "type": "str" + "type": "DN", + "name": "issuer", + "label": "Issuer" }, { - "doc": "Assigned user of the token (default: self)", - "label": "Owner", - "name": "ipatokenowner", + "doc": "Reason for revoking the certificate (0-10). Type \"ipa help cert\" for revocation reason details. ", "required": false, - "type": "str" + "type": "int", + "name": "revocation_reason", + "label": "Revocation reason" }, { - "doc": "Assigned manager of the token (default: self)", - "label": "Manager", - "name": "managedby_user", + "cli_name": "ca", + "name": "cacn", + "doc": "Name of issuing CA", "required": false, + "label": "Issuing CA", "type": "str" }, { - "doc": "Mark the token as disabled (default: false)", - "label": "Disabled", - "name": "ipatokendisabled", + "doc": "Subject", "required": false, - "type": "bool" + "type": "str", + "name": "subject", + "label": "Subject" }, { - "doc": "First date/time the token can be used", - "label": "Validity start", - "name": "ipatokennotbefore", + "doc": "minimum serial number", "required": false, - "type": "datetime" + "type": "int", + "name": "min_serial_number" }, { - "doc": "Last date/time the token can be used", - "label": "Validity end", - "name": "ipatokennotafter", + "doc": "maximum serial number", "required": false, - "type": "datetime" + "type": "int", + "name": "max_serial_number" }, { - "doc": "Token vendor name (informational only)", - "label": "Vendor", - "name": "ipatokenvendor", + "default": [ + "False" + ], + "doc": "match the common name exactly", "required": false, - "type": "str" + "type": "bool", + "name": "exactly" }, { - "doc": "Token model (informational only)", - "label": "Model", - "name": "ipatokenmodel", + "doc": "Valid not after from this date (YYYY-mm-dd)", "required": false, - "type": "str" + "type": "datetime", + "name": "validnotafter_from", + "no_convert": true }, { - "doc": "Token serial (informational only)", - "label": "Serial", - "name": "ipatokenserial", + "doc": "Valid not after to this date (YYYY-mm-dd)", "required": false, - "type": "str" + "type": "datetime", + "name": "validnotafter_to", + "no_convert": true }, { - "doc": "Token secret (Base32; default: random)", - "label": "Key", - "name": "ipatokenotpkey", + "doc": "Valid not before from this date (YYYY-mm-dd)", "required": false, - "sensitive": true, - "type": "bytes" + "type": "datetime", + "name": "validnotbefore_from", + "no_convert": true }, { - "doc": "Token hash algorithm", - "label": "Algorithm", - "name": "ipatokenotpalgorithm", + "doc": "Valid not before to this date (YYYY-mm-dd)", "required": false, - "type": "str" + "type": "datetime", + "name": "validnotbefore_to", + "no_convert": true }, { - "doc": "Number of digits each token code will have", - "label": "Digits", - "name": "ipatokenotpdigits", + "doc": "Issued on from this date (YYYY-mm-dd)", "required": false, - "type": "int" + "type": "datetime", + "name": "issuedon_from", + "no_convert": true }, { - "doc": "TOTP token / FreeIPA server time difference", - "label": "Clock offset", - "name": "ipatokentotpclockoffset", + "doc": "Issued on to this date (YYYY-mm-dd)", "required": false, - "type": "int" + "type": "datetime", + "name": "issuedon_to", + "no_convert": true }, { - "doc": "Length of TOTP token code validity", - "label": "Clock interval", - "name": "ipatokentotptimestep", + "doc": "Revoked on from this date (YYYY-mm-dd)", "required": false, - "type": "int" + "type": "datetime", + "name": "revokedon_from", + "no_convert": true }, { - "doc": "Initial counter for the HOTP token", - "label": "Counter", - "name": "ipatokenhotpcounter", + "doc": "Revoked on to this date (YYYY-mm-dd)", "required": false, - "type": "int" + "type": "datetime", + "name": "revokedon_to", + "no_convert": true }, { - "label": "URI", - "name": "uri", + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"certificate\")", "required": false, - "type": "str" - } - ], - "version": "1" - }, - { - "full_name": "output/1", - "name": "output", - "params": [ - { - "label": "Name", - "name": "name", - "type": "str" + "label": "Primary key only", + "type": "bool" }, { - "label": "Documentation", - "name": "doc", + "doc": "Time limit of search in seconds (0 is unlimited)", "required": false, - "type": "str" + "type": "int", + "name": "timelimit", + "label": "Time Limit" }, { - "label": "Exclude from", - "multivalue": true, - "name": "exclude", + "doc": "Maximum number of entries returned (0 is unlimited)", "required": false, - "type": "str" + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { - "label": "Include in", - "multivalue": true, - "name": "include", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Type", - "name": "type", - "required": false, - "type": "str" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Required", - "name": "required", - "required": false, + "name": "no_members", + "default": [ + "True" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui", + "cli" + ], "type": "bool" }, { - "label": "Multi-value", - "name": "multivalue", + "cli_name": "users", + "name": "user", + "alwaysask": true, + "doc": "Search for certificates with these owner users.", "required": false, - "type": "bool" - } - ], - "version": "1" - }, - { - "full_name": "param/1", - "name": "param", - "params": [ - { - "label": "Name", - "name": "name", - "type": "str" + "label": "user", + "multivalue": true, + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true }, { - "label": "Documentation", - "name": "doc", + "cli_name": "no_users", + "name": "no_user", + "alwaysask": true, + "doc": "Search for certificates without these owner users.", "required": false, - "type": "str" + "label": "user", + "multivalue": true, + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true }, { - "label": "Exclude from", - "multivalue": true, - "name": "exclude", + "cli_name": "hosts", + "name": "host", + "doc": "Search for certificates with these owner hosts.", "required": false, - "type": "str" + "label": "host", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "label": "Include in", - "multivalue": true, - "name": "include", + "cli_name": "no_hosts", + "name": "no_host", + "doc": "Search for certificates without these owner hosts.", "required": false, - "type": "str" + "label": "host", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "label": "Type", - "name": "type", + "cli_name": "services", + "name": "service", + "doc": "Search for certificates with these owner services.", "required": false, - "type": "str" + "label": "service", + "multivalue": true, + "type": "Principal", + "no_convert": true }, { - "label": "Required", - "name": "required", + "cli_name": "no_services", + "name": "no_service", + "doc": "Search for certificates without these owner services.", "required": false, - "type": "bool" - }, + "label": "service", + "multivalue": true, + "type": "Principal", + "no_convert": true + } + ], + "full_name": "cert_find/1", + "output": [ { - "label": "Multi-value", - "name": "multivalue", + "doc": "User-friendly description of action performed", "required": false, - "type": "bool" + "type": "str", + "name": "summary" }, { - "label": "Always ask", - "name": "alwaysask", - "required": false, - "type": "bool" + "type": "dict", + "multivalue": true, + "name": "result" }, { - "label": "CLI metavar", - "name": "cli_metavar", - "required": false, - "type": "str" + "doc": "Number of entries returned", + "type": "int", + "name": "count" }, { - "label": "CLI name", - "name": "cli_name", + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" + } + ], + "obj_class": "cert/1", + "topic_topic": "cert/1" + }, + { + "name": "cert_remove_hold", + "doc": "Take a revoked certificate off hold.", + "attr_name": "remove_hold", + "version": "1", + "params": [ + { + "doc": "Serial number in decimal or if prefixed with 0x in hexadecimal", + "no_convert": true, + "type": "int", + "name": "serial_number", + "label": "Serial number" + }, + { + "cli_name": "ca", + "name": "cacn", + "default": [ + "ipa" + ], + "doc": "Name of issuing CA", "required": false, + "label": "Issuing CA", "type": "str" + } + ], + "full_name": "cert_remove_hold/1", + "output": [ + { + "name": "result" + } + ], + "obj_class": "cert/1", + "topic_topic": "cert/1" + }, + { + "name": "cert_request", + "doc": "Submit a certificate signing request.", + "attr_name": "request", + "version": "1", + "params": [ + { + "type": "CertificateSigningRequest", + "cli_name": "csr_file", + "name": "csr", + "label": "CSR" }, { - "label": "Confirm (password)", - "name": "confirm", - "type": "bool" + "positional": false, + "default": [ + "pkcs10" + ], + "type": "str", + "name": "request_type", + "exclude": [ + "cli", + "webui" + ] }, { - "label": "Default", - "multivalue": true, - "name": "default", + "doc": "Certificate Profile to use", "required": false, - "type": "str" + "type": "str", + "name": "profile_id", + "label": "Profile ID" }, { - "label": "Default from", - "multivalue": true, - "name": "default_from_param", + "cli_name": "ca", + "name": "cacn", + "default": [ + "ipa" + ], + "doc": "Name of issuing CA", "required": false, + "label": "Issuing CA", "type": "str" }, { - "label": "Label", - "name": "label", - "required": false, - "type": "str" + "name": "principal", + "doc": "Principal for this certificate (e.g. HTTP/test.example.com)", + "label": "Principal", + "positional": false, + "type": "Principal", + "no_convert": true }, { - "label": "Convert on server", - "name": "no_convert", - "required": false, - "type": "bool" + "positional": false, + "default": [ + "False" + ], + "type": "bool", + "name": "add", + "doc": "automatically add the principal if it doesn't exist (service principals only)" }, { - "label": "Option group", - "name": "option_group", - "required": false, - "type": "str" + "positional": false, + "default": [ + "False" + ], + "type": "bool", + "name": "chain", + "doc": "Include certificate chain in output" }, { - "label": "Sensitive", - "name": "sensitive", - "required": false, + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "label": "Positional argument", - "name": "positional", - "required": false, + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "version": "1" - }, - { - "full_name": "permission/1", - "name": "permission", - "params": [ - { - "label": "Permission name", - "name": "cn", - "type": "str" - }, + "full_name": "cert_request/1", + "output": [ { - "doc": - "Rights to grant (read, search, compare, write, add, delete, all)", - "label": "Granted rights", - "multivalue": true, - "name": "ipapermright", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "All attributes to which the permission applies", - "label": "Effective attributes", - "multivalue": true, - "name": "attrs", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "doc": - "User-specified attributes to which the permission applies", - "label": "Included attributes", - "multivalue": true, - "name": "ipapermincludedattr", - "required": false, - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "int", + "name": "value" + } + ], + "obj_class": "certreq/1", + "topic_topic": "cert/1" + }, + { + "name": "cert_revoke", + "doc": "Revoke a certificate.", + "attr_name": "revoke", + "version": "1", + "params": [ + { + "doc": "Serial number in decimal or if prefixed with 0x in hexadecimal", + "no_convert": true, + "type": "int", + "name": "serial_number", + "label": "Serial number" }, { - "doc": - "User-specified attributes to which the permission explicitly does not apply", - "label": "Excluded attributes", - "multivalue": true, - "name": "ipapermexcludedattr", - "required": false, - "type": "str" + "name": "revocation_reason", + "default": [ + "0" + ], + "doc": "Reason for revoking the certificate (0-10). Type \"ipa help cert\" for revocation reason details. ", + "label": "Revocation reason", + "positional": false, + "type": "int" }, { - "doc": "Attributes to which the permission applies by default", - "label": "Default attributes", - "multivalue": true, - "name": "ipapermdefaultattr", + "cli_name": "ca", + "name": "cacn", + "default": [ + "ipa" + ], + "doc": "Name of issuing CA", "required": false, + "label": "Issuing CA", "type": "str" - }, + } + ], + "full_name": "cert_revoke/1", + "output": [ { - "doc": "Bind rule type", - "label": "Bind rule type", - "name": "ipapermbindruletype", - "type": "str" - }, + "name": "result" + } + ], + "obj_class": "cert/1", + "topic_topic": "cert/1" + }, + { + "name": "cert_show", + "doc": "Retrieve an existing certificate.", + "attr_name": "show", + "version": "1", + "params": [ { - "doc": "Subtree to apply permissions to", - "label": "Subtree", - "name": "ipapermlocation", - "required": false, - "type": "DN" + "doc": "Serial number in decimal or if prefixed with 0x in hexadecimal", + "no_convert": true, + "type": "int", + "name": "serial_number", + "label": "Serial number" }, { - "doc": "Extra target filter", - "label": "Extra target filter", - "multivalue": true, - "name": "extratargetfilter", + "cli_name": "ca", + "name": "cacn", + "default": [ + "ipa" + ], + "doc": "Name of issuing CA", "required": false, + "label": "Issuing CA", "type": "str" }, { - "doc": - "All target filters, including those implied by type and memberof", - "label": "Raw target filter", - "multivalue": true, - "name": "ipapermtargetfilter", + "name": "out", + "doc": "File to store the certificate in.", "required": false, + "label": "Output filename", + "exclude": [ + "webui" + ], "type": "str" }, { - "doc": - "Optional DN to apply the permission to (must be in the subtree, but may not yet exist)", - "label": "Target DN", - "name": "ipapermtarget", - "required": false, - "type": "DN" + "positional": false, + "default": [ + "False" + ], + "type": "bool", + "name": "chain", + "doc": "Include certificate chain in output" }, { - "doc": - "Optional DN subtree where an entry can be moved to (must be in the subtree, but may not yet exist)", - "label": "Target DN subtree", - "name": "ipapermtargetto", - "required": false, - "type": "DN" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": - "Optional DN subtree from where an entry can be moved (must be in the subtree, but may not yet exist)", - "label": "Origin DN subtree", - "name": "ipapermtargetfrom", - "required": false, - "type": "DN" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": "Target members of a group (sets memberOf targetfilter)", - "label": "Member of group", - "multivalue": true, - "name": "memberof", - "required": false, - "type": "str" - }, + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "cert_show/1", + "output": [ { - "doc": "User group to apply permissions to (sets target)", - "label": "Target group", - "name": "targetgroup", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": - "Type of IPA object (sets subtree and objectClass targetfilter)", - "label": "Type", - "name": "type", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "doc": "Deprecated; use extratargetfilter", - "multivalue": true, - "name": "filter", - "required": false, - "type": "str" - }, + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "int", + "name": "value" + } + ], + "obj_class": "cert/1", + "topic_topic": "cert/1" + }, + { + "name": "cert_status", + "doc": "Check the status of a certificate signing request.", + "attr_name": "status", + "version": "1", + "params": [ { - "doc": "Deprecated; use ipapermlocation", - "multivalue": true, - "name": "subtree", - "required": false, - "type": "str" + "type": "int", + "name": "request_id", + "label": "Request id" }, { - "doc": "Deprecated; use ipapermright", - "multivalue": true, - "name": "permissions", + "cli_name": "ca", + "name": "cacn", + "default": [ + "ipa" + ], + "doc": "Name of issuing CA", "required": false, + "label": "Issuing CA", "type": "str" }, { - "label": "Permission flags", - "multivalue": true, - "name": "ipapermissiontype", - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "ACI", - "name": "aci", - "type": "str" - }, + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "cert_status/1", + "output": [ { - "label": "Granted to Privilege", - "name": "member_privilege", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "label": "Indirect Member of roles", - "name": "memberindirect_role", - "required": false, - "type": "str" + "type": "dict", + "name": "result" + }, + { + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "int", + "name": "value" } ], - "version": "1" - }, - { - "full_name": "pkinit/1", - "name": "pkinit", - "params": [], - "version": "1" + "obj_class": "certreq/1", + "topic_topic": "cert/1" }, { - "full_name": "privilege/1", - "name": "privilege", + "name": "certmap_match", + "doc": "\n Search for users matching the provided certificate.\n\n This command relies on SSSD to retrieve the list of matching users and\n may return cached data. For more information on purging SSSD cache,\n please refer to sss_cache documentation.\n ", + "attr_name": "match", + "version": "1", "params": [ { - "label": "Privilege name", - "name": "cn", - "type": "str" + "type": "Certificate", + "doc": "Base-64 encoded user certificate", + "cli_name": "certificate", + "name": "certificate", + "label": "Certificate" }, { - "doc": "Privilege description", - "label": "Description", - "name": "description", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Permissions", - "name": "memberof_permission", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "certmap_match/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "label": "Granting privilege to roles", - "name": "member_role", - "required": false, - "type": "str" + "type": "dict", + "multivalue": true, + "name": "result" + }, + { + "doc": "Number of entries returned", + "type": "int", + "name": "count" + }, + { + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], - "version": "1" + "obj_class": "certmap/1", + "topic_topic": "certmap/1" }, { - "full_name": "pwpolicy/1", - "name": "pwpolicy", + "name": "certmapconfig_mod", + "doc": "Modify Certificate Identity Mapping configuration.", + "attr_name": "mod", + "version": "1", "params": [ { - "doc": "Manage password policy for specific group", - "label": "Group", - "name": "cn", + "cli_name": "promptusername", + "name": "ipacertmappromptusername", + "doc": "Prompt for the username when multiple identities are mapped to a certificate", "required": false, - "type": "str" + "label": "Prompt for the username", + "type": "bool" }, { - "doc": "Maximum password lifetime (in days)", - "label": "Max lifetime (days)", - "name": "krbmaxpwdlife", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, - "type": "int" + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" }, { - "doc": "Minimum password lifetime (in hours)", - "label": "Min lifetime (hours)", - "name": "krbminpwdlife", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, - "type": "int" + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" }, { - "doc": "Password history size", - "label": "History size", - "name": "krbpwdhistorylength", + "cli_name": "delattr", + "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, - "type": "int" - }, - { - "doc": "Minimum number of character classes", - "label": "Character classes", - "name": "krbpwdmindiffchars", - "required": false, - "type": "int" + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" }, { - "doc": "Minimum length of password", - "label": "Min length", - "name": "krbpwdminlength", - "required": false, - "type": "int" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { - "doc": - "Priority of the policy (higher number means lower priority", - "label": "Priority", - "name": "cospriority", - "type": "int" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": "Consecutive failures before lockout", - "label": "Max failures", - "name": "krbpwdmaxfailure", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "certmapconfig_mod/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "int" + "type": "str", + "name": "summary" }, { - "doc": "Period after which failure count will be reset (seconds)", - "label": "Failure reset interval", - "name": "krbpwdfailurecountinterval", - "required": false, - "type": "int" + "type": "dict", + "name": "result" }, { - "doc": "Period for which lockout is enforced (seconds)", - "label": "Lockout duration", - "name": "krbpwdlockoutduration", - "required": false, - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "NoneType", + "name": "value" } ], - "version": "1" + "obj_class": "certmapconfig/1", + "topic_topic": "certmap/1" }, { - "full_name": "radiusproxy/1", - "name": "radiusproxy", + "name": "certmapconfig_show", + "doc": "Show the current Certificate Identity Mapping configuration.", + "attr_name": "show", + "version": "1", "params": [ { - "label": "RADIUS proxy server name", - "name": "cn", - "type": "str" - }, - { - "doc": "A description of this RADIUS proxy server", - "label": "Description", - "name": "description", - "required": false, - "type": "str" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { - "doc": "The hostname or IP (with or without port)", - "label": "Server", - "multivalue": true, - "name": "ipatokenradiusserver", - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": "The secret used to encrypt data", - "label": "Secret", - "name": "ipatokenradiussecret", - "sensitive": true, - "type": "str" - }, + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "certmapconfig_show/1", + "output": [ { - "doc": "The total timeout across all retries (in seconds)", - "label": "Timeout", - "name": "ipatokenradiustimeout", + "doc": "User-friendly description of action performed", "required": false, - "type": "int" + "type": "str", + "name": "summary" }, { - "doc": "The number of times to retry authentication", - "label": "Retries", - "name": "ipatokenradiusretries", - "required": false, - "type": "int" + "type": "dict", + "name": "result" }, { - "doc": "The username attribute on the user object", - "label": "User attribute", - "name": "ipatokenusermapattribute", - "required": false, - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "NoneType", + "name": "value" } ], - "version": "1" + "obj_class": "certmapconfig/1", + "topic_topic": "certmap/1" }, { - "full_name": "realmdomains/1", - "name": "realmdomains", + "name": "certmaprule_add", + "doc": "Create a new Certificate Identity Mapping Rule.", + "attr_name": "add", + "version": "1", "params": [ { - "label": "Domain", - "multivalue": true, - "name": "associateddomain", - "type": "str" + "type": "str", + "doc": "Certificate Identity Mapping Rule name", + "cli_name": "rulename", + "name": "cn", + "label": "Rule name" }, { - "label": "Add domain", - "name": "add_domain", + "cli_name": "desc", + "name": "description", + "doc": "Certificate Identity Mapping Rule description", "required": false, + "label": "Description", "type": "str" }, { - "label": "Delete domain", - "name": "del_domain", + "cli_name": "maprule", + "name": "ipacertmapmaprule", + "doc": "Rule used to map the certificate with a user entry", "required": false, - "type": "str" - } - ], - "version": "1" - }, - { - "full_name": "role/1", - "name": "role", - "params": [ - { - "label": "Role name", - "name": "cn", + "label": "Mapping rule", "type": "str" }, { - "doc": "A description of this role-group", - "label": "Description", - "name": "description", + "cli_name": "matchrule", + "name": "ipacertmapmatchrule", + "doc": "Rule used to check if a certificate can be used for authentication", "required": false, + "label": "Matching rule", "type": "str" }, { - "label": "Member users", - "name": "member_user", + "cli_name": "domain", + "name": "associateddomain", + "doc": "Domain where the user entry will be searched", "required": false, - "type": "str" + "label": "Domain name", + "multivalue": true, + "type": "DNSName" }, { - "label": "Member groups", - "name": "member_group", + "cli_name": "priority", + "name": "ipacertmappriority", + "doc": "Priority of the rule (higher number means lower priority", "required": false, - "type": "str" + "label": "Priority", + "type": "int" }, { - "label": "Member hosts", - "name": "member_host", + "name": "ipaenabledflag", + "default": [ + "True" + ], "required": false, - "type": "str" + "label": "Enabled", + "exclude": [ + "cli", + "webui" + ], + "type": "bool" }, { - "label": "Member host-groups", - "name": "member_hostgroup", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "label": "Privileges", - "name": "memberof_privilege", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "label": "Member services", - "name": "member_service", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" } ], - "version": "1" - }, - { - "full_name": "selfservice/1", - "name": "selfservice", - "params": [ - { - "doc": "Self-service name", - "label": "Self-service name", - "name": "aciname", - "type": "str" - }, + "full_name": "certmaprule_add/1", + "output": [ { - "doc": "Permissions to grant (read, write). Default is write.", - "label": "Permissions", - "multivalue": true, - "name": "permissions", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "Attributes to which the permission applies.", - "label": "Attributes", - "multivalue": true, - "name": "attrs", - "type": "str" + "type": "dict", + "name": "result" }, { - "label": "ACI", - "name": "aci", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "version": "1" + "obj_class": "certmaprule/1", + "topic_topic": "certmap/1" }, { - "full_name": "selinuxusermap/1", - "name": "selinuxusermap", + "name": "certmaprule_del", + "doc": "Delete a Certificate Identity Mapping Rule.", + "attr_name": "del", + "version": "1", "params": [ { - "label": "Rule name", + "cli_name": "rulename", "name": "cn", + "doc": "Certificate Identity Mapping Rule name", + "label": "Rule name", + "multivalue": true, "type": "str" }, { - "label": "SELinux User", - "name": "ipaselinuxuser", - "type": "str" - }, + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", + "positional": false, + "type": "bool" + } + ], + "full_name": "certmaprule_del/1", + "output": [ { - "doc": "HBAC Rule that defines the users, groups and hostgroups", - "label": "HBAC Rule", - "name": "seealso", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "User category the rule applies to", - "label": "User category", - "name": "usercategory", - "required": false, - "type": "str" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "doc": "Host category the rule applies to", - "label": "Host category", - "name": "hostcategory", - "required": false, + "type": "str", + "multivalue": true, + "name": "value" + } + ], + "obj_class": "certmaprule/1", + "topic_topic": "certmap/1" + }, + { + "name": "certmaprule_disable", + "doc": "Disable a Certificate Identity Mapping Rule.", + "attr_name": "disable", + "version": "1", + "params": [ + { + "doc": "Certificate Identity Mapping Rule name", + "label": "Rule name", + "cli_name": "rulename", + "name": "cn", "type": "str" - }, + } + ], + "full_name": "certmaprule_disable/1", + "output": [ { - "label": "Description", - "name": "description", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "label": "Enabled", - "name": "ipaenabledflag", - "required": false, - "type": "bool" + "doc": "True means the operation was successful", + "type": "bool", + "name": "result" }, { - "label": "Users", - "name": "memberuser_user", - "required": false, + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "certmaprule/1", + "topic_topic": "certmap/1" + }, + { + "name": "certmaprule_enable", + "doc": "Enable a Certificate Identity Mapping Rule.", + "attr_name": "enable", + "version": "1", + "params": [ + { + "doc": "Certificate Identity Mapping Rule name", + "label": "Rule name", + "cli_name": "rulename", + "name": "cn", "type": "str" - }, + } + ], + "full_name": "certmaprule_enable/1", + "output": [ { - "label": "User Groups", - "name": "memberuser_group", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "label": "Hosts", - "name": "memberhost_host", - "required": false, - "type": "str" + "doc": "True means the operation was successful", + "type": "bool", + "name": "result" }, { - "label": "Host Groups", - "name": "memberhost_hostgroup", - "required": false, - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "version": "1" + "obj_class": "certmaprule/1", + "topic_topic": "certmap/1" }, { - "full_name": "server/1", - "name": "server", + "name": "certmaprule_find", + "doc": "Search for Certificate Identity Mapping Rules.", + "attr_name": "find", + "version": "1", "params": [ { - "doc": "IPA server hostname", - "label": "Server name", - "name": "cn", - "type": "str" + "positional": true, + "doc": "A string searched in all relevant object attributes", + "required": false, + "type": "str", + "name": "criteria" }, { - "multivalue": true, - "name": "iparepltopomanagedsuffix", + "cli_name": "rulename", + "name": "cn", + "doc": "Certificate Identity Mapping Rule name", "required": false, + "label": "Rule name", "type": "str" }, { - "label": "Managed suffixes", - "multivalue": true, - "name": "iparepltopomanagedsuffix_topologysuffix", + "cli_name": "desc", + "name": "description", + "doc": "Certificate Identity Mapping Rule description", "required": false, + "label": "Description", "type": "str" }, { - "doc": "Minimum domain level", - "label": "Min domain level", - "name": "ipamindomainlevel", - "type": "int" + "cli_name": "maprule", + "name": "ipacertmapmaprule", + "doc": "Rule used to map the certificate with a user entry", + "required": false, + "label": "Mapping rule", + "type": "str" }, { - "doc": "Maximum domain level", - "label": "Max domain level", - "name": "ipamaxdomainlevel", - "type": "int" + "cli_name": "matchrule", + "name": "ipacertmapmatchrule", + "doc": "Rule used to check if a certificate can be used for authentication", + "required": false, + "label": "Matching rule", + "type": "str" }, { - "doc": "Server location", - "label": "Location", - "name": "ipalocation_location", + "cli_name": "domain", + "name": "associateddomain", + "doc": "Domain where the user entry will be searched", "required": false, + "label": "Domain name", + "multivalue": true, "type": "DNSName" }, { - "doc": "Weight for server services", - "label": "Service weight", - "name": "ipaserviceweight", + "cli_name": "priority", + "name": "ipacertmappriority", + "doc": "Priority of the rule (higher number means lower priority", "required": false, + "label": "Priority", "type": "int" }, { - "doc": - "Relative weight for server services (counts per location)", - "label": "Service relative weight", - "name": "service_relative_weight", - "type": "str" + "name": "ipaenabledflag", + "alwaysask": true, + "default": [ + "True" + ], + "required": false, + "label": "Enabled", + "exclude": [ + "cli", + "webui" + ], + "type": "bool" }, { - "doc": "List of enabled roles", - "label": "Enabled server roles", - "multivalue": true, - "name": "enabled_role_servrole", + "doc": "Time limit of search in seconds (0 is unlimited)", "required": false, - "type": "str" - } - ], - "version": "1" - }, - { - "full_name": "server_role/1", - "name": "server_role", - "params": [ + "type": "int", + "name": "timelimit", + "label": "Time Limit" + }, { - "doc": "IPA server hostname", - "label": "Server name", - "name": "server_server", - "type": "str" + "doc": "Maximum number of entries returned (0 is unlimited)", + "required": false, + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { - "doc": "IPA server role name", - "label": "Role name", - "name": "role_servrole", - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": "Status of the role", - "label": "Role status", - "name": "status", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"rulename\")", "required": false, - "type": "str" + "label": "Primary key only", + "type": "bool" } ], - "version": "1" - }, - { - "full_name": "service/1", - "name": "service", - "params": [ - { - "doc": "Service principal", - "label": "Principal name", - "name": "krbcanonicalname", - "type": "Principal" - }, + "full_name": "certmaprule_find/1", + "output": [ { - "doc": "Service principal alias", - "label": "Principal alias", - "multivalue": true, - "name": "krbprincipalname", + "doc": "User-friendly description of action performed", "required": false, - "type": "Principal" + "type": "str", + "name": "summary" }, { - "doc": "Base-64 encoded service certificate", - "label": "Certificate", + "type": "dict", "multivalue": true, - "name": "usercertificate", - "required": false, - "type": "bytes" - }, - { - "label": "Subject", - "name": "subject", - "type": "str" - }, - { - "label": "Serial Number", - "name": "serial_number", - "type": "str" - }, - { - "label": "Serial Number (hex)", - "name": "serial_number_hex", - "type": "str" + "name": "result" }, { - "label": "Issuer", - "name": "issuer", - "type": "str" + "doc": "Number of entries returned", + "type": "int", + "name": "count" }, { - "label": "Not Before", - "name": "valid_not_before", - "type": "str" - }, + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" + } + ], + "obj_class": "certmaprule/1", + "topic_topic": "certmap/1" + }, + { + "name": "certmaprule_mod", + "doc": "Modify a Certificate Identity Mapping Rule.", + "attr_name": "mod", + "version": "1", + "params": [ { - "label": "Not After", - "name": "valid_not_after", + "doc": "Certificate Identity Mapping Rule name", + "label": "Rule name", + "cli_name": "rulename", + "name": "cn", "type": "str" }, { - "label": "Fingerprint (MD5)", - "name": "md5_fingerprint", + "cli_name": "desc", + "name": "description", + "doc": "Certificate Identity Mapping Rule description", + "required": false, + "label": "Description", "type": "str" }, { - "label": "Fingerprint (SHA1)", - "name": "sha1_fingerprint", + "cli_name": "maprule", + "name": "ipacertmapmaprule", + "doc": "Rule used to map the certificate with a user entry", + "required": false, + "label": "Mapping rule", "type": "str" }, { - "label": "Revocation reason", - "name": "revocation_reason", + "cli_name": "matchrule", + "name": "ipacertmapmatchrule", + "doc": "Rule used to check if a certificate can be used for authentication", "required": false, + "label": "Matching rule", "type": "str" }, { - "doc": - "Override default list of supported PAC types. Use 'NONE' to disable PAC support for this service, e.g. this might be necessary for NFS services.", - "label": "PAC type", - "multivalue": true, - "name": "ipakrbauthzdata", + "cli_name": "domain", + "name": "associateddomain", + "doc": "Domain where the user entry will be searched", "required": false, - "type": "str" + "label": "Domain name", + "multivalue": true, + "type": "DNSName" }, { - "doc": - "Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations.", - "label": "Authentication Indicators", - "multivalue": true, - "name": "krbprincipalauthind", + "cli_name": "priority", + "name": "ipacertmappriority", + "doc": "Priority of the rule (higher number means lower priority", "required": false, - "type": "str" + "label": "Priority", + "type": "int" }, { - "doc": "Pre-authentication is required for the service", - "label": "Requires pre-authentication", - "name": "ipakrbrequirespreauth", + "name": "ipaenabledflag", + "default": [ + "True" + ], "required": false, + "label": "Enabled", + "exclude": [ + "cli", + "webui" + ], "type": "bool" }, { - "doc": "Client credentials may be delegated to the service", - "label": "Trusted for delegation", - "name": "ipakrbokasdelegate", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, - "type": "bool" + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" }, { - "doc": - "The service is allowed to authenticate on behalf of a client", - "label": "Trusted to authenticate as user", - "name": "ipakrboktoauthasdelegate", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, - "type": "bool" + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" }, { - "label": "Roles", - "name": "memberof_role", + "cli_name": "delattr", + "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "label": "Keytab", - "name": "has_keytab", + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, "type": "bool" }, { - "label": "Managed by", - "name": "managedby_host", - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Users allowed to retrieve keytab", - "name": "ipaallowedtoperform_read_keys_user", - "type": "str" - }, - { - "label": "Groups allowed to retrieve keytab", - "name": "ipaallowedtoperform_read_keys_group", - "type": "str" - }, - { - "label": "Hosts allowed to retrieve keytab", - "name": "ipaallowedtoperform_read_keys_host", - "type": "str" - }, - { - "label": "Host Groups allowed to retrieve keytab", - "name": "ipaallowedtoperform_read_keys_hostgroup", - "type": "str" - }, - { - "label": "Users allowed to create keytab", - "name": "ipaallowedtoperform_write_keys_user", - "type": "str" - }, + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "certmaprule_mod/1", + "output": [ { - "label": "Groups allowed to create keytab", - "name": "ipaallowedtoperform_write_keys_group", - "type": "str" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "label": "Hosts allowed to create keytab", - "name": "ipaallowedtoperform_write_keys_host", - "type": "str" + "type": "dict", + "name": "result" }, { - "label": "Host Groups allowed to create keytab", - "name": "ipaallowedtoperform_write_keys_hostgroup", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "version": "1" + "obj_class": "certmaprule/1", + "topic_topic": "certmap/1" }, { - "full_name": "servicedelegationrule/1", - "name": "servicedelegationrule", + "name": "certmaprule_show", + "doc": "Display information about a Certificate Identity Mapping Rule.", + "attr_name": "show", + "version": "1", "params": [ { - "label": "Delegation name", + "doc": "Certificate Identity Mapping Rule name", + "label": "Rule name", + "cli_name": "rulename", "name": "cn", "type": "str" }, { - "label": "Allowed Target", - "name": "ipaallowedtarget_servicedelegationtarget", - "type": "str" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { - "label": "Allowed to Impersonate", - "name": "ipaallowedtoimpersonate", - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Member principals", - "name": "memberprincipal", - "type": "str" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" } ], - "version": "1" - }, - { - "full_name": "servicedelegationtarget/1", - "name": "servicedelegationtarget", - "params": [ - { - "label": "Delegation name", - "name": "cn", - "type": "str" - }, + "full_name": "certmaprule_show/1", + "output": [ { - "label": "Allowed Target", - "name": "ipaallowedtarget_servicedelegationtarget", - "type": "str" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "label": "Allowed to Impersonate", - "name": "ipaallowedtoimpersonate", - "type": "str" + "type": "dict", + "name": "result" }, { - "label": "Member principals", - "name": "memberprincipal", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "version": "1" + "obj_class": "certmaprule/1", + "topic_topic": "certmap/1" }, { - "full_name": "servrole/1", - "name": "servrole", + "name": "certprofile_del", + "doc": "Delete a Certificate Profile.", + "attr_name": "del", + "version": "1", "params": [ { - "doc": "IPA role name", - "label": "Role name", - "name": "name", + "cli_name": "id", + "name": "cn", + "doc": "Profile ID for referring to this profile", + "label": "Profile ID", + "multivalue": true, "type": "str" + }, + { + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", + "positional": false, + "type": "bool" } ], - "version": "1" - }, - { - "full_name": "stageuser/1", - "name": "stageuser", - "params": [ + "full_name": "certprofile_del/1", + "output": [ { - "label": "User login", - "name": "uid", - "type": "str" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "label": "First name", - "name": "givenname", - "type": "str" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "label": "Last name", - "name": "sn", - "type": "str" + "type": "str", + "multivalue": true, + "name": "value" + } + ], + "obj_class": "certprofile/1", + "topic_topic": "certprofile/1" + }, + { + "name": "certprofile_find", + "doc": "Search for Certificate Profiles.", + "attr_name": "find", + "version": "1", + "params": [ + { + "positional": true, + "doc": "A string searched in all relevant object attributes", + "required": false, + "type": "str", + "name": "criteria" }, { - "label": "Full name", + "cli_name": "id", "name": "cn", + "doc": "Profile ID for referring to this profile", + "required": false, + "label": "Profile ID", "type": "str" }, { - "label": "Display name", - "name": "displayname", + "cli_name": "desc", + "name": "description", + "doc": "Brief description of this profile", "required": false, + "label": "Profile description", "type": "str" }, { - "label": "Initials", - "name": "initials", + "cli_name": "store", + "name": "ipacertprofilestoreissued", + "alwaysask": true, + "default": [ + "True" + ], + "doc": "Whether to store certs issued using this profile", "required": false, - "type": "str" + "label": "Store issued certificates", + "type": "bool" }, { - "label": "Home directory", - "name": "homedirectory", + "doc": "Time limit of search in seconds (0 is unlimited)", "required": false, - "type": "str" + "type": "int", + "name": "timelimit", + "label": "Time Limit" }, { - "label": "GECOS", - "name": "gecos", + "doc": "Maximum number of entries returned (0 is unlimited)", "required": false, - "type": "str" + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { - "label": "Login shell", - "name": "loginshell", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Principal name", - "name": "krbcanonicalname", - "required": false, - "type": "Principal" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Principal alias", - "multivalue": true, - "name": "krbprincipalname", + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"id\")", "required": false, - "type": "Principal" - }, + "label": "Primary key only", + "type": "bool" + } + ], + "full_name": "certprofile_find/1", + "output": [ { - "label": "Kerberos principal expiration", - "name": "krbprincipalexpiration", + "doc": "User-friendly description of action performed", "required": false, - "type": "datetime" + "type": "str", + "name": "summary" }, { - "label": "Email address", + "type": "dict", "multivalue": true, - "name": "mail", - "required": false, - "type": "str" + "name": "result" }, { - "doc": "Prompt to set the user password", - "exclude": ["webui"], - "label": "Password", - "name": "userpassword", - "required": false, - "sensitive": true, - "type": "str" + "doc": "Number of entries returned", + "type": "int", + "name": "count" }, { - "doc": "Generate a random user password", - "name": "random", - "required": false, - "type": "bool" + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" + } + ], + "obj_class": "certprofile/1", + "topic_topic": "certprofile/1" + }, + { + "name": "certprofile_import", + "doc": "Import a Certificate Profile.", + "attr_name": "import", + "version": "1", + "params": [ + { + "type": "str", + "doc": "Profile ID for referring to this profile", + "cli_name": "id", + "name": "cn", + "label": "Profile ID" }, { - "label": "Random password", - "name": "randompassword", - "required": false, + "cli_name": "desc", + "name": "description", + "doc": "Brief description of this profile", + "label": "Profile description", + "positional": false, "type": "str" }, { - "doc": "User ID Number (system will assign one if not provided)", - "label": "UID", - "name": "uidnumber", - "required": false, - "type": "int" + "cli_name": "store", + "name": "ipacertprofilestoreissued", + "alwaysask": true, + "default": [ + "True" + ], + "doc": "Whether to store certs issued using this profile", + "label": "Store issued certificates", + "positional": false, + "type": "bool" }, { - "doc": "Group ID Number", - "label": "GID", - "name": "gidnumber", - "required": false, - "type": "int" + "positional": false, + "type": "str", + "cli_name": "file", + "name": "file", + "label": "Filename of a raw profile. The XML format is not supported." }, { - "label": "Street address", - "name": "street", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "City", - "name": "l", - "required": false, - "type": "str" - }, + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "certprofile_import/1", + "output": [ { - "label": "State/Province", - "name": "st", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "label": "ZIP", - "name": "postalcode", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "label": "Telephone Number", - "multivalue": true, - "name": "telephonenumber", - "required": false, - "type": "str" - }, + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "certprofile/1", + "topic_topic": "certprofile/1" + }, + { + "name": "certprofile_mod", + "doc": "Modify Certificate Profile configuration.", + "attr_name": "mod", + "version": "1", + "params": [ { - "label": "Mobile Telephone Number", - "multivalue": true, - "name": "mobile", - "required": false, + "doc": "Profile ID for referring to this profile", + "label": "Profile ID", + "cli_name": "id", + "name": "cn", "type": "str" }, { - "label": "Pager Number", - "multivalue": true, - "name": "pager", + "cli_name": "desc", + "name": "description", + "doc": "Brief description of this profile", "required": false, + "label": "Profile description", "type": "str" }, { - "label": "Fax Number", - "multivalue": true, - "name": "facsimiletelephonenumber", + "cli_name": "store", + "name": "ipacertprofilestoreissued", + "alwaysask": true, + "default": [ + "True" + ], + "doc": "Whether to store certs issued using this profile", "required": false, - "type": "str" + "label": "Store issued certificates", + "type": "bool" }, { - "label": "Org. Unit", - "name": "ou", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "label": "Job Title", - "name": "title", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "label": "Manager", - "name": "manager", + "cli_name": "delattr", + "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, - "type": "str" - }, - { - "label": "Car License", "multivalue": true, - "name": "carlicense", - "required": false, + "exclude": [ + "webui" + ], "type": "str" }, { - "label": "SSH public key", - "multivalue": true, - "name": "ipasshpubkey", - "required": false, - "type": "str" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { - "label": "SSH public key fingerprint", - "multivalue": true, - "name": "sshpubkeyfp", + "type": "str", "required": false, - "type": "str" + "cli_name": "file", + "name": "file", + "label": "File containing profile configuration" }, { - "doc": "Types of supported user authentication", - "label": "User authentication types", - "multivalue": true, - "name": "ipauserauthtype", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": - "User category (semantics placed on this attribute are for local interpretation)", - "label": "Class", - "multivalue": true, - "name": "userclass", - "required": false, - "type": "str" - }, + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "certprofile_mod/1", + "output": [ { - "label": "RADIUS proxy configuration", - "name": "ipatokenradiusconfiglink", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "label": "RADIUS proxy username", - "name": "ipatokenradiususername", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "label": "Department Number", - "multivalue": true, - "name": "departmentnumber", - "required": false, - "type": "str" - }, + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "certprofile/1", + "topic_topic": "certprofile/1" + }, + { + "name": "certprofile_show", + "doc": "Display the properties of a Certificate Profile.", + "attr_name": "show", + "version": "1", + "params": [ { - "label": "Employee Number", - "name": "employeenumber", - "required": false, + "doc": "Profile ID for referring to this profile", + "label": "Profile ID", + "cli_name": "id", + "name": "cn", "type": "str" }, { - "label": "Employee Type", - "name": "employeetype", - "required": false, - "type": "str" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { - "label": "Preferred Language", - "name": "preferredlanguage", + "doc": "Write profile configuration to file", "required": false, - "type": "str" + "type": "str", + "name": "out" }, { - "doc": "Base-64 encoded user certificate", - "label": "Certificate", - "multivalue": true, - "name": "usercertificate", - "required": false, - "type": "bytes" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Password", - "name": "has_password", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - }, + } + ], + "full_name": "certprofile_show/1", + "output": [ { - "label": "Member of groups", - "name": "memberof_group", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "label": "Roles", - "name": "memberof_role", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "label": "Member of netgroups", - "name": "memberof_netgroup", + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "certprofile/1", + "topic_topic": "certprofile/1" + }, + { + "name": "class_find", + "doc": "Search for classes.", + "attr_name": "find", + "version": "1", + "params": [ + { + "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, - "type": "str" + "type": "str", + "name": "criteria" }, { - "label": "Member of Sudo rule", - "name": "memberof_sudorule", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Member of HBAC rule", - "name": "memberof_hbacrule", - "required": false, - "type": "str" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Indirect Member of group", - "name": "memberofindirect_group", + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"name\")", "required": false, - "type": "str" - }, + "label": "Primary key only", + "type": "bool" + } + ], + "full_name": "class_find/1", + "output": [ { - "label": "Indirect Member of netgroup", - "name": "memberofindirect_netgroup", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "label": "Indirect Member of role", - "name": "memberofindirect_role", - "required": false, - "type": "str" + "type": "dict", + "multivalue": true, + "name": "result" }, { - "label": "Indirect Member of Sudo rule", - "name": "memberofindirect_sudorule", - "required": false, - "type": "str" + "doc": "Number of entries returned", + "type": "int", + "name": "count" }, { - "label": "Indirect Member of HBAC rule", - "name": "memberofindirect_hbacrule", - "required": false, - "type": "str" + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" + } + ], + "obj_class": "class/1", + "topic_topic": "schema/1" + }, + { + "name": "class_show", + "doc": "Display information about a class.", + "attr_name": "show", + "version": "1", + "params": [ + { + "no_convert": true, + "type": "str", + "name": "full_name", + "label": "Full name" }, { - "label": "Kerberos keys available", - "name": "has_keytab", + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "version": "1" + "full_name": "class_show/1", + "output": [ + { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" + }, + { + "type": "dict", + "name": "result" + }, + { + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "class/1", + "topic_topic": "schema/1" }, { - "full_name": "sudocmd/1", - "name": "sudocmd", + "version": "1", + "attr_name": "defaults", + "obj_class": "command/1", "params": [ { - "label": "Sudo Command", - "name": "sudocmd", - "type": "str" + "no_convert": true, + "type": "str", + "name": "full_name", + "label": "Full name" }, { - "doc": "A description of this command", - "label": "Description", - "name": "description", + "type": "str", "required": false, - "type": "str" + "multivalue": true, + "name": "params" }, { - "label": "Sudo Command Groups", - "name": "memberof_sudocmdgroup", "required": false, - "type": "str" + "type": "dict", + "name": "kw" + } + ], + "full_name": "command_defaults/1", + "exclude": [ + "cli" + ], + "output": [ + { + "name": "result" } ], - "version": "1" + "topic_topic": "schema/1", + "name": "command_defaults" }, { - "full_name": "sudocmdgroup/1", - "name": "sudocmdgroup", + "name": "command_find", + "doc": "Search for commands.", + "attr_name": "find", + "version": "1", "params": [ { - "label": "Sudo Command Group", - "name": "cn", - "type": "str" + "positional": true, + "doc": "A string searched in all relevant object attributes", + "required": false, + "type": "str", + "name": "criteria" }, { - "doc": "Group description", - "label": "Description", - "name": "description", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Commands", - "name": "membercmd_sudocmd", - "required": false, - "type": "str" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Sudo Command Groups", - "name": "membercmd_sudocmdgroup", + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"name\")", "required": false, - "type": "str" - }, + "label": "Primary key only", + "type": "bool" + } + ], + "full_name": "command_find/1", + "output": [ { - "label": "Member Sudo commands", - "name": "member_sudocmd", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" + }, + { + "type": "dict", + "multivalue": true, + "name": "result" + }, + { + "doc": "Number of entries returned", + "type": "int", + "name": "count" + }, + { + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], - "version": "1" + "obj_class": "command/1", + "topic_topic": "schema/1" }, { - "full_name": "sudorule/1", - "name": "sudorule", + "name": "command_show", + "doc": "Display information about a command.", + "attr_name": "show", + "version": "1", "params": [ { - "label": "Rule name", - "name": "cn", - "type": "str" + "no_convert": true, + "type": "str", + "name": "full_name", + "label": "Full name" }, { - "label": "Description", - "name": "description", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Enabled", - "name": "ipaenabledflag", - "required": false, + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" + } + ], + "full_name": "command_show/1", + "output": [ + { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "User category the rule applies to", - "label": "User category", - "name": "usercategory", + "type": "dict", + "name": "result" + }, + { + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "command/1", + "topic_topic": "schema/1" + }, + { + "name": "compat_is_enabled", + "doc": "Determine whether Schema Compatibility plugin is configured to serve trusted domain users and groups", + "version": "1", + "params": [], + "full_name": "compat_is_enabled/1", + "exclude": [ + "cli" + ], + "output": [ + { + "name": "result" + } + ], + "topic_topic": "trust/1" + }, + { + "name": "config_mod", + "doc": "Modify configuration options.", + "attr_name": "mod", + "version": "1", + "params": [ + { + "type": "int", "required": false, - "type": "str" + "cli_name": "maxusername", + "name": "ipamaxusernamelength", + "label": "Maximum username length" }, { - "doc": "Host category the rule applies to", - "label": "Host category", - "name": "hostcategory", + "cli_name": "homedirectory", + "name": "ipahomesrootdir", + "doc": "Default location of home directories", "required": false, + "label": "Home directory base", "type": "str" }, { - "doc": "Command category the rule applies to", - "label": "Command category", - "name": "cmdcategory", + "cli_name": "defaultshell", + "name": "ipadefaultloginshell", + "doc": "Default shell for new users", "required": false, + "label": "Default shell", "type": "str" }, { - "doc": "RunAs User category the rule applies to", - "label": "RunAs User category", - "name": "ipasudorunasusercategory", + "cli_name": "defaultgroup", + "name": "ipadefaultprimarygroup", + "doc": "Default group for new users", "required": false, + "label": "Default users group", "type": "str" }, { - "doc": "RunAs Group category the rule applies to", - "label": "RunAs Group category", - "name": "ipasudorunasgroupcategory", + "cli_name": "emaildomain", + "name": "ipadefaultemaildomain", + "doc": "Default e-mail domain", "required": false, + "label": "Default e-mail domain", "type": "str" }, { - "doc": "integer to order the Sudo rules", - "label": "Sudo order", - "name": "sudoorder", + "cli_name": "searchtimelimit", + "name": "ipasearchtimelimit", + "doc": "Maximum amount of time (seconds) for a search (-1 or 0 is unlimited)", "required": false, + "label": "Search time limit", "type": "int" }, { - "label": "Users", - "name": "memberuser_user", + "cli_name": "searchrecordslimit", + "name": "ipasearchrecordslimit", + "doc": "Maximum number of records to search (-1 or 0 is unlimited)", "required": false, - "type": "str" + "label": "Search size limit", + "type": "int" }, { - "label": "User Groups", - "name": "memberuser_group", + "cli_name": "usersearch", + "name": "ipausersearchfields", + "doc": "A comma-separated list of fields to search in when searching for users", "required": false, + "label": "User search fields", "type": "str" }, { - "doc": "External User the rule applies to (sudorule-find only)", - "label": "External User", - "name": "externaluser", + "cli_name": "groupsearch", + "name": "ipagroupsearchfields", + "doc": "A comma-separated list of fields to search in when searching for groups", "required": false, + "label": "Group search fields", "type": "str" }, { - "label": "Hosts", - "name": "memberhost_host", + "cli_name": "enable_migration", + "name": "ipamigrationenabled", + "doc": "Enable migration mode", "required": false, - "type": "str" + "label": "Enable migration mode", + "type": "bool" }, { - "label": "Host Groups", - "name": "memberhost_hostgroup", + "cli_name": "groupobjectclasses", + "name": "ipagroupobjectclasses", + "doc": "Default group objectclasses (comma-separated list)", "required": false, + "label": "Default group objectclasses", + "multivalue": true, "type": "str" }, { - "label": "Host Masks", + "cli_name": "userobjectclasses", + "name": "ipauserobjectclasses", + "doc": "Default user objectclasses (comma-separated list)", + "required": false, + "label": "Default user objectclasses", "multivalue": true, - "name": "hostmask", "type": "str" }, { - "label": "External host", - "multivalue": true, - "name": "externalhost", + "cli_name": "pwdexpnotify", + "name": "ipapwdexpadvnotify", + "doc": "Number of days's notice of impending password expiration", "required": false, - "type": "str" + "label": "Password Expiration Notification (days)", + "type": "int" }, { - "label": "Sudo Allow Commands", - "name": "memberallowcmd_sudocmd", + "cli_name": "ipaconfigstring", + "name": "ipaconfigstring", + "cli_metavar": "['AllowNThash', 'KDC:Disable Last Success', 'KDC:Disable Lockout', 'KDC:Disable Default Preauth for SPNs']", + "doc": "Extra hashes to generate in password plug-in", "required": false, + "label": "Password plugin features", + "multivalue": true, "type": "str" }, { - "label": "Sudo Deny Commands", - "name": "memberdenycmd_sudocmd", + "doc": "Order in increasing priority of SELinux users, delimited by $", "required": false, - "type": "str" + "type": "str", + "name": "ipaselinuxusermaporder", + "label": "SELinux user map order" }, { - "label": "Sudo Allow Command Groups", - "name": "memberallowcmd_sudocmdgroup", + "doc": "Default SELinux user when no match is found in SELinux map rule", "required": false, - "type": "str" + "type": "str", + "name": "ipaselinuxusermapdefault", + "label": "Default SELinux user" }, { - "label": "Sudo Deny Command Groups", - "name": "memberdenycmd_sudocmdgroup", + "cli_name": "pac_type", + "name": "ipakrbauthzdata", + "cli_metavar": "['MS-PAC', 'PAD', 'nfs:NONE']", + "doc": "Default types of PAC supported for services", "required": false, + "label": "Default PAC types", + "multivalue": true, "type": "str" }, { - "doc": "Run as a user", - "label": "RunAs Users", - "name": "ipasudorunas_user", + "cli_name": "user_auth_type", + "name": "ipauserauthtype", + "cli_metavar": "['password', 'radius', 'otp', 'disabled']", + "doc": "Default types of supported user authentication", "required": false, + "label": "Default user authentication types", + "multivalue": true, "type": "str" }, { - "doc": "Run as any user within a specified group", - "label": "Groups of RunAs Users", - "name": "ipasudorunas_group", + "doc": "Renewal master for IPA certificate authority", "required": false, - "type": "str" + "type": "str", + "name": "ca_renewal_master_server", + "label": "IPA CA renewal master" }, { - "doc": - "External User the commands can run as (sudorule-find only)", - "label": "RunAs External User", - "name": "ipasudorunasextuser", + "cli_name": "domain_resolution_order", + "name": "ipadomainresolutionorder", + "doc": "colon-separated list of domains used for short name qualification", "required": false, + "label": "Domain resolution order", "type": "str" }, { - "doc": "External Groups of users that the command can run as", - "label": "External Groups of RunAs Users", - "name": "ipasudorunasextusergroup", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "doc": "Run with the gid of a specified POSIX group", - "label": "RunAs Groups", - "name": "ipasudorunasgroup_group", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "doc": - "External Group the commands can run as (sudorule-find only)", - "label": "RunAs External Group", - "name": "ipasudorunasextgroup", + "cli_name": "delattr", + "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "label": "Sudo Option", - "name": "ipasudoopt", + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" + }, + { + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "config_mod/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" + }, + { + "type": "dict", + "name": "result" + }, + { + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "NoneType", + "name": "value" } ], - "version": "1" + "obj_class": "config/1", + "topic_topic": "config/1" }, { - "full_name": "topic/1", - "name": "topic", + "name": "config_show", + "doc": "Show the current configuration.", + "attr_name": "show", + "version": "1", "params": [ { - "label": "Name", - "name": "name", - "type": "str" - }, - { - "label": "Version", - "name": "version", - "type": "str" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { - "label": "Full name", - "name": "full_name", - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Documentation", - "name": "doc", - "required": false, - "type": "str" - }, + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "config_show/1", + "output": [ { - "label": "Exclude from", - "multivalue": true, - "name": "exclude", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "label": "Include in", - "multivalue": true, - "name": "include", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "label": "Help topic", - "name": "topic_topic", - "required": false, - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "NoneType", + "name": "value" } ], - "version": "1" + "obj_class": "config/1", + "topic_topic": "config/1" }, { - "full_name": "topologysegment/1", - "name": "topologysegment", + "version": "1", + "attr_name": "add", + "obj_class": "cosentry/1", "params": [ { - "doc": "Arbitrary string identifying the segment", - "label": "Segment name", - "name": "cn", - "type": "str" + "type": "str", + "name": "cn" }, { - "doc": "Left replication node - an IPA server", - "label": "Left node", - "name": "iparepltoposegmentleftnode", - "type": "str" + "positional": false, + "type": "DN", + "name": "krbpwdpolicyreference" }, { - "doc": "Right replication node - an IPA server", - "label": "Right node", - "name": "iparepltoposegmentrightnode", - "type": "str" + "positional": false, + "type": "int", + "name": "cospriority" }, { - "doc": - "Direction of replication between left and right replication node", - "label": "Connectivity", - "name": "iparepltoposegmentdirection", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "doc": - "A space separated list of attributes which are removed from replication updates.", - "label": "Attributes to strip", - "name": "nsds5replicastripattrs", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "doc": - "Attributes that are not replicated to a consumer server during a fractional update. E.g., `(objectclass=*) $ EXCLUDE accountlockout memberof", - "label": "Attributes to replicate", - "name": "nsds5replicatedattributelist", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": - "Attributes that are not replicated to a consumer server during a total update. E.g. (objectclass=*) $ EXCLUDE accountlockout", - "label": "Attributes for total update", - "name": "nsds5replicatedattributelisttotal", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "cosentry_add/1", + "exclude": [ + "cli" + ], + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": - "Number of seconds outbound LDAP operations waits for a response from the remote replica before timing out and failing", - "label": "Session timeout", - "name": "nsds5replicatimeout", - "required": false, - "type": "int" + "type": "dict", + "name": "result" }, { - "doc": - "Whether a replication agreement is active, meaning whether replication is occurring per that agreement", - "label": "Replication agreement enabled", - "name": "nsds5replicaenabled", - "required": false, - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "version": "1" + "topic_topic": "pwpolicy/1", + "name": "cosentry_add" }, { - "full_name": "topologysuffix/1", - "name": "topologysuffix", + "version": "1", + "attr_name": "del", + "obj_class": "cosentry/1", "params": [ { - "label": "Suffix name", - "name": "cn", - "type": "str" + "type": "str", + "multivalue": true, + "name": "cn" }, { - "label": "Managed LDAP suffix DN", - "name": "iparepltopoconfroot", - "type": "DN" + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", + "positional": false, + "type": "bool" } ], - "version": "1" - }, - { - "full_name": "trust/1", - "name": "trust", - "params": [ - { - "label": "Realm name", - "name": "cn", - "type": "str" - }, + "full_name": "cosentry_del/1", + "exclude": [ + "cli" + ], + "output": [ { - "label": "Domain NetBIOS name", - "name": "ipantflatname", - "type": "str" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "label": "Domain Security Identifier", - "name": "ipanttrusteddomainsid", - "type": "str" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "label": "SID blacklist incoming", + "type": "str", "multivalue": true, - "name": "ipantsidblacklistincoming", - "required": false, - "type": "str" - }, - { - "label": "SID blacklist outgoing", - "multivalue": true, - "name": "ipantsidblacklistoutgoing", - "required": false, - "type": "str" - }, - { - "label": "Trust direction", - "name": "trustdirection", - "type": "str" - }, - { - "label": "Trust type", - "name": "trusttype", - "type": "str" - }, - { - "label": "Trust status", - "name": "truststatus", - "type": "str" - }, - { - "label": "UPN suffixes", - "multivalue": true, - "name": "ipantadditionalsuffixes", - "required": false, - "type": "str" + "name": "value" } ], - "version": "1" + "topic_topic": "pwpolicy/1", + "name": "cosentry_del" }, { - "full_name": "trustconfig/1", - "name": "trustconfig", + "version": "1", + "attr_name": "find", + "obj_class": "cosentry/1", "params": [ { - "label": "Domain", - "name": "cn", - "type": "str" + "positional": true, + "doc": "A string searched in all relevant object attributes", + "required": false, + "type": "str", + "name": "criteria" }, { - "label": "Security Identifier", - "name": "ipantsecurityidentifier", - "type": "str" + "required": false, + "type": "str", + "name": "cn" }, { - "label": "NetBIOS name", - "name": "ipantflatname", - "type": "str" + "required": false, + "type": "DN", + "name": "krbpwdpolicyreference" }, { - "label": "Domain GUID", - "name": "ipantdomainguid", - "type": "str" + "required": false, + "type": "int", + "name": "cospriority" }, { - "label": "Fallback primary group", - "name": "ipantfallbackprimarygroup", - "type": "str" + "doc": "Time limit of search in seconds (0 is unlimited)", + "required": false, + "type": "int", + "name": "timelimit", + "label": "Time Limit" }, { - "doc": "IPA servers configured as AD trust agents", - "label": "IPA AD trust agents", - "multivalue": true, - "name": "ad_trust_agent_server", + "doc": "Maximum number of entries returned (0 is unlimited)", "required": false, - "type": "str" + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { - "doc": "IPA servers configured as AD trust controllers", - "label": "IPA AD trust controllers", - "multivalue": true, - "name": "ad_trust_controller_server", + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"cn\")", "required": false, - "type": "str" + "label": "Primary key only", + "type": "bool" } ], - "version": "1" - }, - { - "full_name": "trustdomain/1", - "name": "trustdomain", - "params": [ + "full_name": "cosentry_find/1", + "exclude": [ + "cli" + ], + "output": [ { - "label": "Domain name", - "name": "cn", - "type": "str" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "label": "Domain NetBIOS name", - "name": "ipantflatname", - "required": false, - "type": "str" + "type": "dict", + "multivalue": true, + "name": "result" }, { - "label": "Domain Security Identifier", - "name": "ipanttrusteddomainsid", - "required": false, - "type": "str" + "doc": "Number of entries returned", + "type": "int", + "name": "count" }, { - "label": "Domain enabled", - "name": "domain_enabled", - "type": "bool" + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], - "version": "1" + "topic_topic": "pwpolicy/1", + "name": "cosentry_find" }, { - "full_name": "user/1", - "name": "user", + "version": "1", + "attr_name": "mod", + "obj_class": "cosentry/1", "params": [ { - "label": "User login", - "name": "uid", - "type": "str" - }, - { - "label": "First name", - "name": "givenname", - "type": "str" - }, - { - "label": "Last name", - "name": "sn", - "type": "str" - }, - { - "label": "Full name", - "name": "cn", - "type": "str" + "type": "str", + "name": "cn" }, { - "label": "Display name", - "name": "displayname", "required": false, - "type": "str" + "type": "DN", + "name": "krbpwdpolicyreference" }, { - "label": "Initials", - "name": "initials", "required": false, - "type": "str" + "type": "int", + "name": "cospriority" }, { - "label": "Home directory", - "name": "homedirectory", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "label": "GECOS", - "name": "gecos", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "label": "Login shell", - "name": "loginshell", + "cli_name": "delattr", + "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "label": "Principal name", - "name": "krbcanonicalname", - "required": false, - "type": "Principal" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { - "label": "Principal alias", - "multivalue": true, - "name": "krbprincipalname", - "required": false, - "type": "Principal" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Kerberos principal expiration", - "name": "krbprincipalexpiration", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "cosentry_mod/1", + "exclude": [ + "cli" + ], + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "datetime" + "type": "str", + "name": "summary" }, { - "label": "Email address", - "multivalue": true, - "name": "mail", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "doc": "Prompt to set the user password", - "exclude": ["webui"], - "label": "Password", - "name": "userpassword", - "required": false, - "sensitive": true, - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "topic_topic": "pwpolicy/1", + "name": "cosentry_mod" + }, + { + "version": "1", + "attr_name": "show", + "obj_class": "cosentry/1", + "params": [ + { + "type": "str", + "name": "cn" }, { - "doc": "Generate a random user password", - "name": "random", - "required": false, + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, "type": "bool" }, { - "label": "Random password", - "name": "randompassword", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": "User ID Number (system will assign one if not provided)", - "label": "UID", - "name": "uidnumber", - "required": false, - "type": "int" - }, + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "cosentry_show/1", + "exclude": [ + "cli" + ], + "output": [ { - "doc": "Group ID Number", - "label": "GID", - "name": "gidnumber", + "doc": "User-friendly description of action performed", "required": false, - "type": "int" + "type": "str", + "name": "summary" }, { - "label": "Street address", - "name": "street", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "label": "City", - "name": "l", - "required": false, - "type": "str" - }, + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "topic_topic": "pwpolicy/1", + "name": "cosentry_show" + }, + { + "name": "delegation_add", + "doc": "Add a new delegation.", + "attr_name": "add", + "version": "1", + "params": [ { - "label": "State/Province", - "name": "st", - "required": false, - "type": "str" + "type": "str", + "doc": "Delegation name", + "cli_name": "name", + "name": "aciname", + "label": "Delegation name" }, { - "label": "ZIP", - "name": "postalcode", + "cli_name": "permissions", + "name": "permissions", + "doc": "Permissions to grant (read, write). Default is write.", "required": false, - "type": "str" - }, - { - "label": "Telephone Number", + "label": "Permissions", "multivalue": true, - "name": "telephonenumber", - "required": false, "type": "str" }, { - "label": "Mobile Telephone Number", + "cli_name": "attrs", + "name": "attrs", + "doc": "Attributes to which the delegation applies", + "label": "Attributes", + "positional": false, "multivalue": true, - "name": "mobile", - "required": false, - "type": "str" + "type": "str", + "no_convert": true }, { - "label": "Pager Number", - "multivalue": true, - "name": "pager", - "required": false, + "cli_name": "membergroup", + "name": "memberof", + "doc": "User group to apply delegation to", + "label": "Member user group", + "positional": false, "type": "str" }, { - "label": "Fax Number", - "multivalue": true, - "name": "facsimiletelephonenumber", - "required": false, + "cli_name": "group", + "name": "group", + "doc": "User group ACI grants access to", + "label": "User group", + "positional": false, "type": "str" }, { - "label": "Org. Unit", - "name": "ou", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Job Title", - "name": "title", - "required": false, - "type": "str" - }, + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "delegation_add/1", + "output": [ { - "label": "Manager", - "name": "manager", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "label": "Car License", - "multivalue": true, - "name": "carlicense", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "label": "SSH public key", - "multivalue": true, - "name": "ipasshpubkey", - "required": false, - "type": "str" - }, + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "delegation/1", + "topic_topic": "delegation/1" + }, + { + "name": "delegation_del", + "doc": "Delete a delegation.", + "attr_name": "del", + "version": "1", + "params": [ { - "label": "SSH public key fingerprint", - "multivalue": true, - "name": "sshpubkeyfp", - "required": false, + "doc": "Delegation name", + "label": "Delegation name", + "cli_name": "name", + "name": "aciname", "type": "str" - }, + } + ], + "full_name": "delegation_del/1", + "output": [ { - "doc": "Types of supported user authentication", - "label": "User authentication types", - "multivalue": true, - "name": "ipauserauthtype", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": - "User category (semantics placed on this attribute are for local interpretation)", - "label": "Class", - "multivalue": true, - "name": "userclass", - "required": false, - "type": "str" + "doc": "True means the operation was successful", + "type": "bool", + "name": "result" }, { - "label": "RADIUS proxy configuration", - "name": "ipatokenradiusconfiglink", - "required": false, - "type": "str" - }, + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "delegation/1", + "topic_topic": "delegation/1" + }, + { + "name": "delegation_find", + "doc": "Search for delegations.", + "attr_name": "find", + "version": "1", + "params": [ { - "label": "RADIUS proxy username", - "name": "ipatokenradiususername", + "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, - "type": "str" + "type": "str", + "name": "criteria" }, { - "label": "Department Number", - "multivalue": true, - "name": "departmentnumber", + "cli_name": "name", + "name": "aciname", + "doc": "Delegation name", "required": false, + "label": "Delegation name", "type": "str" }, { - "label": "Employee Number", - "name": "employeenumber", + "cli_name": "permissions", + "name": "permissions", + "doc": "Permissions to grant (read, write). Default is write.", "required": false, + "label": "Permissions", + "multivalue": true, "type": "str" }, { - "label": "Employee Type", - "name": "employeetype", + "cli_name": "attrs", + "name": "attrs", + "doc": "Attributes to which the delegation applies", "required": false, - "type": "str" + "label": "Attributes", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "label": "Preferred Language", - "name": "preferredlanguage", + "cli_name": "membergroup", + "name": "memberof", + "doc": "User group to apply delegation to", "required": false, + "label": "Member user group", "type": "str" }, { - "doc": "Base-64 encoded user certificate", - "label": "Certificate", - "multivalue": true, - "name": "usercertificate", + "cli_name": "group", + "name": "group", + "doc": "User group ACI grants access to", "required": false, - "type": "bytes" + "label": "User group", + "type": "str" }, { - "label": "Account disabled", - "name": "nsaccountlock", + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"name\")", "required": false, + "label": "Primary key only", "type": "bool" }, { - "label": "Preserved user", - "name": "preserved", - "required": false, + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "label": "Password", - "name": "has_password", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - }, + } + ], + "full_name": "delegation_find/1", + "output": [ { - "label": "Member of groups", - "name": "memberof_group", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "label": "Roles", - "name": "memberof_role", - "required": false, - "type": "str" + "type": "dict", + "multivalue": true, + "name": "result" }, { - "label": "Member of netgroups", - "name": "memberof_netgroup", - "required": false, - "type": "str" + "doc": "Number of entries returned", + "type": "int", + "name": "count" }, { - "label": "Member of Sudo rule", - "name": "memberof_sudorule", - "required": false, - "type": "str" - }, + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" + } + ], + "obj_class": "delegation/1", + "topic_topic": "delegation/1" + }, + { + "name": "delegation_mod", + "doc": "Modify a delegation.", + "attr_name": "mod", + "version": "1", + "params": [ { - "label": "Member of HBAC rule", - "name": "memberof_hbacrule", - "required": false, + "doc": "Delegation name", + "label": "Delegation name", + "cli_name": "name", + "name": "aciname", "type": "str" }, { - "label": "Indirect Member of group", - "name": "memberofindirect_group", + "cli_name": "permissions", + "name": "permissions", + "doc": "Permissions to grant (read, write). Default is write.", "required": false, + "label": "Permissions", + "multivalue": true, "type": "str" }, { - "label": "Indirect Member of netgroup", - "name": "memberofindirect_netgroup", + "cli_name": "attrs", + "name": "attrs", + "doc": "Attributes to which the delegation applies", "required": false, - "type": "str" + "label": "Attributes", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "label": "Indirect Member of role", - "name": "memberofindirect_role", + "cli_name": "membergroup", + "name": "memberof", + "doc": "User group to apply delegation to", "required": false, + "label": "Member user group", "type": "str" }, { - "label": "Indirect Member of Sudo rule", - "name": "memberofindirect_sudorule", + "cli_name": "group", + "name": "group", + "doc": "User group ACI grants access to", "required": false, + "label": "User group", "type": "str" }, { - "label": "Indirect Member of HBAC rule", - "name": "memberofindirect_hbacrule", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Kerberos keys available", - "name": "has_keytab", - "type": "bool" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" } ], - "version": "1" - }, - { - "full_name": "userstatus/1", - "name": "userstatus", - "params": [ + "full_name": "delegation_mod/1", + "output": [ { - "label": "Preserved user", - "name": "preserved", + "doc": "User-friendly description of action performed", "required": false, - "type": "bool" + "type": "str", + "name": "summary" }, { - "label": "Server", - "name": "server", - "type": "str" - }, - { - "label": "Failed logins", - "name": "krbloginfailedcount", - "type": "str" - }, - { - "label": "Last successful authentication", - "name": "krblastsuccessfulauth", - "type": "str" - }, - { - "label": "Last failed authentication", - "name": "krblastfailedauth", - "type": "str" + "type": "dict", + "name": "result" }, { - "label": "Time now", - "name": "now", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "version": "1" + "obj_class": "delegation/1", + "topic_topic": "delegation/1" }, { - "full_name": "vault/1", - "name": "vault", + "name": "delegation_show", + "doc": "Display information about a delegation.", + "attr_name": "show", + "version": "1", "params": [ { - "label": "Vault name", - "name": "cn", + "doc": "Delegation name", + "label": "Delegation name", + "cli_name": "name", + "name": "aciname", "type": "str" }, { - "doc": "Vault description", - "label": "Description", - "name": "description", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": "Vault type", - "label": "Type", - "name": "ipavaulttype", - "required": false, - "type": "str" - }, + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "delegation_show/1", + "output": [ { - "doc": "Vault salt", - "label": "Salt", - "name": "ipavaultsalt", + "doc": "User-friendly description of action performed", "required": false, - "type": "bytes" + "type": "str", + "name": "summary" }, { - "doc": "Vault public key", - "label": "Public key", - "name": "ipavaultpublickey", - "required": false, - "type": "bytes" + "type": "dict", + "name": "result" }, { - "label": "Owner users", - "name": "owner_user", - "required": false, - "type": "str" - }, + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "delegation/1", + "topic_topic": "delegation/1" + }, + { + "name": "dns_is_enabled", + "doc": "\n Checks if any of the servers has the DNS service enabled.\n ", + "version": "1", + "params": [], + "full_name": "dns_is_enabled/1", + "exclude": [ + "cli" + ], + "output": [ { - "label": "Owner groups", - "name": "owner_group", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "label": "Owner services", - "name": "owner_service", - "required": false, - "type": "str" + "doc": "True means the operation was successful", + "type": "bool", + "name": "result" }, { - "label": "Failed owners", - "name": "owner", - "required": false, - "type": "str" - }, + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "NoneType", + "name": "value" + } + ], + "topic_topic": "dns/1" + }, + { + "name": "dns_resolve", + "doc": "Resolve a host name in DNS. (Deprecated)", + "version": "1", + "params": [ { - "label": "Vault service", - "name": "service", - "required": false, - "type": "str" - }, + "type": "str", + "name": "hostname", + "label": "Hostname (FQDN)" + } + ], + "full_name": "dns_resolve/1", + "exclude": [ + "cli" + ], + "output": [ { - "label": "Shared vault", - "name": "shared", + "doc": "User-friendly description of action performed", "required": false, - "type": "bool" + "type": "str", + "name": "summary" }, { - "label": "Vault user", - "name": "username", - "required": false, - "type": "str" + "doc": "True means the operation was successful", + "type": "bool", + "name": "result" }, { - "label": "Member users", - "name": "member_user", - "required": false, - "type": "str" + "type": "str", + "name": "value" + } + ], + "topic_topic": "dns/1" + }, + { + "name": "dns_update_system_records", + "doc": "Update location and IPA server DNS records", + "attr_name": "update", + "version": "1", + "params": [ + { + "name": "dry_run", + "default": [ + "False" + ], + "doc": "Do not update records only return expected records", + "label": "Dry run", + "positional": false, + "type": "bool" }, { - "label": "Member groups", - "name": "member_group", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "label": "Member services", - "name": "member_service", - "required": false, - "type": "str" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" } ], - "version": "1" - }, - { - "full_name": "vaultconfig/1", - "name": "vaultconfig", - "params": [ + "full_name": "dns_update_system_records/1", + "output": [ { - "label": "Transport Certificate", - "name": "transport_cert", - "type": "bytes" + "type": "dict", + "name": "result" }, { - "doc": "IPA servers configured as key recovery agents", - "label": "IPA KRA servers", - "multivalue": true, - "name": "kra_server_server", - "required": false, - "type": "str" + "doc": "Result of the command", + "type": "bool", + "name": "value" } ], - "version": "1" + "obj_class": "dns_system_records/1", + "topic_topic": "dns/1" }, { - "full_name": "vaultcontainer/1", - "name": "vaultcontainer", + "name": "dnsconfig_mod", + "doc": "Modify global DNS configuration.", + "attr_name": "mod", + "version": "1", "params": [ { - "label": "Owner users", - "name": "owner_user", + "cli_name": "forwarder", + "name": "idnsforwarders", + "doc": "Global forwarders. A custom port can be specified for each forwarder using a standard format \"IP_ADDRESS port PORT\"", "required": false, + "label": "Global forwarders", + "multivalue": true, "type": "str" }, { - "label": "Owner groups", - "name": "owner_group", + "cli_name": "forward_policy", + "name": "idnsforwardpolicy", + "cli_metavar": "['only', 'first', 'none']", + "doc": "Global forwarding policy. Set to \"none\" to disable any configured global forwarders.", "required": false, + "label": "Forward policy", "type": "str" }, { - "label": "Owner services", - "name": "owner_service", + "cli_name": "allow_sync_ptr", + "name": "idnsallowsyncptr", + "doc": "Allow synchronization of forward (A, AAAA) and reverse (PTR) records", "required": false, - "type": "str" + "label": "Allow PTR sync", + "type": "bool" }, { - "label": "Failed owners", - "name": "owner", + "cli_name": "zone_refresh", + "name": "idnszonerefresh", + "doc": "An interval between regular polls of the name server for new DNS zones", "required": false, - "type": "str" + "label": "Zone refresh interval", + "exclude": [ + "cli", + "webui" + ], + "type": "int" }, { - "label": "Vault service", - "name": "service", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "label": "Shared vault", - "name": "shared", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, - "type": "bool" + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" }, { - "label": "Vault user", - "name": "username", + "cli_name": "delattr", + "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" + }, + { + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" + }, + { + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" } ], - "version": "1" - } - ], - "commands": [ - { - "attr_name": "add", - "doc": "\n Create new ACI.\n ", - "exclude": ["cli"], - "full_name": "aci_add/1", - "name": "aci_add", - "obj_class": "aci/1", + "full_name": "dnsconfig_mod/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "NoneType", + "name": "value" } ], + "obj_class": "dnsconfig/1", + "topic_topic": "dns/1" + }, + { + "name": "dnsconfig_show", + "doc": "Show the current global DNS configuration.", + "attr_name": "show", + "version": "1", "params": [ { - "cli_name": "name", - "label": "ACI name", - "name": "aciname", - "type": "str" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { - "cli_name": "permission", - "doc": "Permission ACI grants access to", - "label": "Permission", - "name": "permission", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "group", - "doc": "User group ACI grants access to", - "label": "User group", - "name": "group", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "dnsconfig_show/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "cli_name": "permissions", - "doc": "Permissions to grant(read, write, add, delete, all)", - "label": "Permissions", - "multivalue": true, - "name": "permissions", - "no_convert": true, - "positional": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "cli_name": "attrs", - "doc": "Attributes", - "label": "Attributes to which the permission applies", - "multivalue": true, - "name": "attrs", - "required": false, - "type": "str" - }, + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "NoneType", + "name": "value" + } + ], + "obj_class": "dnsconfig/1", + "topic_topic": "dns/1" + }, + { + "name": "dnsforwardzone_add", + "doc": "Create new DNS forward zone.", + "attr_name": "add", + "version": "1", + "params": [ { - "cli_metavar": - "['user', 'group', 'host', 'service', 'hostgroup', 'netgroup', 'dnsrecord']", - "cli_name": "type", - "doc": - "type of IPA object (user, group, host, hostgroup, service, netgroup)", - "label": "Type", - "name": "type", - "required": false, - "type": "str" + "cli_name": "name", + "name": "idnsname", + "alwaysask": true, + "doc": "Zone name (FQDN)", + "label": "Zone name", + "type": "DNSName", + "default_from_param": [ + "name_from_ip" + ], + "no_convert": true }, { - "cli_name": "memberof", - "doc": "Member of a group", - "label": "Member of", - "name": "memberof", + "doc": "IP network to create reverse zone name from", "required": false, - "type": "str" + "type": "str", + "name": "name_from_ip", + "label": "Reverse zone IP network" }, { - "cli_name": "filter", - "doc": "Legal LDAP filter (e.g. ou=Engineering)", - "label": "Filter", - "name": "filter", + "cli_name": "forwarder", + "name": "idnsforwarders", + "doc": "Per-zone forwarders. A custom port can be specified for each forwarder using a standard format \"IP_ADDRESS port PORT\"", "required": false, + "label": "Zone forwarders", + "multivalue": true, "type": "str" }, { - "cli_name": "subtree", - "doc": "Subtree to apply ACI to", - "label": "Subtree", - "name": "subtree", + "cli_name": "forward_policy", + "name": "idnsforwardpolicy", + "cli_metavar": "['only', 'first', 'none']", + "doc": "Per-zone conditional forwarding policy. Set to \"none\" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded.", "required": false, + "label": "Forward policy", "type": "str" }, { - "cli_name": "targetgroup", - "doc": "Group to apply ACI to", - "label": "Target group", - "name": "targetgroup", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "self", - "default": ["False"], - "doc": "Apply ACI to your own entry (self)", - "label": "Target your own entry (self)", - "name": "selfaci", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, - "type": "bool" - }, - { - "cli_metavar": - "['permission', 'delegation', 'selfservice', 'none']", - "cli_name": "prefix", - "doc": - "Prefix used to distinguish ACI types (permission, delegation, selfservice, none)", - "label": "ACI prefix", - "name": "aciprefix", - "positional": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "default": ["False"], - "doc": "Test the ACI syntax but don't write anything", - "name": "test", - "required": false, - "type": "bool" + "positional": false, + "default": [ + "False" + ], + "type": "bool", + "name": "skip_overlap_check", + "doc": "Force DNS zone creation even if it will overlap with an existing zone." }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "aci/1", - "version": "1" + "full_name": "dnsforwardzone_add/1", + "output": [ + { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" + }, + { + "type": "dict", + "name": "result" + }, + { + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "DNSName", + "name": "value" + } + ], + "obj_class": "dnsforwardzone/1", + "topic_topic": "dns/1" }, { - "attr_name": "del", - "doc": "\n Delete ACI.\n ", - "exclude": ["cli"], - "full_name": "aci_del/1", - "name": "aci_del", - "obj_class": "aci/1", + "name": "dnsforwardzone_add_permission", + "doc": "Add a permission for per-forward zone access delegation.", + "attr_name": "add_permission", + "version": "1", + "params": [ + { + "cli_name": "name", + "name": "idnsname", + "alwaysask": true, + "doc": "Zone name (FQDN)", + "label": "Zone name", + "type": "DNSName", + "default_from_param": [ + "name_from_ip" + ], + "no_convert": true + } + ], + "full_name": "dnsforwardzone_add_permission/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { "doc": "True means the operation was successful", - "name": "result", - "type": "bool" + "type": "bool", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "Permission value", + "type": "str", + "name": "value" } ], + "obj_class": "dnsforwardzone/1", + "topic_topic": "dns/1" + }, + { + "name": "dnsforwardzone_del", + "doc": "Delete DNS forward zone.", + "attr_name": "del", + "version": "1", "params": [ { "cli_name": "name", - "label": "ACI name", - "name": "aciname", - "type": "str" + "name": "idnsname", + "alwaysask": true, + "doc": "Zone name (FQDN)", + "label": "Zone name", + "multivalue": true, + "type": "DNSName", + "default_from_param": [ + "name_from_ip" + ], + "no_convert": true }, { - "cli_metavar": - "['permission', 'delegation', 'selfservice', 'none']", - "cli_name": "prefix", - "doc": - "Prefix used to distinguish ACI types (permission, delegation, selfservice, none)", - "label": "ACI prefix", - "name": "aciprefix", + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", "positional": false, - "type": "str" + "type": "bool" } ], - "topic_topic": "aci/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": - "\n Search for ACIs.\n\n Returns a list of ACIs\n\n EXAMPLES:\n\n To find all ACIs that apply directly to members of the group ipausers:\n ipa aci-find --memberof=ipausers\n\n To find all ACIs that grant add access:\n ipa aci-find --permissions=add\n\n Note that the find command only looks for the given text in the set of\n ACIs, it does not evaluate the ACIs to see if something would apply.\n For example, searching on memberof=ipausers will find all ACIs that\n have ipausers as a memberof. There may be other ACIs that apply to\n members of that group indirectly.\n ", - "exclude": ["cli"], - "full_name": "aci_find/1", - "name": "aci_find", - "obj_class": "aci/1", + "full_name": "dnsforwardzone_del/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" - }, - { - "multivalue": true, - "name": "result", - "type": "dict" + "type": "str", + "name": "summary" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" + "type": "DNSName", + "multivalue": true, + "name": "value" } ], + "obj_class": "dnsforwardzone/1", + "topic_topic": "dns/1" + }, + { + "name": "dnsforwardzone_disable", + "doc": "Disable DNS Forward Zone.", + "attr_name": "disable", + "version": "1", "params": [ - { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, - "required": false, - "type": "str" - }, { "cli_name": "name", - "label": "ACI name", - "name": "aciname", + "name": "idnsname", + "alwaysask": true, + "doc": "Zone name (FQDN)", + "label": "Zone name", + "type": "DNSName", + "default_from_param": [ + "name_from_ip" + ], + "no_convert": true + } + ], + "full_name": "dnsforwardzone_disable/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "cli_name": "permission", - "doc": "Permission ACI grants access to", - "label": "Permission", - "name": "permission", - "required": false, - "type": "str" + "doc": "True means the operation was successful", + "type": "bool", + "name": "result" }, { - "cli_name": "group", - "doc": "User group ACI grants access to", - "label": "User group", - "name": "group", - "required": false, - "type": "str" - }, + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "DNSName", + "name": "value" + } + ], + "obj_class": "dnsforwardzone/1", + "topic_topic": "dns/1" + }, + { + "name": "dnsforwardzone_enable", + "doc": "Enable DNS Forward Zone.", + "attr_name": "enable", + "version": "1", + "params": [ { - "cli_name": "permissions", - "doc": "Permissions to grant(read, write, add, delete, all)", - "label": "Permissions", - "multivalue": true, - "name": "permissions", - "no_convert": true, + "cli_name": "name", + "name": "idnsname", + "alwaysask": true, + "doc": "Zone name (FQDN)", + "label": "Zone name", + "type": "DNSName", + "default_from_param": [ + "name_from_ip" + ], + "no_convert": true + } + ], + "full_name": "dnsforwardzone_enable/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "cli_name": "attrs", - "doc": "Attributes", - "label": "Attributes to which the permission applies", - "multivalue": true, - "name": "attrs", - "required": false, - "type": "str" + "doc": "True means the operation was successful", + "type": "bool", + "name": "result" }, { - "cli_metavar": - "['user', 'group', 'host', 'service', 'hostgroup', 'netgroup', 'dnsrecord']", - "cli_name": "type", - "doc": - "type of IPA object (user, group, host, hostgroup, service, netgroup)", - "label": "Type", - "name": "type", + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "DNSName", + "name": "value" + } + ], + "obj_class": "dnsforwardzone/1", + "topic_topic": "dns/1" + }, + { + "name": "dnsforwardzone_find", + "doc": "Search for DNS forward zones.", + "attr_name": "find", + "version": "1", + "params": [ + { + "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, - "type": "str" + "type": "str", + "name": "criteria" }, { - "cli_name": "memberof", - "doc": "Member of a group", - "label": "Member of", - "name": "memberof", + "cli_name": "name", + "name": "idnsname", + "alwaysask": true, + "doc": "Zone name (FQDN)", "required": false, - "type": "str" + "label": "Zone name", + "type": "DNSName", + "default_from_param": [ + "name_from_ip" + ], + "no_convert": true }, { - "cli_name": "filter", - "doc": "Legal LDAP filter (e.g. ou=Engineering)", - "label": "Filter", - "name": "filter", + "doc": "IP network to create reverse zone name from", "required": false, - "type": "str" + "type": "str", + "name": "name_from_ip", + "label": "Reverse zone IP network" }, { - "cli_name": "subtree", - "doc": "Subtree to apply ACI to", - "label": "Subtree", - "name": "subtree", + "cli_name": "zone_active", + "name": "idnszoneactive", + "doc": "Is zone active?", "required": false, - "type": "str" + "label": "Active zone", + "type": "bool" }, { - "cli_name": "targetgroup", - "doc": "Group to apply ACI to", - "label": "Target group", - "name": "targetgroup", + "cli_name": "forwarder", + "name": "idnsforwarders", + "doc": "Per-zone forwarders. A custom port can be specified for each forwarder using a standard format \"IP_ADDRESS port PORT\"", "required": false, + "label": "Zone forwarders", + "multivalue": true, "type": "str" }, { - "alwaysask": true, - "cli_name": "self", - "default": ["False"], - "doc": "Apply ACI to your own entry (self)", - "label": "Target your own entry (self)", - "name": "selfaci", + "cli_name": "forward_policy", + "name": "idnsforwardpolicy", + "cli_metavar": "['only', 'first', 'none']", + "doc": "Per-zone conditional forwarding policy. Set to \"none\" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded.", "required": false, - "type": "bool" + "label": "Forward policy", + "type": "str" }, { - "cli_metavar": - "['permission', 'delegation', 'selfservice', 'none']", - "cli_name": "prefix", - "doc": - "Prefix used to distinguish ACI types (permission, delegation, selfservice, none)", - "label": "ACI prefix", - "name": "aciprefix", + "doc": "Time limit of search in seconds (0 is unlimited)", "required": false, - "type": "str" + "type": "int", + "name": "timelimit", + "label": "Time Limit" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"name\")", - "label": "Primary key only", - "name": "pkey_only", + "doc": "Maximum number of entries returned (0 is unlimited)", "required": false, - "type": "bool" + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"name\")", + "required": false, + "label": "Primary key only", "type": "bool" } ], - "topic_topic": "aci/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "\n Modify ACI.\n ", - "exclude": ["cli"], - "full_name": "aci_mod/1", - "name": "aci_mod", - "obj_class": "aci/1", + "full_name": "dnsforwardzone_find/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "multivalue": true, + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "Number of entries returned", + "type": "int", + "name": "count" + }, + { + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], + "obj_class": "dnsforwardzone/1", + "topic_topic": "dns/1" + }, + { + "name": "dnsforwardzone_mod", + "doc": "Modify DNS forward zone.", + "attr_name": "mod", + "version": "1", "params": [ { "cli_name": "name", - "label": "ACI name", - "name": "aciname", - "type": "str" + "name": "idnsname", + "alwaysask": true, + "doc": "Zone name (FQDN)", + "label": "Zone name", + "type": "DNSName", + "default_from_param": [ + "name_from_ip" + ], + "no_convert": true }, { - "cli_name": "permission", - "doc": "Permission ACI grants access to", - "label": "Permission", - "name": "permission", + "doc": "IP network to create reverse zone name from", "required": false, - "type": "str" + "type": "str", + "name": "name_from_ip", + "label": "Reverse zone IP network" }, { - "cli_name": "group", - "doc": "User group ACI grants access to", - "label": "User group", - "name": "group", + "cli_name": "forwarder", + "name": "idnsforwarders", + "doc": "Per-zone forwarders. A custom port can be specified for each forwarder using a standard format \"IP_ADDRESS port PORT\"", "required": false, + "label": "Zone forwarders", + "multivalue": true, "type": "str" }, { - "cli_name": "permissions", - "doc": "Permissions to grant(read, write, add, delete, all)", - "label": "Permissions", - "multivalue": true, - "name": "permissions", - "no_convert": true, + "cli_name": "forward_policy", + "name": "idnsforwardpolicy", + "cli_metavar": "['only', 'first', 'none']", + "doc": "Per-zone conditional forwarding policy. Set to \"none\" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded.", "required": false, + "label": "Forward policy", "type": "str" }, { - "cli_name": "attrs", - "doc": "Attributes", - "label": "Attributes to which the permission applies", - "multivalue": true, - "name": "attrs", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_metavar": - "['user', 'group', 'host', 'service', 'hostgroup', 'netgroup', 'dnsrecord']", - "cli_name": "type", - "doc": - "type of IPA object (user, group, host, hostgroup, service, netgroup)", - "label": "Type", - "name": "type", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "memberof", - "doc": "Member of a group", - "label": "Member of", - "name": "memberof", + "cli_name": "delattr", + "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "filter", - "doc": "Legal LDAP filter (e.g. ou=Engineering)", - "label": "Filter", - "name": "filter", - "required": false, - "type": "str" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { - "cli_name": "subtree", - "doc": "Subtree to apply ACI to", - "label": "Subtree", - "name": "subtree", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "targetgroup", - "doc": "Group to apply ACI to", - "label": "Target group", - "name": "targetgroup", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "dnsforwardzone_mod/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "cli_name": "self", - "default": ["False"], - "doc": "Apply ACI to your own entry (self)", - "label": "Target your own entry (self)", - "name": "selfaci", + "type": "dict", + "name": "result" + }, + { + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "DNSName", + "name": "value" + } + ], + "obj_class": "dnsforwardzone/1", + "topic_topic": "dns/1" + }, + { + "name": "dnsforwardzone_remove_permission", + "doc": "Remove a permission for per-forward zone access delegation.", + "attr_name": "remove_permission", + "version": "1", + "params": [ + { + "cli_name": "name", + "name": "idnsname", + "alwaysask": true, + "doc": "Zone name (FQDN)", + "label": "Zone name", + "type": "DNSName", + "default_from_param": [ + "name_from_ip" + ], + "no_convert": true + } + ], + "full_name": "dnsforwardzone_remove_permission/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "bool" + "type": "str", + "name": "summary" }, { - "cli_metavar": - "['permission', 'delegation', 'selfservice', 'none']", - "cli_name": "prefix", - "doc": - "Prefix used to distinguish ACI types (permission, delegation, selfservice, none)", - "label": "ACI prefix", - "name": "aciprefix", + "doc": "True means the operation was successful", + "type": "bool", + "name": "result" + }, + { + "doc": "Permission value", + "type": "str", + "name": "value" + } + ], + "obj_class": "dnsforwardzone/1", + "topic_topic": "dns/1" + }, + { + "name": "dnsforwardzone_show", + "doc": "Display information about a DNS forward zone.", + "attr_name": "show", + "version": "1", + "params": [ + { + "cli_name": "name", + "name": "idnsname", + "alwaysask": true, + "doc": "Zone name (FQDN)", + "label": "Zone name", + "type": "DNSName", + "default_from_param": [ + "name_from_ip" + ], + "no_convert": true + }, + { + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, - "type": "str" + "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "aci/1", - "version": "1" - }, - { - "attr_name": "rename", - "doc": "\n Rename an ACI.\n ", - "exclude": ["cli"], - "full_name": "aci_rename/1", - "name": "aci_rename", - "obj_class": "aci/1", + "full_name": "dnsforwardzone_show/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "DNSName", + "name": "value" } ], + "obj_class": "dnsforwardzone/1", + "topic_topic": "dns/1" + }, + { + "name": "dnsrecord_add", + "doc": "Add new DNS resource record.", + "attr_name": "add", + "version": "1", "params": [ { + "cli_name": "dnszone", + "name": "dnszoneidnsname", + "alwaysask": true, + "doc": "Zone name (FQDN)", + "label": "Zone name", + "type": "DNSName", + "default_from_param": [ + "name_from_ip" + ], + "no_convert": true + }, + { + "type": "DNSName", + "doc": "Record name", "cli_name": "name", - "label": "ACI name", - "name": "aciname", - "type": "str" + "name": "idnsname", + "label": "Record name" }, { - "cli_name": "permission", - "doc": "Permission ACI grants access to", - "label": "Permission", - "name": "permission", + "cli_name": "ttl", + "name": "dnsttl", + "doc": "Time to live", "required": false, - "type": "str" + "label": "Time to live", + "type": "int" }, { - "cli_name": "group", - "doc": "User group ACI grants access to", - "label": "User group", - "name": "group", + "cli_name": "class", + "name": "dnsclass", + "cli_metavar": "['IN', 'CS', 'CH', 'HS']", "required": false, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "cli_name": "permissions", - "doc": "Permissions to grant(read, write, add, delete, all)", - "label": "Permissions", - "multivalue": true, - "name": "permissions", - "no_convert": true, "required": false, + "cli_name": "a_rec", + "name": "arecord", + "doc": "Raw A records", + "option_group": "A Record", + "label": "A record", + "multivalue": true, "type": "str" }, { - "cli_name": "attrs", - "doc": "Attributes", - "label": "Attributes to which the permission applies", - "multivalue": true, - "name": "attrs", "required": false, + "cli_name": "a_ip_address", + "name": "a_part_ip_address", + "option_group": "A Record", + "label": "A IP Address", "type": "str" }, { - "cli_metavar": - "['user', 'group', 'host', 'service', 'hostgroup', 'netgroup', 'dnsrecord']", - "cli_name": "type", - "doc": - "type of IPA object (user, group, host, hostgroup, service, netgroup)", - "label": "Type", - "name": "type", "required": false, - "type": "str" + "cli_name": "a_create_reverse", + "name": "a_extra_create_reverse", + "default": [ + "False" + ], + "doc": "Create reverse record for this IP Address", + "option_group": "A Record", + "label": "A Create reverse", + "type": "bool" }, { - "cli_name": "memberof", - "doc": "Member of a group", - "label": "Member of", - "name": "memberof", "required": false, + "cli_name": "aaaa_rec", + "name": "aaaarecord", + "doc": "Raw AAAA records", + "option_group": "AAAA Record", + "label": "AAAA record", + "multivalue": true, "type": "str" }, { - "cli_name": "filter", - "doc": "Legal LDAP filter (e.g. ou=Engineering)", - "label": "Filter", - "name": "filter", "required": false, + "cli_name": "aaaa_ip_address", + "name": "aaaa_part_ip_address", + "option_group": "AAAA Record", + "label": "AAAA IP Address", "type": "str" }, { - "cli_name": "subtree", - "doc": "Subtree to apply ACI to", - "label": "Subtree", - "name": "subtree", "required": false, - "type": "str" + "cli_name": "aaaa_create_reverse", + "name": "aaaa_extra_create_reverse", + "default": [ + "False" + ], + "doc": "Create reverse record for this IP Address", + "option_group": "AAAA Record", + "label": "AAAA Create reverse", + "type": "bool" }, { - "cli_name": "targetgroup", - "doc": "Group to apply ACI to", - "label": "Target group", - "name": "targetgroup", "required": false, + "cli_name": "a6_rec", + "name": "a6record", + "doc": "Raw A6 records", + "option_group": "A6 Record", + "label": "A6 record", + "multivalue": true, "type": "str" }, { - "cli_name": "self", - "default": ["False"], - "doc": "Apply ACI to your own entry (self)", - "label": "Target your own entry (self)", - "name": "selfaci", "required": false, - "type": "bool" - }, - { - "cli_metavar": - "['permission', 'delegation', 'selfservice', 'none']", - "cli_name": "prefix", - "doc": - "Prefix used to distinguish ACI types (permission, delegation, selfservice, none)", - "label": "ACI prefix", - "name": "aciprefix", - "positional": false, + "cli_name": "a6_data", + "name": "a6_part_data", + "option_group": "A6 Record", + "label": "A6 Record data", "type": "str" }, { - "doc": "New ACI name", - "name": "newname", - "positional": false, + "required": false, + "cli_name": "afsdb_rec", + "name": "afsdbrecord", + "doc": "Raw AFSDB records", + "option_group": "AFSDB Record", + "label": "AFSDB record", + "multivalue": true, "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "required": false, + "cli_name": "afsdb_subtype", + "name": "afsdb_part_subtype", + "option_group": "AFSDB Record", + "label": "AFSDB Subtype", + "type": "int" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "aci/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "\n Display a single ACI given an ACI name.\n ", - "exclude": ["cli"], - "full_name": "aci_show/1", - "name": "aci_show", - "obj_class": "aci/1", - "output": [ + "required": false, + "cli_name": "afsdb_hostname", + "name": "afsdb_part_hostname", + "option_group": "AFSDB Record", + "label": "AFSDB Hostname", + "type": "DNSName" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", "required": false, + "cli_name": "apl_rec", + "name": "aplrecord", + "doc": "Raw APL records", + "option_group": "APL Record", + "label": "APL record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "name": "result", - "type": "dict" - }, - { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "name", - "label": "ACI name", - "name": "aciname", + "required": false, + "cli_name": "cert_rec", + "name": "certrecord", + "doc": "Raw CERT records", + "option_group": "CERT Record", + "label": "CERT record", + "multivalue": true, "type": "str" }, { - "cli_metavar": - "['permission', 'delegation', 'selfservice', 'none']", - "cli_name": "prefix", - "doc": - "Prefix used to distinguish ACI types (permission, delegation, selfservice, none)", - "label": "ACI prefix", - "name": "aciprefix", - "positional": false, - "type": "str" + "required": false, + "cli_name": "cert_type", + "name": "cert_part_type", + "option_group": "CERT Record", + "label": "CERT Certificate Type", + "type": "int" }, { - "label": "Location of the ACI", - "name": "location", "required": false, - "type": "DN" + "cli_name": "cert_key_tag", + "name": "cert_part_key_tag", + "option_group": "CERT Record", + "label": "CERT Key Tag", + "type": "int" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "required": false, + "cli_name": "cert_algorithm", + "name": "cert_part_algorithm", + "option_group": "CERT Record", + "label": "CERT Algorithm", + "type": "int" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "aci/1", - "version": "1" - }, - { - "doc": - "Determine whether ipa-adtrust-install has been run on this system", - "exclude": ["cli"], - "full_name": "adtrust_is_enabled/1", - "name": "adtrust_is_enabled", - "output": [ - { - "name": "result" - } - ], - "params": [], - "topic_topic": "trust/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "\n Add an automember rule.\n ", - "full_name": "automember_add/1", - "name": "automember_add", - "obj_class": "automember/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", "required": false, + "cli_name": "cert_certificate_or_crl", + "name": "cert_part_certificate_or_crl", + "option_group": "CERT Record", + "label": "CERT Certificate/CRL", "type": "str" }, { - "name": "result", - "type": "dict" - }, - { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", + "required": false, + "cli_name": "cname_rec", + "name": "cnamerecord", + "doc": "Raw CNAME records", + "option_group": "CNAME Record", + "label": "CNAME record", + "multivalue": true, "type": "str" - } - ], - "params": [ + }, { - "cli_name": "automember_rule", - "doc": "Automember Rule", - "label": "Automember Rule", - "name": "cn", - "no_convert": true, - "type": "str" + "required": false, + "cli_name": "cname_hostname", + "name": "cname_part_hostname", + "doc": "A hostname which this alias hostname points to", + "option_group": "CNAME Record", + "label": "CNAME Hostname", + "type": "DNSName" }, { - "cli_name": "desc", - "doc": "A description of this auto member rule", - "label": "Description", - "name": "description", "required": false, + "cli_name": "dhcid_rec", + "name": "dhcidrecord", + "doc": "Raw DHCID records", + "option_group": "DHCID Record", + "label": "DHCID record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", "required": false, + "cli_name": "dlv_rec", + "name": "dlvrecord", + "doc": "Raw DLV records", + "option_group": "DLV Record", + "label": "DLV record", + "multivalue": true, "type": "str" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", "required": false, - "type": "str" + "cli_name": "dlv_key_tag", + "name": "dlv_part_key_tag", + "option_group": "DLV Record", + "label": "DLV Key Tag", + "type": "int" }, { - "cli_metavar": "['group', 'hostgroup']", - "doc": "Grouping to which the rule applies", - "label": "Grouping Type", - "name": "type", - "positional": false, - "type": "str" + "required": false, + "cli_name": "dlv_algorithm", + "name": "dlv_part_algorithm", + "option_group": "DLV Record", + "label": "DLV Algorithm", + "type": "int" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "required": false, + "cli_name": "dlv_digest_type", + "name": "dlv_part_digest_type", + "option_group": "DLV Record", + "label": "DLV Digest Type", + "type": "int" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "automember/1", - "version": "1" - }, - { - "attr_name": "add_condition", - "doc": "\n Add conditions to an automember rule.\n ", - "full_name": "automember_add_condition/1", - "name": "automember_add_condition", - "obj_class": "automember/1", - "output": [ + "required": false, + "cli_name": "dlv_digest", + "name": "dlv_part_digest", + "option_group": "DLV Record", + "label": "DLV Digest", + "type": "str" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", "required": false, + "cli_name": "dname_rec", + "name": "dnamerecord", + "doc": "Raw DNAME records", + "option_group": "DNAME Record", + "label": "DNAME record", + "multivalue": true, "type": "str" }, { - "name": "result", - "type": "dict" + "required": false, + "cli_name": "dname_target", + "name": "dname_part_target", + "option_group": "DNAME Record", + "label": "DNAME Target", + "type": "DNSName" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", + "required": false, + "cli_name": "ds_rec", + "name": "dsrecord", + "doc": "Raw DS records", + "option_group": "DS Record", + "label": "DS record", + "multivalue": true, "type": "str" }, { - "doc": "Conditions that could not be added", - "name": "failed", - "type": "dict" + "required": false, + "cli_name": "ds_key_tag", + "name": "ds_part_key_tag", + "option_group": "DS Record", + "label": "DS Key Tag", + "type": "int" }, { - "doc": "Number of conditions added", - "name": "completed", + "required": false, + "cli_name": "ds_algorithm", + "name": "ds_part_algorithm", + "option_group": "DS Record", + "label": "DS Algorithm", "type": "int" - } - ], - "params": [ + }, { - "cli_name": "automember_rule", - "doc": "Automember Rule", - "label": "Automember Rule", - "name": "cn", - "no_convert": true, - "type": "str" + "required": false, + "cli_name": "ds_digest_type", + "name": "ds_part_digest_type", + "option_group": "DS Record", + "label": "DS Digest Type", + "type": "int" }, { - "cli_name": "desc", - "doc": "A description of this auto member rule", - "label": "Description", - "name": "description", "required": false, + "cli_name": "ds_digest", + "name": "ds_part_digest", + "option_group": "DS Record", + "label": "DS Digest", "type": "str" }, { - "alwaysask": true, - "cli_name": "inclusive_regex", - "doc": "Inclusive Regex", - "label": "Inclusive Regex", - "multivalue": true, - "name": "automemberinclusiveregex", "required": false, + "cli_name": "hip_rec", + "name": "hiprecord", + "doc": "Raw HIP records", + "option_group": "HIP Record", + "label": "HIP record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "alwaysask": true, - "cli_name": "exclusive_regex", - "doc": "Exclusive Regex", - "label": "Exclusive Regex", - "multivalue": true, - "name": "automemberexclusiveregex", "required": false, + "cli_name": "ipseckey_rec", + "name": "ipseckeyrecord", + "doc": "Raw IPSECKEY records", + "option_group": "IPSECKEY Record", + "label": "IPSECKEY record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "doc": - "Attribute to filter via regex. For example fqdn for a host, or manager for a user", - "label": "Attribute Key", - "name": "key", - "positional": false, + "required": false, + "cli_name": "key_rec", + "name": "keyrecord", + "doc": "Raw KEY records", + "option_group": "KEY Record", + "label": "KEY record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "cli_metavar": "['group', 'hostgroup']", - "doc": "Grouping to which the rule applies", - "label": "Grouping Type", - "name": "type", - "positional": false, + "required": false, + "cli_name": "kx_rec", + "name": "kxrecord", + "doc": "Raw KX records", + "option_group": "KX Record", + "label": "KX record", + "multivalue": true, "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "option_group": "KX Record", + "cli_name": "kx_preference", + "name": "kx_part_preference", + "doc": "Preference given to this exchanger. Lower values are more preferred", + "required": false, + "label": "KX Preference", + "type": "int" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "automember/1", - "version": "1" - }, - { - "attr_name": "remove", - "doc": - "\n Remove default (fallback) group for all unmatched entries.\n ", - "full_name": "automember_default_group_remove/1", - "name": "automember_default_group_remove", - "obj_class": "automember_default_group/1", - "output": [ + "required": false, + "cli_name": "kx_exchanger", + "name": "kx_part_exchanger", + "doc": "A host willing to act as a key exchanger", + "option_group": "KX Record", + "label": "KX Exchanger", + "type": "DNSName" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", "required": false, + "cli_name": "loc_rec", + "name": "locrecord", + "doc": "Raw LOC records", + "option_group": "LOC Record", + "label": "LOC record", + "multivalue": true, "type": "str" }, { - "name": "result", - "type": "dict" + "required": false, + "cli_name": "loc_lat_deg", + "name": "loc_part_lat_deg", + "option_group": "LOC Record", + "label": "LOC Degrees Latitude", + "type": "int" }, { - "name": "value", - "type": "str" - } - ], - "params": [ + "required": false, + "cli_name": "loc_lat_min", + "name": "loc_part_lat_min", + "option_group": "LOC Record", + "label": "LOC Minutes Latitude", + "type": "int" + }, { - "cli_name": "desc", - "doc": "A description of this auto member rule", - "label": "Description", - "name": "description", "required": false, - "type": "str" + "cli_name": "loc_lat_sec", + "name": "loc_part_lat_sec", + "option_group": "LOC Record", + "label": "LOC Seconds Latitude", + "type": "Decimal", + "no_convert": true }, { - "cli_metavar": "['group', 'hostgroup']", - "doc": "Grouping to which the rule applies", - "label": "Grouping Type", - "name": "type", - "positional": false, + "required": false, + "cli_name": "loc_lat_dir", + "name": "loc_part_lat_dir", + "cli_metavar": "['N', 'S']", + "option_group": "LOC Record", + "label": "LOC Direction Latitude", "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "required": false, + "cli_name": "loc_lon_deg", + "name": "loc_part_lon_deg", + "option_group": "LOC Record", + "label": "LOC Degrees Longitude", + "type": "int" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "automember/1", - "version": "1" - }, - { - "attr_name": "set", - "doc": - "\n Set default (fallback) group for all unmatched entries.\n ", - "full_name": "automember_default_group_set/1", - "name": "automember_default_group_set", - "obj_class": "automember_default_group/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "cli_name": "loc_lon_min", + "name": "loc_part_lon_min", + "option_group": "LOC Record", + "label": "LOC Minutes Longitude", + "type": "int" }, { - "name": "result", - "type": "dict" + "required": false, + "cli_name": "loc_lon_sec", + "name": "loc_part_lon_sec", + "option_group": "LOC Record", + "label": "LOC Seconds Longitude", + "type": "Decimal", + "no_convert": true }, { - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "desc", - "doc": "A description of this auto member rule", - "label": "Description", - "name": "description", "required": false, + "cli_name": "loc_lon_dir", + "name": "loc_part_lon_dir", + "cli_metavar": "['E', 'W']", + "option_group": "LOC Record", + "label": "LOC Direction Longitude", "type": "str" }, { - "cli_name": "default_group", - "doc": "Default (fallback) group for entries to land", - "label": "Default (fallback) Group", - "name": "automemberdefaultgroup", - "positional": false, - "type": "str" + "required": false, + "cli_name": "loc_altitude", + "name": "loc_part_altitude", + "option_group": "LOC Record", + "label": "LOC Altitude", + "type": "Decimal", + "no_convert": true }, { - "cli_metavar": "['group', 'hostgroup']", - "doc": "Grouping to which the rule applies", - "label": "Grouping Type", - "name": "type", - "positional": false, - "type": "str" + "required": false, + "cli_name": "loc_size", + "name": "loc_part_size", + "option_group": "LOC Record", + "label": "LOC Size", + "type": "Decimal", + "no_convert": true }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "required": false, + "cli_name": "loc_h_precision", + "name": "loc_part_h_precision", + "option_group": "LOC Record", + "label": "LOC Horizontal Precision", + "type": "Decimal", + "no_convert": true }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "automember/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": - "\n Display information about the default (fallback) automember groups.\n ", - "full_name": "automember_default_group_show/1", - "name": "automember_default_group_show", - "obj_class": "automember_default_group/1", - "output": [ + "required": false, + "cli_name": "loc_v_precision", + "name": "loc_part_v_precision", + "option_group": "LOC Record", + "label": "LOC Vertical Precision", + "type": "Decimal", + "no_convert": true + }, { - "doc": "User-friendly description of action performed", - "name": "summary", "required": false, + "cli_name": "mx_rec", + "name": "mxrecord", + "doc": "Raw MX records", + "option_group": "MX Record", + "label": "MX record", + "multivalue": true, "type": "str" }, { - "name": "result", - "type": "dict" + "option_group": "MX Record", + "cli_name": "mx_preference", + "name": "mx_part_preference", + "doc": "Preference given to this exchanger. Lower values are more preferred", + "required": false, + "label": "MX Preference", + "type": "int" }, { - "name": "value", - "type": "str" - } - ], - "params": [ + "required": false, + "cli_name": "mx_exchanger", + "name": "mx_part_exchanger", + "doc": "A host willing to act as a mail exchanger", + "option_group": "MX Record", + "label": "MX Exchanger", + "type": "DNSName" + }, { - "cli_metavar": "['group', 'hostgroup']", - "doc": "Grouping to which the rule applies", - "label": "Grouping Type", - "name": "type", - "positional": false, + "required": false, + "cli_name": "naptr_rec", + "name": "naptrrecord", + "doc": "Raw NAPTR records", + "option_group": "NAPTR Record", + "label": "NAPTR record", + "multivalue": true, "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "required": false, + "cli_name": "naptr_order", + "name": "naptr_part_order", + "option_group": "NAPTR Record", + "label": "NAPTR Order", + "type": "int" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "automember/1", - "version": "1" - }, - { - "attr_name": "del", - "doc": "\n Delete an automember rule.\n ", - "full_name": "automember_del/1", - "name": "automember_del", - "obj_class": "automember/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "cli_name": "naptr_preference", + "name": "naptr_part_preference", + "option_group": "NAPTR Record", + "label": "NAPTR Preference", + "type": "int" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "option_group": "NAPTR Record", + "cli_name": "naptr_flags", + "name": "naptr_part_flags", + "required": false, + "label": "NAPTR Flags", + "type": "str", + "no_convert": true }, { - "multivalue": true, - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "automember_rule", - "doc": "Automember Rule", - "label": "Automember Rule", - "multivalue": true, - "name": "cn", - "no_convert": true, + "required": false, + "cli_name": "naptr_service", + "name": "naptr_part_service", + "option_group": "NAPTR Record", + "label": "NAPTR Service", "type": "str" }, { - "cli_metavar": "['group', 'hostgroup']", - "doc": "Grouping to which the rule applies", - "label": "Grouping Type", - "name": "type", - "positional": false, + "required": false, + "cli_name": "naptr_regexp", + "name": "naptr_part_regexp", + "option_group": "NAPTR Record", + "label": "NAPTR Regular Expression", "type": "str" - } - ], - "topic_topic": "automember/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "\n Search for automember rules.\n ", - "full_name": "automember_find/1", - "name": "automember_find", - "obj_class": "automember/1", - "output": [ + }, { - "doc": "User-friendly description of action performed", - "name": "summary", "required": false, + "cli_name": "naptr_replacement", + "name": "naptr_part_replacement", + "option_group": "NAPTR Record", + "label": "NAPTR Replacement", "type": "str" }, { + "required": false, + "cli_name": "ns_rec", + "name": "nsrecord", + "doc": "Raw NS records", + "option_group": "NS Record", + "label": "NS record", "multivalue": true, - "name": "result", - "type": "dict" - }, - { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "type": "str" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" - } - ], - "params": [ - { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, "required": false, - "type": "str" + "cli_name": "ns_hostname", + "name": "ns_part_hostname", + "option_group": "NS Record", + "label": "NS Hostname", + "type": "DNSName" }, { - "cli_name": "desc", - "doc": "A description of this auto member rule", - "label": "Description", - "name": "description", "required": false, + "cli_name": "nsec_rec", + "name": "nsecrecord", + "doc": "Raw NSEC records", + "option_group": "NSEC Record", + "label": "NSEC record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "cli_metavar": "['group', 'hostgroup']", - "doc": "Grouping to which the rule applies", - "label": "Grouping Type", - "name": "type", - "positional": false, + "required": false, + "cli_name": "ptr_rec", + "name": "ptrrecord", + "doc": "Raw PTR records", + "option_group": "PTR Record", + "label": "PTR record", + "multivalue": true, "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" - }, - { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - }, - { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"automember-rule\")", - "label": "Primary key only", - "name": "pkey_only", "required": false, - "type": "bool" - } - ], - "topic_topic": "automember/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "\n Modify an automember rule.\n ", - "full_name": "automember_mod/1", - "name": "automember_mod", - "obj_class": "automember/1", - "output": [ + "cli_name": "ptr_hostname", + "name": "ptr_part_hostname", + "doc": "The hostname this reverse record points to", + "option_group": "PTR Record", + "label": "PTR Hostname", + "type": "DNSName" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", "required": false, + "cli_name": "rrsig_rec", + "name": "rrsigrecord", + "doc": "Raw RRSIG records", + "option_group": "RRSIG Record", + "label": "RRSIG record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "name": "result", - "type": "dict" - }, - { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "automember_rule", - "doc": "Automember Rule", - "label": "Automember Rule", - "name": "cn", - "no_convert": true, + "required": false, + "cli_name": "rp_rec", + "name": "rprecord", + "doc": "Raw RP records", + "option_group": "RP Record", + "label": "RP record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "cli_name": "desc", - "doc": "A description of this auto member rule", - "label": "Description", - "name": "description", "required": false, + "cli_name": "sig_rec", + "name": "sigrecord", + "doc": "Raw SIG records", + "option_group": "SIG Record", + "label": "SIG record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", "required": false, + "cli_name": "spf_rec", + "name": "spfrecord", + "doc": "Raw SPF records", + "option_group": "SPF Record", + "label": "SPF record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", "required": false, + "cli_name": "srv_rec", + "name": "srvrecord", + "doc": "Raw SRV records", + "option_group": "SRV Record", + "label": "SRV record", + "multivalue": true, "type": "str" }, { - "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, - "name": "delattr", + "option_group": "SRV Record", + "cli_name": "srv_priority", + "name": "srv_part_priority", + "doc": "Lower number means higher priority. Clients will attempt to contact the server with the lowest-numbered priority they can reach.", "required": false, - "type": "str" + "label": "SRV Priority (order)", + "type": "int" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "option_group": "SRV Record", + "cli_name": "srv_weight", + "name": "srv_part_weight", + "doc": "Relative weight for entries with the same priority.", + "required": false, + "label": "SRV Weight", + "type": "int" }, { - "cli_metavar": "['group', 'hostgroup']", - "doc": "Grouping to which the rule applies", - "label": "Grouping Type", - "name": "type", - "positional": false, - "type": "str" + "required": false, + "cli_name": "srv_port", + "name": "srv_part_port", + "option_group": "SRV Record", + "label": "SRV Port", + "type": "int" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "required": false, + "cli_name": "srv_target", + "name": "srv_part_target", + "doc": "The domain name of the target host or '.' if the service is decidedly not available at this domain", + "option_group": "SRV Record", + "label": "SRV Target", + "type": "DNSName" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "automember/1", - "version": "1" - }, - { - "attr_name": "rebuild", - "doc": "Rebuild auto membership.", - "full_name": "automember_rebuild/1", - "name": "automember_rebuild", - "obj_class": "automember_task/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", "required": false, + "cli_name": "sshfp_rec", + "name": "sshfprecord", + "doc": "Raw SSHFP records", + "option_group": "SSHFP Record", + "label": "SSHFP record", + "multivalue": true, "type": "str" }, { - "name": "result", - "type": "dict" + "required": false, + "cli_name": "sshfp_algorithm", + "name": "sshfp_part_algorithm", + "option_group": "SSHFP Record", + "label": "SSHFP Algorithm", + "type": "int" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "NoneType" - } - ], - "params": [ - { - "cli_metavar": "['group', 'hostgroup']", - "doc": "Grouping to which the rule applies", - "label": "Rebuild membership for all members of a grouping", - "name": "type", "required": false, - "type": "str" + "cli_name": "sshfp_fp_type", + "name": "sshfp_part_fp_type", + "option_group": "SSHFP Record", + "label": "SSHFP Fingerprint Type", + "type": "int" }, { - "doc": "Rebuild membership for specified users", - "label": "Users", - "multivalue": true, - "name": "users", "required": false, + "cli_name": "sshfp_fingerprint", + "name": "sshfp_part_fingerprint", + "option_group": "SSHFP Record", + "label": "SSHFP Fingerprint", "type": "str" }, { - "doc": "Rebuild membership for specified hosts", - "label": "Hosts", - "multivalue": true, - "name": "hosts", "required": false, + "cli_name": "tlsa_rec", + "name": "tlsarecord", + "doc": "Raw TLSA records", + "option_group": "TLSA Record", + "label": "TLSA record", + "multivalue": true, "type": "str" }, { - "default": ["False"], - "doc": "Don't wait for rebuilding membership", - "label": "No wait", - "name": "no_wait", "required": false, - "type": "bool" + "cli_name": "tlsa_cert_usage", + "name": "tlsa_part_cert_usage", + "option_group": "TLSA Record", + "label": "TLSA Certificate Usage", + "type": "int" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "required": false, + "cli_name": "tlsa_selector", + "name": "tlsa_part_selector", + "option_group": "TLSA Record", + "label": "TLSA Selector", + "type": "int" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "automember/1", - "version": "1" - }, - { - "attr_name": "remove_condition", - "doc": "\n Remove conditions from an automember rule.\n ", - "full_name": "automember_remove_condition/1", - "name": "automember_remove_condition", - "obj_class": "automember/1", - "output": [ + "required": false, + "cli_name": "tlsa_matching_type", + "name": "tlsa_part_matching_type", + "option_group": "TLSA Record", + "label": "TLSA Matching Type", + "type": "int" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", "required": false, + "cli_name": "tlsa_cert_association_data", + "name": "tlsa_part_cert_association_data", + "option_group": "TLSA Record", + "label": "TLSA Certificate Association Data", "type": "str" }, { - "name": "result", - "type": "dict" + "required": false, + "cli_name": "txt_rec", + "name": "txtrecord", + "doc": "Raw TXT records", + "option_group": "TXT Record", + "label": "TXT record", + "multivalue": true, + "type": "str" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", + "required": false, + "cli_name": "txt_data", + "name": "txt_part_data", + "option_group": "TXT Record", + "label": "TXT Text Data", "type": "str" }, { - "doc": "Conditions that could not be removed", - "name": "failed", - "type": "dict" + "required": false, + "cli_name": "uri_rec", + "name": "urirecord", + "doc": "Raw URI records", + "option_group": "URI Record", + "label": "URI record", + "multivalue": true, + "type": "str" }, { - "doc": "Number of conditions removed", - "name": "completed", + "option_group": "URI Record", + "cli_name": "uri_priority", + "name": "uri_part_priority", + "doc": "Lower number means higher priority. Clients will attempt to contact the URI with the lowest-numbered priority they can reach.", + "required": false, + "label": "URI Priority (order)", "type": "int" - } - ], - "params": [ + }, { - "cli_name": "automember_rule", - "doc": "Automember Rule", - "label": "Automember Rule", - "name": "cn", - "no_convert": true, - "type": "str" + "option_group": "URI Record", + "cli_name": "uri_weight", + "name": "uri_part_weight", + "doc": "Relative weight for entries with the same priority.", + "required": false, + "label": "URI Weight", + "type": "int" }, { - "cli_name": "desc", - "doc": "A description of this auto member rule", - "label": "Description", - "name": "description", + "option_group": "URI Record", + "cli_name": "uri_target", + "name": "uri_part_target", + "doc": "Target Uniform Resource Identifier according to RFC 3986", "required": false, - "type": "str" + "label": "URI Target Uniform Resource Identifier", + "type": "str", + "no_convert": true }, { - "alwaysask": true, - "cli_name": "inclusive_regex", - "doc": "Inclusive Regex", - "label": "Inclusive Regex", - "multivalue": true, - "name": "automemberinclusiveregex", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "alwaysask": true, - "cli_name": "exclusive_regex", - "doc": "Exclusive Regex", - "label": "Exclusive Regex", - "multivalue": true, - "name": "automemberexclusiveregex", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "doc": - "Attribute to filter via regex. For example fqdn for a host, or manager for a user", - "label": "Attribute Key", - "name": "key", + "name": "force", + "default": [ + "False" + ], + "doc": "force NS record creation even if its hostname is not in DNS", + "label": "Force", "positional": false, - "type": "str" + "exclude": [ + "cli", + "webui" + ], + "type": "bool" }, { - "cli_metavar": "['group', 'hostgroup']", - "doc": "Grouping to which the rule applies", - "label": "Grouping Type", - "name": "type", + "name": "structured", + "default": [ + "False" + ], + "doc": "Parse all raw DNS records and return them in a structured way", + "label": "Structured", "positional": false, - "type": "str" + "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "automember/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "\n Display information about an automember rule.\n ", - "full_name": "automember_show/1", - "name": "automember_show", - "obj_class": "automember/1", + "full_name": "dnsrecord_add/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "DNSName", + "name": "value" } ], + "obj_class": "dnsrecord/1", + "topic_topic": "dns/1" + }, + { + "name": "dnsrecord_del", + "doc": "Delete DNS resource record.", + "attr_name": "del", + "version": "1", "params": [ { - "cli_name": "automember_rule", - "doc": "Automember Rule", - "label": "Automember Rule", - "name": "cn", - "no_convert": true, - "type": "str" + "cli_name": "dnszone", + "name": "dnszoneidnsname", + "alwaysask": true, + "doc": "Zone name (FQDN)", + "label": "Zone name", + "type": "DNSName", + "default_from_param": [ + "name_from_ip" + ], + "no_convert": true }, { - "cli_metavar": "['group', 'hostgroup']", - "doc": "Grouping to which the rule applies", - "label": "Grouping Type", - "name": "type", - "positional": false, - "type": "str" + "doc": "Record name", + "label": "Record name", + "cli_name": "name", + "name": "idnsname", + "type": "DNSName" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "cli_name": "ttl", + "name": "dnsttl", + "doc": "Time to live", + "required": false, + "label": "Time to live", + "type": "int" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "automember/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Create a new automount key.", - "full_name": "automountkey_add/1", - "name": "automountkey_add", - "obj_class": "automountkey/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", + "cli_name": "class", + "name": "dnsclass", + "cli_metavar": "['IN', 'CS', 'CH', 'HS']", "required": false, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "name": "result", - "type": "dict" + "cli_name": "a_rec", + "name": "arecord", + "doc": "Raw A records", + "required": false, + "label": "A record", + "multivalue": true, + "type": "str" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "automountlocation", - "doc": "Automount location name.", - "label": "Location", - "name": "automountlocationcn", + "cli_name": "aaaa_rec", + "name": "aaaarecord", + "doc": "Raw AAAA records", + "required": false, + "label": "AAAA record", + "multivalue": true, "type": "str" }, { - "cli_name": "automountmap", - "doc": "Automount map name.", - "label": "Map", - "name": "automountmapautomountmapname", + "cli_name": "a6_rec", + "name": "a6record", + "doc": "Raw A6 records", + "required": false, + "label": "A6 record", + "multivalue": true, "type": "str" }, { - "cli_name": "key", - "doc": "Automount key name.", - "label": "Key", - "name": "automountkey", - "positional": false, + "cli_name": "afsdb_rec", + "name": "afsdbrecord", + "doc": "Raw AFSDB records", + "required": false, + "label": "AFSDB record", + "multivalue": true, "type": "str" }, { - "cli_name": "info", - "label": "Mount information", - "name": "automountinformation", - "positional": false, + "cli_name": "apl_rec", + "name": "aplrecord", + "doc": "Raw APL records", + "required": false, + "label": "APL record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", + "cli_name": "cert_rec", + "name": "certrecord", + "doc": "Raw CERT records", "required": false, + "label": "CERT record", + "multivalue": true, "type": "str" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", + "cli_name": "cname_rec", + "name": "cnamerecord", + "doc": "Raw CNAME records", "required": false, + "label": "CNAME record", + "multivalue": true, "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" - }, - { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "automount/1", - "version": "1" - }, - { - "attr_name": "del", - "doc": "Delete an automount key.", - "full_name": "automountkey_del/1", - "name": "automountkey_del", - "obj_class": "automountkey/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", + "cli_name": "dhcid_rec", + "name": "dhcidrecord", + "doc": "Raw DHCID records", "required": false, + "label": "DHCID record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" - }, - { + "cli_name": "dlv_rec", + "name": "dlvrecord", + "doc": "Raw DLV records", + "required": false, + "label": "DLV record", "multivalue": true, - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "automountlocation", - "doc": "Automount location name.", - "label": "Location", - "name": "automountlocationcn", "type": "str" }, { - "cli_name": "automountmap", - "doc": "Automount map name.", - "label": "Map", - "name": "automountmapautomountmapname", + "cli_name": "dname_rec", + "name": "dnamerecord", + "doc": "Raw DNAME records", + "required": false, + "label": "DNAME record", + "multivalue": true, "type": "str" }, { - "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", - "exclude": ["webui", "cli"], - "name": "continue", - "positional": false, - "type": "bool" - }, - { - "cli_name": "key", - "doc": "Automount key name.", - "label": "Key", - "name": "automountkey", - "positional": false, + "cli_name": "ds_rec", + "name": "dsrecord", + "doc": "Raw DS records", + "required": false, + "label": "DS record", + "multivalue": true, "type": "str" }, { - "cli_name": "info", - "label": "Mount information", - "name": "automountinformation", + "cli_name": "hip_rec", + "name": "hiprecord", + "doc": "Raw HIP records", "required": false, + "label": "HIP record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" - } - ], - "topic_topic": "automount/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for an automount key.", - "full_name": "automountkey_find/1", - "name": "automountkey_find", - "obj_class": "automountkey/1", - "output": [ + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "cli_name": "ipseckey_rec", + "name": "ipseckeyrecord", + "doc": "Raw IPSECKEY records", "required": false, + "label": "IPSECKEY record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { + "cli_name": "key_rec", + "name": "keyrecord", + "doc": "Raw KEY records", + "required": false, + "label": "KEY record", "multivalue": true, - "name": "result", - "type": "dict" - }, - { - "doc": "Number of entries returned", - "name": "count", - "type": "int" - }, - { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" - } - ], - "params": [ - { - "cli_name": "automountlocation", - "doc": "Automount location name.", - "label": "Location", - "name": "automountlocationcn", + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "cli_name": "automountmap", - "doc": "Automount map name.", - "label": "Map", - "name": "automountmapautomountmapname", + "cli_name": "kx_rec", + "name": "kxrecord", + "doc": "Raw KX records", + "required": false, + "label": "KX record", + "multivalue": true, "type": "str" }, { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, + "cli_name": "loc_rec", + "name": "locrecord", + "doc": "Raw LOC records", "required": false, + "label": "LOC record", + "multivalue": true, "type": "str" }, { - "cli_name": "key", - "doc": "Automount key name.", - "label": "Key", - "name": "automountkey", + "cli_name": "mx_rec", + "name": "mxrecord", + "doc": "Raw MX records", "required": false, + "label": "MX record", + "multivalue": true, "type": "str" }, { - "cli_name": "info", - "label": "Mount information", - "name": "automountinformation", + "cli_name": "naptr_rec", + "name": "naptrrecord", + "doc": "Raw NAPTR records", "required": false, + "label": "NAPTR record", + "multivalue": true, "type": "str" }, { - "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", + "cli_name": "ns_rec", + "name": "nsrecord", + "doc": "Raw NS records", "required": false, - "type": "int" + "label": "NS record", + "multivalue": true, + "type": "str" }, { - "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", + "cli_name": "nsec_rec", + "name": "nsecrecord", + "doc": "Raw NSEC records", "required": false, - "type": "int" - }, - { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "label": "NSEC record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], + "type": "str" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "automount/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify an automount key.", - "full_name": "automountkey_mod/1", - "name": "automountkey_mod", - "obj_class": "automountkey/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", + "cli_name": "ptr_rec", + "name": "ptrrecord", + "doc": "Raw PTR records", "required": false, + "label": "PTR record", + "multivalue": true, "type": "str" }, { - "name": "result", - "type": "dict" - }, - { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "automountlocation", - "doc": "Automount location name.", - "label": "Location", - "name": "automountlocationcn", + "cli_name": "rrsig_rec", + "name": "rrsigrecord", + "doc": "Raw RRSIG records", + "required": false, + "label": "RRSIG record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "cli_name": "automountmap", - "doc": "Automount map name.", - "label": "Map", - "name": "automountmapautomountmapname", + "cli_name": "rp_rec", + "name": "rprecord", + "doc": "Raw RP records", + "required": false, + "label": "RP record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "alwaysask": false, - "cli_name": "key", - "doc": "Automount key name.", - "label": "Key", - "name": "automountkey", - "positional": false, + "cli_name": "sig_rec", + "name": "sigrecord", + "doc": "Raw SIG records", + "required": false, + "label": "SIG record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "cli_name": "info", - "label": "Mount information", - "name": "automountinformation", + "cli_name": "spf_rec", + "name": "spfrecord", + "doc": "Raw SPF records", "required": false, + "label": "SPF record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", + "cli_name": "srv_rec", + "name": "srvrecord", + "doc": "Raw SRV records", "required": false, + "label": "SRV record", + "multivalue": true, "type": "str" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", + "cli_name": "sshfp_rec", + "name": "sshfprecord", + "doc": "Raw SSHFP records", "required": false, + "label": "SSHFP record", + "multivalue": true, "type": "str" }, { - "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, - "name": "delattr", + "cli_name": "tlsa_rec", + "name": "tlsarecord", + "doc": "Raw TLSA records", "required": false, + "label": "TLSA record", + "multivalue": true, "type": "str" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "cli_name": "txt_rec", + "name": "txtrecord", + "doc": "Raw TXT records", + "required": false, + "label": "TXT record", + "multivalue": true, + "type": "str" }, { - "cli_name": "newinfo", - "label": "New mount information", - "name": "newautomountinformation", + "cli_name": "uri_rec", + "name": "urirecord", + "doc": "Raw URI records", "required": false, + "label": "URI record", + "multivalue": true, "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", "positional": false, - "type": "bool" + "default": [ + "False" + ], + "type": "bool", + "name": "del_all", + "label": "Delete all associated records" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", + "name": "structured", + "default": [ + "False" + ], + "doc": "Parse all raw DNS records and return them in a structured way", + "label": "Structured", "positional": false, "type": "bool" }, { - "cli_name": "rename", - "doc": "Rename the automount key object", - "exclude": ["webui"], - "label": "Rename", - "name": "rename", - "required": false, - "type": "str" + "positional": false, + "default": [ + "False" + ], + "type": "bool", + "name": "raw", + "exclude": [ + "cli", + "webui" + ] } ], - "topic_topic": "automount/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display an automount key.", - "full_name": "automountkey_show/1", - "name": "automountkey_show", - "obj_class": "automountkey/1", + "full_name": "dnsrecord_del/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "type": "DNSName", + "multivalue": true, + "name": "value" } ], + "obj_class": "dnsrecord/1", + "topic_topic": "dns/1" + }, + { + "exclude": [ + "cli" + ], + "name": "dnsrecord_delentry", + "doc": "\n Delete DNS record entry.\n ", + "attr_name": "delentry", + "version": "1", "params": [ { - "cli_name": "automountlocation", - "doc": "Automount location name.", - "label": "Location", - "name": "automountlocationcn", - "type": "str" + "cli_name": "dnszone", + "name": "dnszoneidnsname", + "alwaysask": true, + "doc": "Zone name (FQDN)", + "label": "Zone name", + "type": "DNSName", + "default_from_param": [ + "name_from_ip" + ], + "no_convert": true }, { - "cli_name": "automountmap", - "doc": "Automount map name.", - "label": "Map", - "name": "automountmapautomountmapname", - "type": "str" + "cli_name": "name", + "name": "idnsname", + "doc": "Record name", + "label": "Record name", + "multivalue": true, + "type": "DNSName" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", "positional": false, "type": "bool" - }, - { - "cli_name": "key", - "doc": "Automount key name.", - "label": "Key", - "name": "automountkey", - "positional": false, - "type": "str" - }, + } + ], + "full_name": "dnsrecord_delentry/1", + "output": [ { - "cli_name": "info", - "label": "Mount information", - "name": "automountinformation", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "type": "DNSName", + "multivalue": true, + "name": "value" } ], - "topic_topic": "automount/1", - "version": "1" + "obj_class": "dnsrecord/1", + "topic_topic": "dns/1" }, { - "attr_name": "add", - "doc": "Create a new automount location.", - "full_name": "automountlocation_add/1", - "name": "automountlocation_add", - "obj_class": "automountlocation/1", - "output": [ + "name": "dnsrecord_find", + "doc": "Search for DNS resources.", + "attr_name": "find", + "version": "1", + "params": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "cli_name": "dnszone", + "name": "dnszoneidnsname", + "alwaysask": true, + "doc": "Zone name (FQDN)", + "label": "Zone name", + "type": "DNSName", + "default_from_param": [ + "name_from_ip" + ], + "no_convert": true }, { - "name": "result", - "type": "dict" + "positional": true, + "doc": "A string searched in all relevant object attributes", + "required": false, + "type": "str", + "name": "criteria" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ + "cli_name": "name", + "name": "idnsname", + "doc": "Record name", + "required": false, + "label": "Record name", + "type": "DNSName" + }, { - "cli_name": "location", - "doc": "Automount location name.", - "label": "Location", - "name": "cn", - "type": "str" + "cli_name": "ttl", + "name": "dnsttl", + "doc": "Time to live", + "required": false, + "label": "Time to live", + "type": "int" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", + "cli_name": "class", + "name": "dnsclass", + "cli_metavar": "['IN', 'CS', 'CH', 'HS']", "required": false, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", + "cli_name": "a_rec", + "name": "arecord", + "doc": "Raw A records", "required": false, + "label": "A record", + "multivalue": true, "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "cli_name": "aaaa_rec", + "name": "aaaarecord", + "doc": "Raw AAAA records", + "required": false, + "label": "AAAA record", + "multivalue": true, + "type": "str" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "automount/1", - "version": "1" - }, - { - "attr_name": "del", - "doc": "Delete an automount location.", - "full_name": "automountlocation_del/1", - "name": "automountlocation_del", - "obj_class": "automountlocation/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", + "cli_name": "a6_rec", + "name": "a6record", + "doc": "Raw A6 records", "required": false, + "label": "A6 record", + "multivalue": true, "type": "str" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "cli_name": "afsdb_rec", + "name": "afsdbrecord", + "doc": "Raw AFSDB records", + "required": false, + "label": "AFSDB record", + "multivalue": true, + "type": "str" }, { + "cli_name": "apl_rec", + "name": "aplrecord", + "doc": "Raw APL records", + "required": false, + "label": "APL record", "multivalue": true, - "name": "value", + "exclude": [ + "cli", + "webui" + ], "type": "str" - } - ], - "params": [ + }, { - "cli_name": "location", - "doc": "Automount location name.", - "label": "Location", + "cli_name": "cert_rec", + "name": "certrecord", + "doc": "Raw CERT records", + "required": false, + "label": "CERT record", "multivalue": true, - "name": "cn", "type": "str" }, { - "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", - "name": "continue", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "automount/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for an automount location.", - "full_name": "automountlocation_find/1", - "name": "automountlocation_find", - "obj_class": "automountlocation/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", + "cli_name": "cname_rec", + "name": "cnamerecord", + "doc": "Raw CNAME records", "required": false, + "label": "CNAME record", + "multivalue": true, "type": "str" }, { + "cli_name": "dhcid_rec", + "name": "dhcidrecord", + "doc": "Raw DHCID records", + "required": false, + "label": "DHCID record", "multivalue": true, - "name": "result", - "type": "dict" + "exclude": [ + "cli", + "webui" + ], + "type": "str" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "cli_name": "dlv_rec", + "name": "dlvrecord", + "doc": "Raw DLV records", + "required": false, + "label": "DLV record", + "multivalue": true, + "type": "str" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" - } - ], - "params": [ - { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, + "cli_name": "dname_rec", + "name": "dnamerecord", + "doc": "Raw DNAME records", "required": false, + "label": "DNAME record", + "multivalue": true, "type": "str" }, { - "cli_name": "location", - "doc": "Automount location name.", - "label": "Location", - "name": "cn", + "cli_name": "ds_rec", + "name": "dsrecord", + "doc": "Raw DS records", "required": false, + "label": "DS record", + "multivalue": true, "type": "str" }, { - "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", + "cli_name": "hip_rec", + "name": "hiprecord", + "doc": "Raw HIP records", "required": false, - "type": "int" + "label": "HIP record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], + "type": "str" }, { - "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", + "cli_name": "ipseckey_rec", + "name": "ipseckeyrecord", + "doc": "Raw IPSECKEY records", "required": false, - "type": "int" + "label": "IPSECKEY record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], + "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "cli_name": "key_rec", + "name": "keyrecord", + "doc": "Raw KEY records", + "required": false, + "label": "KEY record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], + "type": "str" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "cli_name": "kx_rec", + "name": "kxrecord", + "doc": "Raw KX records", + "required": false, + "label": "KX record", + "multivalue": true, + "type": "str" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"location\")", - "label": "Primary key only", - "name": "pkey_only", + "cli_name": "loc_rec", + "name": "locrecord", + "doc": "Raw LOC records", "required": false, - "type": "bool" - } - ], - "topic_topic": "automount/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display an automount location.", - "full_name": "automountlocation_show/1", - "name": "automountlocation_show", - "obj_class": "automountlocation/1", - "output": [ + "label": "LOC record", + "multivalue": true, + "type": "str" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "cli_name": "mx_rec", + "name": "mxrecord", + "doc": "Raw MX records", "required": false, + "label": "MX record", + "multivalue": true, "type": "str" }, { - "name": "result", - "type": "dict" + "cli_name": "naptr_rec", + "name": "naptrrecord", + "doc": "Raw NAPTR records", + "required": false, + "label": "NAPTR record", + "multivalue": true, + "type": "str" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", + "cli_name": "ns_rec", + "name": "nsrecord", + "doc": "Raw NS records", + "required": false, + "label": "NS record", + "multivalue": true, "type": "str" - } - ], - "params": [ + }, { - "cli_name": "location", - "doc": "Automount location name.", - "label": "Location", - "name": "cn", + "cli_name": "nsec_rec", + "name": "nsecrecord", + "doc": "Raw NSEC records", + "required": false, + "label": "NSEC record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "cli_name": "ptr_rec", + "name": "ptrrecord", + "doc": "Raw PTR records", + "required": false, + "label": "PTR record", + "multivalue": true, + "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "cli_name": "rrsig_rec", + "name": "rrsigrecord", + "doc": "Raw RRSIG records", + "required": false, + "label": "RRSIG record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], + "type": "str" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "automount/1", - "version": "1" - }, - { - "attr_name": "tofiles", - "doc": "Generate automount files for a specific location.", - "full_name": "automountlocation_tofiles/1", - "name": "automountlocation_tofiles", - "obj_class": "automountlocation/1", - "output": [ - { - "name": "result" - } - ], - "params": [ - { - "cli_name": "location", - "doc": "Automount location name.", - "label": "Location", - "name": "cn", + "cli_name": "rp_rec", + "name": "rprecord", + "doc": "Raw RP records", + "required": false, + "label": "RP record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" - } - ], - "topic_topic": "automount/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Create a new automount map.", - "full_name": "automountmap_add/1", - "name": "automountmap_add", - "obj_class": "automountmap/1", - "output": [ + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "cli_name": "sig_rec", + "name": "sigrecord", + "doc": "Raw SIG records", "required": false, + "label": "SIG record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "name": "result", - "type": "dict" + "cli_name": "spf_rec", + "name": "spfrecord", + "doc": "Raw SPF records", + "required": false, + "label": "SPF record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], + "type": "str" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", + "cli_name": "srv_rec", + "name": "srvrecord", + "doc": "Raw SRV records", + "required": false, + "label": "SRV record", + "multivalue": true, "type": "str" - } - ], - "params": [ + }, { - "cli_name": "automountlocation", - "doc": "Automount location name.", - "label": "Location", - "name": "automountlocationcn", + "cli_name": "sshfp_rec", + "name": "sshfprecord", + "doc": "Raw SSHFP records", + "required": false, + "label": "SSHFP record", + "multivalue": true, "type": "str" }, { - "cli_name": "map", - "doc": "Automount map name.", - "label": "Map", - "name": "automountmapname", + "cli_name": "tlsa_rec", + "name": "tlsarecord", + "doc": "Raw TLSA records", + "required": false, + "label": "TLSA record", + "multivalue": true, "type": "str" }, { - "cli_name": "desc", - "label": "Description", - "name": "description", + "cli_name": "txt_rec", + "name": "txtrecord", + "doc": "Raw TXT records", "required": false, + "label": "TXT record", + "multivalue": true, "type": "str" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", + "cli_name": "uri_rec", + "name": "urirecord", + "doc": "Raw URI records", "required": false, + "label": "URI record", + "multivalue": true, "type": "str" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", + "doc": "Time limit of search in seconds (0 is unlimited)", "required": false, - "type": "str" + "type": "int", + "name": "timelimit", + "label": "Time Limit" + }, + { + "doc": "Maximum number of entries returned (0 is unlimited)", + "required": false, + "type": "int", + "name": "sizelimit", + "label": "Size Limit" + }, + { + "name": "structured", + "default": [ + "False" + ], + "doc": "Parse all raw DNS records and return them in a structured way", + "label": "Structured", + "positional": false, + "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"name\")", + "required": false, + "label": "Primary key only", "type": "bool" } ], - "topic_topic": "automount/1", - "version": "1" - }, - { - "attr_name": "add_indirect", - "doc": "Create a new indirect mount point.", - "full_name": "automountmap_add_indirect/1", - "name": "automountmap_add_indirect", - "obj_class": "automountmap/1", + "full_name": "dnsrecord_find/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "multivalue": true, + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "Number of entries returned", + "type": "int", + "name": "count" + }, + { + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], + "obj_class": "dnsrecord/1", + "topic_topic": "dns/1" + }, + { + "name": "dnsrecord_mod", + "doc": "Modify a DNS resource record.", + "attr_name": "mod", + "version": "1", "params": [ { - "cli_name": "automountlocation", - "doc": "Automount location name.", - "label": "Location", - "name": "automountlocationcn", - "type": "str" + "cli_name": "dnszone", + "name": "dnszoneidnsname", + "alwaysask": true, + "doc": "Zone name (FQDN)", + "label": "Zone name", + "type": "DNSName", + "default_from_param": [ + "name_from_ip" + ], + "no_convert": true }, { - "cli_name": "map", - "doc": "Automount map name.", - "label": "Map", - "name": "automountmapname", - "type": "str" + "doc": "Record name", + "label": "Record name", + "cli_name": "name", + "name": "idnsname", + "type": "DNSName" }, { - "cli_name": "desc", - "label": "Description", - "name": "description", + "cli_name": "ttl", + "name": "dnsttl", + "doc": "Time to live", "required": false, - "type": "str" + "label": "Time to live", + "type": "int" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", + "cli_name": "class", + "name": "dnsclass", + "cli_metavar": "['IN', 'CS', 'CH', 'HS']", "required": false, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", "required": false, + "cli_name": "a_rec", + "name": "arecord", + "doc": "Raw A records", + "option_group": "A Record", + "label": "A record", + "multivalue": true, "type": "str" }, { - "cli_name": "mount", - "label": "Mount point", - "name": "key", - "positional": false, + "required": false, + "cli_name": "a_ip_address", + "name": "a_part_ip_address", + "option_group": "A Record", + "label": "A IP Address", "type": "str" }, { - "cli_name": "parentmap", - "default": ["auto.master"], - "doc": "Name of parent automount map (default: auto.master).", - "label": "Parent map", - "name": "parentmap", "required": false, + "cli_name": "aaaa_rec", + "name": "aaaarecord", + "doc": "Raw AAAA records", + "option_group": "AAAA Record", + "label": "AAAA record", + "multivalue": true, "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "required": false, + "cli_name": "aaaa_ip_address", + "name": "aaaa_part_ip_address", + "option_group": "AAAA Record", + "label": "AAAA IP Address", + "type": "str" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "automount/1", - "version": "1" - }, - { - "attr_name": "del", - "doc": "Delete an automount map.", - "full_name": "automountmap_del/1", - "name": "automountmap_del", - "obj_class": "automountmap/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", "required": false, + "cli_name": "a6_rec", + "name": "a6record", + "doc": "Raw A6 records", + "option_group": "A6 Record", + "label": "A6 record", + "multivalue": true, "type": "str" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "required": false, + "cli_name": "a6_data", + "name": "a6_part_data", + "option_group": "A6 Record", + "label": "A6 Record data", + "type": "str" }, { + "required": false, + "cli_name": "afsdb_rec", + "name": "afsdbrecord", + "doc": "Raw AFSDB records", + "option_group": "AFSDB Record", + "label": "AFSDB record", "multivalue": true, - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "automountlocation", - "doc": "Automount location name.", - "label": "Location", - "name": "automountlocationcn", "type": "str" }, { - "cli_name": "map", - "doc": "Automount map name.", - "label": "Map", - "multivalue": true, - "name": "automountmapname", - "type": "str" + "required": false, + "cli_name": "afsdb_subtype", + "name": "afsdb_part_subtype", + "option_group": "AFSDB Record", + "label": "AFSDB Subtype", + "type": "int" }, { - "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", - "name": "continue", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "automount/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for an automount map.", - "full_name": "automountmap_find/1", - "name": "automountmap_find", - "obj_class": "automountmap/1", - "output": [ + "required": false, + "cli_name": "afsdb_hostname", + "name": "afsdb_part_hostname", + "option_group": "AFSDB Record", + "label": "AFSDB Hostname", + "type": "DNSName" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", "required": false, + "cli_name": "apl_rec", + "name": "aplrecord", + "doc": "Raw APL records", + "option_group": "APL Record", + "label": "APL record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { + "required": false, + "cli_name": "cert_rec", + "name": "certrecord", + "doc": "Raw CERT records", + "option_group": "CERT Record", + "label": "CERT record", "multivalue": true, - "name": "result", - "type": "dict" + "type": "str" }, { - "doc": "Number of entries returned", - "name": "count", + "required": false, + "cli_name": "cert_type", + "name": "cert_part_type", + "option_group": "CERT Record", + "label": "CERT Certificate Type", "type": "int" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" - } - ], - "params": [ + "required": false, + "cli_name": "cert_key_tag", + "name": "cert_part_key_tag", + "option_group": "CERT Record", + "label": "CERT Key Tag", + "type": "int" + }, { - "cli_name": "automountlocation", - "doc": "Automount location name.", - "label": "Location", - "name": "automountlocationcn", + "required": false, + "cli_name": "cert_algorithm", + "name": "cert_part_algorithm", + "option_group": "CERT Record", + "label": "CERT Algorithm", + "type": "int" + }, + { + "required": false, + "cli_name": "cert_certificate_or_crl", + "name": "cert_part_certificate_or_crl", + "option_group": "CERT Record", + "label": "CERT Certificate/CRL", "type": "str" }, { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, "required": false, + "cli_name": "cname_rec", + "name": "cnamerecord", + "doc": "Raw CNAME records", + "option_group": "CNAME Record", + "label": "CNAME record", + "multivalue": true, "type": "str" }, { - "cli_name": "map", - "doc": "Automount map name.", - "label": "Map", - "name": "automountmapname", "required": false, + "cli_name": "cname_hostname", + "name": "cname_part_hostname", + "doc": "A hostname which this alias hostname points to", + "option_group": "CNAME Record", + "label": "CNAME Hostname", + "type": "DNSName" + }, + { + "required": false, + "cli_name": "dhcid_rec", + "name": "dhcidrecord", + "doc": "Raw DHCID records", + "option_group": "DHCID Record", + "label": "DHCID record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "cli_name": "desc", - "label": "Description", - "name": "description", "required": false, + "cli_name": "dlv_rec", + "name": "dlvrecord", + "doc": "Raw DLV records", + "option_group": "DLV Record", + "label": "DLV record", + "multivalue": true, "type": "str" }, { - "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", "required": false, + "cli_name": "dlv_key_tag", + "name": "dlv_part_key_tag", + "option_group": "DLV Record", + "label": "DLV Key Tag", "type": "int" }, { - "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", "required": false, + "cli_name": "dlv_algorithm", + "name": "dlv_part_algorithm", + "option_group": "DLV Record", + "label": "DLV Algorithm", "type": "int" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "required": false, + "cli_name": "dlv_digest_type", + "name": "dlv_part_digest_type", + "option_group": "DLV Record", + "label": "DLV Digest Type", + "type": "int" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "required": false, + "cli_name": "dlv_digest", + "name": "dlv_part_digest", + "option_group": "DLV Record", + "label": "DLV Digest", + "type": "str" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"map\")", - "label": "Primary key only", - "name": "pkey_only", "required": false, - "type": "bool" - } - ], - "topic_topic": "automount/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify an automount map.", - "full_name": "automountmap_mod/1", - "name": "automountmap_mod", - "obj_class": "automountmap/1", - "output": [ + "cli_name": "dname_rec", + "name": "dnamerecord", + "doc": "Raw DNAME records", + "option_group": "DNAME Record", + "label": "DNAME record", + "multivalue": true, + "type": "str" + }, + { + "required": false, + "cli_name": "dname_target", + "name": "dname_part_target", + "option_group": "DNAME Record", + "label": "DNAME Target", + "type": "DNSName" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", "required": false, + "cli_name": "ds_rec", + "name": "dsrecord", + "doc": "Raw DS records", + "option_group": "DS Record", + "label": "DS record", + "multivalue": true, "type": "str" }, { - "name": "result", - "type": "dict" + "required": false, + "cli_name": "ds_key_tag", + "name": "ds_part_key_tag", + "option_group": "DS Record", + "label": "DS Key Tag", + "type": "int" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ + "required": false, + "cli_name": "ds_algorithm", + "name": "ds_part_algorithm", + "option_group": "DS Record", + "label": "DS Algorithm", + "type": "int" + }, { - "cli_name": "automountlocation", - "doc": "Automount location name.", - "label": "Location", - "name": "automountlocationcn", - "type": "str" + "required": false, + "cli_name": "ds_digest_type", + "name": "ds_part_digest_type", + "option_group": "DS Record", + "label": "DS Digest Type", + "type": "int" }, { - "cli_name": "map", - "doc": "Automount map name.", - "label": "Map", - "name": "automountmapname", + "required": false, + "cli_name": "ds_digest", + "name": "ds_part_digest", + "option_group": "DS Record", + "label": "DS Digest", "type": "str" }, { - "cli_name": "desc", - "label": "Description", - "name": "description", "required": false, + "cli_name": "hip_rec", + "name": "hiprecord", + "doc": "Raw HIP records", + "option_group": "HIP Record", + "label": "HIP record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", "required": false, + "cli_name": "ipseckey_rec", + "name": "ipseckeyrecord", + "doc": "Raw IPSECKEY records", + "option_group": "IPSECKEY Record", + "label": "IPSECKEY record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", "required": false, + "cli_name": "key_rec", + "name": "keyrecord", + "doc": "Raw KEY records", + "option_group": "KEY Record", + "label": "KEY record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, - "name": "delattr", "required": false, + "cli_name": "kx_rec", + "name": "kxrecord", + "doc": "Raw KX records", + "option_group": "KX Record", + "label": "KX record", + "multivalue": true, "type": "str" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "option_group": "KX Record", + "cli_name": "kx_preference", + "name": "kx_part_preference", + "doc": "Preference given to this exchanger. Lower values are more preferred", + "required": false, + "label": "KX Preference", + "type": "int" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "required": false, + "cli_name": "kx_exchanger", + "name": "kx_part_exchanger", + "doc": "A host willing to act as a key exchanger", + "option_group": "KX Record", + "label": "KX Exchanger", + "type": "DNSName" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "automount/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display an automount map.", - "full_name": "automountmap_show/1", - "name": "automountmap_show", - "obj_class": "automountmap/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", "required": false, + "cli_name": "loc_rec", + "name": "locrecord", + "doc": "Raw LOC records", + "option_group": "LOC Record", + "label": "LOC record", + "multivalue": true, "type": "str" }, { - "name": "result", - "type": "dict" + "required": false, + "cli_name": "loc_lat_deg", + "name": "loc_part_lat_deg", + "option_group": "LOC Record", + "label": "LOC Degrees Latitude", + "type": "int" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "automountlocation", - "doc": "Automount location name.", - "label": "Location", - "name": "automountlocationcn", - "type": "str" + "required": false, + "cli_name": "loc_lat_min", + "name": "loc_part_lat_min", + "option_group": "LOC Record", + "label": "LOC Minutes Latitude", + "type": "int" }, { - "cli_name": "map", - "doc": "Automount map name.", - "label": "Map", - "name": "automountmapname", - "type": "str" + "required": false, + "cli_name": "loc_lat_sec", + "name": "loc_part_lat_sec", + "option_group": "LOC Record", + "label": "LOC Seconds Latitude", + "type": "Decimal", + "no_convert": true }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "required": false, + "cli_name": "loc_lat_dir", + "name": "loc_part_lat_dir", + "cli_metavar": "['N', 'S']", + "option_group": "LOC Record", + "label": "LOC Direction Latitude", + "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "required": false, + "cli_name": "loc_lon_deg", + "name": "loc_part_lon_deg", + "option_group": "LOC Record", + "label": "LOC Degrees Longitude", + "type": "int" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "automount/1", - "version": "1" - }, - { - "exclude": ["cli"], - "full_name": "batch/1", - "name": "batch", - "output": [ - { - "doc": "", - "name": "count", + "required": false, + "cli_name": "loc_lon_min", + "name": "loc_part_lon_min", + "option_group": "LOC Record", + "label": "LOC Minutes Longitude", "type": "int" }, { - "doc": "", - "multivalue": true, - "name": "results" - } - ], - "params": [ - { - "doc": "Nested Methods to execute", - "multivalue": true, - "name": "methods", - "positional": true, "required": false, - "type": "dict" - } - ], - "topic_topic": "batch/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Create a CA.", - "full_name": "ca_add/1", - "name": "ca_add", - "obj_class": "ca/1", - "output": [ + "cli_name": "loc_lon_sec", + "name": "loc_part_lon_sec", + "option_group": "LOC Record", + "label": "LOC Seconds Longitude", + "type": "Decimal", + "no_convert": true + }, { - "doc": "User-friendly description of action performed", - "name": "summary", "required": false, + "cli_name": "loc_lon_dir", + "name": "loc_part_lon_dir", + "cli_metavar": "['E', 'W']", + "option_group": "LOC Record", + "label": "LOC Direction Longitude", "type": "str" }, { - "name": "result", - "type": "dict" + "required": false, + "cli_name": "loc_altitude", + "name": "loc_part_altitude", + "option_group": "LOC Record", + "label": "LOC Altitude", + "type": "Decimal", + "no_convert": true }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "name", - "doc": "Name for referencing the CA", - "label": "Name", - "name": "cn", - "type": "str" + "required": false, + "cli_name": "loc_size", + "name": "loc_part_size", + "option_group": "LOC Record", + "label": "LOC Size", + "type": "Decimal", + "no_convert": true }, { - "cli_name": "desc", - "doc": "Description of the purpose of the CA", - "label": "Description", - "name": "description", "required": false, - "type": "str" + "cli_name": "loc_h_precision", + "name": "loc_part_h_precision", + "option_group": "LOC Record", + "label": "LOC Horizontal Precision", + "type": "Decimal", + "no_convert": true }, { - "cli_name": "subject", - "doc": "Subject Distinguished Name", - "label": "Subject DN", - "name": "ipacasubjectdn", - "positional": false, - "type": "DN" + "required": false, + "cli_name": "loc_v_precision", + "name": "loc_part_v_precision", + "option_group": "LOC Record", + "label": "LOC Vertical Precision", + "type": "Decimal", + "no_convert": true }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", "required": false, + "cli_name": "mx_rec", + "name": "mxrecord", + "doc": "Raw MX records", + "option_group": "MX Record", + "label": "MX record", + "multivalue": true, "type": "str" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", + "option_group": "MX Record", + "cli_name": "mx_preference", + "name": "mx_part_preference", + "doc": "Preference given to this exchanger. Lower values are more preferred", "required": false, - "type": "str" + "label": "MX Preference", + "type": "int" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "required": false, + "cli_name": "mx_exchanger", + "name": "mx_part_exchanger", + "doc": "A host willing to act as a mail exchanger", + "option_group": "MX Record", + "label": "MX Exchanger", + "type": "DNSName" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "ca/1", - "version": "1" - }, - { - "attr_name": "del", - "doc": "Delete a CA.", - "full_name": "ca_del/1", - "name": "ca_del", - "obj_class": "ca/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", "required": false, + "cli_name": "naptr_rec", + "name": "naptrrecord", + "doc": "Raw NAPTR records", + "option_group": "NAPTR Record", + "label": "NAPTR record", + "multivalue": true, "type": "str" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" - }, - { - "multivalue": true, - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "name", - "doc": "Name for referencing the CA", - "label": "Name", - "multivalue": true, - "name": "cn", - "type": "str" + "required": false, + "cli_name": "naptr_order", + "name": "naptr_part_order", + "option_group": "NAPTR Record", + "label": "NAPTR Order", + "type": "int" }, { - "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", - "name": "continue", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "ca/1", - "version": "1" - }, - { - "attr_name": "disable", - "doc": "Disable a CA.", - "full_name": "ca_disable/1", - "name": "ca_disable", - "obj_class": "ca/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "cli_name": "naptr_preference", + "name": "naptr_part_preference", + "option_group": "NAPTR Record", + "label": "NAPTR Preference", + "type": "int" }, { - "doc": "True means the operation was successful", - "name": "result", - "type": "bool" + "required": false, + "cli_name": "naptr_flags", + "name": "naptr_part_flags", + "option_group": "NAPTR Record", + "label": "NAPTR Flags", + "type": "str", + "no_convert": true }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "name", - "doc": "Name for referencing the CA", - "label": "Name", - "name": "cn", + "required": false, + "cli_name": "naptr_service", + "name": "naptr_part_service", + "option_group": "NAPTR Record", + "label": "NAPTR Service", "type": "str" - } - ], - "topic_topic": "ca/1", - "version": "1" - }, - { - "attr_name": "enable", - "doc": "Enable a CA.", - "full_name": "ca_enable/1", - "name": "ca_enable", - "obj_class": "ca/1", - "output": [ + }, { - "doc": "User-friendly description of action performed", - "name": "summary", "required": false, + "cli_name": "naptr_regexp", + "name": "naptr_part_regexp", + "option_group": "NAPTR Record", + "label": "NAPTR Regular Expression", "type": "str" }, { - "doc": "True means the operation was successful", - "name": "result", - "type": "bool" + "required": false, + "cli_name": "naptr_replacement", + "name": "naptr_part_replacement", + "option_group": "NAPTR Record", + "label": "NAPTR Replacement", + "type": "str" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", + "required": false, + "cli_name": "ns_rec", + "name": "nsrecord", + "doc": "Raw NS records", + "option_group": "NS Record", + "label": "NS record", + "multivalue": true, "type": "str" - } - ], - "params": [ + }, { - "cli_name": "name", - "doc": "Name for referencing the CA", - "label": "Name", - "name": "cn", - "type": "str" - } - ], - "topic_topic": "ca/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for CAs.", - "full_name": "ca_find/1", - "name": "ca_find", - "obj_class": "ca/1", - "output": [ + "required": false, + "cli_name": "ns_hostname", + "name": "ns_part_hostname", + "option_group": "NS Record", + "label": "NS Hostname", + "type": "DNSName" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", "required": false, + "cli_name": "nsec_rec", + "name": "nsecrecord", + "doc": "Raw NSEC records", + "option_group": "NSEC Record", + "label": "NSEC record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { + "required": false, + "cli_name": "ptr_rec", + "name": "ptrrecord", + "doc": "Raw PTR records", + "option_group": "PTR Record", + "label": "PTR record", "multivalue": true, - "name": "result", - "type": "dict" + "type": "str" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "required": false, + "cli_name": "ptr_hostname", + "name": "ptr_part_hostname", + "doc": "The hostname this reverse record points to", + "option_group": "PTR Record", + "label": "PTR Hostname", + "type": "DNSName" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" - } - ], - "params": [ - { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, "required": false, + "cli_name": "rrsig_rec", + "name": "rrsigrecord", + "doc": "Raw RRSIG records", + "option_group": "RRSIG Record", + "label": "RRSIG record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "cli_name": "name", - "doc": "Name for referencing the CA", - "label": "Name", - "name": "cn", "required": false, + "cli_name": "rp_rec", + "name": "rprecord", + "doc": "Raw RP records", + "option_group": "RP Record", + "label": "RP record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "cli_name": "desc", - "doc": "Description of the purpose of the CA", - "label": "Description", - "name": "description", "required": false, + "cli_name": "sig_rec", + "name": "sigrecord", + "doc": "Raw SIG records", + "option_group": "SIG Record", + "label": "SIG record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "cli_name": "id", - "doc": "Dogtag Authority ID", - "label": "Authority ID", - "name": "ipacaid", "required": false, + "cli_name": "spf_rec", + "name": "spfrecord", + "doc": "Raw SPF records", + "option_group": "SPF Record", + "label": "SPF record", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "cli_name": "subject", - "doc": "Subject Distinguished Name", - "label": "Subject DN", - "name": "ipacasubjectdn", "required": false, - "type": "DN" + "cli_name": "srv_rec", + "name": "srvrecord", + "doc": "Raw SRV records", + "option_group": "SRV Record", + "label": "SRV record", + "multivalue": true, + "type": "str" }, { - "cli_name": "issuer", - "doc": "Issuer Distinguished Name", - "label": "Issuer DN", - "name": "ipacaissuerdn", + "option_group": "SRV Record", + "cli_name": "srv_priority", + "name": "srv_part_priority", + "doc": "Lower number means higher priority. Clients will attempt to contact the server with the lowest-numbered priority they can reach.", "required": false, - "type": "DN" + "label": "SRV Priority (order)", + "type": "int" }, { - "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", + "option_group": "SRV Record", + "cli_name": "srv_weight", + "name": "srv_part_weight", + "doc": "Relative weight for entries with the same priority.", "required": false, + "label": "SRV Weight", "type": "int" }, { - "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", "required": false, + "cli_name": "srv_port", + "name": "srv_part_port", + "option_group": "SRV Record", + "label": "SRV Port", "type": "int" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "required": false, + "cli_name": "srv_target", + "name": "srv_part_target", + "doc": "The domain name of the target host or '.' if the service is decidedly not available at this domain", + "option_group": "SRV Record", + "label": "SRV Target", + "type": "DNSName" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "required": false, + "cli_name": "sshfp_rec", + "name": "sshfprecord", + "doc": "Raw SSHFP records", + "option_group": "SSHFP Record", + "label": "SSHFP record", + "multivalue": true, + "type": "str" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"name\")", - "label": "Primary key only", - "name": "pkey_only", "required": false, - "type": "bool" - } - ], - "topic_topic": "ca/1", - "version": "1" - }, - { - "doc": - "\n Checks if any of the servers has the CA service enabled.\n ", - "exclude": ["cli"], - "full_name": "ca_is_enabled/1", - "name": "ca_is_enabled", - "output": [ + "cli_name": "sshfp_algorithm", + "name": "sshfp_part_algorithm", + "option_group": "SSHFP Record", + "label": "SSHFP Algorithm", + "type": "int" + }, + { + "required": false, + "cli_name": "sshfp_fp_type", + "name": "sshfp_part_fp_type", + "option_group": "SSHFP Record", + "label": "SSHFP Fingerprint Type", + "type": "int" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", "required": false, + "cli_name": "sshfp_fingerprint", + "name": "sshfp_part_fingerprint", + "option_group": "SSHFP Record", + "label": "SSHFP Fingerprint", "type": "str" }, { - "doc": "True means the operation was successful", - "name": "result", - "type": "bool" + "required": false, + "cli_name": "tlsa_rec", + "name": "tlsarecord", + "doc": "Raw TLSA records", + "option_group": "TLSA Record", + "label": "TLSA record", + "multivalue": true, + "type": "str" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "NoneType" - } - ], - "params": [], - "topic_topic": "cert/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify CA configuration.", - "full_name": "ca_mod/1", - "name": "ca_mod", - "obj_class": "ca/1", - "output": [ + "required": false, + "cli_name": "tlsa_cert_usage", + "name": "tlsa_part_cert_usage", + "option_group": "TLSA Record", + "label": "TLSA Certificate Usage", + "type": "int" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "cli_name": "tlsa_selector", + "name": "tlsa_part_selector", + "option_group": "TLSA Record", + "label": "TLSA Selector", + "type": "int" }, { - "name": "result", - "type": "dict" + "required": false, + "cli_name": "tlsa_matching_type", + "name": "tlsa_part_matching_type", + "option_group": "TLSA Record", + "label": "TLSA Matching Type", + "type": "int" + }, + { + "required": false, + "cli_name": "tlsa_cert_association_data", + "name": "tlsa_part_cert_association_data", + "option_group": "TLSA Record", + "label": "TLSA Certificate Association Data", + "type": "str" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", + "required": false, + "cli_name": "txt_rec", + "name": "txtrecord", + "doc": "Raw TXT records", + "option_group": "TXT Record", + "label": "TXT record", + "multivalue": true, "type": "str" - } - ], - "params": [ + }, { - "cli_name": "name", - "doc": "Name for referencing the CA", - "label": "Name", - "name": "cn", + "required": false, + "cli_name": "txt_data", + "name": "txt_part_data", + "option_group": "TXT Record", + "label": "TXT Text Data", "type": "str" }, { - "cli_name": "desc", - "doc": "Description of the purpose of the CA", - "label": "Description", - "name": "description", "required": false, + "cli_name": "uri_rec", + "name": "urirecord", + "doc": "Raw URI records", + "option_group": "URI Record", + "label": "URI record", + "multivalue": true, "type": "str" }, + { + "option_group": "URI Record", + "cli_name": "uri_priority", + "name": "uri_part_priority", + "doc": "Lower number means higher priority. Clients will attempt to contact the URI with the lowest-numbered priority they can reach.", + "required": false, + "label": "URI Priority (order)", + "type": "int" + }, + { + "option_group": "URI Record", + "cli_name": "uri_weight", + "name": "uri_part_weight", + "doc": "Relative weight for entries with the same priority.", + "required": false, + "label": "URI Weight", + "type": "int" + }, + { + "option_group": "URI Record", + "cli_name": "uri_target", + "name": "uri_part_target", + "doc": "Target Uniform Resource Identifier according to RFC 3986", + "required": false, + "label": "URI Target Uniform Resource Identifier", + "type": "str", + "no_convert": true + }, { "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" + }, + { + "name": "structured", + "default": [ + "False" + ], + "doc": "Parse all raw DNS records and return them in a structured way", + "label": "Structured", "positional": false, "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "rename", - "doc": "Rename the Certificate Authority object", - "label": "Rename", "name": "rename", + "doc": "Rename the DNS resource record object", "required": false, - "type": "str" + "label": "Rename", + "type": "DNSName" } ], - "topic_topic": "ca/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display the properties of a CA.", - "full_name": "ca_show/1", - "name": "ca_show", - "obj_class": "ca/1", + "full_name": "dnsrecord_mod/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "DNSName", + "name": "value" } ], + "obj_class": "dnsrecord/1", + "topic_topic": "dns/1" + }, + { + "name": "dnsrecord_show", + "doc": "Display DNS resource.", + "attr_name": "show", + "version": "1", "params": [ { + "cli_name": "dnszone", + "name": "dnszoneidnsname", + "alwaysask": true, + "doc": "Zone name (FQDN)", + "label": "Zone name", + "type": "DNSName", + "default_from_param": [ + "name_from_ip" + ], + "no_convert": true + }, + { + "doc": "Record name", + "label": "Record name", "cli_name": "name", - "doc": "Name for referencing the CA", - "label": "Name", - "name": "cn", - "type": "str" + "name": "idnsname", + "type": "DNSName" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" + }, + { + "name": "structured", + "default": [ + "False" + ], + "doc": "Parse all raw DNS records and return them in a structured way", + "label": "Structured", "positional": false, "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "ca/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Create a new CA ACL.", - "full_name": "caacl_add/1", - "name": "caacl_add", - "obj_class": "caacl/1", + "full_name": "dnsrecord_show/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "DNSName", + "name": "value" } ], + "obj_class": "dnsrecord/1", + "topic_topic": "dns/1" + }, + { + "name": "dnsrecord_split_parts", + "version": "1", "params": [ { - "cli_name": "name", - "label": "ACL name", - "name": "cn", - "type": "str" + "type": "str", + "name": "name" }, { - "cli_name": "desc", - "label": "Description", - "name": "description", + "type": "str", + "name": "value" + } + ], + "full_name": "dnsrecord_split_parts/1", + "exclude": [ + "cli" + ], + "output": [ + { + "name": "result" + } + ], + "topic_topic": "dns/1" + }, + { + "name": "dnsserver_find", + "doc": "Search for DNS servers.", + "attr_name": "find", + "version": "1", + "params": [ + { + "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, - "type": "str" + "type": "str", + "name": "criteria" }, { - "exclude": ["cli", "webui"], - "label": "Enabled", - "name": "ipaenabledflag", + "cli_name": "hostname", + "name": "idnsserverid", + "doc": "DNS Server name", "required": false, - "type": "bool" + "label": "Server name", + "type": "str", + "no_convert": true }, { - "cli_metavar": "['all']", - "cli_name": "cacat", - "doc": "CA category the ACL applies to", - "label": "CA category", - "name": "ipacacategory", + "cli_name": "soa_mname_override", + "name": "idnssoamname", + "doc": "SOA mname (authoritative server) override", + "required": false, + "label": "SOA mname override", + "type": "DNSName" + }, + { + "cli_name": "forwarder", + "name": "idnsforwarders", + "doc": "Per-server forwarders. A custom port can be specified for each forwarder using a standard format \"IP_ADDRESS port PORT\"", "required": false, + "label": "Forwarders", + "multivalue": true, "type": "str" }, { - "cli_metavar": "['all']", - "cli_name": "profilecat", - "doc": "Profile category the ACL applies to", - "label": "Profile category", - "name": "ipacertprofilecategory", + "cli_name": "forward_policy", + "name": "idnsforwardpolicy", + "cli_metavar": "['only', 'first', 'none']", + "doc": "Per-server conditional forwarding policy. Set to \"none\" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded.", "required": false, + "label": "Forward policy", "type": "str" }, { - "cli_metavar": "['all']", - "cli_name": "usercat", - "doc": "User category the ACL applies to", - "label": "User category", - "name": "usercategory", + "doc": "Time limit of search in seconds (0 is unlimited)", "required": false, - "type": "str" + "type": "int", + "name": "timelimit", + "label": "Time Limit" }, { - "cli_metavar": "['all']", - "cli_name": "hostcat", - "doc": "Host category the ACL applies to", - "label": "Host category", - "name": "hostcategory", + "doc": "Maximum number of entries returned (0 is unlimited)", + "required": false, + "type": "int", + "name": "sizelimit", + "label": "Size Limit" + }, + { + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"hostname\")", + "required": false, + "label": "Primary key only", + "type": "bool" + } + ], + "full_name": "dnsserver_find/1", + "output": [ + { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" + }, + { + "type": "dict", + "multivalue": true, + "name": "result" + }, + { + "doc": "Number of entries returned", + "type": "int", + "name": "count" + }, + { + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" + } + ], + "obj_class": "dnsserver/1", + "topic_topic": "dns/1" + }, + { + "name": "dnsserver_mod", + "doc": "Modify DNS server configuration", + "attr_name": "mod", + "version": "1", + "params": [ + { + "cli_name": "hostname", + "name": "idnsserverid", + "doc": "DNS Server name", + "label": "Server name", + "type": "str", + "no_convert": true + }, + { + "cli_name": "soa_mname_override", + "name": "idnssoamname", + "doc": "SOA mname (authoritative server) override", + "required": false, + "label": "SOA mname override", + "type": "DNSName" + }, + { + "cli_name": "forwarder", + "name": "idnsforwarders", + "doc": "Per-server forwarders. A custom port can be specified for each forwarder using a standard format \"IP_ADDRESS port PORT\"", "required": false, + "label": "Forwarders", + "multivalue": true, "type": "str" }, { - "cli_metavar": "['all']", - "cli_name": "servicecat", - "doc": "Service category the ACL applies to", - "label": "Service category", - "name": "servicecategory", + "cli_name": "forward_policy", + "name": "idnsforwardpolicy", + "cli_metavar": "['only', 'first', 'none']", + "doc": "Per-server conditional forwarding policy. Set to \"none\" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded.", "required": false, + "label": "Forward policy", "type": "str" }, { "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", + "cli_name": "delattr", + "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" + }, + { + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "caacl/1", - "version": "1" - }, - { - "attr_name": "add_ca", - "doc": "Add CAs to a CA ACL.", - "full_name": "caacl_add_ca/1", - "name": "caacl_add_ca", - "obj_class": "caacl/1", + "full_name": "dnsserver_mod/1", "output": [ { - "name": "result", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": "Number of members added", - "name": "completed", - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "dnsserver/1", + "topic_topic": "dns/1" + }, + { + "name": "dnsserver_show", + "doc": "Display configuration of a DNS server.", + "attr_name": "show", + "version": "1", "params": [ { - "cli_name": "name", - "label": "ACL name", - "name": "cn", - "type": "str" + "cli_name": "hostname", + "name": "idnsserverid", + "doc": "DNS Server name", + "label": "Server name", + "type": "str", + "no_convert": true }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - }, - { - "alwaysask": true, - "cli_name": "cas", - "doc": "Certificate Authorities to add", - "label": "member Certificate Authority", - "multivalue": true, - "name": "ca", - "required": false, - "type": "str" } ], - "topic_topic": "caacl/1", - "version": "1" - }, - { - "attr_name": "add_host", - "doc": "Add target hosts and hostgroups to a CA ACL.", - "full_name": "caacl_add_host/1", - "name": "caacl_add_host", - "obj_class": "caacl/1", + "full_name": "dnsserver_show/1", "output": [ { - "name": "result", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": "Number of members added", - "name": "completed", - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "dnsserver/1", + "topic_topic": "dns/1" + }, + { + "name": "dnszone_add", + "doc": "Create new DNS zone (SOA record).", + "attr_name": "add", + "version": "1", "params": [ { "cli_name": "name", - "label": "ACL name", - "name": "cn", - "type": "str" - }, - { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "name": "idnsname", + "alwaysask": true, + "doc": "Zone name (FQDN)", + "label": "Zone name", + "type": "DNSName", + "default_from_param": [ + "name_from_ip" + ], + "no_convert": true }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "doc": "IP network to create reverse zone name from", + "required": false, + "type": "str", + "name": "name_from_ip", + "label": "Reverse zone IP network" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "cli_name": "forwarder", + "name": "idnsforwarders", + "doc": "Per-zone forwarders. A custom port can be specified for each forwarder using a standard format \"IP_ADDRESS port PORT\"", + "required": false, + "label": "Zone forwarders", + "multivalue": true, + "type": "str" }, { - "alwaysask": true, - "cli_name": "hosts", - "doc": "hosts to add", - "label": "member host", - "multivalue": true, - "name": "host", + "cli_name": "forward_policy", + "name": "idnsforwardpolicy", + "cli_metavar": "['only', 'first', 'none']", + "doc": "Per-zone conditional forwarding policy. Set to \"none\" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded.", "required": false, + "label": "Forward policy", "type": "str" }, { - "alwaysask": true, - "cli_name": "hostgroups", - "doc": "host groups to add", - "label": "member host group", - "multivalue": true, - "name": "hostgroup", + "cli_name": "name_server", + "name": "idnssoamname", + "doc": "Authoritative nameserver domain name", "required": false, - "type": "str" - } - ], - "topic_topic": "caacl/1", - "version": "1" - }, - { - "attr_name": "add_profile", - "doc": "Add profiles to a CA ACL.", - "full_name": "caacl_add_profile/1", - "name": "caacl_add_profile", - "obj_class": "caacl/1", - "output": [ + "label": "Authoritative nameserver", + "type": "DNSName" + }, { - "name": "result", - "type": "dict" + "cli_name": "admin_email", + "name": "idnssoarname", + "default": [ + "hostmaster" + ], + "doc": "Administrator e-mail address", + "label": "Administrator e-mail address", + "positional": false, + "type": "DNSName", + "no_convert": true }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "cli_name": "serial", + "name": "idnssoaserial", + "doc": "SOA record serial number", + "label": "SOA serial", + "positional": false, + "type": "int", + "default_from_param": [] }, { - "doc": "Number of members added", - "name": "completed", + "cli_name": "refresh", + "name": "idnssoarefresh", + "default": [ + "3600" + ], + "doc": "SOA record refresh time", + "label": "SOA refresh", + "positional": false, "type": "int" - } - ], - "params": [ - { - "cli_name": "name", - "label": "ACL name", - "name": "cn", - "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", + "cli_name": "retry", + "name": "idnssoaretry", + "default": [ + "900" + ], + "doc": "SOA record retry time", + "label": "SOA retry", "positional": false, - "type": "bool" + "type": "int" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", + "cli_name": "expire", + "name": "idnssoaexpire", + "default": [ + "1209600" + ], + "doc": "SOA record expire time", + "label": "SOA expire", "positional": false, - "type": "bool" + "type": "int" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", + "cli_name": "minimum", + "name": "idnssoaminimum", + "default": [ + "3600" + ], + "doc": "How long should negative responses be cached", + "label": "SOA minimum", "positional": false, - "type": "bool" + "type": "int" }, { - "alwaysask": true, - "cli_name": "certprofiles", - "doc": "Certificate Profiles to add", - "label": "member Certificate Profile", - "multivalue": true, - "name": "certprofile", + "cli_name": "ttl", + "name": "dnsttl", + "doc": "Time to live for records at zone apex", + "required": false, + "label": "Time to live", + "type": "int" + }, + { + "cli_name": "default_ttl", + "name": "dnsdefaultttl", + "doc": "Time to live for records without explicit TTL definition", + "required": false, + "label": "Default time to live", + "type": "int" + }, + { + "cli_name": "class", + "name": "dnsclass", + "cli_metavar": "['IN', 'CS', 'CH', 'HS']", "required": false, + "exclude": [ + "cli", + "webui" + ], "type": "str" - } - ], - "topic_topic": "caacl/1", - "version": "1" - }, - { - "attr_name": "add_service", - "doc": "Add services to a CA ACL.", - "full_name": "caacl_add_service/1", - "name": "caacl_add_service", - "obj_class": "caacl/1", - "output": [ + }, { - "name": "result", - "type": "dict" + "cli_name": "update_policy", + "name": "idnsupdatepolicy", + "doc": "BIND update policy", + "required": false, + "label": "BIND update policy", + "type": "str", + "default_from_param": [ + "idnsname" + ] }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "cli_name": "dynamic_update", + "name": "idnsallowdynupdate", + "default": [ + "False" + ], + "doc": "Allow dynamic updates.", + "required": false, + "label": "Dynamic update", + "type": "bool" }, { - "doc": "Number of members added", - "name": "completed", - "type": "int" - } - ], - "params": [ + "cli_name": "allow_query", + "name": "idnsallowquery", + "default": [ + "any;" + ], + "doc": "Semicolon separated list of IP addresses or networks which are allowed to issue queries", + "required": false, + "label": "Allow query", + "type": "str", + "no_convert": true + }, { - "cli_name": "name", - "label": "ACL name", - "name": "cn", - "type": "str" + "cli_name": "allow_transfer", + "name": "idnsallowtransfer", + "default": [ + "none;" + ], + "doc": "Semicolon separated list of IP addresses or networks which are allowed to transfer the zone", + "required": false, + "label": "Allow transfer", + "type": "str", + "no_convert": true }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, + "cli_name": "allow_sync_ptr", + "name": "idnsallowsyncptr", + "doc": "Allow synchronization of forward (A, AAAA) and reverse (PTR) records in the zone", + "required": false, + "label": "Allow PTR sync", "type": "bool" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, + "cli_name": "dnssec", + "name": "idnssecinlinesigning", + "alwaysask": true, + "default": [ + "False" + ], + "doc": "Allow inline DNSSEC signing of records in the zone", + "required": false, + "label": "Allow in-line DNSSEC signing", "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "cli_name": "nsec3param_rec", + "name": "nsec3paramrecord", + "doc": "NSEC3PARAM record for zone in format: hash_algorithm flags iterations salt", + "required": false, + "label": "NSEC3PARAM record", + "type": "str" }, { - "alwaysask": true, - "cli_name": "services", - "doc": "services to add", - "label": "member service", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", + "required": false, "multivalue": true, - "name": "service", + "exclude": [ + "webui" + ], + "type": "str" + }, + { + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" - } - ], - "topic_topic": "caacl/1", - "version": "1" - }, - { - "attr_name": "add_user", - "doc": "Add users and groups to a CA ACL.", - "full_name": "caacl_add_user/1", - "name": "caacl_add_user", - "obj_class": "caacl/1", - "output": [ + }, { - "name": "result", - "type": "dict" + "positional": false, + "default": [ + "False" + ], + "type": "bool", + "name": "skip_overlap_check", + "doc": "Force DNS zone creation even if it will overlap with an existing zone." }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "positional": false, + "default": [ + "False" + ], + "type": "bool", + "name": "force", + "doc": "Force DNS zone creation even if nameserver is not resolvable. (Deprecated)" }, { - "doc": "Number of members added", - "name": "completed", - "type": "int" - } - ], - "params": [ + "positional": false, + "default": [ + "False" + ], + "type": "bool", + "name": "skip_nameserver_check", + "doc": "Force DNS zone creation even if nameserver is not resolvable." + }, { - "cli_name": "name", - "label": "ACL name", - "name": "cn", - "type": "str" + "exclude": [ + "cli", + "webui" + ], + "required": false, + "type": "str", + "name": "ip_address" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - }, + } + ], + "full_name": "dnszone_add/1", + "output": [ { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "alwaysask": true, - "cli_name": "users", - "doc": "users to add", - "label": "member user", - "multivalue": true, - "name": "user", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "alwaysask": true, - "cli_name": "groups", - "doc": "groups to add", - "label": "member group", - "multivalue": true, - "name": "group", - "required": false, - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "DNSName", + "name": "value" } ], - "topic_topic": "caacl/1", - "version": "1" + "obj_class": "dnszone/1", + "topic_topic": "dns/1" }, { - "attr_name": "del", - "doc": "Delete a CA ACL.", - "full_name": "caacl_del/1", - "name": "caacl_del", - "obj_class": "caacl/1", + "name": "dnszone_add_permission", + "doc": "Add a permission for per-zone access delegation.", + "attr_name": "add_permission", + "version": "1", + "params": [ + { + "cli_name": "name", + "name": "idnsname", + "alwaysask": true, + "doc": "Zone name (FQDN)", + "label": "Zone name", + "type": "DNSName", + "default_from_param": [ + "name_from_ip" + ], + "no_convert": true + } + ], + "full_name": "dnszone_add_permission/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "doc": "True means the operation was successful", + "type": "bool", + "name": "result" }, { - "multivalue": true, - "name": "value", - "type": "str" + "doc": "Permission value", + "type": "str", + "name": "value" } ], + "obj_class": "dnszone/1", + "topic_topic": "dns/1" + }, + { + "name": "dnszone_del", + "doc": "Delete DNS zone (SOA record).", + "attr_name": "del", + "version": "1", "params": [ { "cli_name": "name", - "label": "ACL name", + "name": "idnsname", + "alwaysask": true, + "doc": "Zone name (FQDN)", + "label": "Zone name", "multivalue": true, - "name": "cn", - "type": "str" + "type": "DNSName", + "default_from_param": [ + "name_from_ip" + ], + "no_convert": true }, { "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", "positional": false, "type": "bool" } ], - "topic_topic": "caacl/1", - "version": "1" - }, - { - "attr_name": "disable", - "doc": "Disable a CA ACL.", - "full_name": "caacl_disable/1", - "name": "caacl_disable", - "obj_class": "caacl/1", + "full_name": "dnszone_del/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "True means the operation was successful", - "name": "result", - "type": "bool" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "type": "DNSName", + "multivalue": true, + "name": "value" } ], + "obj_class": "dnszone/1", + "topic_topic": "dns/1" + }, + { + "name": "dnszone_disable", + "doc": "Disable DNS Zone.", + "attr_name": "disable", + "version": "1", "params": [ { "cli_name": "name", - "label": "ACL name", - "name": "cn", - "type": "str" + "name": "idnsname", + "alwaysask": true, + "doc": "Zone name (FQDN)", + "label": "Zone name", + "type": "DNSName", + "default_from_param": [ + "name_from_ip" + ], + "no_convert": true } ], - "topic_topic": "caacl/1", - "version": "1" - }, - { - "attr_name": "enable", - "doc": "Enable a CA ACL.", - "full_name": "caacl_enable/1", - "name": "caacl_enable", - "obj_class": "caacl/1", + "full_name": "dnszone_disable/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { "doc": "True means the operation was successful", - "name": "result", - "type": "bool" + "type": "bool", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "DNSName", + "name": "value" } ], + "obj_class": "dnszone/1", + "topic_topic": "dns/1" + }, + { + "name": "dnszone_enable", + "doc": "Enable DNS Zone.", + "attr_name": "enable", + "version": "1", "params": [ { "cli_name": "name", - "label": "ACL name", - "name": "cn", - "type": "str" + "name": "idnsname", + "alwaysask": true, + "doc": "Zone name (FQDN)", + "label": "Zone name", + "type": "DNSName", + "default_from_param": [ + "name_from_ip" + ], + "no_convert": true } ], - "topic_topic": "caacl/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for CA ACLs.", - "full_name": "caacl_find/1", - "name": "caacl_find", - "obj_class": "caacl/1", + "full_name": "dnszone_enable/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" - }, - { - "multivalue": true, - "name": "result", - "type": "dict" + "type": "str", + "name": "summary" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "doc": "True means the operation was successful", + "type": "bool", + "name": "result" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "DNSName", + "name": "value" } ], + "obj_class": "dnszone/1", + "topic_topic": "dns/1" + }, + { + "name": "dnszone_find", + "doc": "Search for DNS zones (SOA records).", + "attr_name": "find", + "version": "1", "params": [ { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, - "type": "str" + "type": "str", + "name": "criteria" }, { "cli_name": "name", - "label": "ACL name", - "name": "cn", + "name": "idnsname", + "alwaysask": true, + "doc": "Zone name (FQDN)", "required": false, - "type": "str" + "label": "Zone name", + "type": "DNSName", + "default_from_param": [ + "name_from_ip" + ], + "no_convert": true }, { - "cli_name": "desc", - "label": "Description", - "name": "description", + "doc": "IP network to create reverse zone name from", "required": false, - "type": "str" + "type": "str", + "name": "name_from_ip", + "label": "Reverse zone IP network" }, { - "exclude": ["cli", "webui"], - "label": "Enabled", - "name": "ipaenabledflag", + "cli_name": "zone_active", + "name": "idnszoneactive", + "doc": "Is zone active?", "required": false, + "label": "Active zone", "type": "bool" }, { - "cli_metavar": "['all']", - "cli_name": "cacat", - "doc": "CA category the ACL applies to", - "label": "CA category", - "name": "ipacacategory", + "cli_name": "forwarder", + "name": "idnsforwarders", + "doc": "Per-zone forwarders. A custom port can be specified for each forwarder using a standard format \"IP_ADDRESS port PORT\"", "required": false, + "label": "Zone forwarders", + "multivalue": true, "type": "str" }, { - "cli_metavar": "['all']", - "cli_name": "profilecat", - "doc": "Profile category the ACL applies to", - "label": "Profile category", - "name": "ipacertprofilecategory", + "cli_name": "forward_policy", + "name": "idnsforwardpolicy", + "cli_metavar": "['only', 'first', 'none']", + "doc": "Per-zone conditional forwarding policy. Set to \"none\" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded.", "required": false, + "label": "Forward policy", "type": "str" }, { - "cli_metavar": "['all']", - "cli_name": "usercat", - "doc": "User category the ACL applies to", - "label": "User category", - "name": "usercategory", + "cli_name": "name_server", + "name": "idnssoamname", + "doc": "Authoritative nameserver domain name", "required": false, - "type": "str" + "label": "Authoritative nameserver", + "type": "DNSName" }, { - "cli_metavar": "['all']", - "cli_name": "hostcat", - "doc": "Host category the ACL applies to", - "label": "Host category", - "name": "hostcategory", + "cli_name": "admin_email", + "name": "idnssoarname", + "alwaysask": true, + "default": [ + "hostmaster" + ], + "doc": "Administrator e-mail address", "required": false, - "type": "str" + "label": "Administrator e-mail address", + "type": "DNSName", + "no_convert": true }, { - "cli_metavar": "['all']", - "cli_name": "servicecat", - "doc": "Service category the ACL applies to", - "label": "Service category", - "name": "servicecategory", + "cli_name": "serial", + "name": "idnssoaserial", + "alwaysask": true, + "doc": "SOA record serial number", "required": false, - "type": "str" + "label": "SOA serial", + "type": "int", + "default_from_param": [] }, { - "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", + "cli_name": "refresh", + "name": "idnssoarefresh", + "alwaysask": true, + "default": [ + "3600" + ], + "doc": "SOA record refresh time", "required": false, + "label": "SOA refresh", "type": "int" }, { - "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", + "cli_name": "retry", + "name": "idnssoaretry", + "alwaysask": true, + "default": [ + "900" + ], + "doc": "SOA record retry time", "required": false, + "label": "SOA retry", "type": "int" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" - }, - { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - }, - { - "default": ["True"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui", "cli"], - "name": "no_members", - "positional": false, - "type": "bool" - }, - { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"name\")", - "label": "Primary key only", - "name": "pkey_only", + "cli_name": "expire", + "name": "idnssoaexpire", + "alwaysask": true, + "default": [ + "1209600" + ], + "doc": "SOA record expire time", "required": false, - "type": "bool" - } - ], - "topic_topic": "caacl/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify a CA ACL.", - "full_name": "caacl_mod/1", - "name": "caacl_mod", - "obj_class": "caacl/1", - "output": [ + "label": "SOA expire", + "type": "int" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "cli_name": "minimum", + "name": "idnssoaminimum", + "alwaysask": true, + "default": [ + "3600" + ], + "doc": "How long should negative responses be cached", "required": false, - "type": "str" + "label": "SOA minimum", + "type": "int" }, { - "name": "result", - "type": "dict" + "cli_name": "ttl", + "name": "dnsttl", + "doc": "Time to live for records at zone apex", + "required": false, + "label": "Time to live", + "type": "int" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "name", - "label": "ACL name", - "name": "cn", - "type": "str" + "cli_name": "default_ttl", + "name": "dnsdefaultttl", + "doc": "Time to live for records without explicit TTL definition", + "required": false, + "label": "Default time to live", + "type": "int" }, { - "cli_name": "desc", - "label": "Description", - "name": "description", + "cli_name": "class", + "name": "dnsclass", + "cli_metavar": "['IN', 'CS', 'CH', 'HS']", "required": false, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "exclude": ["cli", "webui"], - "label": "Enabled", - "name": "ipaenabledflag", + "cli_name": "update_policy", + "name": "idnsupdatepolicy", + "alwaysask": true, + "doc": "BIND update policy", "required": false, - "type": "bool" + "label": "BIND update policy", + "type": "str", + "default_from_param": [ + "idnsname" + ] }, { - "cli_metavar": "['all']", - "cli_name": "cacat", - "doc": "CA category the ACL applies to", - "label": "CA category", - "name": "ipacacategory", + "cli_name": "dynamic_update", + "name": "idnsallowdynupdate", + "alwaysask": true, + "default": [ + "False" + ], + "doc": "Allow dynamic updates.", "required": false, - "type": "str" + "label": "Dynamic update", + "type": "bool" }, { - "cli_metavar": "['all']", - "cli_name": "profilecat", - "doc": "Profile category the ACL applies to", - "label": "Profile category", - "name": "ipacertprofilecategory", + "cli_name": "allow_query", + "name": "idnsallowquery", + "alwaysask": true, + "default": [ + "any;" + ], + "doc": "Semicolon separated list of IP addresses or networks which are allowed to issue queries", "required": false, - "type": "str" + "label": "Allow query", + "type": "str", + "no_convert": true }, { - "cli_metavar": "['all']", - "cli_name": "usercat", - "doc": "User category the ACL applies to", - "label": "User category", - "name": "usercategory", + "cli_name": "allow_transfer", + "name": "idnsallowtransfer", + "alwaysask": true, + "default": [ + "none;" + ], + "doc": "Semicolon separated list of IP addresses or networks which are allowed to transfer the zone", "required": false, - "type": "str" + "label": "Allow transfer", + "type": "str", + "no_convert": true }, { - "cli_metavar": "['all']", - "cli_name": "hostcat", - "doc": "Host category the ACL applies to", - "label": "Host category", - "name": "hostcategory", + "cli_name": "allow_sync_ptr", + "name": "idnsallowsyncptr", + "doc": "Allow synchronization of forward (A, AAAA) and reverse (PTR) records in the zone", "required": false, - "type": "str" + "label": "Allow PTR sync", + "type": "bool" }, { - "cli_metavar": "['all']", - "cli_name": "servicecat", - "doc": "Service category the ACL applies to", - "label": "Service category", - "name": "servicecategory", + "cli_name": "dnssec", + "name": "idnssecinlinesigning", + "alwaysask": true, + "default": [ + "False" + ], + "doc": "Allow inline DNSSEC signing of records in the zone", "required": false, - "type": "str" + "label": "Allow in-line DNSSEC signing", + "type": "bool" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", + "cli_name": "nsec3param_rec", + "name": "nsec3paramrecord", + "doc": "NSEC3PARAM record for zone in format: hash_algorithm flags iterations salt", "required": false, + "label": "NSEC3PARAM record", "type": "str" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", + "doc": "Time limit of search in seconds (0 is unlimited)", "required": false, - "type": "str" + "type": "int", + "name": "timelimit", + "label": "Time Limit" }, { - "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, - "name": "delattr", + "doc": "Maximum number of entries returned (0 is unlimited)", "required": false, - "type": "str" + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", + "cli_name": "forward_only", + "name": "forward_only", + "default": [ + "False" + ], + "doc": "Search for forward zones only", + "label": "Forward zones only", "positional": false, "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"name\")", + "required": false, + "label": "Primary key only", "type": "bool" } ], - "topic_topic": "caacl/1", - "version": "1" - }, - { - "attr_name": "remove_ca", - "doc": "Remove CAs from a CA ACL.", - "full_name": "caacl_remove_ca/1", - "name": "caacl_remove_ca", - "obj_class": "caacl/1", + "full_name": "dnszone_find/1", "output": [ { - "name": "result", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" + "type": "dict", + "multivalue": true, + "name": "result" }, { - "doc": "Number of members removed", - "name": "completed", - "type": "int" + "doc": "Number of entries returned", + "type": "int", + "name": "count" + }, + { + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], + "obj_class": "dnszone/1", + "topic_topic": "dns/1" + }, + { + "name": "dnszone_mod", + "doc": "Modify DNS zone (SOA record).", + "attr_name": "mod", + "version": "1", "params": [ { "cli_name": "name", - "label": "ACL name", - "name": "cn", - "type": "str" - }, - { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "name": "idnsname", + "alwaysask": true, + "doc": "Zone name (FQDN)", + "label": "Zone name", + "type": "DNSName", + "default_from_param": [ + "name_from_ip" + ], + "no_convert": true }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "doc": "IP network to create reverse zone name from", + "required": false, + "type": "str", + "name": "name_from_ip", + "label": "Reverse zone IP network" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "cli_name": "forwarder", + "name": "idnsforwarders", + "doc": "Per-zone forwarders. A custom port can be specified for each forwarder using a standard format \"IP_ADDRESS port PORT\"", + "required": false, + "label": "Zone forwarders", + "multivalue": true, + "type": "str" }, { - "alwaysask": true, - "cli_name": "cas", - "doc": "Certificate Authorities to remove", - "label": "member Certificate Authority", - "multivalue": true, - "name": "ca", + "cli_name": "forward_policy", + "name": "idnsforwardpolicy", + "cli_metavar": "['only', 'first', 'none']", + "doc": "Per-zone conditional forwarding policy. Set to \"none\" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded.", "required": false, + "label": "Forward policy", "type": "str" - } - ], - "topic_topic": "caacl/1", - "version": "1" - }, - { - "attr_name": "remove_host", - "doc": "Remove target hosts and hostgroups from a CA ACL.", - "full_name": "caacl_remove_host/1", - "name": "caacl_remove_host", - "obj_class": "caacl/1", - "output": [ - { - "name": "result", - "type": "dict" }, { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" + "cli_name": "name_server", + "name": "idnssoamname", + "doc": "Authoritative nameserver domain name", + "required": false, + "label": "Authoritative nameserver", + "type": "DNSName" }, { - "doc": "Number of members removed", - "name": "completed", - "type": "int" - } - ], - "params": [ - { - "cli_name": "name", - "label": "ACL name", - "name": "cn", - "type": "str" + "cli_name": "admin_email", + "name": "idnssoarname", + "alwaysask": true, + "default": [ + "hostmaster" + ], + "doc": "Administrator e-mail address", + "required": false, + "label": "Administrator e-mail address", + "type": "DNSName", + "no_convert": true }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "cli_name": "serial", + "name": "idnssoaserial", + "alwaysask": true, + "doc": "SOA record serial number", + "required": false, + "label": "SOA serial", + "type": "int", + "default_from_param": [] }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, + "cli_name": "refresh", + "name": "idnssoarefresh", + "alwaysask": true, + "default": [ + "3600" + ], + "doc": "SOA record refresh time", + "required": false, + "label": "SOA refresh", + "type": "int" + }, + { + "cli_name": "retry", + "name": "idnssoaretry", + "alwaysask": true, + "default": [ + "900" + ], + "doc": "SOA record retry time", + "required": false, + "label": "SOA retry", + "type": "int" + }, + { + "cli_name": "expire", + "name": "idnssoaexpire", + "alwaysask": true, + "default": [ + "1209600" + ], + "doc": "SOA record expire time", + "required": false, + "label": "SOA expire", + "type": "int" + }, + { + "cli_name": "minimum", + "name": "idnssoaminimum", + "alwaysask": true, + "default": [ + "3600" + ], + "doc": "How long should negative responses be cached", + "required": false, + "label": "SOA minimum", + "type": "int" + }, + { + "cli_name": "ttl", + "name": "dnsttl", + "doc": "Time to live for records at zone apex", + "required": false, + "label": "Time to live", + "type": "int" + }, + { + "cli_name": "default_ttl", + "name": "dnsdefaultttl", + "doc": "Time to live for records without explicit TTL definition", + "required": false, + "label": "Default time to live", + "type": "int" + }, + { + "cli_name": "class", + "name": "dnsclass", + "cli_metavar": "['IN', 'CS', 'CH', 'HS']", + "required": false, + "exclude": [ + "cli", + "webui" + ], + "type": "str" + }, + { + "cli_name": "update_policy", + "name": "idnsupdatepolicy", + "alwaysask": true, + "doc": "BIND update policy", + "required": false, + "label": "BIND update policy", + "type": "str", + "default_from_param": [ + "idnsname" + ] + }, + { + "cli_name": "dynamic_update", + "name": "idnsallowdynupdate", + "alwaysask": true, + "default": [ + "False" + ], + "doc": "Allow dynamic updates.", + "required": false, + "label": "Dynamic update", "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, + "cli_name": "allow_query", + "name": "idnsallowquery", + "alwaysask": true, + "default": [ + "any;" + ], + "doc": "Semicolon separated list of IP addresses or networks which are allowed to issue queries", + "required": false, + "label": "Allow query", + "type": "str", + "no_convert": true + }, + { + "cli_name": "allow_transfer", + "name": "idnsallowtransfer", + "alwaysask": true, + "default": [ + "none;" + ], + "doc": "Semicolon separated list of IP addresses or networks which are allowed to transfer the zone", + "required": false, + "label": "Allow transfer", + "type": "str", + "no_convert": true + }, + { + "cli_name": "allow_sync_ptr", + "name": "idnsallowsyncptr", + "doc": "Allow synchronization of forward (A, AAAA) and reverse (PTR) records in the zone", + "required": false, + "label": "Allow PTR sync", "type": "bool" }, { + "cli_name": "dnssec", + "name": "idnssecinlinesigning", "alwaysask": true, - "cli_name": "hosts", - "doc": "hosts to remove", - "label": "member host", - "multivalue": true, - "name": "host", + "default": [ + "False" + ], + "doc": "Allow inline DNSSEC signing of records in the zone", + "required": false, + "label": "Allow in-line DNSSEC signing", + "type": "bool" + }, + { + "cli_name": "nsec3param_rec", + "name": "nsec3paramrecord", + "doc": "NSEC3PARAM record for zone in format: hash_algorithm flags iterations salt", "required": false, + "label": "NSEC3PARAM record", "type": "str" }, { - "alwaysask": true, - "cli_name": "hostgroups", - "doc": "host groups to remove", - "label": "member host group", - "multivalue": true, - "name": "hostgroup", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" - } - ], - "topic_topic": "caacl/1", - "version": "1" - }, - { - "attr_name": "remove_profile", - "doc": "Remove profiles from a CA ACL.", - "full_name": "caacl_remove_profile/1", - "name": "caacl_remove_profile", - "obj_class": "caacl/1", - "output": [ + }, { - "name": "result", - "type": "dict" + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" }, { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" + "cli_name": "delattr", + "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" }, { - "doc": "Number of members removed", - "name": "completed", - "type": "int" - } - ], - "params": [ + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" + }, { - "cli_name": "name", - "label": "ACL name", - "name": "cn", - "type": "str" + "name": "force", + "default": [ + "False" + ], + "doc": "Force nameserver change even if nameserver not in DNS", + "label": "Force", + "positional": false, + "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" + } + ], + "full_name": "dnszone_mod/1", + "output": [ + { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "type": "dict", + "name": "result" }, { - "alwaysask": true, - "cli_name": "certprofiles", - "doc": "Certificate Profiles to remove", - "label": "member Certificate Profile", - "multivalue": true, - "name": "certprofile", - "required": false, - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "DNSName", + "name": "value" } ], - "topic_topic": "caacl/1", - "version": "1" + "obj_class": "dnszone/1", + "topic_topic": "dns/1" }, { - "attr_name": "remove_service", - "doc": "Remove services from a CA ACL.", - "full_name": "caacl_remove_service/1", - "name": "caacl_remove_service", - "obj_class": "caacl/1", + "name": "dnszone_remove_permission", + "doc": "Remove a permission for per-zone access delegation.", + "attr_name": "remove_permission", + "version": "1", + "params": [ + { + "cli_name": "name", + "name": "idnsname", + "alwaysask": true, + "doc": "Zone name (FQDN)", + "label": "Zone name", + "type": "DNSName", + "default_from_param": [ + "name_from_ip" + ], + "no_convert": true + } + ], + "full_name": "dnszone_remove_permission/1", "output": [ { - "name": "result", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" + "doc": "True means the operation was successful", + "type": "bool", + "name": "result" }, { - "doc": "Number of members removed", - "name": "completed", - "type": "int" + "doc": "Permission value", + "type": "str", + "name": "value" } ], + "obj_class": "dnszone/1", + "topic_topic": "dns/1" + }, + { + "name": "dnszone_show", + "doc": "Display information about a DNS zone (SOA record).", + "attr_name": "show", + "version": "1", "params": [ { "cli_name": "name", - "label": "ACL name", - "name": "cn", - "type": "str" + "name": "idnsname", + "alwaysask": true, + "doc": "Zone name (FQDN)", + "label": "Zone name", + "type": "DNSName", + "default_from_param": [ + "name_from_ip" + ], + "no_convert": true + }, + { + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" + } + ], + "full_name": "dnszone_show/1", + "output": [ + { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "type": "dict", + "name": "result" }, { - "alwaysask": true, - "cli_name": "services", - "doc": "services to remove", - "label": "member service", - "multivalue": true, - "name": "service", - "required": false, - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "DNSName", + "name": "value" } ], - "topic_topic": "caacl/1", - "version": "1" + "obj_class": "dnszone/1", + "topic_topic": "dns/1" }, { - "attr_name": "remove_user", - "doc": "Remove users and groups from a CA ACL.", - "full_name": "caacl_remove_user/1", - "name": "caacl_remove_user", - "obj_class": "caacl/1", + "name": "domainlevel_get", + "doc": "Query current Domain Level.", + "version": "1", + "params": [], + "full_name": "domainlevel_get/1", "output": [ { - "name": "result", - "type": "dict" - }, + "doc": "Current domain level:", + "type": "int", + "name": "result" + } + ], + "topic_topic": "domainlevel/1" + }, + { + "name": "domainlevel_set", + "doc": "Change current Domain Level.", + "version": "1", + "params": [ { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" - }, + "type": "int", + "cli_name": "level", + "name": "ipadomainlevel", + "label": "Domain Level" + } + ], + "full_name": "domainlevel_set/1", + "output": [ { - "doc": "Number of members removed", - "name": "completed", - "type": "int" + "doc": "Current domain level:", + "type": "int", + "name": "result" } ], + "topic_topic": "domainlevel/1" + }, + { + "name": "env", + "doc": "Show environment variables.", + "version": "1", "params": [ { - "cli_name": "name", - "label": "ACL name", - "name": "cn", - "type": "str" + "positional": true, + "type": "str", + "required": false, + "multivalue": true, + "name": "variables" + }, + { + "default": [ + "False" + ], + "doc": "Forward to server instead of running locally", + "required": false, + "type": "bool", + "name": "server" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "True" + ], + "doc": "retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui", + "cli" + ], "type": "bool" - }, + } + ], + "full_name": "env/1", + "output": [ { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "doc": "Dictionary mapping variable name to value", + "type": "dict", + "name": "result" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "doc": "Total number of variables env (>= count)", + "type": "int", + "name": "total" }, { - "alwaysask": true, - "cli_name": "users", - "doc": "users to remove", - "label": "member user", - "multivalue": true, - "name": "user", - "required": false, - "type": "str" + "doc": "Number of variables returned (<= total)", + "type": "int", + "name": "count" }, { - "alwaysask": true, - "cli_name": "groups", - "doc": "groups to remove", - "label": "member group", - "multivalue": true, - "name": "group", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" } ], - "topic_topic": "caacl/1", - "version": "1" + "topic_topic": "misc/1" }, { - "attr_name": "show", - "doc": "Display the properties of a CA ACL.", - "full_name": "caacl_show/1", - "name": "caacl_show", - "obj_class": "caacl/1", - "output": [ + "name": "group_add", + "doc": "Create a new group.", + "attr_name": "add", + "version": "1", + "params": [ { - "doc": "User-friendly description of action performed", - "name": "summary", + "type": "str", + "no_convert": true, + "cli_name": "group_name", + "name": "cn", + "label": "Group name" + }, + { + "cli_name": "desc", + "name": "description", + "doc": "Group description", "required": false, + "label": "Description", "type": "str" }, { - "name": "result", - "type": "dict" + "cli_name": "gid", + "name": "gidnumber", + "doc": "GID (use this option to set it manually)", + "required": false, + "label": "GID", + "type": "int" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" - } - ], - "params": [ + }, { - "cli_name": "name", - "label": "ACL name", - "name": "cn", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", + "cli_name": "nonposix", + "name": "nonposix", + "default": [ + "False" + ], + "doc": "Create as a non-POSIX group", + "positional": false, + "type": "bool" + }, + { + "cli_name": "external", + "name": "external", + "default": [ + "False" + ], + "doc": "Allow adding external non-IPA members from trusted domains", "positional": false, "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "caacl/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for existing certificates.", - "full_name": "cert_find/1", - "name": "cert_find", - "obj_class": "cert/1", + "full_name": "group_add/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" - }, - { - "multivalue": true, - "name": "result", - "type": "dict" + "type": "str", + "name": "summary" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "type": "dict", + "name": "result" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "group/1", + "topic_topic": "group/1" + }, + { + "name": "group_add_member", + "doc": "Add members to a group.", + "attr_name": "add_member", + "version": "1", "params": [ { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, + "type": "str", + "no_convert": true, + "cli_name": "group_name", + "name": "cn", + "label": "Group name" + }, + { + "cli_name": "external", + "name": "ipaexternalmember", + "doc": "Members of a trusted domain in DOM\\name or name@domain form", "required": false, + "label": "External member", + "multivalue": true, "type": "str" }, { - "doc": "Base-64 encoded certificate.", - "label": "Certificate", - "name": "certificate", - "no_convert": true, - "required": false, - "type": "bytes" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": "Issuer DN", - "label": "Issuer", - "name": "issuer", - "required": false, - "type": "DN" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": - "Reason for revoking the certificate (0-10). Type \"ipa help cert\" for revocation reason details. ", - "label": "Revocation reason", - "name": "revocation_reason", - "required": false, - "type": "int" + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "ca", - "doc": "Name of issuing CA", - "label": "Issuing CA", - "name": "cacn", + "cli_name": "users", + "name": "user", + "alwaysask": true, + "doc": "users to add", "required": false, + "label": "member user", + "multivalue": true, "type": "str" }, { - "doc": "Subject", - "label": "Subject", - "name": "subject", - "required": false, + "cli_name": "groups", + "name": "group", + "alwaysask": true, + "doc": "groups to add", + "required": false, + "label": "member group", + "multivalue": true, "type": "str" + } + ], + "full_name": "group_add_member/1", + "output": [ + { + "type": "dict", + "name": "result" }, { - "doc": "minimum serial number", - "name": "min_serial_number", - "required": false, - "type": "int" + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" }, { - "doc": "maximum serial number", - "name": "max_serial_number", - "required": false, - "type": "int" + "doc": "Number of members added", + "type": "int", + "name": "completed" + } + ], + "obj_class": "group/1", + "topic_topic": "group/1" + }, + { + "name": "group_del", + "doc": "Delete group.", + "attr_name": "del", + "version": "1", + "params": [ + { + "cli_name": "group_name", + "name": "cn", + "label": "Group name", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "default": ["False"], - "doc": "match the common name exactly", - "name": "exactly", - "required": false, + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", + "positional": false, "type": "bool" - }, + } + ], + "full_name": "group_del/1", + "output": [ { - "doc": "Valid not after from this date (YYYY-mm-dd)", - "name": "validnotafter_from", - "no_convert": true, + "doc": "User-friendly description of action performed", "required": false, - "type": "datetime" + "type": "str", + "name": "summary" }, { - "doc": "Valid not after to this date (YYYY-mm-dd)", - "name": "validnotafter_to", - "no_convert": true, - "required": false, - "type": "datetime" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "doc": "Valid not before from this date (YYYY-mm-dd)", - "name": "validnotbefore_from", - "no_convert": true, - "required": false, - "type": "datetime" - }, + "type": "str", + "multivalue": true, + "name": "value" + } + ], + "obj_class": "group/1", + "topic_topic": "group/1" + }, + { + "name": "group_detach", + "doc": "Detach a managed group from a user.", + "attr_name": "detach", + "version": "1", + "params": [ { - "doc": "Valid not before to this date (YYYY-mm-dd)", - "name": "validnotbefore_to", + "type": "str", "no_convert": true, + "cli_name": "group_name", + "name": "cn", + "label": "Group name" + } + ], + "full_name": "group_detach/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "datetime" + "type": "str", + "name": "summary" }, { - "doc": "Issued on from this date (YYYY-mm-dd)", - "name": "issuedon_from", - "no_convert": true, - "required": false, - "type": "datetime" + "doc": "True means the operation was successful", + "type": "bool", + "name": "result" }, { - "doc": "Issued on to this date (YYYY-mm-dd)", - "name": "issuedon_to", - "no_convert": true, + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "group/1", + "topic_topic": "group/1" + }, + { + "name": "group_find", + "doc": "Search for groups.", + "attr_name": "find", + "version": "1", + "params": [ + { + "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, - "type": "datetime" + "type": "str", + "name": "criteria" }, { - "doc": "Revoked on from this date (YYYY-mm-dd)", - "name": "revokedon_from", - "no_convert": true, + "cli_name": "group_name", + "name": "cn", "required": false, - "type": "datetime" + "label": "Group name", + "type": "str", + "no_convert": true }, { - "doc": "Revoked on to this date (YYYY-mm-dd)", - "name": "revokedon_to", - "no_convert": true, + "cli_name": "desc", + "name": "description", + "doc": "Group description", "required": false, - "type": "datetime" + "label": "Description", + "type": "str" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"certificate\")", - "label": "Primary key only", - "name": "pkey_only", + "cli_name": "gid", + "name": "gidnumber", + "doc": "GID (use this option to set it manually)", "required": false, - "type": "bool" + "label": "GID", + "type": "int" }, { "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", "required": false, - "type": "int" + "type": "int", + "name": "timelimit", + "label": "Time Limit" }, { "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", "required": false, - "type": "int" + "type": "int", + "name": "sizelimit", + "label": "Size Limit" + }, + { + "cli_name": "private", + "name": "private", + "default": [ + "False" + ], + "doc": "search for private groups", + "positional": false, + "type": "bool" + }, + { + "cli_name": "posix", + "name": "posix", + "default": [ + "False" + ], + "doc": "search for POSIX groups", + "positional": false, + "type": "bool" + }, + { + "cli_name": "external", + "name": "external", + "default": [ + "False" + ], + "doc": "search for groups with support of external non-IPA members from trusted domains", + "positional": false, + "type": "bool" + }, + { + "cli_name": "nonposix", + "name": "nonposix", + "default": [ + "False" + ], + "doc": "search for non-POSIX groups", + "positional": false, + "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["True"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui", "cli"], "name": "no_members", + "default": [ + "True" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui", + "cli" + ], + "type": "bool" + }, + { + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"group-name\")", + "required": false, + "label": "Primary key only", "type": "bool" }, { - "alwaysask": true, "cli_name": "users", - "default_from_param": ["givenname", "sn"], - "doc": "Search for certificates with these owner users.", - "label": "user", - "multivalue": true, "name": "user", - "no_convert": true, + "alwaysask": true, + "doc": "Search for groups with these member users.", "required": false, - "type": "str" + "label": "user", + "multivalue": true, + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true }, { - "alwaysask": true, "cli_name": "no_users", - "default_from_param": ["givenname", "sn"], - "doc": "Search for certificates without these owner users.", + "name": "no_user", + "alwaysask": true, + "doc": "Search for groups without these member users.", + "required": false, "label": "user", "multivalue": true, - "name": "no_user", - "no_convert": true, + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true + }, + { + "cli_name": "groups", + "name": "group", + "doc": "Search for groups with these member groups.", "required": false, - "type": "str" + "label": "group", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_name": "hosts", - "doc": "Search for certificates with these owner hosts.", - "label": "host", + "cli_name": "no_groups", + "name": "no_group", + "doc": "Search for groups without these member groups.", + "required": false, + "label": "group", "multivalue": true, - "name": "host", - "no_convert": true, + "type": "str", + "no_convert": true + }, + { + "cli_name": "in_groups", + "name": "in_group", + "doc": "Search for groups with these member of groups.", "required": false, - "type": "str" + "label": "group", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_name": "no_hosts", - "doc": "Search for certificates without these owner hosts.", - "label": "host", + "cli_name": "not_in_groups", + "name": "not_in_group", + "doc": "Search for groups without these member of groups.", + "required": false, + "label": "group", "multivalue": true, - "name": "no_host", - "no_convert": true, + "type": "str", + "no_convert": true + }, + { + "cli_name": "in_netgroups", + "name": "in_netgroup", + "doc": "Search for groups with these member of netgroups.", "required": false, - "type": "str" + "label": "netgroup", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_name": "services", - "doc": "Search for certificates with these owner services.", - "label": "service", + "cli_name": "not_in_netgroups", + "name": "not_in_netgroup", + "doc": "Search for groups without these member of netgroups.", + "required": false, + "label": "netgroup", "multivalue": true, - "name": "service", - "no_convert": true, + "type": "str", + "no_convert": true + }, + { + "cli_name": "in_roles", + "name": "in_role", + "doc": "Search for groups with these member of roles.", "required": false, - "type": "Principal" + "label": "role", + "multivalue": true, + "type": "str" }, { - "cli_name": "no_services", - "doc": "Search for certificates without these owner services.", - "label": "service", + "cli_name": "not_in_roles", + "name": "not_in_role", + "doc": "Search for groups without these member of roles.", + "required": false, + "label": "role", "multivalue": true, - "name": "no_service", - "no_convert": true, + "type": "str" + }, + { + "cli_name": "in_hbacrules", + "name": "in_hbacrule", + "doc": "Search for groups with these member of HBAC rules.", "required": false, - "type": "Principal" - } - ], - "topic_topic": "cert/1", - "version": "1" - }, - { - "attr_name": "remove_hold", - "doc": "Take a revoked certificate off hold.", - "full_name": "cert_remove_hold/1", - "name": "cert_remove_hold", - "obj_class": "cert/1", - "output": [ + "label": "HBAC rule", + "multivalue": true, + "type": "str" + }, { - "name": "result" - } - ], - "params": [ + "cli_name": "not_in_hbacrules", + "name": "not_in_hbacrule", + "doc": "Search for groups without these member of HBAC rules.", + "required": false, + "label": "HBAC rule", + "multivalue": true, + "type": "str" + }, { - "doc": - "Serial number in decimal or if prefixed with 0x in hexadecimal", - "label": "Serial number", - "name": "serial_number", - "no_convert": true, - "type": "int" + "cli_name": "in_sudorules", + "name": "in_sudorule", + "doc": "Search for groups with these member of sudo rules.", + "required": false, + "label": "sudo rule", + "multivalue": true, + "type": "str" }, { - "cli_name": "ca", - "default": ["ipa"], - "doc": "Name of issuing CA", - "label": "Issuing CA", - "name": "cacn", + "cli_name": "not_in_sudorules", + "name": "not_in_sudorule", + "doc": "Search for groups without these member of sudo rules.", "required": false, + "label": "sudo rule", + "multivalue": true, "type": "str" } ], - "topic_topic": "cert/1", - "version": "1" - }, - { - "attr_name": "request", - "doc": "Submit a certificate signing request.", - "full_name": "cert_request/1", - "name": "cert_request", - "obj_class": "certreq/1", + "full_name": "group_find/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "multivalue": true, + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "int" + "doc": "Number of entries returned", + "type": "int", + "name": "count" + }, + { + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], + "obj_class": "group/1", + "topic_topic": "group/1" + }, + { + "name": "group_mod", + "doc": "Modify a group.", + "attr_name": "mod", + "version": "1", "params": [ { - "cli_name": "csr_file", - "label": "CSR", - "name": "csr", + "type": "str", "no_convert": true, + "cli_name": "group_name", + "name": "cn", + "label": "Group name" + }, + { + "cli_name": "desc", + "name": "description", + "doc": "Group description", + "required": false, + "label": "Description", "type": "str" }, { - "default": ["pkcs10"], - "name": "request_type", - "positional": false, + "cli_name": "gid", + "name": "gidnumber", + "doc": "GID (use this option to set it manually)", + "required": false, + "label": "GID", + "type": "int" + }, + { + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "doc": "Certificate Profile to use", - "label": "Profile ID", - "name": "profile_id", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "ca", - "default": ["ipa"], - "doc": "Name of issuing CA", - "label": "Issuing CA", - "name": "cacn", + "cli_name": "delattr", + "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "doc": - "Principal for this certificate (e.g. HTTP/test.example.com)", - "label": "Principal", - "name": "principal", - "no_convert": true, + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, - "type": "Principal" + "type": "bool" }, { - "default": ["False"], - "doc": - "automatically add the principal if it doesn't exist (service principals only)", - "name": "add", + "cli_name": "posix", + "name": "posix", + "default": [ + "False" + ], + "doc": "change to a POSIX group", + "positional": false, + "type": "bool" + }, + { + "cli_name": "external", + "name": "external", + "default": [ + "False" + ], + "doc": "change to support external non-IPA members from trusted domains", "positional": false, "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - } - ], - "topic_topic": "cert/1", - "version": "1" - }, - { - "attr_name": "revoke", - "doc": "Revoke a certificate.", - "full_name": "cert_revoke/1", - "name": "cert_revoke", - "obj_class": "cert/1", - "output": [ - { - "name": "result" - } - ], - "params": [ - { - "doc": - "Serial number in decimal or if prefixed with 0x in hexadecimal", - "label": "Serial number", - "name": "serial_number", - "no_convert": true, - "type": "int" }, { - "default": ["0"], - "doc": - "Reason for revoking the certificate (0-10). Type \"ipa help cert\" for revocation reason details. ", - "label": "Revocation reason", - "name": "revocation_reason", + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, - "type": "int" + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "ca", - "default": ["ipa"], - "doc": "Name of issuing CA", - "label": "Issuing CA", - "name": "cacn", + "cli_name": "rename", + "name": "rename", + "doc": "Rename the group object", "required": false, - "type": "str" + "label": "Rename", + "type": "str", + "no_convert": true } ], - "topic_topic": "cert/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Retrieve an existing certificate.", - "full_name": "cert_show/1", - "name": "cert_show", - "obj_class": "cert/1", + "full_name": "group_mod/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "group/1", + "topic_topic": "group/1" + }, + { + "name": "group_remove_member", + "doc": "Remove members from a group.", + "attr_name": "remove_member", + "version": "1", "params": [ { - "doc": - "Serial number in decimal or if prefixed with 0x in hexadecimal", - "label": "Serial number", - "name": "serial_number", + "type": "str", "no_convert": true, - "type": "int" - }, - { - "cli_name": "ca", - "default": ["ipa"], - "doc": "Name of issuing CA", - "label": "Issuing CA", - "name": "cacn", - "required": false, - "type": "str" + "cli_name": "group_name", + "name": "cn", + "label": "Group name" }, { - "doc": "File to store the certificate in.", - "exclude": ["webui"], - "label": "Output filename", - "name": "out", + "cli_name": "external", + "name": "ipaexternalmember", + "doc": "Members of a trusted domain in DOM\\name or name@domain form", "required": false, + "label": "External member", + "multivalue": true, "type": "str" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - } - ], - "topic_topic": "cert/1", - "version": "1" - }, - { - "attr_name": "status", - "doc": "Check the status of a certificate signing request.", - "full_name": "cert_status/1", - "name": "cert_status", - "obj_class": "certreq/1", - "output": [ + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "cli_name": "users", + "name": "user", + "alwaysask": true, + "doc": "users to remove", "required": false, + "label": "member user", + "multivalue": true, "type": "str" }, { - "name": "result", - "type": "dict" + "cli_name": "groups", + "name": "group", + "alwaysask": true, + "doc": "groups to remove", + "required": false, + "label": "member group", + "multivalue": true, + "type": "str" + } + ], + "full_name": "group_remove_member/1", + "output": [ + { + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "int" + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" + }, + { + "doc": "Number of members removed", + "type": "int", + "name": "completed" } ], + "obj_class": "group/1", + "topic_topic": "group/1" + }, + { + "name": "group_show", + "doc": "Display information about a named group.", + "attr_name": "show", + "version": "1", "params": [ { - "label": "Request id", - "name": "request_id", - "type": "int" + "type": "str", + "no_convert": true, + "cli_name": "group_name", + "name": "cn", + "label": "Group name" }, { - "cli_name": "ca", - "default": ["ipa"], - "doc": "Name of issuing CA", - "label": "Issuing CA", - "name": "cacn", - "required": false, - "type": "str" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "cert/1", - "version": "1" - }, - { - "attr_name": "del", - "doc": "Delete a Certificate Profile.", - "full_name": "certprofile_del/1", - "name": "certprofile_del", - "obj_class": "certprofile/1", + "full_name": "group_show/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "multivalue": true, - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "group/1", + "topic_topic": "group/1" + }, + { + "name": "hbacrule_add", + "doc": "Create a new HBAC rule.", + "attr_name": "add", + "version": "1", "params": [ { - "cli_name": "id", - "doc": "Profile ID for referring to this profile", - "label": "Profile ID", - "multivalue": true, + "type": "str", + "cli_name": "name", "name": "cn", - "type": "str" + "label": "Rule name" }, { - "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", - "name": "continue", + "cli_name": "type", + "name": "accessruletype", + "cli_metavar": "['allow', 'deny']", + "default": [ + "allow" + ], + "doc": "Rule type (allow)", + "label": "Rule type", "positional": false, - "type": "bool" - } - ], - "topic_topic": "certprofile/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for Certificate Profiles.", - "full_name": "certprofile_find/1", - "name": "certprofile_find", - "obj_class": "certprofile/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, + "exclude": [ + "webui", + "cli" + ], "type": "str" }, { - "multivalue": true, - "name": "result", - "type": "dict" + "cli_name": "usercat", + "name": "usercategory", + "cli_metavar": "['all']", + "doc": "User category the rule applies to", + "required": false, + "label": "User category", + "type": "str" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "cli_name": "hostcat", + "name": "hostcategory", + "cli_metavar": "['all']", + "doc": "Host category the rule applies to", + "required": false, + "label": "Host category", + "type": "str" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" - } - ], - "params": [ - { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, + "cli_name": "srchostcat", + "name": "sourcehostcategory", + "cli_metavar": "['all']", + "doc": "Source host category the rule applies to", "required": false, + "label": "Source host category", + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "cli_name": "id", - "doc": "Profile ID for referring to this profile", - "label": "Profile ID", - "name": "cn", + "cli_name": "servicecat", + "name": "servicecategory", + "cli_metavar": "['all']", + "doc": "Service category the rule applies to", "required": false, + "label": "Service category", "type": "str" }, { + "type": "str", + "required": false, "cli_name": "desc", - "doc": "Brief description of this profile", - "label": "Profile description", "name": "description", + "label": "Description" + }, + { + "exclude": [ + "cli", + "webui" + ], "required": false, - "type": "str" + "type": "bool", + "name": "ipaenabledflag", + "label": "Enabled" }, { - "alwaysask": true, - "cli_name": "store", - "default": ["True"], - "doc": "Whether to store certs issued using this profile", - "label": "Store issued certificates", - "name": "ipacertprofilestoreissued", + "name": "externalhost", "required": false, - "type": "bool" + "label": "External host", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], + "type": "str" }, { - "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, - "type": "int" + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" }, { - "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, - "type": "int" + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"id\")", - "label": "Primary key only", - "name": "pkey_only", - "required": false, + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "certprofile/1", - "version": "1" - }, - { - "attr_name": "import", - "doc": "Import a Certificate Profile.", - "full_name": "certprofile_import/1", - "name": "certprofile_import", - "obj_class": "certprofile/1", + "full_name": "hbacrule_add/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "hbacrule/1", + "topic_topic": "hbacrule/1" + }, + { + "name": "hbacrule_add_host", + "doc": "Add target hosts and hostgroups to an HBAC rule.", + "attr_name": "add_host", + "version": "1", "params": [ { - "cli_name": "id", - "doc": "Profile ID for referring to this profile", - "label": "Profile ID", + "type": "str", + "cli_name": "name", "name": "cn", - "type": "str" - }, - { - "cli_name": "desc", - "doc": "Brief description of this profile", - "label": "Profile description", - "name": "description", - "positional": false, - "type": "str" - }, - { - "alwaysask": true, - "cli_name": "store", - "default": ["True"], - "doc": "Whether to store certs issued using this profile", - "label": "Store issued certificates", - "name": "ipacertprofilestoreissued", - "positional": false, - "type": "bool" - }, - { - "cli_name": "file", - "label": - "Filename of a raw profile. The XML format is not supported.", - "name": "file", - "positional": false, - "type": "str" + "label": "Rule name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - } - ], - "topic_topic": "certprofile/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify Certificate Profile configuration.", - "full_name": "certprofile_mod/1", - "name": "certprofile_mod", - "obj_class": "certprofile/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" - }, - { - "name": "result", - "type": "dict" - }, - { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "id", - "doc": "Profile ID for referring to this profile", - "label": "Profile ID", - "name": "cn", - "type": "str" }, { - "cli_name": "desc", - "doc": "Brief description of this profile", - "label": "Profile description", - "name": "description", - "required": false, - "type": "str" + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { + "cli_name": "hosts", + "name": "host", "alwaysask": true, - "cli_name": "store", - "default": ["True"], - "doc": "Whether to store certs issued using this profile", - "label": "Store issued certificates", - "name": "ipacertprofilestoreissued", + "doc": "hosts to add", "required": false, - "type": "bool" - }, - { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], + "label": "member host", "multivalue": true, - "name": "setattr", - "required": false, "type": "str" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", + "cli_name": "hostgroups", + "name": "hostgroup", + "alwaysask": true, + "doc": "host groups to add", "required": false, - "type": "str" - }, - { - "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], + "label": "member host group", "multivalue": true, - "name": "delattr", - "required": false, - "type": "str" - }, - { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" - }, - { - "cli_name": "file", - "label": "File containing profile configuration", - "name": "file", - "required": false, "type": "str" - }, - { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" - }, - { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" } ], - "topic_topic": "certprofile/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display the properties of a Certificate Profile.", - "full_name": "certprofile_show/1", - "name": "certprofile_show", - "obj_class": "certprofile/1", + "full_name": "hbacrule_add_host/1", "output": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "name": "result", - "type": "dict" + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "Number of members added", + "type": "int", + "name": "completed" } ], + "obj_class": "hbacrule/1", + "topic_topic": "hbacrule/1" + }, + { + "name": "hbacrule_add_service", + "doc": "Add services to an HBAC rule.", + "attr_name": "add_service", + "version": "1", "params": [ { - "cli_name": "id", - "doc": "Profile ID for referring to this profile", - "label": "Profile ID", + "type": "str", + "cli_name": "name", "name": "cn", - "type": "str" - }, - { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" - }, - { - "doc": "Write profile configuration to file", - "name": "out", - "required": false, - "type": "str" + "label": "Rule name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - } - ], - "topic_topic": "certprofile/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for classes.", - "full_name": "class_find/1", - "name": "class_find", - "obj_class": "class/1", - "output": [ + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "hbacsvcs", + "name": "hbacsvc", + "alwaysask": true, + "doc": "HBAC services to add", "required": false, + "label": "member HBAC service", + "multivalue": true, "type": "str" }, { + "cli_name": "hbacsvcgroups", + "name": "hbacsvcgroup", + "alwaysask": true, + "doc": "HBAC service groups to add", + "required": false, + "label": "member HBAC service group", "multivalue": true, - "name": "result", - "type": "dict" + "type": "str" + } + ], + "full_name": "hbacrule_add_service/1", + "output": [ + { + "type": "dict", + "name": "result" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" + "doc": "Number of members added", + "type": "int", + "name": "completed" } ], + "obj_class": "hbacrule/1", + "topic_topic": "hbacrule/1" + }, + { + "version": "1", + "attr_name": "add_sourcehost", + "obj_class": "hbacrule/1", "params": [ { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, - "required": false, - "type": "str" + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Rule name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"name\")", - "label": "Primary key only", - "name": "pkey_only", - "required": false, + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" + }, + { + "cli_name": "hosts", + "name": "host", + "alwaysask": true, + "doc": "hosts to add", + "required": false, + "label": "member host", + "multivalue": true, + "type": "str" + }, + { + "cli_name": "hostgroups", + "name": "hostgroup", + "alwaysask": true, + "doc": "host groups to add", + "required": false, + "label": "member host group", + "multivalue": true, + "type": "str" } ], - "topic_topic": "schema/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display information about a class.", - "full_name": "class_show/1", - "name": "class_show", - "obj_class": "class/1", + "full_name": "hbacrule_add_sourcehost/1", + "exclude": [ + "cli" + ], "output": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "name": "result", - "type": "dict" + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "Number of members added", + "type": "int", + "name": "completed" } ], + "topic_topic": "hbacrule/1", + "name": "hbacrule_add_sourcehost" + }, + { + "name": "hbacrule_add_user", + "doc": "Add users and groups to an HBAC rule.", + "attr_name": "add_user", + "version": "1", "params": [ { - "label": "Full name", - "name": "full_name", - "no_convert": true, - "type": "str" + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Rule name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - } - ], - "topic_topic": "schema/1", - "version": "1" - }, - { - "attr_name": "defaults", - "exclude": ["cli"], - "full_name": "command_defaults/1", - "name": "command_defaults", - "obj_class": "command/1", - "output": [ - { - "name": "result" - } - ], - "params": [ + }, { - "label": "Full name", - "name": "full_name", - "no_convert": true, - "type": "str" + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "multivalue": true, - "name": "params", + "cli_name": "users", + "name": "user", + "alwaysask": true, + "doc": "users to add", "required": false, + "label": "member user", + "multivalue": true, "type": "str" }, { - "name": "kw", + "cli_name": "groups", + "name": "group", + "alwaysask": true, + "doc": "groups to add", "required": false, - "type": "dict" + "label": "member group", + "multivalue": true, + "type": "str" } ], - "topic_topic": "schema/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for commands.", - "full_name": "command_find/1", - "name": "command_find", - "obj_class": "command/1", + "full_name": "hbacrule_add_user/1", "output": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" - }, - { - "multivalue": true, - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" + "doc": "Number of members added", + "type": "int", + "name": "completed" } ], + "obj_class": "hbacrule/1", + "topic_topic": "hbacrule/1" + }, + { + "name": "hbacrule_del", + "doc": "Delete an HBAC rule.", + "attr_name": "del", + "version": "1", "params": [ { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, - "required": false, + "cli_name": "name", + "label": "Rule name", + "multivalue": true, + "name": "cn", "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" - }, - { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", "positional": false, "type": "bool" - }, - { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"name\")", - "label": "Primary key only", - "name": "pkey_only", - "required": false, - "type": "bool" } ], - "topic_topic": "schema/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display information about a command.", - "full_name": "command_show/1", - "name": "command_show", - "obj_class": "command/1", + "full_name": "hbacrule_del/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "type": "str", + "multivalue": true, + "name": "value" } ], + "obj_class": "hbacrule/1", + "topic_topic": "hbacrule/1" + }, + { + "name": "hbacrule_disable", + "doc": "Disable an HBAC rule.", + "attr_name": "disable", + "version": "1", "params": [ { - "label": "Full name", - "name": "full_name", - "no_convert": true, - "type": "str" + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Rule name" + } + ], + "full_name": "hbacrule_disable/1", + "output": [ + { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "doc": "True means the operation was successful", + "type": "bool", + "name": "result" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "topic_topic": "schema/1", - "version": "1" + "obj_class": "hbacrule/1", + "topic_topic": "hbacrule/1" }, { - "doc": - "Determine whether Schema Compatibility plugin is configured to serve trusted domain users and groups", - "exclude": ["cli"], - "full_name": "compat_is_enabled/1", - "name": "compat_is_enabled", - "output": [ + "name": "hbacrule_enable", + "doc": "Enable an HBAC rule.", + "attr_name": "enable", + "version": "1", + "params": [ { - "name": "result" + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Rule name" } ], - "params": [], - "topic_topic": "trust/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify configuration options.", - "full_name": "config_mod/1", - "name": "config_mod", - "obj_class": "config/1", + "full_name": "hbacrule_enable/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "doc": "True means the operation was successful", + "type": "bool", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "NoneType" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "hbacrule/1", + "topic_topic": "hbacrule/1" + }, + { + "name": "hbacrule_find", + "doc": "Search for HBAC rules.", + "attr_name": "find", + "version": "1", "params": [ { - "cli_name": "maxusername", - "label": "Maximum username length", - "name": "ipamaxusernamelength", + "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, - "type": "int" + "type": "str", + "name": "criteria" }, { - "cli_name": "homedirectory", - "doc": "Default location of home directories", - "label": "Home directory base", - "name": "ipahomesrootdir", + "type": "str", + "required": false, + "cli_name": "name", + "name": "cn", + "label": "Rule name" + }, + { + "cli_name": "type", + "name": "accessruletype", + "cli_metavar": "['allow', 'deny']", + "alwaysask": true, + "default": [ + "allow" + ], + "doc": "Rule type (allow)", "required": false, + "label": "Rule type", + "exclude": [ + "webui", + "cli" + ], "type": "str" }, { - "cli_name": "defaultshell", - "doc": "Default shell for new users", - "label": "Default shell", - "name": "ipadefaultloginshell", + "cli_name": "usercat", + "name": "usercategory", + "cli_metavar": "['all']", + "doc": "User category the rule applies to", "required": false, + "label": "User category", "type": "str" }, { - "cli_name": "defaultgroup", - "doc": "Default group for new users", - "label": "Default users group", - "name": "ipadefaultprimarygroup", + "cli_name": "hostcat", + "name": "hostcategory", + "cli_metavar": "['all']", + "doc": "Host category the rule applies to", "required": false, + "label": "Host category", "type": "str" }, { - "cli_name": "emaildomain", - "doc": "Default e-mail domain", - "label": "Default e-mail domain", - "name": "ipadefaultemaildomain", + "cli_name": "srchostcat", + "name": "sourcehostcategory", + "cli_metavar": "['all']", + "doc": "Source host category the rule applies to", "required": false, + "label": "Source host category", + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "cli_name": "searchtimelimit", - "doc": - "Maximum amount of time (seconds) for a search (-1 or 0 is unlimited)", - "label": "Search time limit", - "name": "ipasearchtimelimit", + "cli_name": "servicecat", + "name": "servicecategory", + "cli_metavar": "['all']", + "doc": "Service category the rule applies to", "required": false, - "type": "int" + "label": "Service category", + "type": "str" }, { - "cli_name": "searchrecordslimit", - "doc": - "Maximum number of records to search (-1 or 0 is unlimited)", - "label": "Search size limit", - "name": "ipasearchrecordslimit", + "type": "str", "required": false, - "type": "int" + "cli_name": "desc", + "name": "description", + "label": "Description" }, { - "cli_name": "usersearch", - "doc": - "A comma-separated list of fields to search in when searching for users", - "label": "User search fields", - "name": "ipausersearchfields", + "exclude": [ + "cli", + "webui" + ], "required": false, - "type": "str" + "type": "bool", + "name": "ipaenabledflag", + "label": "Enabled" }, { - "cli_name": "groupsearch", - "doc": - "A comma-separated list of fields to search in when searching for groups", - "label": "Group search fields", - "name": "ipagroupsearchfields", + "name": "externalhost", "required": false, + "label": "External host", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "cli_name": "enable_migration", - "doc": "Enable migration mode", - "label": "Enable migration mode", - "name": "ipamigrationenabled", + "doc": "Time limit of search in seconds (0 is unlimited)", + "required": false, + "type": "int", + "name": "timelimit", + "label": "Time Limit" + }, + { + "doc": "Maximum number of entries returned (0 is unlimited)", "required": false, + "type": "int", + "name": "sizelimit", + "label": "Size Limit" + }, + { + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "cli_name": "groupobjectclasses", - "doc": "Default group objectclasses (comma-separated list)", - "label": "Default group objectclasses", - "multivalue": true, - "name": "ipagroupobjectclasses", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "True" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui", + "cli" + ], + "type": "bool" + }, + { + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"name\")", "required": false, - "type": "str" + "label": "Primary key only", + "type": "bool" + } + ], + "full_name": "hbacrule_find/1", + "output": [ + { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "cli_name": "userobjectclasses", - "doc": "Default user objectclasses (comma-separated list)", - "label": "Default user objectclasses", + "type": "dict", "multivalue": true, - "name": "ipauserobjectclasses", + "name": "result" + }, + { + "doc": "Number of entries returned", + "type": "int", + "name": "count" + }, + { + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" + } + ], + "obj_class": "hbacrule/1", + "topic_topic": "hbacrule/1" + }, + { + "name": "hbacrule_mod", + "doc": "Modify an HBAC rule.", + "attr_name": "mod", + "version": "1", + "params": [ + { + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Rule name" + }, + { + "cli_name": "type", + "name": "accessruletype", + "cli_metavar": "['allow', 'deny']", + "alwaysask": true, + "default": [ + "allow" + ], + "doc": "Rule type (allow)", "required": false, + "label": "Rule type", + "exclude": [ + "webui", + "cli" + ], "type": "str" }, { - "cli_name": "pwdexpnotify", - "doc": "Number of days's notice of impending password expiration", - "label": "Password Expiration Notification (days)", - "name": "ipapwdexpadvnotify", + "cli_name": "usercat", + "name": "usercategory", + "cli_metavar": "['all']", + "doc": "User category the rule applies to", "required": false, - "type": "int" + "label": "User category", + "type": "str" }, { - "cli_metavar": - "['AllowNThash', 'KDC:Disable Last Success', 'KDC:Disable Lockout', 'KDC:Disable Default Preauth for SPNs']", - "cli_name": "ipaconfigstring", - "doc": "Extra hashes to generate in password plug-in", - "label": "Password plugin features", - "multivalue": true, - "name": "ipaconfigstring", + "cli_name": "hostcat", + "name": "hostcategory", + "cli_metavar": "['all']", + "doc": "Host category the rule applies to", "required": false, + "label": "Host category", "type": "str" }, { - "doc": - "Order in increasing priority of SELinux users, delimited by $", - "label": "SELinux user map order", - "name": "ipaselinuxusermaporder", + "cli_name": "srchostcat", + "name": "sourcehostcategory", + "cli_metavar": "['all']", + "doc": "Source host category the rule applies to", "required": false, + "label": "Source host category", + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "doc": - "Default SELinux user when no match is found in SELinux map rule", - "label": "Default SELinux user", - "name": "ipaselinuxusermapdefault", + "cli_name": "servicecat", + "name": "servicecategory", + "cli_metavar": "['all']", + "doc": "Service category the rule applies to", "required": false, + "label": "Service category", "type": "str" }, { - "cli_metavar": "['MS-PAC', 'PAD', 'nfs:NONE']", - "cli_name": "pac_type", - "doc": "Default types of PAC supported for services", - "label": "Default PAC types", - "multivalue": true, - "name": "ipakrbauthzdata", + "type": "str", "required": false, - "type": "str" + "cli_name": "desc", + "name": "description", + "label": "Description" }, { - "cli_metavar": "['password', 'radius', 'otp', 'disabled']", - "cli_name": "user_auth_type", - "doc": "Default types of supported user authentication", - "label": "Default user authentication types", - "multivalue": true, - "name": "ipauserauthtype", + "exclude": [ + "cli", + "webui" + ], "required": false, - "type": "str" + "type": "bool", + "name": "ipaenabledflag", + "label": "Enabled" }, { - "doc": "Renewal master for IPA certificate authority", - "label": "IPA CA renewal master", - "name": "ca_renewal_master_server", + "name": "externalhost", "required": false, + "label": "External host", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" + }, + { + "cli_name": "rename", + "name": "rename", + "doc": "Rename the HBAC rule object", + "required": false, + "label": "Rename", + "type": "str" } ], - "topic_topic": "config/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Show the current configuration.", - "full_name": "config_show/1", - "name": "config_show", - "obj_class": "config/1", + "full_name": "hbacrule_mod/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "NoneType" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "hbacrule/1", + "topic_topic": "hbacrule/1" + }, + { + "name": "hbacrule_remove_host", + "doc": "Remove target hosts and hostgroups from an HBAC rule.", + "attr_name": "remove_host", + "version": "1", "params": [ { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Rule name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" + }, + { + "cli_name": "hosts", + "name": "host", + "alwaysask": true, + "doc": "hosts to remove", + "required": false, + "label": "member host", + "multivalue": true, + "type": "str" + }, + { + "cli_name": "hostgroups", + "name": "hostgroup", + "alwaysask": true, + "doc": "host groups to remove", + "required": false, + "label": "member host group", + "multivalue": true, + "type": "str" } ], - "topic_topic": "config/1", - "version": "1" - }, - { - "attr_name": "add", - "exclude": ["cli"], - "full_name": "cosentry_add/1", - "name": "cosentry_add", - "obj_class": "cosentry/1", + "full_name": "hbacrule_remove_host/1", "output": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "name": "result", - "type": "dict" + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "Number of members removed", + "type": "int", + "name": "completed" } ], + "obj_class": "hbacrule/1", + "topic_topic": "hbacrule/1" + }, + { + "name": "hbacrule_remove_service", + "doc": "Remove service and service groups from an HBAC rule.", + "attr_name": "remove_service", + "version": "1", "params": [ { + "type": "str", + "cli_name": "name", "name": "cn", - "type": "str" + "label": "Rule name" }, { - "name": "krbpwdpolicyreference", + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, - "type": "DN" + "exclude": [ + "webui" + ], + "type": "bool" }, { - "name": "cospriority", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, - "type": "int" + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", - "required": false, - "type": "str" + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], + "cli_name": "hbacsvcs", + "name": "hbacsvc", + "alwaysask": true, + "doc": "HBAC services to remove", + "required": false, + "label": "member HBAC service", "multivalue": true, - "name": "addattr", + "type": "str" + }, + { + "cli_name": "hbacsvcgroups", + "name": "hbacsvcgroup", + "alwaysask": true, + "doc": "HBAC service groups to remove", "required": false, + "label": "member HBAC service group", + "multivalue": true, "type": "str" + } + ], + "full_name": "hbacrule_remove_service/1", + "output": [ + { + "type": "dict", + "name": "result" + }, + { + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" + }, + { + "doc": "Number of members removed", + "type": "int", + "name": "completed" + } + ], + "obj_class": "hbacrule/1", + "topic_topic": "hbacrule/1" + }, + { + "version": "1", + "attr_name": "remove_sourcehost", + "obj_class": "hbacrule/1", + "params": [ + { + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Rule name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - } - ], - "topic_topic": "pwpolicy/1", - "version": "1" - }, - { - "attr_name": "del", - "exclude": ["cli"], - "full_name": "cosentry_del/1", - "name": "cosentry_del", - "obj_class": "cosentry/1", - "output": [ + }, { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "cli_name": "hosts", + "name": "host", + "alwaysask": true, + "doc": "hosts to remove", + "required": false, + "label": "member host", + "multivalue": true, + "type": "str" }, { + "cli_name": "hostgroups", + "name": "hostgroup", + "alwaysask": true, + "doc": "host groups to remove", + "required": false, + "label": "member host group", "multivalue": true, - "name": "value", "type": "str" } ], - "params": [ + "full_name": "hbacrule_remove_sourcehost/1", + "exclude": [ + "cli" + ], + "output": [ { - "multivalue": true, - "name": "cn", - "type": "str" + "type": "dict", + "name": "result" }, { - "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", - "name": "continue", - "positional": false, - "type": "bool" + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" + }, + { + "doc": "Number of members removed", + "type": "int", + "name": "completed" } ], - "topic_topic": "pwpolicy/1", - "version": "1" + "topic_topic": "hbacrule/1", + "name": "hbacrule_remove_sourcehost" }, { - "attr_name": "find", - "exclude": ["cli"], - "full_name": "cosentry_find/1", - "name": "cosentry_find", - "obj_class": "cosentry/1", - "output": [ + "name": "hbacrule_remove_user", + "doc": "Remove users and groups from an HBAC rule.", + "attr_name": "remove_user", + "version": "1", + "params": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Rule name" }, { - "multivalue": true, - "name": "result", - "type": "dict" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": "True if not all results were returned", - "name": "truncated", + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - } - ], - "params": [ + }, { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, + "cli_name": "users", + "name": "user", + "alwaysask": true, + "doc": "users to remove", "required": false, + "label": "member user", + "multivalue": true, "type": "str" }, { - "name": "cn", + "cli_name": "groups", + "name": "group", + "alwaysask": true, + "doc": "groups to remove", "required": false, + "label": "member group", + "multivalue": true, "type": "str" - }, + } + ], + "full_name": "hbacrule_remove_user/1", + "output": [ { - "name": "krbpwdpolicyreference", - "required": false, - "type": "DN" + "type": "dict", + "name": "result" }, { - "name": "cospriority", - "required": false, - "type": "int" + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" }, { - "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", - "required": false, - "type": "int" + "doc": "Number of members removed", + "type": "int", + "name": "completed" + } + ], + "obj_class": "hbacrule/1", + "topic_topic": "hbacrule/1" + }, + { + "name": "hbacrule_show", + "doc": "Display the properties of an HBAC rule.", + "attr_name": "show", + "version": "1", + "params": [ + { + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Rule name" }, { - "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", - "required": false, - "type": "int" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"cn\")", - "label": "Primary key only", - "name": "pkey_only", - "required": false, + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "pwpolicy/1", - "version": "1" - }, - { - "attr_name": "mod", - "exclude": ["cli"], - "full_name": "cosentry_mod/1", - "name": "cosentry_mod", - "obj_class": "cosentry/1", + "full_name": "hbacrule_show/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "hbacrule/1", + "topic_topic": "hbacrule/1" + }, + { + "name": "hbacsvc_add", + "doc": "Add a new HBAC service.", + "attr_name": "add", + "version": "1", "params": [ { + "cli_name": "service", "name": "cn", - "type": "str" - }, - { - "name": "krbpwdpolicyreference", - "required": false, - "type": "DN" + "doc": "HBAC service", + "label": "Service name", + "type": "str", + "no_convert": true }, { - "name": "cospriority", + "cli_name": "desc", + "name": "description", + "doc": "HBAC service description", "required": false, - "type": "int" + "label": "Description", + "type": "str" }, { "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, - "type": "str" - }, - { - "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], "multivalue": true, - "name": "delattr", - "required": false, + "exclude": [ + "webui" + ], "type": "str" }, - { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" - }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "pwpolicy/1", - "version": "1" - }, - { - "attr_name": "show", - "exclude": ["cli"], - "full_name": "cosentry_show/1", - "name": "cosentry_show", - "obj_class": "cosentry/1", + "full_name": "hbacsvc_add/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "hbacsvc/1", + "topic_topic": "hbacsvc/1" + }, + { + "name": "hbacsvc_del", + "doc": "Delete an existing HBAC service.", + "attr_name": "del", + "version": "1", "params": [ { + "cli_name": "service", "name": "cn", - "type": "str" - }, - { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" - }, - { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "doc": "HBAC service", + "label": "Service name", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", "positional": false, "type": "bool" } ], - "topic_topic": "pwpolicy/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Add a new delegation.", - "full_name": "delegation_add/1", - "name": "delegation_add", - "obj_class": "delegation/1", + "full_name": "hbacsvc_del/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "type": "str", + "multivalue": true, + "name": "value" } ], + "obj_class": "hbacsvc/1", + "topic_topic": "hbacsvc/1" + }, + { + "name": "hbacsvc_find", + "doc": "Search for HBAC services.", + "attr_name": "find", + "version": "1", "params": [ { - "cli_name": "name", - "doc": "Delegation name", - "label": "Delegation name", - "name": "aciname", - "type": "str" + "positional": true, + "doc": "A string searched in all relevant object attributes", + "required": false, + "type": "str", + "name": "criteria" }, { - "cli_name": "permissions", - "doc": "Permissions to grant (read, write). Default is write.", - "label": "Permissions", - "multivalue": true, - "name": "permissions", + "cli_name": "service", + "name": "cn", + "doc": "HBAC service", "required": false, - "type": "str" + "label": "Service name", + "type": "str", + "no_convert": true }, { - "cli_name": "attrs", - "doc": "Attributes to which the delegation applies", - "label": "Attributes", - "multivalue": true, - "name": "attrs", - "no_convert": true, - "positional": false, + "cli_name": "desc", + "name": "description", + "doc": "HBAC service description", + "required": false, + "label": "Description", "type": "str" }, { - "cli_name": "membergroup", - "doc": "User group to apply delegation to", - "label": "Member user group", - "name": "memberof", - "positional": false, - "type": "str" + "doc": "Time limit of search in seconds (0 is unlimited)", + "required": false, + "type": "int", + "name": "timelimit", + "label": "Time Limit" }, { - "cli_name": "group", - "doc": "User group ACI grants access to", - "label": "User group", - "name": "group", - "positional": false, - "type": "str" + "doc": "Maximum number of entries returned (0 is unlimited)", + "required": false, + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - } - ], - "topic_topic": "delegation/1", - "version": "1" - }, - { - "attr_name": "del", - "doc": "Delete a delegation.", - "full_name": "delegation_del/1", - "name": "delegation_del", - "obj_class": "delegation/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" }, { - "doc": "True means the operation was successful", - "name": "result", + "name": "no_members", + "default": [ + "True" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui", + "cli" + ], "type": "bool" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "name", - "doc": "Delegation name", - "label": "Delegation name", - "name": "aciname", - "type": "str" + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"service\")", + "required": false, + "label": "Primary key only", + "type": "bool" } ], - "topic_topic": "delegation/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for delegations.", - "full_name": "delegation_find/1", - "name": "delegation_find", - "obj_class": "delegation/1", + "full_name": "hbacsvc_find/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { + "type": "dict", "multivalue": true, - "name": "result", - "type": "dict" + "name": "result" }, { "doc": "Number of entries returned", - "name": "count", - "type": "int" + "type": "int", + "name": "count" }, { "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" + "type": "bool", + "name": "truncated" } ], + "obj_class": "hbacsvc/1", + "topic_topic": "hbacsvc/1" + }, + { + "name": "hbacsvc_mod", + "doc": "Modify an HBAC service.", + "attr_name": "mod", + "version": "1", "params": [ { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, - "required": false, - "type": "str" + "cli_name": "service", + "name": "cn", + "doc": "HBAC service", + "label": "Service name", + "type": "str", + "no_convert": true }, { - "cli_name": "name", - "doc": "Delegation name", - "label": "Delegation name", - "name": "aciname", + "cli_name": "desc", + "name": "description", + "doc": "HBAC service description", "required": false, + "label": "Description", "type": "str" }, { - "cli_name": "permissions", - "doc": "Permissions to grant (read, write). Default is write.", - "label": "Permissions", - "multivalue": true, - "name": "permissions", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, - "type": "str" - }, - { - "cli_name": "attrs", - "doc": "Attributes to which the delegation applies", - "label": "Attributes", "multivalue": true, - "name": "attrs", - "no_convert": true, - "required": false, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "membergroup", - "doc": "User group to apply delegation to", - "label": "Member user group", - "name": "memberof", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "group", - "doc": "User group ACI grants access to", - "label": "User group", - "name": "group", + "cli_name": "delattr", + "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"name\")", - "label": "Primary key only", - "name": "pkey_only", - "required": false, + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "delegation/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify a delegation.", - "full_name": "delegation_mod/1", - "name": "delegation_mod", - "obj_class": "delegation/1", + "full_name": "hbacsvc_mod/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "hbacsvc/1", + "topic_topic": "hbacsvc/1" + }, + { + "name": "hbacsvc_show", + "doc": "Display information about an HBAC service.", + "attr_name": "show", + "version": "1", "params": [ { - "cli_name": "name", - "doc": "Delegation name", - "label": "Delegation name", - "name": "aciname", - "type": "str" + "cli_name": "service", + "name": "cn", + "doc": "HBAC service", + "label": "Service name", + "type": "str", + "no_convert": true }, { - "cli_name": "permissions", - "doc": "Permissions to grant (read, write). Default is write.", - "label": "Permissions", - "multivalue": true, - "name": "permissions", + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" + }, + { + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "hbacsvc_show/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "cli_name": "attrs", - "doc": "Attributes to which the delegation applies", - "label": "Attributes", - "multivalue": true, - "name": "attrs", + "type": "dict", + "name": "result" + }, + { + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "hbacsvc/1", + "topic_topic": "hbacsvc/1" + }, + { + "name": "hbacsvcgroup_add", + "doc": "Add a new HBAC service group.", + "attr_name": "add", + "version": "1", + "params": [ + { + "type": "str", "no_convert": true, + "cli_name": "name", + "name": "cn", + "label": "Service group name" + }, + { + "cli_name": "desc", + "name": "description", + "doc": "HBAC service group description", "required": false, + "label": "Description", "type": "str" }, { - "cli_name": "membergroup", - "doc": "User group to apply delegation to", - "label": "Member user group", - "name": "memberof", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "group", - "doc": "User group ACI grants access to", - "label": "User group", - "name": "group", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "delegation/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display information about a delegation.", - "full_name": "delegation_show/1", - "name": "delegation_show", - "obj_class": "delegation/1", + "full_name": "hbacsvcgroup_add/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "hbacsvcgroup/1", + "topic_topic": "hbacsvcgroup/1" + }, + { + "name": "hbacsvcgroup_add_member", + "doc": "Add members to an HBAC service group.", + "attr_name": "add_member", + "version": "1", "params": [ { + "type": "str", + "no_convert": true, "cli_name": "name", - "doc": "Delegation name", - "label": "Delegation name", - "name": "aciname", - "type": "str" + "name": "cn", + "label": "Service group name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" + }, + { + "cli_name": "hbacsvcs", + "name": "hbacsvc", + "alwaysask": true, + "doc": "HBAC services to add", + "required": false, + "label": "member HBAC service", + "multivalue": true, + "type": "str" } ], - "topic_topic": "delegation/1", - "version": "1" - }, - { - "doc": - "\n Checks if any of the servers has the DNS service enabled.\n ", - "exclude": ["cli"], - "full_name": "dns_is_enabled/1", - "name": "dns_is_enabled", + "full_name": "hbacsvcgroup_add_member/1", "output": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "doc": "True means the operation was successful", - "name": "result", - "type": "bool" + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "NoneType" + "doc": "Number of members added", + "type": "int", + "name": "completed" } ], - "params": [], - "topic_topic": "dns/1", - "version": "1" + "obj_class": "hbacsvcgroup/1", + "topic_topic": "hbacsvcgroup/1" }, { - "doc": "Resolve a host name in DNS. (Deprecated)", - "exclude": ["cli"], - "full_name": "dns_resolve/1", - "name": "dns_resolve", + "name": "hbacsvcgroup_del", + "doc": "Delete an HBAC service group.", + "attr_name": "del", + "version": "1", + "params": [ + { + "cli_name": "name", + "name": "cn", + "label": "Service group name", + "multivalue": true, + "type": "str", + "no_convert": true + }, + { + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", + "positional": false, + "type": "bool" + } + ], + "full_name": "hbacsvcgroup_del/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "True means the operation was successful", - "name": "result", - "type": "bool" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "name": "value", - "type": "str" - } - ], - "params": [ - { - "label": "Hostname (FQDN)", - "name": "hostname", - "type": "str" + "type": "str", + "multivalue": true, + "name": "value" } ], - "topic_topic": "dns/1", - "version": "1" + "obj_class": "hbacsvcgroup/1", + "topic_topic": "hbacsvcgroup/1" }, { - "attr_name": "update", - "doc": "Update location and IPA server DNS records", - "full_name": "dns_update_system_records/1", - "name": "dns_update_system_records", - "obj_class": "dns_system_records/1", - "output": [ + "name": "hbacsvcgroup_find", + "doc": "Search for an HBAC service group.", + "attr_name": "find", + "version": "1", + "params": [ { - "name": "result", - "type": "dict" + "positional": true, + "doc": "A string searched in all relevant object attributes", + "required": false, + "type": "str", + "name": "criteria" }, { - "doc": "Result of the command", - "name": "value", - "type": "bool" - } - ], - "params": [ + "cli_name": "name", + "name": "cn", + "required": false, + "label": "Service group name", + "type": "str", + "no_convert": true + }, { - "default": ["False"], - "doc": "Do not update records only return expected records", - "label": "Dry run", - "name": "dry_run", - "positional": false, - "type": "bool" + "cli_name": "desc", + "name": "description", + "doc": "HBAC service group description", + "required": false, + "label": "Description", + "type": "str" + }, + { + "doc": "Time limit of search in seconds (0 is unlimited)", + "required": false, + "type": "int", + "name": "timelimit", + "label": "Time Limit" + }, + { + "doc": "Maximum number of entries returned (0 is unlimited)", + "required": false, + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "True" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui", + "cli" + ], + "type": "bool" + }, + { + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"name\")", + "required": false, + "label": "Primary key only", "type": "bool" } ], - "topic_topic": "dns/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify global DNS configuration.", - "full_name": "dnsconfig_mod/1", - "name": "dnsconfig_mod", - "obj_class": "dnsconfig/1", + "full_name": "hbacsvcgroup_find/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "multivalue": true, + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "NoneType" + "doc": "Number of entries returned", + "type": "int", + "name": "count" + }, + { + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], + "obj_class": "hbacsvcgroup/1", + "topic_topic": "hbacsvcgroup/1" + }, + { + "name": "hbacsvcgroup_mod", + "doc": "Modify an HBAC service group.", + "attr_name": "mod", + "version": "1", "params": [ { - "cli_name": "forwarder", - "doc": - "Global forwarders. A custom port can be specified for each forwarder using a standard format \"IP_ADDRESS port PORT\"", - "label": "Global forwarders", - "multivalue": true, - "name": "idnsforwarders", - "required": false, - "type": "str" + "type": "str", + "no_convert": true, + "cli_name": "name", + "name": "cn", + "label": "Service group name" }, { - "cli_metavar": "['only', 'first', 'none']", - "cli_name": "forward_policy", - "doc": - "Global forwarding policy. Set to \"none\" to disable any configured global forwarders.", - "label": "Forward policy", - "name": "idnsforwardpolicy", + "cli_name": "desc", + "name": "description", + "doc": "HBAC service group description", "required": false, + "label": "Description", "type": "str" }, - { - "cli_name": "allow_sync_ptr", - "doc": - "Allow synchronization of forward (A, AAAA) and reverse (PTR) records", - "label": "Allow PTR sync", - "name": "idnsallowsyncptr", - "required": false, - "type": "bool" - }, - { - "cli_name": "zone_refresh", - "doc": - "An interval between regular polls of the name server for new DNS zones", - "exclude": ["cli", "webui"], - "label": "Zone refresh interval", - "name": "idnszonerefresh", - "required": false, - "type": "int" - }, { "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "dns/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Show the current global DNS configuration.", - "full_name": "dnsconfig_show/1", - "name": "dnsconfig_show", - "obj_class": "dnsconfig/1", + "full_name": "hbacsvcgroup_mod/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "NoneType" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "hbacsvcgroup/1", + "topic_topic": "hbacsvcgroup/1" + }, + { + "name": "hbacsvcgroup_remove_member", + "doc": "Remove members from an HBAC service group.", + "attr_name": "remove_member", + "version": "1", "params": [ { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "type": "str", + "no_convert": true, + "cli_name": "name", + "name": "cn", + "label": "Service group name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - } - ], - "topic_topic": "dns/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Create new DNS forward zone.", - "full_name": "dnsforwardzone_add/1", - "name": "dnsforwardzone_add", - "obj_class": "dnsforwardzone/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" }, { - "name": "result", - "type": "dict" + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "DNSName" - } - ], - "params": [ - { + "cli_name": "hbacsvcs", + "name": "hbacsvc", "alwaysask": true, - "cli_name": "name", - "default_from_param": ["name_from_ip"], - "doc": "Zone name (FQDN)", - "label": "Zone name", - "name": "idnsname", - "no_convert": true, - "type": "DNSName" - }, - { - "doc": "IP network to create reverse zone name from", - "label": "Reverse zone IP network", - "name": "name_from_ip", + "doc": "HBAC services to remove", "required": false, - "type": "str" - }, - { - "cli_name": "forwarder", - "doc": - "Per-zone forwarders. A custom port can be specified for each forwarder using a standard format \"IP_ADDRESS port PORT\"", - "label": "Zone forwarders", + "label": "member HBAC service", "multivalue": true, - "name": "idnsforwarders", - "required": false, "type": "str" - }, + } + ], + "full_name": "hbacsvcgroup_remove_member/1", + "output": [ { - "cli_metavar": "['only', 'first', 'none']", - "cli_name": "forward_policy", - "doc": - "Per-zone conditional forwarding policy. Set to \"none\" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded.", - "label": "Forward policy", - "name": "idnsforwardpolicy", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", - "required": false, - "type": "str" + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", - "required": false, - "type": "str" + "doc": "Number of members removed", + "type": "int", + "name": "completed" + } + ], + "obj_class": "hbacsvcgroup/1", + "topic_topic": "hbacsvcgroup/1" + }, + { + "name": "hbacsvcgroup_show", + "doc": "Display information about an HBAC service group.", + "attr_name": "show", + "version": "1", + "params": [ + { + "type": "str", + "no_convert": true, + "cli_name": "name", + "name": "cn", + "label": "Service group name" }, { - "default": ["False"], - "doc": - "Force DNS zone creation even if it will overlap with an existing zone.", - "name": "skip_overlap_check", + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "dns/1", - "version": "1" - }, - { - "attr_name": "add_permission", - "doc": "Add a permission for per-forward zone access delegation.", - "full_name": "dnsforwardzone_add_permission/1", - "name": "dnsforwardzone_add_permission", - "obj_class": "dnsforwardzone/1", + "full_name": "hbacsvcgroup_show/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "True means the operation was successful", - "name": "result", - "type": "bool" + "type": "dict", + "name": "result" }, { - "doc": "Permission value", - "name": "value", - "type": "str" - } - ], - "params": [ - { - "alwaysask": true, - "cli_name": "name", - "default_from_param": ["name_from_ip"], - "doc": "Zone name (FQDN)", - "label": "Zone name", - "name": "idnsname", - "no_convert": true, - "type": "DNSName" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "topic_topic": "dns/1", - "version": "1" + "obj_class": "hbacsvcgroup/1", + "topic_topic": "hbacsvcgroup/1" }, { - "attr_name": "del", - "doc": "Delete DNS forward zone.", - "full_name": "dnsforwardzone_del/1", - "name": "dnsforwardzone_del", - "obj_class": "dnsforwardzone/1", - "output": [ + "name": "hbactest", + "doc": "Simulate use of Host-based access controls", + "version": "1", + "params": [ { - "doc": "User-friendly description of action performed", - "name": "summary", + "positional": false, + "type": "str", + "cli_name": "user", + "name": "user", + "label": "User name" + }, + { + "cli_name": "srchost", + "name": "sourcehost", "required": false, + "label": "Source host", + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "positional": false, + "type": "str", + "cli_name": "host", + "name": "targethost", + "label": "Target host" }, { - "multivalue": true, - "name": "value", - "type": "DNSName" - } - ], - "params": [ + "positional": false, + "type": "str", + "cli_name": "service", + "name": "service", + "label": "Service" + }, { - "alwaysask": true, - "cli_name": "name", - "default_from_param": ["name_from_ip"], - "doc": "Zone name (FQDN)", - "label": "Zone name", + "cli_name": "rules", + "name": "rules", + "required": false, + "label": "Rules to test. If not specified, --enabled is assumed", "multivalue": true, - "name": "idnsname", - "no_convert": true, - "type": "DNSName" + "type": "str" }, { - "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", - "name": "continue", - "positional": false, + "cli_name": "nodetail", + "name": "nodetail", + "default": [ + "False" + ], + "required": false, + "label": "Hide details which rules are matched, not matched, or invalid", "type": "bool" - } - ], - "topic_topic": "dns/1", - "version": "1" - }, - { - "attr_name": "disable", - "doc": "Disable DNS Forward Zone.", - "full_name": "dnsforwardzone_disable/1", - "name": "dnsforwardzone_disable", - "obj_class": "dnsforwardzone/1", - "output": [ + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "cli_name": "enabled", + "name": "enabled", + "default": [ + "False" + ], "required": false, - "type": "str" + "label": "Include all enabled IPA rules into test [default]", + "type": "bool" }, { - "doc": "True means the operation was successful", - "name": "result", + "cli_name": "disabled", + "name": "disabled", + "default": [ + "False" + ], + "required": false, + "label": "Include all disabled IPA rules into test", "type": "bool" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "DNSName" - } - ], - "params": [ - { - "alwaysask": true, - "cli_name": "name", - "default_from_param": ["name_from_ip"], - "doc": "Zone name (FQDN)", - "label": "Zone name", - "name": "idnsname", - "no_convert": true, - "type": "DNSName" + "doc": "Maximum number of rules to process when no --rules is specified", + "required": false, + "type": "int", + "name": "sizelimit", + "label": "Size Limit" } ], - "topic_topic": "dns/1", - "version": "1" - }, - { - "attr_name": "enable", - "doc": "Enable DNS Forward Zone.", - "full_name": "dnsforwardzone_enable/1", - "name": "dnsforwardzone_enable", - "obj_class": "dnsforwardzone/1", + "full_name": "hbactest/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "True means the operation was successful", - "name": "result", - "type": "bool" + "doc": "Warning", + "required": false, + "multivalue": true, + "name": "warning" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "DNSName" - } - ], - "params": [ - { - "alwaysask": true, - "cli_name": "name", - "default_from_param": ["name_from_ip"], - "doc": "Zone name (FQDN)", - "label": "Zone name", - "name": "idnsname", - "no_convert": true, - "type": "DNSName" - } - ], - "topic_topic": "dns/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for DNS forward zones.", - "full_name": "dnsforwardzone_find/1", - "name": "dnsforwardzone_find", - "obj_class": "dnsforwardzone/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", + "doc": "Matched rules", "required": false, - "type": "str" + "multivalue": true, + "name": "matched" }, { + "doc": "Not matched rules", + "required": false, "multivalue": true, - "name": "result", - "type": "dict" + "name": "notmatched" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "doc": "Non-existent or invalid rules", + "required": false, + "multivalue": true, + "name": "error" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" + "doc": "Result of simulation", + "type": "bool", + "name": "value" } ], + "topic_topic": "hbactest/1" + }, + { + "name": "host_add", + "doc": "Add a new host.", + "attr_name": "add", + "version": "1", "params": [ { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, - "required": false, - "type": "str" + "type": "str", + "no_convert": true, + "cli_name": "hostname", + "name": "fqdn", + "label": "Host name" }, { - "alwaysask": true, - "cli_name": "name", - "default_from_param": ["name_from_ip"], - "doc": "Zone name (FQDN)", - "label": "Zone name", - "name": "idnsname", - "no_convert": true, + "cli_name": "desc", + "name": "description", + "doc": "A description of this host", "required": false, - "type": "DNSName" + "label": "Description", + "type": "str" }, { - "doc": "IP network to create reverse zone name from", - "label": "Reverse zone IP network", - "name": "name_from_ip", + "cli_name": "locality", + "name": "l", + "doc": "Host locality (e.g. \"Baltimore, MD\")", "required": false, + "label": "Locality", "type": "str" }, { - "cli_name": "zone_active", - "doc": "Is zone active?", - "label": "Active zone", - "name": "idnszoneactive", + "cli_name": "location", + "name": "nshostlocation", + "doc": "Host location (e.g. \"Lab 2\")", "required": false, - "type": "bool" + "label": "Location", + "type": "str" }, { - "cli_name": "forwarder", - "doc": - "Per-zone forwarders. A custom port can be specified for each forwarder using a standard format \"IP_ADDRESS port PORT\"", - "label": "Zone forwarders", - "multivalue": true, - "name": "idnsforwarders", + "cli_name": "platform", + "name": "nshardwareplatform", + "doc": "Host hardware platform (e.g. \"Lenovo T61\")", "required": false, + "label": "Platform", "type": "str" }, { - "cli_metavar": "['only', 'first', 'none']", - "cli_name": "forward_policy", - "doc": - "Per-zone conditional forwarding policy. Set to \"none\" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded.", - "label": "Forward policy", - "name": "idnsforwardpolicy", + "cli_name": "os", + "name": "nsosversion", + "doc": "Host operating system and version (e.g. \"Fedora 9\")", "required": false, + "label": "Operating system", "type": "str" }, { - "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", + "cli_name": "password", + "name": "userpassword", + "doc": "Password used in bulk enrollment", "required": false, - "type": "int" + "label": "User password", + "type": "str" }, { - "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", + "default": [ + "False" + ], + "doc": "Generate a random password to be used in bulk enrollment", "required": false, - "type": "int" + "type": "bool", + "name": "random" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "cli_name": "certificate", + "name": "usercertificate", + "doc": "Base-64 encoded host certificate", + "required": false, + "label": "Certificate", + "multivalue": true, + "type": "Certificate" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "name": "macaddress", + "doc": "Hardware MAC address(es) on this host", + "required": false, + "label": "MAC address", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"name\")", - "label": "Primary key only", - "name": "pkey_only", + "cli_name": "sshpubkey", + "name": "ipasshpubkey", "required": false, - "type": "bool" - } - ], - "topic_topic": "dns/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify DNS forward zone.", - "full_name": "dnsforwardzone_mod/1", - "name": "dnsforwardzone_mod", - "obj_class": "dnsforwardzone/1", - "output": [ + "label": "SSH public key", + "multivalue": true, + "type": "str", + "no_convert": true + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "cli_name": "class", + "name": "userclass", + "doc": "Host category (semantics placed on this attribute are for local interpretation)", "required": false, + "label": "Class", + "multivalue": true, "type": "str" }, { - "name": "result", - "type": "dict" + "exclude": [ + "cli", + "webui" + ], + "required": false, + "type": "str", + "name": "ipaassignedidview", + "label": "Assigned ID View" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "DNSName" - } - ], - "params": [ - { - "alwaysask": true, - "cli_name": "name", - "default_from_param": ["name_from_ip"], - "doc": "Zone name (FQDN)", - "label": "Zone name", - "name": "idnsname", - "no_convert": true, - "type": "DNSName" + "cli_name": "auth_ind", + "name": "krbprincipalauthind", + "doc": "Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations.", + "required": false, + "label": "Authentication Indicators", + "multivalue": true, + "type": "str" }, { - "doc": "IP network to create reverse zone name from", - "label": "Reverse zone IP network", - "name": "name_from_ip", + "cli_name": "requires_pre_auth", + "name": "ipakrbrequirespreauth", + "doc": "Pre-authentication is required for the service", "required": false, - "type": "str" + "label": "Requires pre-authentication", + "type": "bool" }, { - "cli_name": "forwarder", - "doc": - "Per-zone forwarders. A custom port can be specified for each forwarder using a standard format \"IP_ADDRESS port PORT\"", - "label": "Zone forwarders", - "multivalue": true, - "name": "idnsforwarders", + "cli_name": "ok_as_delegate", + "name": "ipakrbokasdelegate", + "doc": "Client credentials may be delegated to the service", "required": false, - "type": "str" + "label": "Trusted for delegation", + "type": "bool" }, { - "cli_metavar": "['only', 'first', 'none']", - "cli_name": "forward_policy", - "doc": - "Per-zone conditional forwarding policy. Set to \"none\" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded.", - "label": "Forward policy", - "name": "idnsforwardpolicy", + "cli_name": "ok_to_auth_as_delegate", + "name": "ipakrboktoauthasdelegate", + "doc": "The service is allowed to authenticate on behalf of a client", "required": false, - "type": "str" + "label": "Trusted to authenticate as user", + "type": "bool" }, { "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, - "type": "str" - }, - { - "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], "multivalue": true, - "name": "delattr", - "required": false, + "exclude": [ + "webui" + ], "type": "str" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", + "name": "force", + "default": [ + "False" + ], + "doc": "force host name even if not in DNS", + "label": "Force", "positional": false, "type": "bool" }, + { + "positional": false, + "default": [ + "False" + ], + "type": "bool", + "name": "no_reverse", + "doc": "skip reverse DNS detection" + }, + { + "doc": "Add the host to DNS with this IP address", + "required": false, + "type": "str", + "name": "ip_address", + "label": "IP Address" + }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "dns/1", - "version": "1" - }, - { - "attr_name": "remove_permission", - "doc": "Remove a permission for per-forward zone access delegation.", - "full_name": "dnsforwardzone_remove_permission/1", - "name": "dnsforwardzone_remove_permission", - "obj_class": "dnsforwardzone/1", + "full_name": "host_add/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "True means the operation was successful", - "name": "result", - "type": "bool" + "type": "dict", + "name": "result" }, { - "doc": "Permission value", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "host/1", + "topic_topic": "host/1" + }, + { + "name": "host_add_cert", + "doc": "Add certificates to host entry", + "attr_name": "add_cert", + "version": "1", "params": [ { - "alwaysask": true, - "cli_name": "name", - "default_from_param": ["name_from_ip"], - "doc": "Zone name (FQDN)", - "label": "Zone name", - "name": "idnsname", + "type": "str", "no_convert": true, - "type": "DNSName" + "cli_name": "hostname", + "name": "fqdn", + "label": "Host name" + }, + { + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "certificate", + "name": "usercertificate", + "alwaysask": true, + "doc": "Base-64 encoded host certificate", + "label": "Certificate", + "positional": false, + "multivalue": true, + "type": "Certificate" } ], - "topic_topic": "dns/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display information about a DNS forward zone.", - "full_name": "dnsforwardzone_show/1", - "name": "dnsforwardzone_show", - "obj_class": "dnsforwardzone/1", + "full_name": "host_add_cert/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "DNSName" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "host/1", + "topic_topic": "host/1" + }, + { + "name": "host_add_managedby", + "doc": "Add hosts that can manage this host.", + "attr_name": "add_managedby", + "version": "1", "params": [ { - "alwaysask": true, - "cli_name": "name", - "default_from_param": ["name_from_ip"], - "doc": "Zone name (FQDN)", - "label": "Zone name", - "name": "idnsname", + "type": "str", "no_convert": true, - "type": "DNSName" - }, - { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "cli_name": "hostname", + "name": "fqdn", + "label": "Host name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" + }, + { + "cli_name": "hosts", + "name": "host", + "alwaysask": true, + "doc": "hosts to add", + "required": false, + "label": "member host", + "multivalue": true, + "type": "str" } ], - "topic_topic": "dns/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Add new DNS resource record.", - "full_name": "dnsrecord_add/1", - "name": "dnsrecord_add", - "obj_class": "dnsrecord/1", + "full_name": "host_add_managedby/1", "output": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "name": "result", - "type": "dict" + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "DNSName" + "doc": "Number of members added", + "type": "int", + "name": "completed" } ], + "obj_class": "host/1", + "topic_topic": "host/1" + }, + { + "name": "host_add_principal", + "doc": "Add new principal alias to host entry", + "attr_name": "add_principal", + "version": "1", "params": [ { - "alwaysask": true, - "cli_name": "dnszone", - "default_from_param": ["name_from_ip"], - "doc": "Zone name (FQDN)", - "label": "Zone name", - "name": "dnszoneidnsname", + "type": "str", "no_convert": true, - "type": "DNSName" - }, - { - "cli_name": "name", - "doc": "Record name", - "label": "Record name", - "name": "idnsname", - "type": "DNSName" + "cli_name": "hostname", + "name": "fqdn", + "label": "Host name" }, { - "cli_name": "ttl", - "doc": "Time to live", - "label": "Time to live", - "name": "dnsttl", - "required": false, - "type": "int" + "name": "krbprincipalname", + "alwaysask": true, + "label": "Principal alias", + "multivalue": true, + "type": "Principal", + "no_convert": true }, { - "cli_metavar": "['IN', 'CS', 'CH', 'HS']", - "cli_name": "class", - "exclude": ["cli", "webui"], - "name": "dnsclass", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "a_rec", - "doc": "Raw A records", - "label": "A record", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "host_add_principal/1", + "output": [ + { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" + }, + { + "type": "dict", + "name": "result" + }, + { + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "host/1", + "topic_topic": "host/1" + }, + { + "name": "host_allow_create_keytab", + "doc": "Allow users, groups, hosts or host groups to create a keytab of this host.", + "attr_name": "allow_create_keytab", + "version": "1", + "params": [ + { + "type": "str", + "no_convert": true, + "cli_name": "hostname", + "name": "fqdn", + "label": "Host name" + }, + { + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "users", + "name": "user", + "alwaysask": true, + "doc": "users to add", + "required": false, + "label": "member user", "multivalue": true, - "name": "arecord", - "option_group": "A Record", + "type": "str" + }, + { + "cli_name": "groups", + "name": "group", + "alwaysask": true, + "doc": "groups to add", "required": false, + "label": "member group", + "multivalue": true, "type": "str" }, { - "cli_name": "a_ip_address", - "label": "A IP Address", - "name": "a_part_ip_address", - "option_group": "A Record", + "cli_name": "hosts", + "name": "host", + "alwaysask": true, + "doc": "hosts to add", "required": false, + "label": "member host", + "multivalue": true, "type": "str" }, { - "cli_name": "a_create_reverse", - "default": ["False"], - "doc": "Create reverse record for this IP Address", - "label": "A Create reverse", - "name": "a_extra_create_reverse", - "option_group": "A Record", + "cli_name": "hostgroups", + "name": "hostgroup", + "alwaysask": true, + "doc": "host groups to add", "required": false, + "label": "member host group", + "multivalue": true, + "type": "str" + } + ], + "full_name": "host_allow_create_keytab/1", + "output": [ + { + "type": "dict", + "name": "result" + }, + { + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" + }, + { + "doc": "Number of members added", + "type": "int", + "name": "completed" + } + ], + "obj_class": "host/1", + "topic_topic": "host/1" + }, + { + "name": "host_allow_retrieve_keytab", + "doc": "Allow users, groups, hosts or host groups to retrieve a keytab of this host.", + "attr_name": "allow_retrieve_keytab", + "version": "1", + "params": [ + { + "type": "str", + "no_convert": true, + "cli_name": "hostname", + "name": "fqdn", + "label": "Host name" + }, + { + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "cli_name": "aaaa_rec", - "doc": "Raw AAAA records", - "label": "AAAA record", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "users", + "name": "user", + "alwaysask": true, + "doc": "users to add", + "required": false, + "label": "member user", "multivalue": true, - "name": "aaaarecord", - "option_group": "AAAA Record", + "type": "str" + }, + { + "cli_name": "groups", + "name": "group", + "alwaysask": true, + "doc": "groups to add", "required": false, + "label": "member group", + "multivalue": true, "type": "str" }, { - "cli_name": "aaaa_ip_address", - "label": "AAAA IP Address", - "name": "aaaa_part_ip_address", - "option_group": "AAAA Record", + "cli_name": "hosts", + "name": "host", + "alwaysask": true, + "doc": "hosts to add", "required": false, + "label": "member host", + "multivalue": true, "type": "str" }, { - "cli_name": "aaaa_create_reverse", - "default": ["False"], - "doc": "Create reverse record for this IP Address", - "label": "AAAA Create reverse", - "name": "aaaa_extra_create_reverse", - "option_group": "AAAA Record", + "cli_name": "hostgroups", + "name": "hostgroup", + "alwaysask": true, + "doc": "host groups to add", "required": false, + "label": "member host group", + "multivalue": true, + "type": "str" + } + ], + "full_name": "host_allow_retrieve_keytab/1", + "output": [ + { + "type": "dict", + "name": "result" + }, + { + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" + }, + { + "doc": "Number of members added", + "type": "int", + "name": "completed" + } + ], + "obj_class": "host/1", + "topic_topic": "host/1" + }, + { + "name": "host_del", + "doc": "Delete a host.", + "attr_name": "del", + "version": "1", + "params": [ + { + "cli_name": "hostname", + "name": "fqdn", + "label": "Host name", + "multivalue": true, + "type": "str", + "no_convert": true + }, + { + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", + "positional": false, "type": "bool" }, { - "cli_name": "a6_rec", - "doc": "Raw A6 records", - "label": "A6 record", + "default": [ + "False" + ], + "doc": "Remove A, AAAA, SSHFP and PTR records of the host(s) managed by IPA DNS", + "required": false, + "type": "bool", + "name": "updatedns" + } + ], + "full_name": "host_del/1", + "output": [ + { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" + }, + { + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" + }, + { + "type": "str", "multivalue": true, - "name": "a6record", - "option_group": "A6 Record", + "name": "value" + } + ], + "obj_class": "host/1", + "topic_topic": "host/1" + }, + { + "name": "host_disable", + "doc": "Disable the Kerberos key, SSL certificate and all services of a host.", + "attr_name": "disable", + "version": "1", + "params": [ + { + "type": "str", + "no_convert": true, + "cli_name": "hostname", + "name": "fqdn", + "label": "Host name" + } + ], + "full_name": "host_disable/1", + "output": [ + { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" + }, + { + "doc": "True means the operation was successful", + "type": "bool", + "name": "result" + }, + { + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "host/1", + "topic_topic": "host/1" + }, + { + "name": "host_disallow_create_keytab", + "doc": "Disallow users, groups, hosts or host groups to create a keytab of this host.", + "attr_name": "disallow_create_keytab", + "version": "1", + "params": [ + { + "type": "str", + "no_convert": true, + "cli_name": "hostname", + "name": "fqdn", + "label": "Host name" + }, + { + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "users", + "name": "user", + "alwaysask": true, + "doc": "users to remove", "required": false, + "label": "member user", + "multivalue": true, "type": "str" }, { - "cli_name": "a6_data", - "label": "A6 Record data", - "name": "a6_part_data", - "option_group": "A6 Record", + "cli_name": "groups", + "name": "group", + "alwaysask": true, + "doc": "groups to remove", "required": false, + "label": "member group", + "multivalue": true, "type": "str" }, { - "cli_name": "afsdb_rec", - "doc": "Raw AFSDB records", - "label": "AFSDB record", + "cli_name": "hosts", + "name": "host", + "alwaysask": true, + "doc": "hosts to remove", + "required": false, + "label": "member host", "multivalue": true, - "name": "afsdbrecord", - "option_group": "AFSDB Record", + "type": "str" + }, + { + "cli_name": "hostgroups", + "name": "hostgroup", + "alwaysask": true, + "doc": "host groups to remove", "required": false, + "label": "member host group", + "multivalue": true, "type": "str" + } + ], + "full_name": "host_disallow_create_keytab/1", + "output": [ + { + "type": "dict", + "name": "result" }, { - "cli_name": "afsdb_subtype", - "label": "AFSDB Subtype", - "name": "afsdb_part_subtype", - "option_group": "AFSDB Record", + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" + }, + { + "doc": "Number of members removed", + "type": "int", + "name": "completed" + } + ], + "obj_class": "host/1", + "topic_topic": "host/1" + }, + { + "name": "host_disallow_retrieve_keytab", + "doc": "Disallow users, groups, hosts or host groups to retrieve a keytab of this host.", + "attr_name": "disallow_retrieve_keytab", + "version": "1", + "params": [ + { + "type": "str", + "no_convert": true, + "cli_name": "hostname", + "name": "fqdn", + "label": "Host name" + }, + { + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "users", + "name": "user", + "alwaysask": true, + "doc": "users to remove", "required": false, - "type": "int" + "label": "member user", + "multivalue": true, + "type": "str" }, { - "cli_name": "afsdb_hostname", - "label": "AFSDB Hostname", - "name": "afsdb_part_hostname", - "option_group": "AFSDB Record", + "cli_name": "groups", + "name": "group", + "alwaysask": true, + "doc": "groups to remove", "required": false, - "type": "DNSName" + "label": "member group", + "multivalue": true, + "type": "str" }, { - "cli_name": "apl_rec", - "doc": "Raw APL records", - "exclude": ["cli", "webui"], - "label": "APL record", + "cli_name": "hosts", + "name": "host", + "alwaysask": true, + "doc": "hosts to remove", + "required": false, + "label": "member host", "multivalue": true, - "name": "aplrecord", - "option_group": "APL Record", + "type": "str" + }, + { + "cli_name": "hostgroups", + "name": "hostgroup", + "alwaysask": true, + "doc": "host groups to remove", "required": false, + "label": "member host group", + "multivalue": true, "type": "str" + } + ], + "full_name": "host_disallow_retrieve_keytab/1", + "output": [ + { + "type": "dict", + "name": "result" }, { - "cli_name": "cert_rec", - "doc": "Raw CERT records", - "label": "CERT record", + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" + }, + { + "doc": "Number of members removed", + "type": "int", + "name": "completed" + } + ], + "obj_class": "host/1", + "topic_topic": "host/1" + }, + { + "name": "host_find", + "doc": "Search for hosts.", + "attr_name": "find", + "version": "1", + "params": [ + { + "positional": true, + "doc": "A string searched in all relevant object attributes", + "required": false, + "type": "str", + "name": "criteria" + }, + { + "cli_name": "hostname", + "name": "fqdn", + "required": false, + "label": "Host name", + "type": "str", + "no_convert": true + }, + { + "cli_name": "desc", + "name": "description", + "doc": "A description of this host", + "required": false, + "label": "Description", + "type": "str" + }, + { + "cli_name": "locality", + "name": "l", + "doc": "Host locality (e.g. \"Baltimore, MD\")", + "required": false, + "label": "Locality", + "type": "str" + }, + { + "cli_name": "location", + "name": "nshostlocation", + "doc": "Host location (e.g. \"Lab 2\")", + "required": false, + "label": "Location", + "type": "str" + }, + { + "cli_name": "platform", + "name": "nshardwareplatform", + "doc": "Host hardware platform (e.g. \"Lenovo T61\")", + "required": false, + "label": "Platform", + "type": "str" + }, + { + "cli_name": "os", + "name": "nsosversion", + "doc": "Host operating system and version (e.g. \"Fedora 9\")", + "required": false, + "label": "Operating system", + "type": "str" + }, + { + "cli_name": "password", + "name": "userpassword", + "doc": "Password used in bulk enrollment", + "required": false, + "label": "User password", + "type": "str" + }, + { + "cli_name": "certificate", + "name": "usercertificate", + "doc": "Base-64 encoded host certificate", + "required": false, + "label": "Certificate", "multivalue": true, - "name": "certrecord", - "option_group": "CERT Record", + "type": "Certificate" + }, + { + "name": "macaddress", + "doc": "Hardware MAC address(es) on this host", + "required": false, + "label": "MAC address", + "multivalue": true, + "type": "str", + "no_convert": true + }, + { + "cli_name": "class", + "name": "userclass", + "doc": "Host category (semantics placed on this attribute are for local interpretation)", + "required": false, + "label": "Class", + "multivalue": true, + "type": "str" + }, + { + "exclude": [ + "cli", + "webui" + ], + "required": false, + "type": "str", + "name": "ipaassignedidview", + "label": "Assigned ID View" + }, + { + "cli_name": "auth_ind", + "name": "krbprincipalauthind", + "doc": "Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations.", + "required": false, + "label": "Authentication Indicators", + "multivalue": true, + "type": "str" + }, + { + "doc": "Time limit of search in seconds (0 is unlimited)", + "required": false, + "type": "int", + "name": "timelimit", + "label": "Time Limit" + }, + { + "doc": "Maximum number of entries returned (0 is unlimited)", + "required": false, + "type": "int", + "name": "sizelimit", + "label": "Size Limit" + }, + { + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "True" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui", + "cli" + ], + "type": "bool" + }, + { + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"hostname\")", + "required": false, + "label": "Primary key only", + "type": "bool" + }, + { + "cli_name": "in_hostgroups", + "name": "in_hostgroup", + "doc": "Search for hosts with these member of host groups.", "required": false, - "type": "str" + "label": "host group", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_name": "cert_type", - "label": "CERT Certificate Type", - "name": "cert_part_type", - "option_group": "CERT Record", + "cli_name": "not_in_hostgroups", + "name": "not_in_hostgroup", + "doc": "Search for hosts without these member of host groups.", "required": false, - "type": "int" + "label": "host group", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_name": "cert_key_tag", - "label": "CERT Key Tag", - "name": "cert_part_key_tag", - "option_group": "CERT Record", + "cli_name": "in_netgroups", + "name": "in_netgroup", + "doc": "Search for hosts with these member of netgroups.", "required": false, - "type": "int" + "label": "netgroup", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_name": "cert_algorithm", - "label": "CERT Algorithm", - "name": "cert_part_algorithm", - "option_group": "CERT Record", + "cli_name": "not_in_netgroups", + "name": "not_in_netgroup", + "doc": "Search for hosts without these member of netgroups.", "required": false, - "type": "int" + "label": "netgroup", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_name": "cert_certificate_or_crl", - "label": "CERT Certificate/CRL", - "name": "cert_part_certificate_or_crl", - "option_group": "CERT Record", + "cli_name": "in_roles", + "name": "in_role", + "doc": "Search for hosts with these member of roles.", "required": false, + "label": "role", + "multivalue": true, "type": "str" }, { - "cli_name": "cname_rec", - "doc": "Raw CNAME records", - "label": "CNAME record", - "multivalue": true, - "name": "cnamerecord", - "option_group": "CNAME Record", + "cli_name": "not_in_roles", + "name": "not_in_role", + "doc": "Search for hosts without these member of roles.", "required": false, + "label": "role", + "multivalue": true, "type": "str" }, { - "cli_name": "cname_hostname", - "doc": "A hostname which this alias hostname points to", - "label": "CNAME Hostname", - "name": "cname_part_hostname", - "option_group": "CNAME Record", + "cli_name": "in_hbacrules", + "name": "in_hbacrule", + "doc": "Search for hosts with these member of HBAC rules.", "required": false, - "type": "DNSName" + "label": "HBAC rule", + "multivalue": true, + "type": "str" }, { - "cli_name": "dhcid_rec", - "doc": "Raw DHCID records", - "exclude": ["cli", "webui"], - "label": "DHCID record", - "multivalue": true, - "name": "dhcidrecord", - "option_group": "DHCID Record", + "cli_name": "not_in_hbacrules", + "name": "not_in_hbacrule", + "doc": "Search for hosts without these member of HBAC rules.", "required": false, + "label": "HBAC rule", + "multivalue": true, "type": "str" }, { - "cli_name": "dlv_rec", - "doc": "Raw DLV records", - "label": "DLV record", - "multivalue": true, - "name": "dlvrecord", - "option_group": "DLV Record", + "cli_name": "in_sudorules", + "name": "in_sudorule", + "doc": "Search for hosts with these member of sudo rules.", "required": false, + "label": "sudo rule", + "multivalue": true, "type": "str" }, { - "cli_name": "dlv_key_tag", - "label": "DLV Key Tag", - "name": "dlv_part_key_tag", - "option_group": "DLV Record", + "cli_name": "not_in_sudorules", + "name": "not_in_sudorule", + "doc": "Search for hosts without these member of sudo rules.", "required": false, - "type": "int" + "label": "sudo rule", + "multivalue": true, + "type": "str" }, { - "cli_name": "dlv_algorithm", - "label": "DLV Algorithm", - "name": "dlv_part_algorithm", - "option_group": "DLV Record", + "cli_name": "enroll_by_users", + "name": "enroll_by_user", + "alwaysask": true, + "doc": "Search for hosts with these enrolled by users.", "required": false, - "type": "int" + "label": "user", + "multivalue": true, + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true }, { - "cli_name": "dlv_digest_type", - "label": "DLV Digest Type", - "name": "dlv_part_digest_type", - "option_group": "DLV Record", + "cli_name": "not_enroll_by_users", + "name": "not_enroll_by_user", + "alwaysask": true, + "doc": "Search for hosts without these enrolled by users.", "required": false, - "type": "int" + "label": "user", + "multivalue": true, + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true }, { - "cli_name": "dlv_digest", - "label": "DLV Digest", - "name": "dlv_part_digest", - "option_group": "DLV Record", + "cli_name": "man_by_hosts", + "name": "man_by_host", + "doc": "Search for hosts with these managed by hosts.", "required": false, - "type": "str" + "label": "host", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_name": "dname_rec", - "doc": "Raw DNAME records", - "label": "DNAME record", - "multivalue": true, - "name": "dnamerecord", - "option_group": "DNAME Record", + "cli_name": "not_man_by_hosts", + "name": "not_man_by_host", + "doc": "Search for hosts without these managed by hosts.", "required": false, - "type": "str" + "label": "host", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_name": "dname_target", - "label": "DNAME Target", - "name": "dname_part_target", - "option_group": "DNAME Record", + "cli_name": "man_hosts", + "name": "man_host", + "doc": "Search for hosts with these managing hosts.", "required": false, - "type": "DNSName" + "label": "host", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_name": "ds_rec", - "doc": "Raw DS records", - "label": "DS record", + "cli_name": "not_man_hosts", + "name": "not_man_host", + "doc": "Search for hosts without these managing hosts.", + "required": false, + "label": "host", "multivalue": true, - "name": "dsrecord", - "option_group": "DS Record", + "type": "str", + "no_convert": true + } + ], + "full_name": "host_find/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "cli_name": "ds_key_tag", - "label": "DS Key Tag", - "name": "ds_part_key_tag", - "option_group": "DS Record", - "required": false, - "type": "int" + "type": "dict", + "multivalue": true, + "name": "result" }, { - "cli_name": "ds_algorithm", - "label": "DS Algorithm", - "name": "ds_part_algorithm", - "option_group": "DS Record", - "required": false, - "type": "int" + "doc": "Number of entries returned", + "type": "int", + "name": "count" }, { - "cli_name": "ds_digest_type", - "label": "DS Digest Type", - "name": "ds_part_digest_type", - "option_group": "DS Record", - "required": false, - "type": "int" + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" + } + ], + "obj_class": "host/1", + "topic_topic": "host/1" + }, + { + "name": "host_mod", + "doc": "Modify information about a host.", + "attr_name": "mod", + "version": "1", + "params": [ + { + "type": "str", + "no_convert": true, + "cli_name": "hostname", + "name": "fqdn", + "label": "Host name" }, { - "cli_name": "ds_digest", - "label": "DS Digest", - "name": "ds_part_digest", - "option_group": "DS Record", + "cli_name": "desc", + "name": "description", + "doc": "A description of this host", "required": false, + "label": "Description", "type": "str" }, { - "cli_name": "hip_rec", - "doc": "Raw HIP records", - "exclude": ["cli", "webui"], - "label": "HIP record", - "multivalue": true, - "name": "hiprecord", - "option_group": "HIP Record", + "cli_name": "locality", + "name": "l", + "doc": "Host locality (e.g. \"Baltimore, MD\")", "required": false, + "label": "Locality", "type": "str" }, { - "cli_name": "ipseckey_rec", - "doc": "Raw IPSECKEY records", - "exclude": ["cli", "webui"], - "label": "IPSECKEY record", - "multivalue": true, - "name": "ipseckeyrecord", - "option_group": "IPSECKEY Record", + "cli_name": "location", + "name": "nshostlocation", + "doc": "Host location (e.g. \"Lab 2\")", "required": false, + "label": "Location", "type": "str" }, { - "cli_name": "key_rec", - "doc": "Raw KEY records", - "exclude": ["cli", "webui"], - "label": "KEY record", - "multivalue": true, - "name": "keyrecord", - "option_group": "KEY Record", + "cli_name": "platform", + "name": "nshardwareplatform", + "doc": "Host hardware platform (e.g. \"Lenovo T61\")", "required": false, + "label": "Platform", "type": "str" }, { - "cli_name": "kx_rec", - "doc": "Raw KX records", - "label": "KX record", - "multivalue": true, - "name": "kxrecord", - "option_group": "KX Record", + "cli_name": "os", + "name": "nsosversion", + "doc": "Host operating system and version (e.g. \"Fedora 9\")", "required": false, + "label": "Operating system", "type": "str" }, { - "cli_name": "kx_preference", - "doc": - "Preference given to this exchanger. Lower values are more preferred", - "label": "KX Preference", - "name": "kx_part_preference", - "option_group": "KX Record", + "cli_name": "password", + "name": "userpassword", + "doc": "Password used in bulk enrollment", "required": false, - "type": "int" + "label": "User password", + "type": "str" }, { - "cli_name": "kx_exchanger", - "doc": "A host willing to act as a key exchanger", - "label": "KX Exchanger", - "name": "kx_part_exchanger", - "option_group": "KX Record", + "default": [ + "False" + ], + "doc": "Generate a random password to be used in bulk enrollment", "required": false, - "type": "DNSName" + "type": "bool", + "name": "random" }, { - "cli_name": "loc_rec", - "doc": "Raw LOC records", - "label": "LOC record", - "multivalue": true, - "name": "locrecord", - "option_group": "LOC Record", + "cli_name": "certificate", + "name": "usercertificate", + "doc": "Base-64 encoded host certificate", "required": false, - "type": "str" + "label": "Certificate", + "multivalue": true, + "type": "Certificate" }, { - "cli_name": "loc_lat_deg", - "label": "LOC Degrees Latitude", - "name": "loc_part_lat_deg", - "option_group": "LOC Record", + "name": "krbprincipalname", "required": false, - "type": "int" + "label": "Principal alias", + "multivalue": true, + "type": "Principal", + "no_convert": true }, { - "cli_name": "loc_lat_min", - "label": "LOC Minutes Latitude", - "name": "loc_part_lat_min", - "option_group": "LOC Record", + "name": "macaddress", + "doc": "Hardware MAC address(es) on this host", "required": false, - "type": "int" + "label": "MAC address", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_name": "loc_lat_sec", - "label": "LOC Seconds Latitude", - "name": "loc_part_lat_sec", - "no_convert": true, - "option_group": "LOC Record", + "cli_name": "sshpubkey", + "name": "ipasshpubkey", "required": false, - "type": "Decimal" + "label": "SSH public key", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_metavar": "['N', 'S']", - "cli_name": "loc_lat_dir", - "label": "LOC Direction Latitude", - "name": "loc_part_lat_dir", - "option_group": "LOC Record", + "cli_name": "class", + "name": "userclass", + "doc": "Host category (semantics placed on this attribute are for local interpretation)", "required": false, + "label": "Class", + "multivalue": true, "type": "str" }, { - "cli_name": "loc_lon_deg", - "label": "LOC Degrees Longitude", - "name": "loc_part_lon_deg", - "option_group": "LOC Record", + "exclude": [ + "cli", + "webui" + ], "required": false, - "type": "int" + "type": "str", + "name": "ipaassignedidview", + "label": "Assigned ID View" }, { - "cli_name": "loc_lon_min", - "label": "LOC Minutes Longitude", - "name": "loc_part_lon_min", - "option_group": "LOC Record", + "cli_name": "auth_ind", + "name": "krbprincipalauthind", + "doc": "Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations.", "required": false, - "type": "int" + "label": "Authentication Indicators", + "multivalue": true, + "type": "str" }, { - "cli_name": "loc_lon_sec", - "label": "LOC Seconds Longitude", - "name": "loc_part_lon_sec", - "no_convert": true, - "option_group": "LOC Record", + "cli_name": "requires_pre_auth", + "name": "ipakrbrequirespreauth", + "doc": "Pre-authentication is required for the service", "required": false, - "type": "Decimal" + "label": "Requires pre-authentication", + "type": "bool" }, { - "cli_metavar": "['E', 'W']", - "cli_name": "loc_lon_dir", - "label": "LOC Direction Longitude", - "name": "loc_part_lon_dir", - "option_group": "LOC Record", + "cli_name": "ok_as_delegate", + "name": "ipakrbokasdelegate", + "doc": "Client credentials may be delegated to the service", "required": false, - "type": "str" + "label": "Trusted for delegation", + "type": "bool" }, { - "cli_name": "loc_altitude", - "label": "LOC Altitude", - "name": "loc_part_altitude", - "no_convert": true, - "option_group": "LOC Record", + "cli_name": "ok_to_auth_as_delegate", + "name": "ipakrboktoauthasdelegate", + "doc": "The service is allowed to authenticate on behalf of a client", "required": false, - "type": "Decimal" + "label": "Trusted to authenticate as user", + "type": "bool" }, { - "cli_name": "loc_size", - "label": "LOC Size", - "name": "loc_part_size", - "no_convert": true, - "option_group": "LOC Record", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, - "type": "Decimal" + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" }, { - "cli_name": "loc_h_precision", - "label": "LOC Horizontal Precision", - "name": "loc_part_h_precision", - "no_convert": true, - "option_group": "LOC Record", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, - "type": "Decimal" + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" }, { - "cli_name": "loc_v_precision", - "label": "LOC Vertical Precision", - "name": "loc_part_v_precision", - "no_convert": true, - "option_group": "LOC Record", + "cli_name": "delattr", + "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, - "type": "Decimal" - }, - { - "cli_name": "mx_rec", - "doc": "Raw MX records", - "label": "MX record", "multivalue": true, - "name": "mxrecord", - "option_group": "MX Record", - "required": false, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "mx_preference", - "doc": - "Preference given to this exchanger. Lower values are more preferred", - "label": "MX Preference", - "name": "mx_part_preference", - "option_group": "MX Record", - "required": false, - "type": "int" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { - "cli_name": "mx_exchanger", - "doc": "A host willing to act as a mail exchanger", - "label": "MX Exchanger", - "name": "mx_part_exchanger", - "option_group": "MX Record", + "default": [ + "False" + ], + "doc": "Update DNS entries", "required": false, - "type": "DNSName" + "type": "bool", + "name": "updatedns" }, { - "cli_name": "naptr_rec", - "doc": "Raw NAPTR records", - "label": "NAPTR record", - "multivalue": true, - "name": "naptrrecord", - "option_group": "NAPTR Record", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "naptr_order", - "label": "NAPTR Order", - "name": "naptr_part_order", - "option_group": "NAPTR Record", - "required": false, - "type": "int" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "naptr_preference", - "label": "NAPTR Preference", - "name": "naptr_part_preference", - "option_group": "NAPTR Record", + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "host_mod/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "int" + "type": "str", + "name": "summary" }, { - "cli_name": "naptr_flags", - "label": "NAPTR Flags", - "name": "naptr_part_flags", - "no_convert": true, - "option_group": "NAPTR Record", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "cli_name": "naptr_service", - "label": "NAPTR Service", - "name": "naptr_part_service", - "option_group": "NAPTR Record", - "required": false, - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "host/1", + "topic_topic": "host/1" + }, + { + "name": "host_remove_cert", + "doc": "Remove certificates from host entry", + "attr_name": "remove_cert", + "version": "1", + "params": [ + { + "type": "str", + "no_convert": true, + "cli_name": "hostname", + "name": "fqdn", + "label": "Host name" }, { - "cli_name": "naptr_regexp", - "label": "NAPTR Regular Expression", - "name": "naptr_part_regexp", - "option_group": "NAPTR Record", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "naptr_replacement", - "label": "NAPTR Replacement", - "name": "naptr_part_replacement", - "option_group": "NAPTR Record", - "required": false, - "type": "str" + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "ns_rec", - "doc": "Raw NS records", - "label": "NS record", + "cli_name": "certificate", + "name": "usercertificate", + "alwaysask": true, + "doc": "Base-64 encoded host certificate", + "label": "Certificate", + "positional": false, "multivalue": true, - "name": "nsrecord", - "option_group": "NS Record", + "type": "Certificate" + } + ], + "full_name": "host_remove_cert/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "cli_name": "ns_hostname", - "label": "NS Hostname", - "name": "ns_part_hostname", - "option_group": "NS Record", - "required": false, - "type": "DNSName" + "type": "dict", + "name": "result" }, { - "cli_name": "nsec_rec", - "doc": "Raw NSEC records", - "exclude": ["cli", "webui"], - "label": "NSEC record", - "multivalue": true, - "name": "nsecrecord", - "option_group": "NSEC Record", - "required": false, - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "host/1", + "topic_topic": "host/1" + }, + { + "name": "host_remove_managedby", + "doc": "Remove hosts that can manage this host.", + "attr_name": "remove_managedby", + "version": "1", + "params": [ + { + "type": "str", + "no_convert": true, + "cli_name": "hostname", + "name": "fqdn", + "label": "Host name" }, { - "cli_name": "ptr_rec", - "doc": "Raw PTR records", - "label": "PTR record", - "multivalue": true, - "name": "ptrrecord", - "option_group": "PTR Record", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "ptr_hostname", - "doc": "The hostname this reverse record points to", - "label": "PTR Hostname", - "name": "ptr_part_hostname", - "option_group": "PTR Record", - "required": false, - "type": "DNSName" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "rrsig_rec", - "doc": "Raw RRSIG records", - "exclude": ["cli", "webui"], - "label": "RRSIG record", - "multivalue": true, - "name": "rrsigrecord", - "option_group": "RRSIG Record", - "required": false, - "type": "str" + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "rp_rec", - "doc": "Raw RP records", - "exclude": ["cli", "webui"], - "label": "RP record", - "multivalue": true, - "name": "rprecord", - "option_group": "RP Record", + "cli_name": "hosts", + "name": "host", + "alwaysask": true, + "doc": "hosts to remove", "required": false, + "label": "member host", + "multivalue": true, "type": "str" + } + ], + "full_name": "host_remove_managedby/1", + "output": [ + { + "type": "dict", + "name": "result" }, { - "cli_name": "sig_rec", - "doc": "Raw SIG records", - "exclude": ["cli", "webui"], - "label": "SIG record", - "multivalue": true, - "name": "sigrecord", - "option_group": "SIG Record", - "required": false, - "type": "str" + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" }, { - "cli_name": "spf_rec", - "doc": "Raw SPF records", - "exclude": ["cli", "webui"], - "label": "SPF record", - "multivalue": true, - "name": "spfrecord", - "option_group": "SPF Record", - "required": false, - "type": "str" + "doc": "Number of members removed", + "type": "int", + "name": "completed" + } + ], + "obj_class": "host/1", + "topic_topic": "host/1" + }, + { + "name": "host_remove_principal", + "doc": "Remove principal alias from a host entry", + "attr_name": "remove_principal", + "version": "1", + "params": [ + { + "type": "str", + "no_convert": true, + "cli_name": "hostname", + "name": "fqdn", + "label": "Host name" }, { - "cli_name": "srv_rec", - "doc": "Raw SRV records", - "label": "SRV record", + "name": "krbprincipalname", + "alwaysask": true, + "label": "Principal alias", "multivalue": true, - "name": "srvrecord", - "option_group": "SRV Record", - "required": false, - "type": "str" + "type": "Principal", + "no_convert": true }, { - "cli_name": "srv_priority", - "label": "SRV Priority", - "name": "srv_part_priority", - "option_group": "SRV Record", - "required": false, - "type": "int" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "srv_weight", - "label": "SRV Weight", - "name": "srv_part_weight", - "option_group": "SRV Record", - "required": false, - "type": "int" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "srv_port", - "label": "SRV Port", - "name": "srv_part_port", - "option_group": "SRV Record", - "required": false, - "type": "int" - }, + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "host_remove_principal/1", + "output": [ { - "cli_name": "srv_target", - "doc": - "The domain name of the target host or '.' if the service is decidedly not available at this domain", - "label": "SRV Target", - "name": "srv_part_target", - "option_group": "SRV Record", + "doc": "User-friendly description of action performed", "required": false, - "type": "DNSName" + "type": "str", + "name": "summary" }, { - "cli_name": "sshfp_rec", - "doc": "Raw SSHFP records", - "label": "SSHFP record", - "multivalue": true, - "name": "sshfprecord", - "option_group": "SSHFP Record", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "cli_name": "sshfp_algorithm", - "label": "SSHFP Algorithm", - "name": "sshfp_part_algorithm", - "option_group": "SSHFP Record", - "required": false, - "type": "int" - }, + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "host/1", + "topic_topic": "host/1" + }, + { + "name": "host_show", + "doc": "Display information about a host.", + "attr_name": "show", + "version": "1", + "params": [ { - "cli_name": "sshfp_fp_type", - "label": "SSHFP Fingerprint Type", - "name": "sshfp_part_fp_type", - "option_group": "SSHFP Record", - "required": false, - "type": "int" + "type": "str", + "no_convert": true, + "cli_name": "hostname", + "name": "fqdn", + "label": "Host name" }, { - "cli_name": "sshfp_fingerprint", - "label": "SSHFP Fingerprint", - "name": "sshfp_part_fingerprint", - "option_group": "SSHFP Record", - "required": false, - "type": "str" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { - "cli_name": "tlsa_rec", - "doc": "Raw TLSA records", - "label": "TLSA record", - "multivalue": true, - "name": "tlsarecord", - "option_group": "TLSA Record", + "doc": "file to store certificate in", "required": false, - "type": "str" + "type": "str", + "name": "out" }, { - "cli_name": "tlsa_cert_usage", - "label": "TLSA Certificate Usage", - "name": "tlsa_part_cert_usage", - "option_group": "TLSA Record", - "required": false, - "type": "int" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "tlsa_selector", - "label": "TLSA Selector", - "name": "tlsa_part_selector", - "option_group": "TLSA Record", - "required": false, - "type": "int" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "tlsa_matching_type", - "label": "TLSA Matching Type", - "name": "tlsa_part_matching_type", - "option_group": "TLSA Record", + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "host_show/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "int" + "type": "str", + "name": "summary" }, { - "cli_name": "tlsa_cert_association_data", - "label": "TLSA Certificate Association Data", - "name": "tlsa_part_cert_association_data", - "option_group": "TLSA Record", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "cli_name": "txt_rec", - "doc": "Raw TXT records", - "label": "TXT record", - "multivalue": true, - "name": "txtrecord", - "option_group": "TXT Record", - "required": false, - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "host/1", + "topic_topic": "host/1" + }, + { + "name": "hostgroup_add", + "doc": "Add a new hostgroup.", + "attr_name": "add", + "version": "1", + "params": [ + { + "cli_name": "hostgroup_name", + "name": "cn", + "doc": "Name of host-group", + "label": "Host-group", + "type": "str", + "no_convert": true }, { - "cli_name": "txt_data", - "label": "TXT Text Data", - "name": "txt_part_data", - "option_group": "TXT Record", + "cli_name": "desc", + "name": "description", + "doc": "A description of this host-group", "required": false, + "label": "Description", "type": "str" }, { "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, - { - "default": ["False"], - "doc": - "force NS record creation even if its hostname is not in DNS", - "exclude": ["cli", "webui"], - "label": "Force", - "name": "force", - "positional": false, - "type": "bool" - }, - { - "default": ["False"], - "doc": - "Parse all raw DNS records and return them in a structured way", - "label": "Structured", - "name": "structured", - "positional": false, - "type": "bool" - }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "dns/1", - "version": "1" - }, - { - "attr_name": "del", - "doc": "Delete DNS resource record.", - "full_name": "dnsrecord_del/1", - "name": "dnsrecord_del", - "obj_class": "dnsrecord/1", + "full_name": "hostgroup_add/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "multivalue": true, - "name": "value", - "type": "DNSName" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "hostgroup/1", + "topic_topic": "hostgroup/1" + }, + { + "name": "hostgroup_add_member", + "doc": "Add members to a hostgroup.", + "attr_name": "add_member", + "version": "1", "params": [ { - "alwaysask": true, - "cli_name": "dnszone", - "default_from_param": ["name_from_ip"], - "doc": "Zone name (FQDN)", - "label": "Zone name", - "name": "dnszoneidnsname", - "no_convert": true, - "type": "DNSName" + "cli_name": "hostgroup_name", + "name": "cn", + "doc": "Name of host-group", + "label": "Host-group", + "type": "str", + "no_convert": true }, { - "cli_name": "name", - "doc": "Record name", - "label": "Record name", - "name": "idnsname", - "type": "DNSName" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "ttl", - "doc": "Time to live", - "label": "Time to live", - "name": "dnsttl", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "hosts", + "name": "host", + "alwaysask": true, + "doc": "hosts to add", "required": false, - "type": "int" + "label": "member host", + "multivalue": true, + "type": "str" }, { - "cli_metavar": "['IN', 'CS', 'CH', 'HS']", - "cli_name": "class", - "exclude": ["cli", "webui"], - "name": "dnsclass", + "cli_name": "hostgroups", + "name": "hostgroup", + "alwaysask": true, + "doc": "host groups to add", "required": false, + "label": "member host group", + "multivalue": true, "type": "str" + } + ], + "full_name": "hostgroup_add_member/1", + "output": [ + { + "type": "dict", + "name": "result" }, { - "cli_name": "a_rec", - "doc": "Raw A records", - "label": "A record", + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" + }, + { + "doc": "Number of members added", + "type": "int", + "name": "completed" + } + ], + "obj_class": "hostgroup/1", + "topic_topic": "hostgroup/1" + }, + { + "name": "hostgroup_del", + "doc": "Delete a hostgroup.", + "attr_name": "del", + "version": "1", + "params": [ + { + "cli_name": "hostgroup_name", + "name": "cn", + "doc": "Name of host-group", + "label": "Host-group", "multivalue": true, - "name": "arecord", + "type": "str", + "no_convert": true + }, + { + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", + "positional": false, + "type": "bool" + } + ], + "full_name": "hostgroup_del/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "cli_name": "aaaa_rec", - "doc": "Raw AAAA records", - "label": "AAAA record", + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" + }, + { + "type": "str", "multivalue": true, - "name": "aaaarecord", + "name": "value" + } + ], + "obj_class": "hostgroup/1", + "topic_topic": "hostgroup/1" + }, + { + "name": "hostgroup_find", + "doc": "Search for hostgroups.", + "attr_name": "find", + "version": "1", + "params": [ + { + "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, - "type": "str" + "type": "str", + "name": "criteria" }, { - "cli_name": "a6_rec", - "doc": "Raw A6 records", - "label": "A6 record", - "multivalue": true, - "name": "a6record", + "cli_name": "hostgroup_name", + "name": "cn", + "doc": "Name of host-group", "required": false, - "type": "str" + "label": "Host-group", + "type": "str", + "no_convert": true }, { - "cli_name": "afsdb_rec", - "doc": "Raw AFSDB records", - "label": "AFSDB record", - "multivalue": true, - "name": "afsdbrecord", + "cli_name": "desc", + "name": "description", + "doc": "A description of this host-group", "required": false, + "label": "Description", "type": "str" }, { - "cli_name": "apl_rec", - "doc": "Raw APL records", - "exclude": ["cli", "webui"], - "label": "APL record", - "multivalue": true, - "name": "aplrecord", + "doc": "Time limit of search in seconds (0 is unlimited)", "required": false, - "type": "str" + "type": "int", + "name": "timelimit", + "label": "Time Limit" }, { - "cli_name": "cert_rec", - "doc": "Raw CERT records", - "label": "CERT record", - "multivalue": true, - "name": "certrecord", + "doc": "Maximum number of entries returned (0 is unlimited)", "required": false, - "type": "str" + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { - "cli_name": "cname_rec", - "doc": "Raw CNAME records", - "label": "CNAME record", - "multivalue": true, - "name": "cnamerecord", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "dhcid_rec", - "doc": "Raw DHCID records", - "exclude": ["cli", "webui"], - "label": "DHCID record", - "multivalue": true, - "name": "dhcidrecord", - "required": false, - "type": "str" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "dlv_rec", - "doc": "Raw DLV records", - "label": "DLV record", - "multivalue": true, - "name": "dlvrecord", - "required": false, - "type": "str" + "name": "no_members", + "default": [ + "True" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui", + "cli" + ], + "type": "bool" }, { - "cli_name": "dname_rec", - "doc": "Raw DNAME records", - "label": "DNAME record", - "multivalue": true, - "name": "dnamerecord", + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"hostgroup-name\")", "required": false, - "type": "str" + "label": "Primary key only", + "type": "bool" }, { - "cli_name": "ds_rec", - "doc": "Raw DS records", - "label": "DS record", - "multivalue": true, - "name": "dsrecord", + "cli_name": "hosts", + "name": "host", + "doc": "Search for host groups with these member hosts.", "required": false, - "type": "str" + "label": "host", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_name": "hip_rec", - "doc": "Raw HIP records", - "exclude": ["cli", "webui"], - "label": "HIP record", - "multivalue": true, - "name": "hiprecord", + "cli_name": "no_hosts", + "name": "no_host", + "doc": "Search for host groups without these member hosts.", "required": false, - "type": "str" + "label": "host", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_name": "ipseckey_rec", - "doc": "Raw IPSECKEY records", - "exclude": ["cli", "webui"], - "label": "IPSECKEY record", - "multivalue": true, - "name": "ipseckeyrecord", + "cli_name": "hostgroups", + "name": "hostgroup", + "doc": "Search for host groups with these member host groups.", "required": false, - "type": "str" + "label": "host group", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_name": "key_rec", - "doc": "Raw KEY records", - "exclude": ["cli", "webui"], - "label": "KEY record", - "multivalue": true, - "name": "keyrecord", + "cli_name": "no_hostgroups", + "name": "no_hostgroup", + "doc": "Search for host groups without these member host groups.", "required": false, - "type": "str" + "label": "host group", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_name": "kx_rec", - "doc": "Raw KX records", - "label": "KX record", - "multivalue": true, - "name": "kxrecord", + "cli_name": "in_hostgroups", + "name": "in_hostgroup", + "doc": "Search for host groups with these member of host groups.", "required": false, - "type": "str" + "label": "host group", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_name": "loc_rec", - "doc": "Raw LOC records", - "label": "LOC record", - "multivalue": true, - "name": "locrecord", + "cli_name": "not_in_hostgroups", + "name": "not_in_hostgroup", + "doc": "Search for host groups without these member of host groups.", "required": false, - "type": "str" + "label": "host group", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_name": "mx_rec", - "doc": "Raw MX records", - "label": "MX record", - "multivalue": true, - "name": "mxrecord", + "cli_name": "in_netgroups", + "name": "in_netgroup", + "doc": "Search for host groups with these member of netgroups.", "required": false, - "type": "str" + "label": "netgroup", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_name": "naptr_rec", - "doc": "Raw NAPTR records", - "label": "NAPTR record", - "multivalue": true, - "name": "naptrrecord", + "cli_name": "not_in_netgroups", + "name": "not_in_netgroup", + "doc": "Search for host groups without these member of netgroups.", "required": false, - "type": "str" + "label": "netgroup", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_name": "ns_rec", - "doc": "Raw NS records", - "label": "NS record", - "multivalue": true, - "name": "nsrecord", + "cli_name": "in_hbacrules", + "name": "in_hbacrule", + "doc": "Search for host groups with these member of HBAC rules.", "required": false, + "label": "HBAC rule", + "multivalue": true, "type": "str" }, { - "cli_name": "nsec_rec", - "doc": "Raw NSEC records", - "exclude": ["cli", "webui"], - "label": "NSEC record", - "multivalue": true, - "name": "nsecrecord", + "cli_name": "not_in_hbacrules", + "name": "not_in_hbacrule", + "doc": "Search for host groups without these member of HBAC rules.", "required": false, + "label": "HBAC rule", + "multivalue": true, "type": "str" }, { - "cli_name": "ptr_rec", - "doc": "Raw PTR records", - "label": "PTR record", - "multivalue": true, - "name": "ptrrecord", + "cli_name": "in_sudorules", + "name": "in_sudorule", + "doc": "Search for host groups with these member of sudo rules.", "required": false, + "label": "sudo rule", + "multivalue": true, "type": "str" }, { - "cli_name": "rrsig_rec", - "doc": "Raw RRSIG records", - "exclude": ["cli", "webui"], - "label": "RRSIG record", - "multivalue": true, - "name": "rrsigrecord", + "cli_name": "not_in_sudorules", + "name": "not_in_sudorule", + "doc": "Search for host groups without these member of sudo rules.", "required": false, + "label": "sudo rule", + "multivalue": true, "type": "str" - }, + } + ], + "full_name": "hostgroup_find/1", + "output": [ { - "cli_name": "rp_rec", - "doc": "Raw RP records", - "exclude": ["cli", "webui"], - "label": "RP record", - "multivalue": true, - "name": "rprecord", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "cli_name": "sig_rec", - "doc": "Raw SIG records", - "exclude": ["cli", "webui"], - "label": "SIG record", + "type": "dict", "multivalue": true, - "name": "sigrecord", - "required": false, - "type": "str" + "name": "result" }, { - "cli_name": "spf_rec", - "doc": "Raw SPF records", - "exclude": ["cli", "webui"], - "label": "SPF record", - "multivalue": true, - "name": "spfrecord", - "required": false, - "type": "str" + "doc": "Number of entries returned", + "type": "int", + "name": "count" }, { - "cli_name": "srv_rec", - "doc": "Raw SRV records", - "label": "SRV record", - "multivalue": true, - "name": "srvrecord", + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" + } + ], + "obj_class": "hostgroup/1", + "topic_topic": "hostgroup/1" + }, + { + "name": "hostgroup_mod", + "doc": "Modify a hostgroup.", + "attr_name": "mod", + "version": "1", + "params": [ + { + "cli_name": "hostgroup_name", + "name": "cn", + "doc": "Name of host-group", + "label": "Host-group", + "type": "str", + "no_convert": true + }, + { + "cli_name": "desc", + "name": "description", + "doc": "A description of this host-group", "required": false, + "label": "Description", "type": "str" }, { - "cli_name": "sshfp_rec", - "doc": "Raw SSHFP records", - "label": "SSHFP record", - "multivalue": true, - "name": "sshfprecord", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "tlsa_rec", - "doc": "Raw TLSA records", - "label": "TLSA record", - "multivalue": true, - "name": "tlsarecord", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "txt_rec", - "doc": "Raw TXT records", - "label": "TXT record", - "multivalue": true, - "name": "txtrecord", + "cli_name": "delattr", + "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "default": ["False"], - "label": "Delete all associated records", - "name": "del_all", + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, { - "default": ["False"], - "doc": - "Parse all raw DNS records and return them in a structured way", - "label": "Structured", - "name": "structured", + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "exclude": ["cli", "webui"], + "cli_name": "raw", "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "dns/1", - "version": "1" - }, - { - "attr_name": "delentry", - "doc": "\n Delete DNS record entry.\n ", - "exclude": ["cli"], - "full_name": "dnsrecord_delentry/1", - "name": "dnsrecord_delentry", - "obj_class": "dnsrecord/1", + "full_name": "hostgroup_mod/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "multivalue": true, - "name": "value", - "type": "DNSName" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "hostgroup/1", + "topic_topic": "hostgroup/1" + }, + { + "name": "hostgroup_remove_member", + "doc": "Remove members from a hostgroup.", + "attr_name": "remove_member", + "version": "1", "params": [ { - "alwaysask": true, - "cli_name": "dnszone", - "default_from_param": ["name_from_ip"], - "doc": "Zone name (FQDN)", - "label": "Zone name", - "name": "dnszoneidnsname", - "no_convert": true, - "type": "DNSName" + "cli_name": "hostgroup_name", + "name": "cn", + "doc": "Name of host-group", + "label": "Host-group", + "type": "str", + "no_convert": true }, { - "cli_name": "name", - "doc": "Record name", - "label": "Record name", - "multivalue": true, - "name": "idnsname", - "type": "DNSName" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", - "name": "continue", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - } - ], - "topic_topic": "dns/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for DNS resources.", - "full_name": "dnsrecord_find/1", - "name": "dnsrecord_find", - "obj_class": "dnsrecord/1", - "output": [ + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "hosts", + "name": "host", + "alwaysask": true, + "doc": "hosts to remove", "required": false, + "label": "member host", + "multivalue": true, "type": "str" }, { + "cli_name": "hostgroups", + "name": "hostgroup", + "alwaysask": true, + "doc": "host groups to remove", + "required": false, + "label": "member host group", "multivalue": true, - "name": "result", - "type": "dict" + "type": "str" + } + ], + "full_name": "hostgroup_remove_member/1", + "output": [ + { + "type": "dict", + "name": "result" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" + "doc": "Number of members removed", + "type": "int", + "name": "completed" } ], + "obj_class": "hostgroup/1", + "topic_topic": "hostgroup/1" + }, + { + "name": "hostgroup_show", + "doc": "Display information about a hostgroup.", + "attr_name": "show", + "version": "1", "params": [ { - "alwaysask": true, - "cli_name": "dnszone", - "default_from_param": ["name_from_ip"], - "doc": "Zone name (FQDN)", - "label": "Zone name", - "name": "dnszoneidnsname", - "no_convert": true, - "type": "DNSName" + "cli_name": "hostgroup_name", + "name": "cn", + "doc": "Name of host-group", + "label": "Host-group", + "type": "str", + "no_convert": true }, { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, - "required": false, - "type": "str" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { - "cli_name": "name", - "doc": "Record name", - "label": "Record name", - "name": "idnsname", - "required": false, - "type": "DNSName" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "ttl", - "doc": "Time to live", - "label": "Time to live", - "name": "dnsttl", - "required": false, - "type": "int" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_metavar": "['IN', 'CS', 'CH', 'HS']", - "cli_name": "class", - "exclude": ["cli", "webui"], - "name": "dnsclass", + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "hostgroup_show/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "cli_name": "a_rec", - "doc": "Raw A records", - "label": "A record", - "multivalue": true, - "name": "arecord", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "cli_name": "aaaa_rec", - "doc": "Raw AAAA records", - "label": "AAAA record", - "multivalue": true, - "name": "aaaarecord", - "required": false, - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "hostgroup/1", + "topic_topic": "hostgroup/1" + }, + { + "name": "i18n_messages", + "version": "1", + "params": [], + "full_name": "i18n_messages/1", + "exclude": [ + "cli" + ], + "output": [ + { + "doc": "Dict of I18N messages", + "type": "dict", + "name": "texts" + } + ], + "topic_topic": "internal/1" + }, + { + "name": "idoverridegroup_add", + "doc": "Add a new Group ID override.", + "attr_name": "add", + "version": "1", + "params": [ + { + "type": "str", + "cli_name": "idview", + "name": "idviewcn", + "label": "ID View Name" }, { - "cli_name": "a6_rec", - "doc": "Raw A6 records", - "label": "A6 record", - "multivalue": true, - "name": "a6record", - "required": false, - "type": "str" + "type": "str", + "cli_name": "anchor", + "name": "ipaanchoruuid", + "label": "Anchor to override" }, { - "cli_name": "afsdb_rec", - "doc": "Raw AFSDB records", - "label": "AFSDB record", - "multivalue": true, - "name": "afsdbrecord", + "type": "str", "required": false, - "type": "str" + "cli_name": "desc", + "name": "description", + "label": "Description" }, { - "cli_name": "apl_rec", - "doc": "Raw APL records", - "exclude": ["cli", "webui"], - "label": "APL record", - "multivalue": true, - "name": "aplrecord", + "cli_name": "group_name", + "name": "cn", "required": false, - "type": "str" + "label": "Group name", + "type": "str", + "no_convert": true }, { - "cli_name": "cert_rec", - "doc": "Raw CERT records", - "label": "CERT record", - "multivalue": true, - "name": "certrecord", + "cli_name": "gid", + "name": "gidnumber", + "doc": "Group ID Number", "required": false, - "type": "str" + "label": "GID", + "type": "int" }, { - "cli_name": "cname_rec", - "doc": "Raw CNAME records", - "label": "CNAME record", - "multivalue": true, - "name": "cnamerecord", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, - "type": "str" - }, - { - "cli_name": "dhcid_rec", - "doc": "Raw DHCID records", - "exclude": ["cli", "webui"], - "label": "DHCID record", "multivalue": true, - "name": "dhcidrecord", - "required": false, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "dlv_rec", - "doc": "Raw DLV records", - "label": "DLV record", - "multivalue": true, - "name": "dlvrecord", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, - "type": "str" - }, - { - "cli_name": "dname_rec", - "doc": "Raw DNAME records", - "label": "DNAME record", "multivalue": true, - "name": "dnamerecord", - "required": false, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "ds_rec", - "doc": "Raw DS records", - "label": "DS record", - "multivalue": true, - "name": "dsrecord", + "name": "fallback_to_ldap", + "default": [ + "False" + ], + "doc": "Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.", "required": false, - "type": "str" + "label": "Fallback to AD DC LDAP", + "type": "bool" }, { - "cli_name": "hip_rec", - "doc": "Raw HIP records", - "exclude": ["cli", "webui"], - "label": "HIP record", - "multivalue": true, - "name": "hiprecord", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "ipseckey_rec", - "doc": "Raw IPSECKEY records", - "exclude": ["cli", "webui"], - "label": "IPSECKEY record", - "multivalue": true, - "name": "ipseckeyrecord", - "required": false, - "type": "str" - }, + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "idoverridegroup_add/1", + "output": [ { - "cli_name": "key_rec", - "doc": "Raw KEY records", - "exclude": ["cli", "webui"], - "label": "KEY record", - "multivalue": true, - "name": "keyrecord", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "cli_name": "kx_rec", - "doc": "Raw KX records", - "label": "KX record", - "multivalue": true, - "name": "kxrecord", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "cli_name": "loc_rec", - "doc": "Raw LOC records", - "label": "LOC record", - "multivalue": true, - "name": "locrecord", - "required": false, - "type": "str" - }, + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "idoverridegroup/1", + "topic_topic": "idviews/1" + }, + { + "name": "idoverridegroup_del", + "doc": "Delete an Group ID override.", + "attr_name": "del", + "version": "1", + "params": [ { - "cli_name": "mx_rec", - "doc": "Raw MX records", - "label": "MX record", - "multivalue": true, - "name": "mxrecord", - "required": false, - "type": "str" + "type": "str", + "cli_name": "idview", + "name": "idviewcn", + "label": "ID View Name" }, { - "cli_name": "naptr_rec", - "doc": "Raw NAPTR records", - "label": "NAPTR record", + "cli_name": "anchor", + "label": "Anchor to override", "multivalue": true, - "name": "naptrrecord", - "required": false, + "name": "ipaanchoruuid", "type": "str" }, { - "cli_name": "ns_rec", - "doc": "Raw NS records", - "label": "NS record", - "multivalue": true, - "name": "nsrecord", - "required": false, - "type": "str" + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", + "positional": false, + "type": "bool" }, { - "cli_name": "nsec_rec", - "doc": "Raw NSEC records", - "exclude": ["cli", "webui"], - "label": "NSEC record", - "multivalue": true, - "name": "nsecrecord", + "name": "fallback_to_ldap", + "default": [ + "False" + ], + "doc": "Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.", "required": false, - "type": "str" - }, + "label": "Fallback to AD DC LDAP", + "type": "bool" + } + ], + "full_name": "idoverridegroup_del/1", + "output": [ { - "cli_name": "ptr_rec", - "doc": "Raw PTR records", - "label": "PTR record", - "multivalue": true, - "name": "ptrrecord", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "cli_name": "rrsig_rec", - "doc": "Raw RRSIG records", - "exclude": ["cli", "webui"], - "label": "RRSIG record", - "multivalue": true, - "name": "rrsigrecord", - "required": false, - "type": "str" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "cli_name": "rp_rec", - "doc": "Raw RP records", - "exclude": ["cli", "webui"], - "label": "RP record", + "type": "str", "multivalue": true, - "name": "rprecord", - "required": false, - "type": "str" - }, + "name": "value" + } + ], + "obj_class": "idoverridegroup/1", + "topic_topic": "idviews/1" + }, + { + "name": "idoverridegroup_find", + "doc": "Search for an Group ID override.", + "attr_name": "find", + "version": "1", + "params": [ { - "cli_name": "sig_rec", - "doc": "Raw SIG records", - "exclude": ["cli", "webui"], - "label": "SIG record", - "multivalue": true, - "name": "sigrecord", - "required": false, - "type": "str" + "type": "str", + "cli_name": "idview", + "name": "idviewcn", + "label": "ID View Name" }, { - "cli_name": "spf_rec", - "doc": "Raw SPF records", - "exclude": ["cli", "webui"], - "label": "SPF record", - "multivalue": true, - "name": "spfrecord", + "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, - "type": "str" + "type": "str", + "name": "criteria" }, { - "cli_name": "srv_rec", - "doc": "Raw SRV records", - "label": "SRV record", - "multivalue": true, - "name": "srvrecord", + "type": "str", "required": false, - "type": "str" + "cli_name": "anchor", + "name": "ipaanchoruuid", + "label": "Anchor to override" }, { - "cli_name": "sshfp_rec", - "doc": "Raw SSHFP records", - "label": "SSHFP record", - "multivalue": true, - "name": "sshfprecord", + "type": "str", "required": false, - "type": "str" + "cli_name": "desc", + "name": "description", + "label": "Description" }, { - "cli_name": "tlsa_rec", - "doc": "Raw TLSA records", - "label": "TLSA record", - "multivalue": true, - "name": "tlsarecord", + "cli_name": "group_name", + "name": "cn", "required": false, - "type": "str" + "label": "Group name", + "type": "str", + "no_convert": true }, { - "cli_name": "txt_rec", - "doc": "Raw TXT records", - "label": "TXT record", - "multivalue": true, - "name": "txtrecord", + "cli_name": "gid", + "name": "gidnumber", + "doc": "Group ID Number", "required": false, - "type": "str" + "label": "GID", + "type": "int" }, { "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", "required": false, - "type": "int" + "type": "int", + "name": "timelimit", + "label": "Time Limit" }, { "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", "required": false, - "type": "int" + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { - "default": ["False"], - "doc": - "Parse all raw DNS records and return them in a structured way", - "label": "Structured", - "name": "structured", - "positional": false, + "name": "fallback_to_ldap", + "default": [ + "False" + ], + "doc": "Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.", + "required": false, + "label": "Fallback to AD DC LDAP", "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"name\")", - "label": "Primary key only", "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"anchor\")", "required": false, + "label": "Primary key only", "type": "bool" } ], - "topic_topic": "dns/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify a DNS resource record.", - "full_name": "dnsrecord_mod/1", - "name": "dnsrecord_mod", - "obj_class": "dnsrecord/1", + "full_name": "idoverridegroup_find/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "multivalue": true, + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "DNSName" + "doc": "Number of entries returned", + "type": "int", + "name": "count" + }, + { + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], + "obj_class": "idoverridegroup/1", + "topic_topic": "idviews/1" + }, + { + "name": "idoverridegroup_mod", + "doc": "Modify an Group ID override.", + "attr_name": "mod", + "version": "1", "params": [ { - "alwaysask": true, - "cli_name": "dnszone", - "default_from_param": ["name_from_ip"], - "doc": "Zone name (FQDN)", - "label": "Zone name", - "name": "dnszoneidnsname", - "no_convert": true, - "type": "DNSName" - }, - { - "cli_name": "name", - "doc": "Record name", - "label": "Record name", - "name": "idnsname", - "type": "DNSName" - }, - { - "cli_name": "ttl", - "doc": "Time to live", - "label": "Time to live", - "name": "dnsttl", - "required": false, - "type": "int" + "type": "str", + "cli_name": "idview", + "name": "idviewcn", + "label": "ID View Name" }, { - "cli_metavar": "['IN', 'CS', 'CH', 'HS']", - "cli_name": "class", - "exclude": ["cli", "webui"], - "name": "dnsclass", - "required": false, - "type": "str" + "type": "str", + "cli_name": "anchor", + "name": "ipaanchoruuid", + "label": "Anchor to override" }, { - "cli_name": "a_rec", - "doc": "Raw A records", - "label": "A record", - "multivalue": true, - "name": "arecord", - "option_group": "A Record", + "type": "str", "required": false, - "type": "str" + "cli_name": "desc", + "name": "description", + "label": "Description" }, { - "cli_name": "a_ip_address", - "label": "A IP Address", - "name": "a_part_ip_address", - "option_group": "A Record", + "cli_name": "group_name", + "name": "cn", "required": false, - "type": "str" + "label": "Group name", + "type": "str", + "no_convert": true }, { - "cli_name": "aaaa_rec", - "doc": "Raw AAAA records", - "label": "AAAA record", - "multivalue": true, - "name": "aaaarecord", - "option_group": "AAAA Record", + "cli_name": "gid", + "name": "gidnumber", + "doc": "Group ID Number", "required": false, - "type": "str" + "label": "GID", + "type": "int" }, { - "cli_name": "aaaa_ip_address", - "label": "AAAA IP Address", - "name": "aaaa_part_ip_address", - "option_group": "AAAA Record", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, - "type": "str" - }, - { - "cli_name": "a6_rec", - "doc": "Raw A6 records", - "label": "A6 record", "multivalue": true, - "name": "a6record", - "option_group": "A6 Record", - "required": false, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "a6_data", - "label": "A6 Record data", - "name": "a6_part_data", - "option_group": "A6 Record", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, - "type": "str" - }, - { - "cli_name": "afsdb_rec", - "doc": "Raw AFSDB records", - "label": "AFSDB record", "multivalue": true, - "name": "afsdbrecord", - "option_group": "AFSDB Record", - "required": false, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "afsdb_subtype", - "label": "AFSDB Subtype", - "name": "afsdb_part_subtype", - "option_group": "AFSDB Record", - "required": false, - "type": "int" - }, - { - "cli_name": "afsdb_hostname", - "label": "AFSDB Hostname", - "name": "afsdb_part_hostname", - "option_group": "AFSDB Record", + "cli_name": "delattr", + "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, - "type": "DNSName" - }, - { - "cli_name": "apl_rec", - "doc": "Raw APL records", - "exclude": ["cli", "webui"], - "label": "APL record", "multivalue": true, - "name": "aplrecord", - "option_group": "APL Record", - "required": false, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "cert_rec", - "doc": "Raw CERT records", - "label": "CERT record", - "multivalue": true, - "name": "certrecord", - "option_group": "CERT Record", - "required": false, - "type": "str" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { - "cli_name": "cert_type", - "label": "CERT Certificate Type", - "name": "cert_part_type", - "option_group": "CERT Record", + "name": "fallback_to_ldap", + "default": [ + "False" + ], + "doc": "Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.", "required": false, - "type": "int" + "label": "Fallback to AD DC LDAP", + "type": "bool" }, { - "cli_name": "cert_key_tag", - "label": "CERT Key Tag", - "name": "cert_part_key_tag", - "option_group": "CERT Record", - "required": false, - "type": "int" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "cert_algorithm", - "label": "CERT Algorithm", - "name": "cert_part_algorithm", - "option_group": "CERT Record", - "required": false, - "type": "int" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "cert_certificate_or_crl", - "label": "CERT Certificate/CRL", - "name": "cert_part_certificate_or_crl", - "option_group": "CERT Record", + "cli_name": "rename", + "name": "rename", + "doc": "Rename the Group ID override object", "required": false, + "label": "Rename", "type": "str" - }, + } + ], + "full_name": "idoverridegroup_mod/1", + "output": [ { - "cli_name": "cname_rec", - "doc": "Raw CNAME records", - "label": "CNAME record", - "multivalue": true, - "name": "cnamerecord", - "option_group": "CNAME Record", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "cli_name": "cname_hostname", - "doc": "A hostname which this alias hostname points to", - "label": "CNAME Hostname", - "name": "cname_part_hostname", - "option_group": "CNAME Record", - "required": false, - "type": "DNSName" + "type": "dict", + "name": "result" }, { - "cli_name": "dhcid_rec", - "doc": "Raw DHCID records", - "exclude": ["cli", "webui"], - "label": "DHCID record", - "multivalue": true, - "name": "dhcidrecord", - "option_group": "DHCID Record", - "required": false, - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "idoverridegroup/1", + "topic_topic": "idviews/1" + }, + { + "name": "idoverridegroup_show", + "doc": "Display information about an Group ID override.", + "attr_name": "show", + "version": "1", + "params": [ + { + "type": "str", + "cli_name": "idview", + "name": "idviewcn", + "label": "ID View Name" }, { - "cli_name": "dlv_rec", - "doc": "Raw DLV records", - "label": "DLV record", - "multivalue": true, - "name": "dlvrecord", - "option_group": "DLV Record", - "required": false, - "type": "str" + "type": "str", + "cli_name": "anchor", + "name": "ipaanchoruuid", + "label": "Anchor to override" }, { - "cli_name": "dlv_key_tag", - "label": "DLV Key Tag", - "name": "dlv_part_key_tag", - "option_group": "DLV Record", - "required": false, - "type": "int" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { - "cli_name": "dlv_algorithm", - "label": "DLV Algorithm", - "name": "dlv_part_algorithm", - "option_group": "DLV Record", + "name": "fallback_to_ldap", + "default": [ + "False" + ], + "doc": "Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.", "required": false, - "type": "int" + "label": "Fallback to AD DC LDAP", + "type": "bool" }, { - "cli_name": "dlv_digest_type", - "label": "DLV Digest Type", - "name": "dlv_part_digest_type", - "option_group": "DLV Record", - "required": false, - "type": "int" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "dlv_digest", - "label": "DLV Digest", - "name": "dlv_part_digest", - "option_group": "DLV Record", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "idoverridegroup_show/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "cli_name": "dname_rec", - "doc": "Raw DNAME records", - "label": "DNAME record", - "multivalue": true, - "name": "dnamerecord", - "option_group": "DNAME Record", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "cli_name": "dname_target", - "label": "DNAME Target", - "name": "dname_part_target", - "option_group": "DNAME Record", - "required": false, - "type": "DNSName" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "idoverridegroup/1", + "topic_topic": "idviews/1" + }, + { + "name": "idoverrideuser_add", + "doc": "Add a new User ID override.", + "attr_name": "add", + "version": "1", + "params": [ + { + "type": "str", + "cli_name": "idview", + "name": "idviewcn", + "label": "ID View Name" }, { - "cli_name": "ds_rec", - "doc": "Raw DS records", - "label": "DS record", - "multivalue": true, - "name": "dsrecord", - "option_group": "DS Record", - "required": false, - "type": "str" + "type": "str", + "cli_name": "anchor", + "name": "ipaanchoruuid", + "label": "Anchor to override" }, { - "cli_name": "ds_key_tag", - "label": "DS Key Tag", - "name": "ds_part_key_tag", - "option_group": "DS Record", + "type": "str", "required": false, - "type": "int" + "cli_name": "desc", + "name": "description", + "label": "Description" }, { - "cli_name": "ds_algorithm", - "label": "DS Algorithm", - "name": "ds_part_algorithm", - "option_group": "DS Record", + "cli_name": "login", + "name": "uid", "required": false, - "type": "int" + "label": "User login", + "type": "str", + "no_convert": true }, { - "cli_name": "ds_digest_type", - "label": "DS Digest Type", - "name": "ds_part_digest_type", - "option_group": "DS Record", + "cli_name": "uid", + "name": "uidnumber", + "doc": "User ID Number", "required": false, + "label": "UID", "type": "int" }, { - "cli_name": "ds_digest", - "label": "DS Digest", - "name": "ds_part_digest", - "option_group": "DS Record", "required": false, - "type": "str" + "type": "str", + "name": "gecos", + "label": "GECOS" }, { - "cli_name": "hip_rec", - "doc": "Raw HIP records", - "exclude": ["cli", "webui"], - "label": "HIP record", - "multivalue": true, - "name": "hiprecord", - "option_group": "HIP Record", + "doc": "Group ID Number", "required": false, - "type": "str" + "type": "int", + "name": "gidnumber", + "label": "GID" }, { - "cli_name": "ipseckey_rec", - "doc": "Raw IPSECKEY records", - "exclude": ["cli", "webui"], - "label": "IPSECKEY record", - "multivalue": true, - "name": "ipseckeyrecord", - "option_group": "IPSECKEY Record", + "type": "str", "required": false, - "type": "str" + "cli_name": "homedir", + "name": "homedirectory", + "label": "Home directory" }, { - "cli_name": "key_rec", - "doc": "Raw KEY records", - "exclude": ["cli", "webui"], - "label": "KEY record", - "multivalue": true, - "name": "keyrecord", - "option_group": "KEY Record", + "type": "str", "required": false, - "type": "str" + "cli_name": "shell", + "name": "loginshell", + "label": "Login shell" }, { - "cli_name": "kx_rec", - "doc": "Raw KX records", - "label": "KX record", - "multivalue": true, - "name": "kxrecord", - "option_group": "KX Record", + "exclude": [ + "cli", + "webui" + ], "required": false, - "type": "str" + "type": "str", + "name": "ipaoriginaluid" }, { - "cli_name": "kx_preference", - "doc": - "Preference given to this exchanger. Lower values are more preferred", - "label": "KX Preference", - "name": "kx_part_preference", - "option_group": "KX Record", + "cli_name": "sshpubkey", + "name": "ipasshpubkey", "required": false, - "type": "int" + "label": "SSH public key", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_name": "kx_exchanger", - "doc": "A host willing to act as a key exchanger", - "label": "KX Exchanger", - "name": "kx_part_exchanger", - "option_group": "KX Record", + "cli_name": "certificate", + "name": "usercertificate", + "doc": "Base-64 encoded user certificate", "required": false, - "type": "DNSName" + "label": "Certificate", + "multivalue": true, + "type": "Certificate" }, { - "cli_name": "loc_rec", - "doc": "Raw LOC records", - "label": "LOC record", - "multivalue": true, - "name": "locrecord", - "option_group": "LOC Record", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "loc_lat_deg", - "label": "LOC Degrees Latitude", - "name": "loc_part_lat_deg", - "option_group": "LOC Record", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, - "type": "int" + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" }, { - "cli_name": "loc_lat_min", - "label": "LOC Minutes Latitude", - "name": "loc_part_lat_min", - "option_group": "LOC Record", + "name": "fallback_to_ldap", + "default": [ + "False" + ], + "doc": "Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.", "required": false, - "type": "int" + "label": "Fallback to AD DC LDAP", + "type": "bool" }, { - "cli_name": "loc_lat_sec", - "label": "LOC Seconds Latitude", - "name": "loc_part_lat_sec", - "no_convert": true, - "option_group": "LOC Record", - "required": false, - "type": "Decimal" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_metavar": "['N', 'S']", - "cli_name": "loc_lat_dir", - "label": "LOC Direction Latitude", - "name": "loc_part_lat_dir", - "option_group": "LOC Record", - "required": false, - "type": "str" - }, + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "idoverrideuser_add/1", + "output": [ { - "cli_name": "loc_lon_deg", - "label": "LOC Degrees Longitude", - "name": "loc_part_lon_deg", - "option_group": "LOC Record", + "doc": "User-friendly description of action performed", "required": false, - "type": "int" + "type": "str", + "name": "summary" }, { - "cli_name": "loc_lon_min", - "label": "LOC Minutes Longitude", - "name": "loc_part_lon_min", - "option_group": "LOC Record", - "required": false, - "type": "int" + "type": "dict", + "name": "result" }, { - "cli_name": "loc_lon_sec", - "label": "LOC Seconds Longitude", - "name": "loc_part_lon_sec", - "no_convert": true, - "option_group": "LOC Record", - "required": false, - "type": "Decimal" - }, + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "idoverrideuser/1", + "topic_topic": "idviews/1" + }, + { + "name": "idoverrideuser_add_cert", + "doc": "Add one or more certificates to the idoverrideuser entry", + "attr_name": "add_cert", + "version": "1", + "params": [ { - "cli_metavar": "['E', 'W']", - "cli_name": "loc_lon_dir", - "label": "LOC Direction Longitude", - "name": "loc_part_lon_dir", - "option_group": "LOC Record", - "required": false, - "type": "str" + "type": "str", + "cli_name": "idview", + "name": "idviewcn", + "label": "ID View Name" }, { - "cli_name": "loc_altitude", - "label": "LOC Altitude", - "name": "loc_part_altitude", - "no_convert": true, - "option_group": "LOC Record", - "required": false, - "type": "Decimal" + "type": "str", + "cli_name": "anchor", + "name": "ipaanchoruuid", + "label": "Anchor to override" }, { - "cli_name": "loc_size", - "label": "LOC Size", - "name": "loc_part_size", - "no_convert": true, - "option_group": "LOC Record", + "name": "fallback_to_ldap", + "default": [ + "False" + ], + "doc": "Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.", "required": false, - "type": "Decimal" + "label": "Fallback to AD DC LDAP", + "type": "bool" }, { - "cli_name": "loc_h_precision", - "label": "LOC Horizontal Precision", - "name": "loc_part_h_precision", - "no_convert": true, - "option_group": "LOC Record", - "required": false, - "type": "Decimal" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "loc_v_precision", - "label": "LOC Vertical Precision", - "name": "loc_part_v_precision", - "no_convert": true, - "option_group": "LOC Record", - "required": false, - "type": "Decimal" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "mx_rec", - "doc": "Raw MX records", - "label": "MX record", + "cli_name": "certificate", + "name": "usercertificate", + "alwaysask": true, + "doc": "Base-64 encoded user certificate", + "label": "Certificate", + "positional": false, "multivalue": true, - "name": "mxrecord", - "option_group": "MX Record", + "type": "Certificate" + } + ], + "full_name": "idoverrideuser_add_cert/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "cli_name": "mx_preference", - "doc": - "Preference given to this exchanger. Lower values are more preferred", - "label": "MX Preference", - "name": "mx_part_preference", - "option_group": "MX Record", - "required": false, - "type": "int" + "type": "dict", + "name": "result" }, { - "cli_name": "mx_exchanger", - "doc": "A host willing to act as a mail exchanger", - "label": "MX Exchanger", - "name": "mx_part_exchanger", - "option_group": "MX Record", - "required": false, - "type": "DNSName" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "idoverrideuser/1", + "topic_topic": "idviews/1" + }, + { + "name": "idoverrideuser_del", + "doc": "Delete an User ID override.", + "attr_name": "del", + "version": "1", + "params": [ + { + "type": "str", + "cli_name": "idview", + "name": "idviewcn", + "label": "ID View Name" }, { - "cli_name": "naptr_rec", - "doc": "Raw NAPTR records", - "label": "NAPTR record", + "cli_name": "anchor", + "label": "Anchor to override", "multivalue": true, - "name": "naptrrecord", - "option_group": "NAPTR Record", - "required": false, + "name": "ipaanchoruuid", "type": "str" }, { - "cli_name": "naptr_order", - "label": "NAPTR Order", - "name": "naptr_part_order", - "option_group": "NAPTR Record", - "required": false, - "type": "int" + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", + "positional": false, + "type": "bool" }, { - "cli_name": "naptr_preference", - "label": "NAPTR Preference", - "name": "naptr_part_preference", - "option_group": "NAPTR Record", + "name": "fallback_to_ldap", + "default": [ + "False" + ], + "doc": "Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.", "required": false, - "type": "int" - }, + "label": "Fallback to AD DC LDAP", + "type": "bool" + } + ], + "full_name": "idoverrideuser_del/1", + "output": [ { - "cli_name": "naptr_flags", - "label": "NAPTR Flags", - "name": "naptr_part_flags", - "no_convert": true, - "option_group": "NAPTR Record", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "cli_name": "naptr_service", - "label": "NAPTR Service", - "name": "naptr_part_service", - "option_group": "NAPTR Record", - "required": false, - "type": "str" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "cli_name": "naptr_regexp", - "label": "NAPTR Regular Expression", - "name": "naptr_part_regexp", - "option_group": "NAPTR Record", - "required": false, - "type": "str" - }, + "type": "str", + "multivalue": true, + "name": "value" + } + ], + "obj_class": "idoverrideuser/1", + "topic_topic": "idviews/1" + }, + { + "name": "idoverrideuser_find", + "doc": "Search for an User ID override.", + "attr_name": "find", + "version": "1", + "params": [ { - "cli_name": "naptr_replacement", - "label": "NAPTR Replacement", - "name": "naptr_part_replacement", - "option_group": "NAPTR Record", - "required": false, - "type": "str" + "type": "str", + "cli_name": "idview", + "name": "idviewcn", + "label": "ID View Name" }, { - "cli_name": "ns_rec", - "doc": "Raw NS records", - "label": "NS record", - "multivalue": true, - "name": "nsrecord", - "option_group": "NS Record", + "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, - "type": "str" + "type": "str", + "name": "criteria" }, { - "cli_name": "ns_hostname", - "label": "NS Hostname", - "name": "ns_part_hostname", - "option_group": "NS Record", + "type": "str", "required": false, - "type": "DNSName" + "cli_name": "anchor", + "name": "ipaanchoruuid", + "label": "Anchor to override" }, { - "cli_name": "nsec_rec", - "doc": "Raw NSEC records", - "exclude": ["cli", "webui"], - "label": "NSEC record", - "multivalue": true, - "name": "nsecrecord", - "option_group": "NSEC Record", + "type": "str", "required": false, - "type": "str" + "cli_name": "desc", + "name": "description", + "label": "Description" }, { - "cli_name": "ptr_rec", - "doc": "Raw PTR records", - "label": "PTR record", - "multivalue": true, - "name": "ptrrecord", - "option_group": "PTR Record", + "cli_name": "login", + "name": "uid", "required": false, - "type": "str" + "label": "User login", + "type": "str", + "no_convert": true }, { - "cli_name": "ptr_hostname", - "doc": "The hostname this reverse record points to", - "label": "PTR Hostname", - "name": "ptr_part_hostname", - "option_group": "PTR Record", + "cli_name": "uid", + "name": "uidnumber", + "doc": "User ID Number", "required": false, - "type": "DNSName" + "label": "UID", + "type": "int" }, { - "cli_name": "rrsig_rec", - "doc": "Raw RRSIG records", - "exclude": ["cli", "webui"], - "label": "RRSIG record", - "multivalue": true, - "name": "rrsigrecord", - "option_group": "RRSIG Record", "required": false, - "type": "str" + "type": "str", + "name": "gecos", + "label": "GECOS" }, - { - "cli_name": "rp_rec", - "doc": "Raw RP records", - "exclude": ["cli", "webui"], - "label": "RP record", - "multivalue": true, - "name": "rprecord", - "option_group": "RP Record", + { + "doc": "Group ID Number", "required": false, - "type": "str" + "type": "int", + "name": "gidnumber", + "label": "GID" }, { - "cli_name": "sig_rec", - "doc": "Raw SIG records", - "exclude": ["cli", "webui"], - "label": "SIG record", - "multivalue": true, - "name": "sigrecord", - "option_group": "SIG Record", + "type": "str", "required": false, - "type": "str" + "cli_name": "homedir", + "name": "homedirectory", + "label": "Home directory" }, { - "cli_name": "spf_rec", - "doc": "Raw SPF records", - "exclude": ["cli", "webui"], - "label": "SPF record", - "multivalue": true, - "name": "spfrecord", - "option_group": "SPF Record", + "type": "str", "required": false, - "type": "str" + "cli_name": "shell", + "name": "loginshell", + "label": "Login shell" }, { - "cli_name": "srv_rec", - "doc": "Raw SRV records", - "label": "SRV record", - "multivalue": true, - "name": "srvrecord", - "option_group": "SRV Record", + "exclude": [ + "cli", + "webui" + ], "required": false, - "type": "str" + "type": "str", + "name": "ipaoriginaluid" }, { - "cli_name": "srv_priority", - "label": "SRV Priority", - "name": "srv_part_priority", - "option_group": "SRV Record", + "doc": "Time limit of search in seconds (0 is unlimited)", "required": false, - "type": "int" + "type": "int", + "name": "timelimit", + "label": "Time Limit" }, { - "cli_name": "srv_weight", - "label": "SRV Weight", - "name": "srv_part_weight", - "option_group": "SRV Record", + "doc": "Maximum number of entries returned (0 is unlimited)", "required": false, - "type": "int" + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { - "cli_name": "srv_port", - "label": "SRV Port", - "name": "srv_part_port", - "option_group": "SRV Record", + "name": "fallback_to_ldap", + "default": [ + "False" + ], + "doc": "Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.", "required": false, - "type": "int" + "label": "Fallback to AD DC LDAP", + "type": "bool" }, { - "cli_name": "srv_target", - "doc": - "The domain name of the target host or '.' if the service is decidedly not available at this domain", - "label": "SRV Target", - "name": "srv_part_target", - "option_group": "SRV Record", + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"anchor\")", "required": false, - "type": "DNSName" + "label": "Primary key only", + "type": "bool" + } + ], + "full_name": "idoverrideuser_find/1", + "output": [ + { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "cli_name": "sshfp_rec", - "doc": "Raw SSHFP records", - "label": "SSHFP record", + "type": "dict", "multivalue": true, - "name": "sshfprecord", - "option_group": "SSHFP Record", - "required": false, - "type": "str" + "name": "result" }, { - "cli_name": "sshfp_algorithm", - "label": "SSHFP Algorithm", - "name": "sshfp_part_algorithm", - "option_group": "SSHFP Record", + "doc": "Number of entries returned", + "type": "int", + "name": "count" + }, + { + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" + } + ], + "obj_class": "idoverrideuser/1", + "topic_topic": "idviews/1" + }, + { + "name": "idoverrideuser_mod", + "doc": "Modify an User ID override.", + "attr_name": "mod", + "version": "1", + "params": [ + { + "type": "str", + "cli_name": "idview", + "name": "idviewcn", + "label": "ID View Name" + }, + { + "type": "str", + "cli_name": "anchor", + "name": "ipaanchoruuid", + "label": "Anchor to override" + }, + { + "type": "str", "required": false, - "type": "int" + "cli_name": "desc", + "name": "description", + "label": "Description" }, { - "cli_name": "sshfp_fp_type", - "label": "SSHFP Fingerprint Type", - "name": "sshfp_part_fp_type", - "option_group": "SSHFP Record", + "cli_name": "login", + "name": "uid", "required": false, - "type": "int" + "label": "User login", + "type": "str", + "no_convert": true }, { - "cli_name": "sshfp_fingerprint", - "label": "SSHFP Fingerprint", - "name": "sshfp_part_fingerprint", - "option_group": "SSHFP Record", + "cli_name": "uid", + "name": "uidnumber", + "doc": "User ID Number", "required": false, - "type": "str" + "label": "UID", + "type": "int" }, { - "cli_name": "tlsa_rec", - "doc": "Raw TLSA records", - "label": "TLSA record", - "multivalue": true, - "name": "tlsarecord", - "option_group": "TLSA Record", "required": false, - "type": "str" + "type": "str", + "name": "gecos", + "label": "GECOS" }, { - "cli_name": "tlsa_cert_usage", - "label": "TLSA Certificate Usage", - "name": "tlsa_part_cert_usage", - "option_group": "TLSA Record", + "doc": "Group ID Number", "required": false, - "type": "int" + "type": "int", + "name": "gidnumber", + "label": "GID" }, { - "cli_name": "tlsa_selector", - "label": "TLSA Selector", - "name": "tlsa_part_selector", - "option_group": "TLSA Record", + "type": "str", "required": false, - "type": "int" + "cli_name": "homedir", + "name": "homedirectory", + "label": "Home directory" }, { - "cli_name": "tlsa_matching_type", - "label": "TLSA Matching Type", - "name": "tlsa_part_matching_type", - "option_group": "TLSA Record", + "type": "str", "required": false, - "type": "int" + "cli_name": "shell", + "name": "loginshell", + "label": "Login shell" }, { - "cli_name": "tlsa_cert_association_data", - "label": "TLSA Certificate Association Data", - "name": "tlsa_part_cert_association_data", - "option_group": "TLSA Record", + "exclude": [ + "cli", + "webui" + ], "required": false, - "type": "str" + "type": "str", + "name": "ipaoriginaluid" }, { - "cli_name": "txt_rec", - "doc": "Raw TXT records", - "label": "TXT record", - "multivalue": true, - "name": "txtrecord", - "option_group": "TXT Record", + "cli_name": "sshpubkey", + "name": "ipasshpubkey", "required": false, - "type": "str" + "label": "SSH public key", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_name": "txt_data", - "label": "TXT Text Data", - "name": "txt_part_data", - "option_group": "TXT Record", + "cli_name": "certificate", + "name": "usercertificate", + "doc": "Base-64 encoded user certificate", "required": false, - "type": "str" + "label": "Certificate", + "multivalue": true, + "type": "Certificate" }, { "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, { - "default": ["False"], - "doc": - "Parse all raw DNS records and return them in a structured way", - "label": "Structured", - "name": "structured", - "positional": false, + "name": "fallback_to_ldap", + "default": [ + "False" + ], + "doc": "Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.", + "required": false, + "label": "Fallback to AD DC LDAP", "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "rename", - "doc": "Rename the DNS resource record object", - "label": "Rename", "name": "rename", + "doc": "Rename the User ID override object", "required": false, - "type": "DNSName" + "label": "Rename", + "type": "str" } ], - "topic_topic": "dns/1", - "version": "1" + "full_name": "idoverrideuser_mod/1", + "output": [ + { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" + }, + { + "type": "dict", + "name": "result" + }, + { + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "idoverrideuser/1", + "topic_topic": "idviews/1" }, { - "attr_name": "show", - "doc": "Display DNS resource.", - "full_name": "dnsrecord_show/1", - "name": "dnsrecord_show", - "obj_class": "dnsrecord/1", + "name": "idoverrideuser_remove_cert", + "doc": "Remove one or more certificates to the idoverrideuser entry", + "attr_name": "remove_cert", + "version": "1", + "params": [ + { + "type": "str", + "cli_name": "idview", + "name": "idviewcn", + "label": "ID View Name" + }, + { + "type": "str", + "cli_name": "anchor", + "name": "ipaanchoruuid", + "label": "Anchor to override" + }, + { + "name": "fallback_to_ldap", + "default": [ + "False" + ], + "doc": "Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.", + "required": false, + "label": "Fallback to AD DC LDAP", + "type": "bool" + }, + { + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "certificate", + "name": "usercertificate", + "alwaysask": true, + "doc": "Base-64 encoded user certificate", + "label": "Certificate", + "positional": false, + "multivalue": true, + "type": "Certificate" + } + ], + "full_name": "idoverrideuser_remove_cert/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "DNSName" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "idoverrideuser/1", + "topic_topic": "idviews/1" + }, + { + "name": "idoverrideuser_show", + "doc": "Display information about an User ID override.", + "attr_name": "show", + "version": "1", "params": [ { - "alwaysask": true, - "cli_name": "dnszone", - "default_from_param": ["name_from_ip"], - "doc": "Zone name (FQDN)", - "label": "Zone name", - "name": "dnszoneidnsname", - "no_convert": true, - "type": "DNSName" + "type": "str", + "cli_name": "idview", + "name": "idviewcn", + "label": "ID View Name" }, { - "cli_name": "name", - "doc": "Record name", - "label": "Record name", - "name": "idnsname", - "type": "DNSName" + "type": "str", + "cli_name": "anchor", + "name": "ipaanchoruuid", + "label": "Anchor to override" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, { - "default": ["False"], - "doc": - "Parse all raw DNS records and return them in a structured way", - "label": "Structured", - "name": "structured", - "positional": false, + "name": "fallback_to_ldap", + "default": [ + "False" + ], + "doc": "Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.", + "required": false, + "label": "Fallback to AD DC LDAP", "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "dns/1", - "version": "1" - }, - { - "exclude": ["cli"], - "full_name": "dnsrecord_split_parts/1", - "name": "dnsrecord_split_parts", + "full_name": "idoverrideuser_show/1", "output": [ { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" + }, + { + "type": "dict", "name": "result" + }, + { + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "idoverrideuser/1", + "topic_topic": "idviews/1" + }, + { + "name": "idrange_add", + "doc": "\n Add new ID range.\n\n To add a new ID range you always have to specify\n\n --base-id\n --range-size\n\n Additionally\n\n --rid-base\n --secondary-rid-base\n\n may be given for a new ID range for the local domain while\n\n --rid-base\n --dom-sid\n\n must be given to add a new range for a trusted AD domain.\n\n=======\nWARNING:\n\nDNA plugin in 389-ds will allocate IDs based on the ranges configured for the\nlocal domain. Currently the DNA plugin *cannot* be reconfigured itself based\non the local ranges set via this family of commands.\n\nManual configuration change has to be done in the DNA plugin configuration for\nthe new local range. Specifically, The dnaNextRange attribute of 'cn=Posix\nIDs,cn=Distributed Numeric Assignment Plugin,cn=plugins,cn=config' has to be\nmodified to match the new range.\n=======\n\n", + "attr_name": "add", + "version": "1", "params": [ { - "name": "name", + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Range name" + }, + { + "positional": false, + "type": "int", + "cli_name": "base_id", + "name": "ipabaseid", + "label": "First Posix ID of the range" + }, + { + "positional": false, + "type": "int", + "cli_name": "range_size", + "name": "ipaidrangesize", + "label": "Number of IDs in the range" + }, + { + "type": "int", + "required": false, + "cli_name": "rid_base", + "name": "ipabaserid", + "label": "First RID of the corresponding RID range" + }, + { + "type": "int", + "required": false, + "cli_name": "secondary_rid_base", + "name": "ipasecondarybaserid", + "label": "First RID of the secondary RID range" + }, + { + "type": "str", + "required": false, + "cli_name": "dom_sid", + "name": "ipanttrusteddomainsid", + "label": "Domain SID of the trusted domain" + }, + { + "type": "str", + "required": false, + "cli_name": "dom_name", + "name": "ipanttrusteddomainname", + "label": "Name of the trusted domain" + }, + { + "cli_name": "type", + "name": "iparangetype", + "cli_metavar": "['ipa-ad-trust', 'ipa-ad-trust-posix', 'ipa-local']", + "doc": "ID range type, one of ipa-ad-trust, ipa-ad-trust-posix, ipa-local", + "required": false, + "label": "Range type", + "type": "str" + }, + { + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "name": "value", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" + }, + { + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" } ], - "topic_topic": "dns/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for DNS servers.", - "full_name": "dnsserver_find/1", - "name": "dnsserver_find", - "obj_class": "dnsserver/1", + "full_name": "idrange_add/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "multivalue": true, - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "idrange/1", + "topic_topic": "idrange/1" + }, + { + "name": "idrange_del", + "doc": "Delete an ID range.", + "attr_name": "del", + "version": "1", + "params": [ + { + "cli_name": "name", + "label": "Range name", + "multivalue": true, + "name": "cn", + "type": "str" }, { - "doc": "True if not all results were returned", - "name": "truncated", + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", + "positional": false, "type": "bool" } ], + "full_name": "idrange_del/1", + "output": [ + { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" + }, + { + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" + }, + { + "type": "str", + "multivalue": true, + "name": "value" + } + ], + "obj_class": "idrange/1", + "topic_topic": "idrange/1" + }, + { + "name": "idrange_find", + "doc": "Search for ranges.", + "attr_name": "find", + "version": "1", "params": [ { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, - "type": "str" + "type": "str", + "name": "criteria" }, { - "cli_name": "hostname", - "doc": "DNS Server name", - "label": "Server name", - "name": "idnsserverid", - "no_convert": true, + "type": "str", "required": false, - "type": "str" + "cli_name": "name", + "name": "cn", + "label": "Range name" }, { - "cli_name": "soa_mname_override", - "doc": "SOA mname (authoritative server) override", - "label": "SOA mname override", - "name": "idnssoamname", + "type": "int", "required": false, - "type": "DNSName" + "cli_name": "base_id", + "name": "ipabaseid", + "label": "First Posix ID of the range" }, { - "cli_name": "forwarder", - "doc": - "Per-server forwarders. A custom port can be specified for each forwarder using a standard format \"IP_ADDRESS port PORT\"", - "label": "Forwarders", - "multivalue": true, - "name": "idnsforwarders", + "type": "int", "required": false, - "type": "str" + "cli_name": "range_size", + "name": "ipaidrangesize", + "label": "Number of IDs in the range" }, { - "cli_metavar": "['only', 'first', 'none']", - "cli_name": "forward_policy", - "doc": - "Per-server conditional forwarding policy. Set to \"none\" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded.", - "label": "Forward policy", - "name": "idnsforwardpolicy", + "type": "int", + "required": false, + "cli_name": "rid_base", + "name": "ipabaserid", + "label": "First RID of the corresponding RID range" + }, + { + "type": "int", + "required": false, + "cli_name": "secondary_rid_base", + "name": "ipasecondarybaserid", + "label": "First RID of the secondary RID range" + }, + { + "type": "str", + "required": false, + "cli_name": "dom_sid", + "name": "ipanttrusteddomainsid", + "label": "Domain SID of the trusted domain" + }, + { + "cli_name": "type", + "name": "iparangetype", + "cli_metavar": "['ipa-ad-trust', 'ipa-ad-trust-posix', 'ipa-local']", + "doc": "ID range type, one of ipa-ad-trust, ipa-ad-trust-posix, ipa-local", "required": false, + "label": "Range type", "type": "str" }, { "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", "required": false, - "type": "int" + "type": "int", + "name": "timelimit", + "label": "Time Limit" }, { "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", "required": false, - "type": "int" + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"hostname\")", - "label": "Primary key only", "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"name\")", "required": false, + "label": "Primary key only", "type": "bool" } ], - "topic_topic": "dns/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify DNS server configuration", - "full_name": "dnsserver_mod/1", - "name": "dnsserver_mod", - "obj_class": "dnsserver/1", + "full_name": "idrange_find/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "multivalue": true, + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "Number of entries returned", + "type": "int", + "name": "count" + }, + { + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], + "obj_class": "idrange/1", + "topic_topic": "idrange/1" + }, + { + "name": "idrange_mod", + "doc": "Modify ID range.\n\n=======\nWARNING:\n\nDNA plugin in 389-ds will allocate IDs based on the ranges configured for the\nlocal domain. Currently the DNA plugin *cannot* be reconfigured itself based\non the local ranges set via this family of commands.\n\nManual configuration change has to be done in the DNA plugin configuration for\nthe new local range. Specifically, The dnaNextRange attribute of 'cn=Posix\nIDs,cn=Distributed Numeric Assignment Plugin,cn=plugins,cn=config' has to be\nmodified to match the new range.\n=======\n\n", + "attr_name": "mod", + "version": "1", "params": [ { - "cli_name": "hostname", - "doc": "DNS Server name", - "label": "Server name", - "name": "idnsserverid", - "no_convert": true, - "type": "str" + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Range name" }, { - "cli_name": "soa_mname_override", - "doc": "SOA mname (authoritative server) override", - "label": "SOA mname override", - "name": "idnssoamname", + "type": "int", "required": false, - "type": "DNSName" + "cli_name": "base_id", + "name": "ipabaseid", + "label": "First Posix ID of the range" }, { - "cli_name": "forwarder", - "doc": - "Per-server forwarders. A custom port can be specified for each forwarder using a standard format \"IP_ADDRESS port PORT\"", - "label": "Forwarders", - "multivalue": true, - "name": "idnsforwarders", + "type": "int", "required": false, - "type": "str" + "cli_name": "range_size", + "name": "ipaidrangesize", + "label": "Number of IDs in the range" }, { - "cli_metavar": "['only', 'first', 'none']", - "cli_name": "forward_policy", - "doc": - "Per-server conditional forwarding policy. Set to \"none\" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded.", - "label": "Forward policy", - "name": "idnsforwardpolicy", + "type": "int", "required": false, - "type": "str" + "cli_name": "rid_base", + "name": "ipabaserid", + "label": "First RID of the corresponding RID range" + }, + { + "type": "int", + "required": false, + "cli_name": "secondary_rid_base", + "name": "ipasecondarybaserid", + "label": "First RID of the secondary RID range" }, { "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, + { + "cli_name": "dom_sid", + "name": "ipanttrusteddomainsid", + "required": false, + "label": "Domain SID of the trusted domain", + "exclude": [ + "cli", + "webui" + ], + "type": "str" + }, + { + "cli_name": "dom_name", + "name": "ipanttrusteddomainname", + "required": false, + "label": "Name of the trusted domain", + "exclude": [ + "cli", + "webui" + ], + "type": "str" + }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "dns/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display configuration of a DNS server.", - "full_name": "dnsserver_show/1", - "name": "dnsserver_show", - "obj_class": "dnsserver/1", + "full_name": "idrange_mod/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "idrange/1", + "topic_topic": "idrange/1" + }, + { + "name": "idrange_show", + "doc": "Display information about a range.", + "attr_name": "show", + "version": "1", "params": [ { - "cli_name": "hostname", - "doc": "DNS Server name", - "label": "Server name", - "name": "idnsserverid", - "no_convert": true, - "type": "str" + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Range name" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "dns/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Create new DNS zone (SOA record).", - "full_name": "dnszone_add/1", - "name": "dnszone_add", - "obj_class": "dnszone/1", + "full_name": "idrange_show/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "DNSName" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "idrange/1", + "topic_topic": "idrange/1" + }, + { + "name": "idview_add", + "doc": "Add a new ID View.", + "attr_name": "add", + "version": "1", "params": [ { - "alwaysask": true, + "type": "str", "cli_name": "name", - "default_from_param": ["name_from_ip"], - "doc": "Zone name (FQDN)", - "label": "Zone name", - "name": "idnsname", - "no_convert": true, - "type": "DNSName" + "name": "cn", + "label": "ID View Name" }, { - "doc": "IP network to create reverse zone name from", - "label": "Reverse zone IP network", - "name": "name_from_ip", + "type": "str", "required": false, - "type": "str" + "cli_name": "desc", + "name": "description", + "label": "Description" }, { - "cli_name": "forwarder", - "doc": - "Per-zone forwarders. A custom port can be specified for each forwarder using a standard format \"IP_ADDRESS port PORT\"", - "label": "Zone forwarders", - "multivalue": true, - "name": "idnsforwarders", + "cli_name": "domain_resolution_order", + "name": "ipadomainresolutionorder", + "doc": "colon-separated list of domains used for short name qualification", "required": false, + "label": "Domain resolution order", "type": "str" }, { - "cli_metavar": "['only', 'first', 'none']", - "cli_name": "forward_policy", - "doc": - "Per-zone conditional forwarding policy. Set to \"none\" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded.", - "label": "Forward policy", - "name": "idnsforwardpolicy", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "name_server", - "doc": "Authoritative nameserver domain name", - "label": "Authoritative nameserver", - "name": "idnssoamname", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, - "type": "DNSName" - }, - { - "cli_name": "admin_email", - "default": ["hostmaster"], - "doc": "Administrator e-mail address", - "label": "Administrator e-mail address", - "name": "idnssoarname", - "no_convert": true, - "positional": false, - "type": "DNSName" + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" }, { - "cli_name": "serial", - "default_from_param": [], - "doc": "SOA record serial number", - "label": "SOA serial", - "name": "idnssoaserial", + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, - "type": "int" + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "refresh", - "default": ["3600"], - "doc": "SOA record refresh time", - "label": "SOA refresh", - "name": "idnssoarefresh", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, - "type": "int" - }, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "idview_add/1", + "output": [ { - "cli_name": "retry", - "default": ["900"], - "doc": "SOA record retry time", - "label": "SOA retry", - "name": "idnssoaretry", - "positional": false, - "type": "int" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "cli_name": "expire", - "default": ["1209600"], - "doc": "SOA record expire time", - "label": "SOA expire", - "name": "idnssoaexpire", - "positional": false, - "type": "int" + "type": "dict", + "name": "result" }, { - "cli_name": "minimum", - "default": ["3600"], - "doc": "How long should negative responses be cached", - "label": "SOA minimum", - "name": "idnssoaminimum", - "positional": false, - "type": "int" - }, + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "idview/1", + "topic_topic": "idviews/1" + }, + { + "name": "idview_apply", + "doc": "Applies ID View to specified hosts or current members of specified hostgroups. If any other ID View is applied to the host, it is overridden.", + "attr_name": "apply", + "version": "1", + "params": [ { - "cli_name": "ttl", - "doc": "Time to live for records at zone apex", - "label": "Time to live", - "name": "dnsttl", - "required": false, - "type": "int" + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "ID View Name" }, { - "cli_name": "default_ttl", - "doc": "Time to live for records without explicit TTL definition", - "label": "Default time to live", - "name": "dnsdefaultttl", + "cli_name": "hosts", + "name": "host", + "doc": "Hosts to apply the ID View to", "required": false, - "type": "int" + "label": "hosts", + "multivalue": true, + "type": "str" }, { - "cli_metavar": "['IN', 'CS', 'CH', 'HS']", - "cli_name": "class", - "exclude": ["cli", "webui"], - "name": "dnsclass", + "cli_name": "hostgroups", + "name": "hostgroup", + "doc": "Hostgroups to whose hosts apply the ID View to. Please note that view is not applied automatically to any hosts added to the hostgroup after running the idview-apply command.", "required": false, + "label": "hostgroups", + "multivalue": true, "type": "str" - }, + } + ], + "full_name": "idview_apply/1", + "output": [ { - "cli_name": "update_policy", - "default_from_param": ["idnsname"], - "doc": "BIND update policy", - "label": "BIND update policy", - "name": "idnsupdatepolicy", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "cli_name": "dynamic_update", - "default": ["False"], - "doc": "Allow dynamic updates.", - "label": "Dynamic update", - "name": "idnsallowdynupdate", - "required": false, - "type": "bool" + "doc": "Hosts that this ID View was applied to.", + "type": "dict", + "name": "succeeded" }, { - "cli_name": "allow_query", - "default": ["any;"], - "doc": - "Semicolon separated list of IP addresses or networks which are allowed to issue queries", - "label": "Allow query", - "name": "idnsallowquery", - "no_convert": true, - "required": false, - "type": "str" + "doc": "Hosts or hostgroups that this ID View could not be applied to.", + "type": "dict", + "name": "failed" }, { - "cli_name": "allow_transfer", - "default": ["none;"], - "doc": - "Semicolon separated list of IP addresses or networks which are allowed to transfer the zone", - "label": "Allow transfer", - "name": "idnsallowtransfer", - "no_convert": true, - "required": false, + "doc": "Number of hosts the ID View was applied to:", + "type": "int", + "name": "completed" + } + ], + "obj_class": "idview/1", + "topic_topic": "idviews/1" + }, + { + "name": "idview_del", + "doc": "Delete an ID View.", + "attr_name": "del", + "version": "1", + "params": [ + { + "cli_name": "name", + "label": "ID View Name", + "multivalue": true, + "name": "cn", "type": "str" }, { - "cli_name": "allow_sync_ptr", - "doc": - "Allow synchronization of forward (A, AAAA) and reverse (PTR) records in the zone", - "label": "Allow PTR sync", - "name": "idnsallowsyncptr", - "required": false, + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", + "positional": false, "type": "bool" - }, + } + ], + "full_name": "idview_del/1", + "output": [ { - "alwaysask": true, - "cli_name": "dnssec", - "default": ["False"], - "doc": "Allow inline DNSSEC signing of records in the zone", - "label": "Allow in-line DNSSEC signing", - "name": "idnssecinlinesigning", + "doc": "User-friendly description of action performed", "required": false, - "type": "bool" + "type": "str", + "name": "summary" }, { - "cli_name": "nsec3param_rec", - "doc": - "NSEC3PARAM record for zone in format: hash_algorithm flags iterations salt", - "label": "NSEC3PARAM record", - "name": "nsec3paramrecord", - "required": false, - "type": "str" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], + "type": "str", "multivalue": true, - "name": "setattr", - "required": false, - "type": "str" - }, + "name": "value" + } + ], + "obj_class": "idview/1", + "topic_topic": "idviews/1" + }, + { + "name": "idview_find", + "doc": "Search for an ID View.", + "attr_name": "find", + "version": "1", + "params": [ { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", + "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, - "type": "str" + "type": "str", + "name": "criteria" }, { - "default": ["False"], - "doc": - "Force DNS zone creation even if it will overlap with an existing zone.", - "name": "skip_overlap_check", - "positional": false, - "type": "bool" + "type": "str", + "required": false, + "cli_name": "name", + "name": "cn", + "label": "ID View Name" }, { - "default": ["False"], - "doc": - "Force DNS zone creation even if nameserver is not resolvable. (Deprecated)", - "name": "force", - "positional": false, - "type": "bool" + "type": "str", + "required": false, + "cli_name": "desc", + "name": "description", + "label": "Description" }, { - "default": ["False"], - "doc": - "Force DNS zone creation even if nameserver is not resolvable.", - "name": "skip_nameserver_check", - "positional": false, - "type": "bool" + "doc": "Time limit of search in seconds (0 is unlimited)", + "required": false, + "type": "int", + "name": "timelimit", + "label": "Time Limit" }, { - "exclude": ["cli", "webui"], - "name": "ip_address", + "doc": "Maximum number of entries returned (0 is unlimited)", "required": false, - "type": "str" + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"name\")", + "required": false, + "label": "Primary key only", "type": "bool" } ], - "topic_topic": "dns/1", - "version": "1" - }, - { - "attr_name": "add_permission", - "doc": "Add a permission for per-zone access delegation.", - "full_name": "dnszone_add_permission/1", - "name": "dnszone_add_permission", - "obj_class": "dnszone/1", + "full_name": "idview_find/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "True means the operation was successful", - "name": "result", - "type": "bool" + "type": "dict", + "multivalue": true, + "name": "result" }, { - "doc": "Permission value", - "name": "value", - "type": "str" - } - ], - "params": [ + "doc": "Number of entries returned", + "type": "int", + "name": "count" + }, { - "alwaysask": true, - "cli_name": "name", - "default_from_param": ["name_from_ip"], - "doc": "Zone name (FQDN)", - "label": "Zone name", - "name": "idnsname", - "no_convert": true, - "type": "DNSName" + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], - "topic_topic": "dns/1", - "version": "1" + "obj_class": "idview/1", + "topic_topic": "idviews/1" }, { - "attr_name": "del", - "doc": "Delete DNS zone (SOA record).", - "full_name": "dnszone_del/1", - "name": "dnszone_del", - "obj_class": "dnszone/1", - "output": [ + "name": "idview_mod", + "doc": "Modify an ID View.", + "attr_name": "mod", + "version": "1", + "params": [ { - "doc": "User-friendly description of action performed", - "name": "summary", + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "ID View Name" + }, + { + "type": "str", "required": false, + "cli_name": "desc", + "name": "description", + "label": "Description" + }, + { + "cli_name": "domain_resolution_order", + "name": "ipadomainresolutionorder", + "doc": "colon-separated list of domains used for short name qualification", + "required": false, + "label": "Domain resolution order", "type": "str" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" }, { + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", + "required": false, "multivalue": true, - "name": "value", - "type": "DNSName" - } - ], - "params": [ + "exclude": [ + "webui" + ], + "type": "str" + }, { - "alwaysask": true, - "cli_name": "name", - "default_from_param": ["name_from_ip"], - "doc": "Zone name (FQDN)", - "label": "Zone name", + "cli_name": "delattr", + "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", + "required": false, "multivalue": true, - "name": "idnsname", - "no_convert": true, - "type": "DNSName" + "exclude": [ + "webui" + ], + "type": "str" }, { - "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", - "name": "continue", + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" + }, + { + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" + }, + { + "cli_name": "rename", + "name": "rename", + "doc": "Rename the ID View object", + "required": false, + "label": "Rename", + "type": "str" } ], - "topic_topic": "dns/1", - "version": "1" - }, - { - "attr_name": "disable", - "doc": "Disable DNS Zone.", - "full_name": "dnszone_disable/1", - "name": "dnszone_disable", - "obj_class": "dnszone/1", + "full_name": "idview_mod/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "True means the operation was successful", - "name": "result", - "type": "bool" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "DNSName" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "idview/1", + "topic_topic": "idviews/1" + }, + { + "name": "idview_show", + "doc": "Display information about an ID View.", + "attr_name": "show", + "version": "1", "params": [ { - "alwaysask": true, + "type": "str", "cli_name": "name", - "default_from_param": ["name_from_ip"], - "doc": "Zone name (FQDN)", - "label": "Zone name", - "name": "idnsname", - "no_convert": true, - "type": "DNSName" + "name": "cn", + "label": "ID View Name" + }, + { + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" + }, + { + "cli_name": "show_hosts", + "name": "show_hosts", + "default": [ + "False" + ], + "doc": "Enumerate all the hosts the view applies to.", + "required": false, + "type": "bool" + }, + { + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" } ], - "topic_topic": "dns/1", - "version": "1" - }, - { - "attr_name": "enable", - "doc": "Enable DNS Zone.", - "full_name": "dnszone_enable/1", - "name": "dnszone_enable", - "obj_class": "dnszone/1", + "full_name": "idview_show/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "True means the operation was successful", - "name": "result", - "type": "bool" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "DNSName" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "idview/1", + "topic_topic": "idviews/1" + }, + { + "name": "idview_unapply", + "doc": "Clears ID View from specified hosts or current members of specified hostgroups.", + "attr_name": "unapply", + "version": "1", "params": [ { - "alwaysask": true, - "cli_name": "name", - "default_from_param": ["name_from_ip"], - "doc": "Zone name (FQDN)", - "label": "Zone name", - "name": "idnsname", - "no_convert": true, - "type": "DNSName" + "cli_name": "hosts", + "name": "host", + "doc": "Hosts to clear (any) ID View from.", + "required": false, + "label": "hosts", + "multivalue": true, + "type": "str" + }, + { + "cli_name": "hostgroups", + "name": "hostgroup", + "doc": "Hostgroups whose hosts should have ID Views cleared. Note that view is not cleared automatically from any host added to the hostgroup after running idview-unapply command.", + "required": false, + "label": "hostgroups", + "multivalue": true, + "type": "str" } ], - "topic_topic": "dns/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for DNS zones (SOA records).", - "full_name": "dnszone_find/1", - "name": "dnszone_find", - "obj_class": "dnszone/1", + "full_name": "idview_unapply/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "multivalue": true, - "name": "result", - "type": "dict" + "doc": "Hosts that ID View was cleared from.", + "type": "dict", + "name": "succeeded" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "doc": "Hosts or hostgroups that ID View could not be cleared from.", + "type": "dict", + "name": "failed" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" + "doc": "Number of hosts that had a ID View was unset:", + "type": "int", + "name": "completed" } ], + "obj_class": "idview/1", + "topic_topic": "idviews/1" + }, + { + "name": "join", + "doc": "Join an IPA domain", + "version": "1", "params": [ { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, - "required": false, - "type": "str" + "type": "str", + "cli_name": "hostname", + "name": "cn", + "default_from_param": [], + "doc": "The hostname to register as" }, { - "alwaysask": true, - "cli_name": "name", - "default_from_param": ["name_from_ip"], - "doc": "Zone name (FQDN)", - "label": "Zone name", - "name": "idnsname", - "no_convert": true, - "required": false, - "type": "DNSName" + "positional": false, + "doc": "The IPA realm", + "type": "str", + "name": "realm", + "default_from_param": [] }, { - "doc": "IP network to create reverse zone name from", - "label": "Reverse zone IP network", - "name": "name_from_ip", + "doc": "Hardware platform of the host (e.g. Lenovo T61)", "required": false, + "cli_name": "platform", + "name": "nshardwareplatform", "type": "str" }, { - "cli_name": "zone_active", - "doc": "Is zone active?", - "label": "Active zone", - "name": "idnszoneactive", + "doc": "Operating System and version of the host (e.g. Fedora 9)", "required": false, - "type": "bool" - }, + "cli_name": "os", + "name": "nsosversion", + "type": "str" + } + ], + "full_name": "join/1", + "exclude": [ + "cli" + ], + "output": [], + "topic_topic": "join/1" + }, + { + "name": "json_metadata", + "doc": "\n Export plugin meta-data for the webUI.\n ", + "version": "1", + "params": [ { - "cli_name": "forwarder", - "doc": - "Per-zone forwarders. A custom port can be specified for each forwarder using a standard format \"IP_ADDRESS port PORT\"", - "label": "Zone forwarders", - "multivalue": true, - "name": "idnsforwarders", + "positional": true, + "doc": "Name of object to export", "required": false, - "type": "str" + "type": "str", + "name": "objname" }, { - "cli_metavar": "['only', 'first', 'none']", - "cli_name": "forward_policy", - "doc": - "Per-zone conditional forwarding policy. Set to \"none\" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded.", - "label": "Forward policy", - "name": "idnsforwardpolicy", + "positional": true, + "doc": "Name of method to export", "required": false, - "type": "str" + "type": "str", + "name": "methodname" }, { - "cli_name": "name_server", - "doc": "Authoritative nameserver domain name", - "label": "Authoritative nameserver", - "name": "idnssoamname", + "doc": "Name of object to export", "required": false, - "type": "DNSName" + "type": "str", + "name": "object" }, { - "alwaysask": true, - "cli_name": "admin_email", - "default": ["hostmaster"], - "doc": "Administrator e-mail address", - "label": "Administrator e-mail address", - "name": "idnssoarname", - "no_convert": true, + "doc": "Name of method to export", "required": false, - "type": "DNSName" + "type": "str", + "name": "method" }, { - "alwaysask": true, - "cli_name": "serial", - "default_from_param": [], - "doc": "SOA record serial number", - "label": "SOA serial", - "name": "idnssoaserial", + "doc": "Name of command to export", "required": false, - "type": "int" + "type": "str", + "name": "command" + } + ], + "full_name": "json_metadata/1", + "exclude": [ + "cli" + ], + "output": [ + { + "doc": "Dict of JSON encoded IPA Objects", + "type": "dict", + "name": "objects" }, { - "alwaysask": true, - "cli_name": "refresh", - "default": ["3600"], - "doc": "SOA record refresh time", - "label": "SOA refresh", - "name": "idnssoarefresh", - "required": false, - "type": "int" + "doc": "Dict of JSON encoded IPA Methods", + "type": "dict", + "name": "methods" }, { - "alwaysask": true, - "cli_name": "retry", - "default": ["900"], - "doc": "SOA record retry time", - "label": "SOA retry", - "name": "idnssoaretry", + "doc": "Dict of JSON encoded IPA Commands", + "type": "dict", + "name": "commands" + } + ], + "topic_topic": "internal/1" + }, + { + "name": "kra_is_enabled", + "version": "1", + "params": [], + "full_name": "kra_is_enabled/1", + "exclude": [ + "cli" + ], + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "int" + "type": "str", + "name": "summary" }, { - "alwaysask": true, - "cli_name": "expire", - "default": ["1209600"], - "doc": "SOA record expire time", - "label": "SOA expire", - "name": "idnssoaexpire", - "required": false, - "type": "int" + "doc": "True means the operation was successful", + "type": "bool", + "name": "result" }, { - "alwaysask": true, - "cli_name": "minimum", - "default": ["3600"], - "doc": "How long should negative responses be cached", - "label": "SOA minimum", - "name": "idnssoaminimum", + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "NoneType", + "name": "value" + } + ], + "topic_topic": "vault/1" + }, + { + "name": "krbtpolicy_mod", + "doc": "Modify Kerberos ticket policy.", + "attr_name": "mod", + "version": "1", + "params": [ + { + "cli_name": "user", + "name": "uid", + "doc": "Manage ticket policy for specific user", "required": false, - "type": "int" + "label": "User name", + "positional": true, + "type": "str" }, { - "cli_name": "ttl", - "doc": "Time to live for records at zone apex", - "label": "Time to live", - "name": "dnsttl", + "cli_name": "maxlife", + "name": "krbmaxticketlife", + "doc": "Maximum ticket life (seconds)", "required": false, + "label": "Max life", "type": "int" }, { - "cli_name": "default_ttl", - "doc": "Time to live for records without explicit TTL definition", - "label": "Default time to live", - "name": "dnsdefaultttl", + "cli_name": "maxrenew", + "name": "krbmaxrenewableage", + "doc": "Maximum renewable age (seconds)", "required": false, + "label": "Max renew", "type": "int" }, { - "cli_metavar": "['IN', 'CS', 'CH', 'HS']", - "cli_name": "class", - "exclude": ["cli", "webui"], - "name": "dnsclass", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "alwaysask": true, - "cli_name": "update_policy", - "default_from_param": ["idnsname"], - "doc": "BIND update policy", - "label": "BIND update policy", - "name": "idnsupdatepolicy", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "alwaysask": true, - "cli_name": "dynamic_update", - "default": ["False"], - "doc": "Allow dynamic updates.", - "label": "Dynamic update", - "name": "idnsallowdynupdate", + "cli_name": "delattr", + "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" + }, + { + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, "type": "bool" }, { - "alwaysask": true, - "cli_name": "allow_query", - "default": ["any;"], - "doc": - "Semicolon separated list of IP addresses or networks which are allowed to issue queries", - "label": "Allow query", - "name": "idnsallowquery", - "no_convert": true, + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "krbtpolicy_mod/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "alwaysask": true, - "cli_name": "allow_transfer", - "default": ["none;"], - "doc": - "Semicolon separated list of IP addresses or networks which are allowed to transfer the zone", - "label": "Allow transfer", - "name": "idnsallowtransfer", - "no_convert": true, + "type": "dict", + "name": "result" + }, + { + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "krbtpolicy/1", + "topic_topic": "krbtpolicy/1" + }, + { + "name": "krbtpolicy_reset", + "doc": "Reset Kerberos ticket policy to the default values.", + "attr_name": "reset", + "version": "1", + "params": [ + { + "cli_name": "user", + "name": "uid", + "doc": "Manage ticket policy for specific user", "required": false, + "label": "User name", + "positional": true, "type": "str" }, { - "cli_name": "allow_sync_ptr", - "doc": - "Allow synchronization of forward (A, AAAA) and reverse (PTR) records in the zone", - "label": "Allow PTR sync", - "name": "idnsallowsyncptr", - "required": false, + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "alwaysask": true, - "cli_name": "dnssec", - "default": ["False"], - "doc": "Allow inline DNSSEC signing of records in the zone", - "label": "Allow in-line DNSSEC signing", - "name": "idnssecinlinesigning", - "required": false, + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - }, + } + ], + "full_name": "krbtpolicy_reset/1", + "output": [ { - "cli_name": "nsec3param_rec", - "doc": - "NSEC3PARAM record for zone in format: hash_algorithm flags iterations salt", - "label": "NSEC3PARAM record", - "name": "nsec3paramrecord", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", - "required": false, - "type": "int" + "type": "dict", + "name": "result" }, { - "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "krbtpolicy/1", + "topic_topic": "krbtpolicy/1" + }, + { + "name": "krbtpolicy_show", + "doc": "Display the current Kerberos ticket policy.", + "attr_name": "show", + "version": "1", + "params": [ + { + "cli_name": "user", + "name": "uid", + "doc": "Manage ticket policy for specific user", "required": false, - "type": "int" + "label": "User name", + "positional": true, + "type": "str" }, { - "cli_name": "forward_only", - "default": ["False"], - "doc": "Search for forward zones only", - "label": "Forward zones only", - "name": "forward_only", + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, - "type": "bool" - }, - { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"name\")", - "label": "Primary key only", - "name": "pkey_only", - "required": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "dns/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify DNS zone (SOA record).", - "full_name": "dnszone_mod/1", - "name": "dnszone_mod", - "obj_class": "dnszone/1", + "full_name": "krbtpolicy_show/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "DNSName" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "krbtpolicy/1", + "topic_topic": "krbtpolicy/1" + }, + { + "name": "location_add", + "doc": "Add a new IPA location.", + "attr_name": "add", + "version": "1", "params": [ { - "alwaysask": true, + "doc": "IPA location name", + "label": "Location name", "cli_name": "name", - "default_from_param": ["name_from_ip"], - "doc": "Zone name (FQDN)", - "label": "Zone name", "name": "idnsname", - "no_convert": true, "type": "DNSName" }, { - "doc": "IP network to create reverse zone name from", - "label": "Reverse zone IP network", - "name": "name_from_ip", + "doc": "IPA Location description", "required": false, - "type": "str" + "type": "str", + "name": "description", + "label": "Description" }, { - "cli_name": "forwarder", - "doc": - "Per-zone forwarders. A custom port can be specified for each forwarder using a standard format \"IP_ADDRESS port PORT\"", - "label": "Zone forwarders", - "multivalue": true, - "name": "idnsforwarders", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_metavar": "['only', 'first', 'none']", - "cli_name": "forward_policy", - "doc": - "Per-zone conditional forwarding policy. Set to \"none\" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded.", - "label": "Forward policy", - "name": "idnsforwardpolicy", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "name_server", - "doc": "Authoritative nameserver domain name", - "label": "Authoritative nameserver", - "name": "idnssoamname", + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "location_add/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "DNSName" + "type": "str", + "name": "summary" }, { - "alwaysask": true, - "cli_name": "admin_email", - "default": ["hostmaster"], - "doc": "Administrator e-mail address", - "label": "Administrator e-mail address", - "name": "idnssoarname", - "no_convert": true, - "required": false, + "type": "dict", + "name": "result" + }, + { + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "DNSName", + "name": "value" + } + ], + "obj_class": "location/1", + "topic_topic": "location/1" + }, + { + "name": "location_del", + "doc": "Delete an IPA location.", + "attr_name": "del", + "version": "1", + "params": [ + { + "cli_name": "name", + "name": "idnsname", + "doc": "IPA location name", + "label": "Location name", + "multivalue": true, "type": "DNSName" }, { - "alwaysask": true, - "cli_name": "serial", - "default_from_param": [], - "doc": "SOA record serial number", - "label": "SOA serial", - "name": "idnssoaserial", + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", + "positional": false, + "type": "bool" + } + ], + "full_name": "location_del/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "int" + "type": "str", + "name": "summary" }, { - "alwaysask": true, - "cli_name": "refresh", - "default": ["3600"], - "doc": "SOA record refresh time", - "label": "SOA refresh", - "name": "idnssoarefresh", - "required": false, - "type": "int" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "alwaysask": true, - "cli_name": "retry", - "default": ["900"], - "doc": "SOA record retry time", - "label": "SOA retry", - "name": "idnssoaretry", + "type": "DNSName", + "multivalue": true, + "name": "value" + } + ], + "obj_class": "location/1", + "topic_topic": "location/1" + }, + { + "name": "location_find", + "doc": "Search for IPA locations.", + "attr_name": "find", + "version": "1", + "params": [ + { + "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, - "type": "int" + "type": "str", + "name": "criteria" }, { - "alwaysask": true, - "cli_name": "expire", - "default": ["1209600"], - "doc": "SOA record expire time", - "label": "SOA expire", - "name": "idnssoaexpire", + "cli_name": "name", + "name": "idnsname", + "doc": "IPA location name", "required": false, - "type": "int" + "label": "Location name", + "type": "DNSName" }, { - "alwaysask": true, - "cli_name": "minimum", - "default": ["3600"], - "doc": "How long should negative responses be cached", - "label": "SOA minimum", - "name": "idnssoaminimum", + "doc": "IPA Location description", "required": false, - "type": "int" + "type": "str", + "name": "description", + "label": "Description" }, { - "cli_name": "ttl", - "doc": "Time to live for records at zone apex", - "label": "Time to live", - "name": "dnsttl", + "doc": "Time limit of search in seconds (0 is unlimited)", "required": false, - "type": "int" + "type": "int", + "name": "timelimit", + "label": "Time Limit" }, { - "cli_name": "default_ttl", - "doc": "Time to live for records without explicit TTL definition", - "label": "Default time to live", - "name": "dnsdefaultttl", + "doc": "Maximum number of entries returned (0 is unlimited)", "required": false, - "type": "int" + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { - "cli_metavar": "['IN', 'CS', 'CH', 'HS']", - "cli_name": "class", - "exclude": ["cli", "webui"], - "name": "dnsclass", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "alwaysask": true, - "cli_name": "update_policy", - "default_from_param": ["idnsname"], - "doc": "BIND update policy", - "label": "BIND update policy", - "name": "idnsupdatepolicy", - "required": false, - "type": "str" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "alwaysask": true, - "cli_name": "dynamic_update", - "default": ["False"], - "doc": "Allow dynamic updates.", - "label": "Dynamic update", - "name": "idnsallowdynupdate", + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"name\")", "required": false, + "label": "Primary key only", "type": "bool" - }, + } + ], + "full_name": "location_find/1", + "output": [ { - "alwaysask": true, - "cli_name": "allow_query", - "default": ["any;"], - "doc": - "Semicolon separated list of IP addresses or networks which are allowed to issue queries", - "label": "Allow query", - "name": "idnsallowquery", - "no_convert": true, + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "alwaysask": true, - "cli_name": "allow_transfer", - "default": ["none;"], - "doc": - "Semicolon separated list of IP addresses or networks which are allowed to transfer the zone", - "label": "Allow transfer", - "name": "idnsallowtransfer", - "no_convert": true, - "required": false, - "type": "str" + "type": "dict", + "multivalue": true, + "name": "result" }, { - "cli_name": "allow_sync_ptr", - "doc": - "Allow synchronization of forward (A, AAAA) and reverse (PTR) records in the zone", - "label": "Allow PTR sync", - "name": "idnsallowsyncptr", - "required": false, - "type": "bool" + "doc": "Number of entries returned", + "type": "int", + "name": "count" }, { - "alwaysask": true, - "cli_name": "dnssec", - "default": ["False"], - "doc": "Allow inline DNSSEC signing of records in the zone", - "label": "Allow in-line DNSSEC signing", - "name": "idnssecinlinesigning", - "required": false, - "type": "bool" + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" + } + ], + "obj_class": "location/1", + "topic_topic": "location/1" + }, + { + "name": "location_mod", + "doc": "Modify information about an IPA location.", + "attr_name": "mod", + "version": "1", + "params": [ + { + "doc": "IPA location name", + "label": "Location name", + "cli_name": "name", + "name": "idnsname", + "type": "DNSName" }, { - "cli_name": "nsec3param_rec", - "doc": - "NSEC3PARAM record for zone in format: hash_algorithm flags iterations salt", - "label": "NSEC3PARAM record", - "name": "nsec3paramrecord", + "doc": "IPA Location description", "required": false, - "type": "str" + "type": "str", + "name": "description", + "label": "Description" }, { "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", "name": "rights", - "positional": false, - "type": "bool" - }, - { - "default": ["False"], - "doc": "Force nameserver change even if nameserver not in DNS", - "label": "Force", - "name": "force", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "dns/1", - "version": "1" - }, - { - "attr_name": "remove_permission", - "doc": "Remove a permission for per-zone access delegation.", - "full_name": "dnszone_remove_permission/1", - "name": "dnszone_remove_permission", - "obj_class": "dnszone/1", + "full_name": "location_mod/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "True means the operation was successful", - "name": "result", - "type": "bool" + "type": "dict", + "name": "result" }, { - "doc": "Permission value", - "name": "value", - "type": "str" - } - ], - "params": [ - { - "alwaysask": true, - "cli_name": "name", - "default_from_param": ["name_from_ip"], - "doc": "Zone name (FQDN)", - "label": "Zone name", - "name": "idnsname", - "no_convert": true, - "type": "DNSName" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "DNSName", + "name": "value" } ], - "topic_topic": "dns/1", - "version": "1" + "obj_class": "location/1", + "topic_topic": "location/1" }, { + "name": "location_show", + "doc": "Display information about an IPA location.", "attr_name": "show", - "doc": "Display information about a DNS zone (SOA record).", - "full_name": "dnszone_show/1", - "name": "dnszone_show", - "obj_class": "dnszone/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" - }, - { - "name": "result", - "type": "dict" - }, - { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "DNSName" - } - ], + "version": "1", "params": [ { - "alwaysask": true, + "doc": "IPA location name", + "label": "Location name", "cli_name": "name", - "default_from_param": ["name_from_ip"], - "doc": "Zone name (FQDN)", - "label": "Zone name", "name": "idnsname", - "no_convert": true, "type": "DNSName" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "dns/1", - "version": "1" - }, - { - "doc": "Query current Domain Level.", - "full_name": "domainlevel_get/1", - "name": "domainlevel_get", + "full_name": "location_show/1", "output": [ { - "doc": "Current domain level:", - "name": "result", - "type": "int" - } - ], - "params": [], - "topic_topic": "domainlevel/1", - "version": "1" - }, - { - "doc": "Change current Domain Level.", - "full_name": "domainlevel_set/1", - "name": "domainlevel_set", - "output": [ + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" + }, { - "doc": "Current domain level:", - "name": "result", - "type": "int" - } - ], - "params": [ + "type": "dict", + "name": "result" + }, { - "cli_name": "level", - "label": "Domain Level", - "name": "ipadomainlevel", - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "DNSName", + "name": "value" + }, + { + "doc": "Servers in location", + "type": "dict", + "name": "servers" } ], - "topic_topic": "domainlevel/1", - "version": "1" + "obj_class": "location/1", + "topic_topic": "location/1" }, { - "doc": "Show environment variables.", - "full_name": "env/1", - "name": "env", - "output": [ + "name": "migrate_ds", + "doc": "Migrate users and groups from DS to IPA.", + "version": "1", + "params": [ { - "doc": "Dictionary mapping variable name to value", - "name": "result", - "type": "dict" + "doc": "LDAP URI of DS server to migrate from", + "label": "LDAP URI", + "cli_name": "ldap_uri", + "name": "ldapuri", + "type": "str" }, { - "doc": "Total number of variables env (>= count)", - "name": "total", - "type": "int" + "cli_name": "password", + "name": "bindpw", + "confirm": false, + "doc": "bind password", + "label": "Password", + "sensitive": true, + "type": "str" }, { - "doc": "Number of variables returned (<= total)", - "name": "count", - "type": "int" + "cli_name": "bind_dn", + "name": "binddn", + "default": [ + "cn=directory manager" + ], + "required": false, + "label": "Bind DN", + "type": "DN" }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "cli_name": "user_container", + "name": "usercontainer", + "default": [ + "ou=people" + ], + "doc": "DN of container for users in DS relative to base DN", + "label": "User container", + "positional": false, + "type": "DN" + }, + { + "cli_name": "group_container", + "name": "groupcontainer", + "default": [ + "ou=groups" + ], + "doc": "DN of container for groups in DS relative to base DN", + "label": "Group container", + "positional": false, + "type": "DN" + }, + { + "cli_name": "user_objectclass", + "name": "userobjectclass", + "default": [ + "person" + ], + "doc": "Objectclasses used to search for user entries in DS", + "label": "User object class", + "positional": false, + "multivalue": true, + "type": "str" + }, + { + "cli_name": "group_objectclass", + "name": "groupobjectclass", + "default": [ + "groupOfUniqueNames", + "groupOfNames" + ], + "doc": "Objectclasses used to search for group entries in DS", + "label": "Group object class", + "positional": false, + "multivalue": true, + "type": "str" + }, + { + "cli_name": "user_ignore_objectclass", + "name": "userignoreobjectclass", + "default": [], + "doc": "Objectclasses to be ignored for user entries in DS", "required": false, + "label": "Ignore user object class", + "multivalue": true, "type": "str" - } - ], - "params": [ + }, { + "cli_name": "user_ignore_attribute", + "name": "userignoreattribute", + "default": [], + "doc": "Attributes to be ignored for user entries in DS", + "required": false, + "label": "Ignore user attribute", "multivalue": true, - "name": "variables", - "positional": true, + "type": "str" + }, + { + "cli_name": "group_ignore_objectclass", + "name": "groupignoreobjectclass", + "default": [], + "doc": "Objectclasses to be ignored for group entries in DS", "required": false, + "label": "Ignore group object class", + "multivalue": true, "type": "str" }, { - "default": ["False"], - "doc": "Forward to server instead of running locally", - "name": "server", + "cli_name": "group_ignore_attribute", + "name": "groupignoreattribute", + "default": [], + "doc": "Attributes to be ignored for group entries in DS", "required": false, - "type": "bool" + "label": "Ignore group attribute", + "multivalue": true, + "type": "str" }, { - "cli_name": "all", - "default": ["True"], - "doc": - "retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui", "cli"], - "name": "all", + "cli_name": "group_overwrite_gid", + "name": "groupoverwritegid", + "default": [ + "False" + ], + "doc": "When migrating a group already existing in IPA domain overwrite the group GID and report as success", + "label": "Overwrite GID", "positional": false, "type": "bool" + }, + { + "cli_name": "schema", + "name": "schema", + "cli_metavar": "['RFC2307bis', 'RFC2307']", + "default": [ + "RFC2307bis" + ], + "doc": "The schema used on the LDAP server. Supported values are RFC2307 and RFC2307bis. The default is RFC2307bis", + "required": false, + "label": "LDAP schema", + "type": "str" + }, + { + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous operation mode. Errors are reported but the process continues", + "required": false, + "label": "Continue", + "type": "bool" + }, + { + "cli_name": "base_dn", + "name": "basedn", + "doc": "Base DN on remote LDAP server", + "required": false, + "label": "Base DN", + "type": "DN" + }, + { + "cli_name": "with_compat", + "name": "compat", + "default": [ + "False" + ], + "doc": "Allows migration despite the usage of compat plugin", + "required": false, + "label": "Ignore compat plugin", + "type": "bool" + }, + { + "cli_name": "ca_cert_file", + "name": "cacertfile", + "doc": "Load CA certificate of LDAP server from FILE", + "required": false, + "label": "CA certificate", + "type": "str" + }, + { + "cli_name": "use_default_group", + "name": "use_def_group", + "default": [ + "True" + ], + "doc": "Add migrated users without a group to a default group (default: true)", + "required": false, + "label": "Add to default group", + "type": "bool" + }, + { + "cli_name": "scope", + "name": "scope", + "cli_metavar": "['base', 'onelevel', 'subtree']", + "default": [ + "onelevel" + ], + "doc": "LDAP search scope for users and groups: base, onelevel, or subtree. Defaults to onelevel", + "label": "Search scope", + "positional": false, + "type": "str" + }, + { + "cli_name": "exclude_groups", + "name": "exclude_groups", + "default": [], + "doc": "groups to exclude from migration", + "required": false, + "multivalue": true, + "type": "str" + }, + { + "cli_name": "exclude_users", + "name": "exclude_users", + "default": [], + "doc": "users to exclude from migration", + "required": false, + "multivalue": true, + "type": "str" + } + ], + "full_name": "migrate_ds/1", + "output": [ + { + "doc": "Lists of objects migrated; categorized by type.", + "type": "dict", + "name": "result" + }, + { + "doc": "Lists of objects that could not be migrated; categorized by type.", + "type": "dict", + "name": "failed" + }, + { + "doc": "False if migration mode was disabled.", + "type": "bool", + "name": "enabled" + }, + { + "doc": "False if migration fails because the compatibility plug-in is enabled.", + "type": "bool", + "name": "compat" } ], - "topic_topic": "misc/1", - "version": "1" + "topic_topic": "migration/1" }, { + "name": "netgroup_add", + "doc": "Add a new netgroup.", "attr_name": "add", - "doc": "Create a new group.", - "full_name": "group_add/1", - "name": "group_add", - "obj_class": "group/1", - "output": [ + "version": "1", + "params": [ { - "doc": "User-friendly description of action performed", - "name": "summary", + "type": "str", + "no_convert": true, + "cli_name": "name", + "name": "cn", + "label": "Netgroup name" + }, + { + "cli_name": "desc", + "name": "description", + "doc": "Netgroup description", "required": false, + "label": "Description", "type": "str" }, { - "name": "result", - "type": "dict" + "type": "str", + "required": false, + "cli_name": "nisdomain", + "name": "nisdomainname", + "label": "NIS domain name" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "group_name", - "label": "Group name", - "name": "cn", - "no_convert": true, + "cli_name": "usercat", + "name": "usercategory", + "cli_metavar": "['all']", + "doc": "User category the rule applies to", + "required": false, + "label": "User category", "type": "str" }, { - "cli_name": "desc", - "doc": "Group description", - "label": "Description", - "name": "description", + "cli_name": "hostcat", + "name": "hostcategory", + "cli_metavar": "['all']", + "doc": "Host category the rule applies to", "required": false, + "label": "Host category", "type": "str" }, { - "cli_name": "gid", - "doc": "GID (use this option to set it manually)", - "label": "GID", - "name": "gidnumber", + "name": "externalhost", "required": false, - "type": "int" + "label": "External host", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], + "type": "str" }, { "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, - { - "cli_name": "nonposix", - "default": ["False"], - "doc": "Create as a non-POSIX group", - "name": "nonposix", - "positional": false, - "type": "bool" - }, - { - "cli_name": "external", - "default": ["False"], - "doc": - "Allow adding external non-IPA members from trusted domains", - "name": "external", - "positional": false, - "type": "bool" - }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "group/1", - "version": "1" - }, - { - "attr_name": "add_member", - "doc": "Add members to a group.", - "full_name": "group_add_member/1", - "name": "group_add_member", - "obj_class": "group/1", + "full_name": "netgroup_add/1", "output": [ { - "name": "result", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": "Number of members added", - "name": "completed", - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "netgroup/1", + "topic_topic": "netgroup/1" + }, + { + "name": "netgroup_add_member", + "doc": "Add members to a netgroup.", + "attr_name": "add_member", + "version": "1", "params": [ { - "cli_name": "group_name", - "label": "Group name", - "name": "cn", + "type": "str", "no_convert": true, - "type": "str" - }, - { - "cli_name": "external", - "doc": - "Members of a trusted domain in DOM\\name or name@domain form", - "label": "External member", - "multivalue": true, - "name": "ipaexternalmember", - "required": false, - "type": "str" + "cli_name": "name", + "name": "cn", + "label": "Netgroup name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "alwaysask": true, "cli_name": "users", + "name": "user", + "alwaysask": true, "doc": "users to add", + "required": false, "label": "member user", "multivalue": true, - "name": "user", - "required": false, "type": "str" }, { - "alwaysask": true, "cli_name": "groups", + "name": "group", + "alwaysask": true, "doc": "groups to add", + "required": false, "label": "member group", "multivalue": true, - "name": "group", - "required": false, "type": "str" - } - ], - "topic_topic": "group/1", - "version": "1" - }, - { - "attr_name": "del", - "doc": "Delete group.", - "full_name": "group_del/1", - "name": "group_del", - "obj_class": "group/1", - "output": [ + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "cli_name": "hosts", + "name": "host", + "alwaysask": true, + "doc": "hosts to add", "required": false, + "label": "member host", + "multivalue": true, "type": "str" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "cli_name": "hostgroups", + "name": "hostgroup", + "alwaysask": true, + "doc": "host groups to add", + "required": false, + "label": "member host group", + "multivalue": true, + "type": "str" }, { + "cli_name": "netgroups", + "name": "netgroup", + "alwaysask": true, + "doc": "netgroups to add", + "required": false, + "label": "member netgroup", "multivalue": true, - "name": "value", "type": "str" } ], + "full_name": "netgroup_add_member/1", + "output": [ + { + "type": "dict", + "name": "result" + }, + { + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" + }, + { + "doc": "Number of members added", + "type": "int", + "name": "completed" + } + ], + "obj_class": "netgroup/1", + "topic_topic": "netgroup/1" + }, + { + "name": "netgroup_del", + "doc": "Delete a netgroup.", + "attr_name": "del", + "version": "1", "params": [ { - "cli_name": "group_name", - "label": "Group name", - "multivalue": true, + "cli_name": "name", "name": "cn", - "no_convert": true, - "type": "str" + "label": "Netgroup name", + "multivalue": true, + "type": "str", + "no_convert": true }, { "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", "positional": false, "type": "bool" } ], - "topic_topic": "group/1", - "version": "1" - }, - { - "attr_name": "detach", - "doc": "Detach a managed group from a user.", - "full_name": "group_detach/1", - "name": "group_detach", - "obj_class": "group/1", + "full_name": "netgroup_del/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "True means the operation was successful", - "name": "result", - "type": "bool" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "group_name", - "label": "Group name", - "name": "cn", - "no_convert": true, - "type": "str" + "type": "str", + "multivalue": true, + "name": "value" } ], - "topic_topic": "group/1", - "version": "1" + "obj_class": "netgroup/1", + "topic_topic": "netgroup/1" }, { + "name": "netgroup_find", + "doc": "Search for a netgroup.", "attr_name": "find", - "doc": "Search for groups.", - "full_name": "group_find/1", - "name": "group_find", - "obj_class": "group/1", - "output": [ + "version": "1", + "params": [ { - "doc": "User-friendly description of action performed", - "name": "summary", + "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, - "type": "str" + "type": "str", + "name": "criteria" }, { - "multivalue": true, - "name": "result", - "type": "dict" + "cli_name": "name", + "name": "cn", + "required": false, + "label": "Netgroup name", + "type": "str", + "no_convert": true }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "cli_name": "desc", + "name": "description", + "doc": "Netgroup description", + "required": false, + "label": "Description", + "type": "str" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" - } - ], - "params": [ + "type": "str", + "required": false, + "cli_name": "nisdomain", + "name": "nisdomainname", + "label": "NIS domain name" + }, { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, + "cli_name": "uuid", + "name": "ipauniqueid", + "doc": "IPA unique ID", "required": false, + "label": "IPA unique ID", "type": "str" }, { - "cli_name": "group_name", - "label": "Group name", - "name": "cn", - "no_convert": true, + "cli_name": "usercat", + "name": "usercategory", + "cli_metavar": "['all']", + "doc": "User category the rule applies to", "required": false, + "label": "User category", "type": "str" }, { - "cli_name": "desc", - "doc": "Group description", - "label": "Description", - "name": "description", + "cli_name": "hostcat", + "name": "hostcategory", + "cli_metavar": "['all']", + "doc": "Host category the rule applies to", "required": false, + "label": "Host category", "type": "str" }, { - "cli_name": "gid", - "doc": "GID (use this option to set it manually)", - "label": "GID", - "name": "gidnumber", + "name": "externalhost", "required": false, - "type": "int" + "label": "External host", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], + "type": "str" }, { "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", "required": false, - "type": "int" + "type": "int", + "name": "timelimit", + "label": "Time Limit" }, { "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", "required": false, - "type": "int" - }, - { - "cli_name": "private", - "default": ["False"], - "doc": "search for private groups", - "name": "private", - "positional": false, - "type": "bool" - }, - { - "cli_name": "posix", - "default": ["False"], - "doc": "search for POSIX groups", - "name": "posix", - "positional": false, - "type": "bool" + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { - "cli_name": "external", - "default": ["False"], - "doc": - "search for groups with support of external non-IPA members from trusted domains", - "name": "external", "positional": false, - "type": "bool" + "exclude": [ + "webui", + "cli" + ], + "default": [ + "False" + ], + "type": "bool", + "name": "private" }, { - "cli_name": "nonposix", - "default": ["False"], - "doc": "search for non-POSIX groups", - "name": "nonposix", + "cli_name": "managed", + "name": "managed", + "default": [ + "False" + ], + "doc": "search for managed groups", "positional": false, - "type": "bool" + "type": "bool", + "default_from_param": [ + "private" + ] }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["True"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui", "cli"], "name": "no_members", + "default": [ + "True" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui", + "cli" + ], "type": "bool" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"group-name\")", - "label": "Primary key only", "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"name\")", "required": false, + "label": "Primary key only", "type": "bool" }, { - "alwaysask": true, - "cli_name": "users", - "default_from_param": ["givenname", "sn"], - "doc": "Search for groups with these member users.", - "label": "user", + "cli_name": "netgroups", + "name": "netgroup", + "doc": "Search for netgroups with these member netgroups.", + "required": false, + "label": "netgroup", "multivalue": true, - "name": "user", - "no_convert": true, + "type": "str", + "no_convert": true + }, + { + "cli_name": "no_netgroups", + "name": "no_netgroup", + "doc": "Search for netgroups without these member netgroups.", "required": false, - "type": "str" + "label": "netgroup", + "multivalue": true, + "type": "str", + "no_convert": true }, { + "cli_name": "users", + "name": "user", "alwaysask": true, - "cli_name": "no_users", - "default_from_param": ["givenname", "sn"], - "doc": "Search for groups without these member users.", + "doc": "Search for netgroups with these member users.", + "required": false, "label": "user", "multivalue": true, + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true + }, + { + "cli_name": "no_users", "name": "no_user", - "no_convert": true, + "alwaysask": true, + "doc": "Search for netgroups without these member users.", "required": false, - "type": "str" + "label": "user", + "multivalue": true, + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true }, { "cli_name": "groups", - "doc": "Search for groups with these member groups.", - "label": "group", - "multivalue": true, "name": "group", - "no_convert": true, + "doc": "Search for netgroups with these member groups.", "required": false, - "type": "str" + "label": "group", + "multivalue": true, + "type": "str", + "no_convert": true }, { "cli_name": "no_groups", - "doc": "Search for groups without these member groups.", - "label": "group", - "multivalue": true, "name": "no_group", - "no_convert": true, + "doc": "Search for netgroups without these member groups.", "required": false, - "type": "str" - }, - { - "cli_name": "in_groups", - "doc": "Search for groups with these member of groups.", "label": "group", "multivalue": true, - "name": "in_group", - "no_convert": true, - "required": false, - "type": "str" + "type": "str", + "no_convert": true }, { - "cli_name": "not_in_groups", - "doc": "Search for groups without these member of groups.", - "label": "group", - "multivalue": true, - "name": "not_in_group", - "no_convert": true, + "cli_name": "hosts", + "name": "host", + "doc": "Search for netgroups with these member hosts.", "required": false, - "type": "str" + "label": "host", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_name": "in_netgroups", - "doc": "Search for groups with these member of netgroups.", - "label": "netgroup", - "multivalue": true, - "name": "in_netgroup", - "no_convert": true, + "cli_name": "no_hosts", + "name": "no_host", + "doc": "Search for netgroups without these member hosts.", "required": false, - "type": "str" + "label": "host", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_name": "not_in_netgroups", - "doc": "Search for groups without these member of netgroups.", - "label": "netgroup", - "multivalue": true, - "name": "not_in_netgroup", - "no_convert": true, + "cli_name": "hostgroups", + "name": "hostgroup", + "doc": "Search for netgroups with these member host groups.", "required": false, - "type": "str" + "label": "host group", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_name": "in_roles", - "doc": "Search for groups with these member of roles.", - "label": "role", - "multivalue": true, - "name": "in_role", + "cli_name": "no_hostgroups", + "name": "no_hostgroup", + "doc": "Search for netgroups without these member host groups.", "required": false, - "type": "str" + "label": "host group", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_name": "not_in_roles", - "doc": "Search for groups without these member of roles.", - "label": "role", - "multivalue": true, - "name": "not_in_role", + "cli_name": "in_netgroups", + "name": "in_netgroup", + "doc": "Search for netgroups with these member of netgroups.", "required": false, - "type": "str" + "label": "netgroup", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_name": "in_hbacrules", - "doc": "Search for groups with these member of HBAC rules.", - "label": "HBAC rule", + "cli_name": "not_in_netgroups", + "name": "not_in_netgroup", + "doc": "Search for netgroups without these member of netgroups.", + "required": false, + "label": "netgroup", "multivalue": true, - "name": "in_hbacrule", + "type": "str", + "no_convert": true + } + ], + "full_name": "netgroup_find/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "cli_name": "not_in_hbacrules", - "doc": "Search for groups without these member of HBAC rules.", - "label": "HBAC rule", + "type": "dict", "multivalue": true, - "name": "not_in_hbacrule", - "required": false, - "type": "str" + "name": "result" }, { - "cli_name": "in_sudorules", - "doc": "Search for groups with these member of sudo rules.", - "label": "sudo rule", - "multivalue": true, - "name": "in_sudorule", - "required": false, - "type": "str" + "doc": "Number of entries returned", + "type": "int", + "name": "count" }, { - "cli_name": "not_in_sudorules", - "doc": "Search for groups without these member of sudo rules.", - "label": "sudo rule", - "multivalue": true, - "name": "not_in_sudorule", - "required": false, - "type": "str" + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], - "topic_topic": "group/1", - "version": "1" + "obj_class": "netgroup/1", + "topic_topic": "netgroup/1" }, { + "name": "netgroup_mod", + "doc": "Modify a netgroup.", "attr_name": "mod", - "doc": "Modify a group.", - "full_name": "group_mod/1", - "name": "group_mod", - "obj_class": "group/1", - "output": [ + "version": "1", + "params": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "str", + "no_convert": true, + "cli_name": "name", + "name": "cn", + "label": "Netgroup name" }, { - "name": "result", - "type": "dict" + "cli_name": "desc", + "name": "description", + "doc": "Netgroup description", + "required": false, + "label": "Description", + "type": "str" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ + "type": "str", + "required": false, + "cli_name": "nisdomain", + "name": "nisdomainname", + "label": "NIS domain name" + }, { - "cli_name": "group_name", - "label": "Group name", - "name": "cn", - "no_convert": true, + "cli_name": "usercat", + "name": "usercategory", + "cli_metavar": "['all']", + "doc": "User category the rule applies to", + "required": false, + "label": "User category", "type": "str" }, { - "cli_name": "desc", - "doc": "Group description", - "label": "Description", - "name": "description", + "cli_name": "hostcat", + "name": "hostcategory", + "cli_metavar": "['all']", + "doc": "Host category the rule applies to", "required": false, + "label": "Host category", "type": "str" }, { - "cli_name": "gid", - "doc": "GID (use this option to set it manually)", - "label": "GID", - "name": "gidnumber", + "name": "externalhost", "required": false, - "type": "int" + "label": "External host", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], + "type": "str" }, { "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", "name": "rights", - "positional": false, - "type": "bool" - }, - { - "cli_name": "posix", - "default": ["False"], - "doc": "change to a POSIX group", - "name": "posix", - "positional": false, - "type": "bool" - }, - { - "cli_name": "external", - "default": ["False"], - "doc": - "change to support external non-IPA members from trusted domains", - "name": "external", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - }, - { - "cli_name": "rename", - "doc": "Rename the group object", - "label": "Rename", - "name": "rename", - "no_convert": true, - "required": false, - "type": "str" } ], - "topic_topic": "group/1", - "version": "1" - }, - { - "attr_name": "remove_member", - "doc": "Remove members from a group.", - "full_name": "group_remove_member/1", - "name": "group_remove_member", - "obj_class": "group/1", + "full_name": "netgroup_mod/1", "output": [ { - "name": "result", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": "Number of members removed", - "name": "completed", - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "netgroup/1", + "topic_topic": "netgroup/1" + }, + { + "name": "netgroup_remove_member", + "doc": "Remove members from a netgroup.", + "attr_name": "remove_member", + "version": "1", "params": [ { - "cli_name": "group_name", - "label": "Group name", - "name": "cn", + "type": "str", "no_convert": true, - "type": "str" - }, - { - "cli_name": "external", - "doc": - "Members of a trusted domain in DOM\\name or name@domain form", - "label": "External member", - "multivalue": true, - "name": "ipaexternalmember", - "required": false, - "type": "str" + "cli_name": "name", + "name": "cn", + "label": "Netgroup name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "alwaysask": true, "cli_name": "users", + "name": "user", + "alwaysask": true, "doc": "users to remove", + "required": false, "label": "member user", "multivalue": true, - "name": "user", - "required": false, "type": "str" }, { - "alwaysask": true, "cli_name": "groups", + "name": "group", + "alwaysask": true, "doc": "groups to remove", + "required": false, "label": "member group", "multivalue": true, - "name": "group", + "type": "str" + }, + { + "cli_name": "hosts", + "name": "host", + "alwaysask": true, + "doc": "hosts to remove", + "required": false, + "label": "member host", + "multivalue": true, + "type": "str" + }, + { + "cli_name": "hostgroups", + "name": "hostgroup", + "alwaysask": true, + "doc": "host groups to remove", "required": false, + "label": "member host group", + "multivalue": true, + "type": "str" + }, + { + "cli_name": "netgroups", + "name": "netgroup", + "alwaysask": true, + "doc": "netgroups to remove", + "required": false, + "label": "member netgroup", + "multivalue": true, "type": "str" } ], - "topic_topic": "group/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display information about a named group.", - "full_name": "group_show/1", - "name": "group_show", - "obj_class": "group/1", + "full_name": "netgroup_remove_member/1", "output": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "name": "result", - "type": "dict" + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "Number of members removed", + "type": "int", + "name": "completed" } ], + "obj_class": "netgroup/1", + "topic_topic": "netgroup/1" + }, + { + "name": "netgroup_show", + "doc": "Display information about a netgroup.", + "attr_name": "show", + "version": "1", "params": [ { - "cli_name": "group_name", - "label": "Group name", - "name": "cn", + "type": "str", "no_convert": true, - "type": "str" + "cli_name": "name", + "name": "cn", + "label": "Netgroup name" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "group/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Create a new HBAC rule.", - "full_name": "hbacrule_add/1", - "name": "hbacrule_add", - "obj_class": "hbacrule/1", + "full_name": "netgroup_show/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "netgroup/1", + "topic_topic": "netgroup/1" + }, + { + "name": "otpconfig_mod", + "doc": "Modify OTP configuration options.", + "attr_name": "mod", + "version": "1", "params": [ { - "cli_name": "name", - "label": "Rule name", - "name": "cn", - "type": "str" - }, - { - "cli_metavar": "['allow', 'deny']", - "cli_name": "type", - "default": ["allow"], - "doc": "Rule type (allow)", - "exclude": ["webui", "cli"], - "label": "Rule type", - "name": "accessruletype", - "positional": false, - "type": "str" - }, - { - "cli_metavar": "['all']", - "cli_name": "usercat", - "doc": "User category the rule applies to", - "label": "User category", - "name": "usercategory", + "cli_name": "totp_auth_window", + "name": "ipatokentotpauthwindow", + "doc": "TOTP authentication time variance (seconds)", "required": false, - "type": "str" + "label": "TOTP authentication Window", + "type": "int" }, { - "cli_metavar": "['all']", - "cli_name": "hostcat", - "doc": "Host category the rule applies to", - "label": "Host category", - "name": "hostcategory", + "cli_name": "totp_sync_window", + "name": "ipatokentotpsyncwindow", + "doc": "TOTP synchronization time variance (seconds)", "required": false, - "type": "str" + "label": "TOTP Synchronization Window", + "type": "int" }, { - "cli_metavar": "['all']", - "cli_name": "srchostcat", - "doc": "Source host category the rule applies to", - "exclude": ["cli", "webui"], - "label": "Source host category", - "name": "sourcehostcategory", + "cli_name": "hotp_auth_window", + "name": "ipatokenhotpauthwindow", + "doc": "HOTP authentication skip-ahead", "required": false, - "type": "str" + "label": "HOTP Authentication Window", + "type": "int" }, { - "cli_metavar": "['all']", - "cli_name": "servicecat", - "doc": "Service category the rule applies to", - "label": "Service category", - "name": "servicecategory", + "cli_name": "hotp_sync_window", + "name": "ipatokenhotpsyncwindow", + "doc": "HOTP synchronization skip-ahead", "required": false, - "type": "str" + "label": "HOTP Synchronization Window", + "type": "int" }, { - "cli_name": "desc", - "label": "Description", - "name": "description", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "exclude": ["cli", "webui"], - "label": "Enabled", - "name": "ipaenabledflag", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, - "type": "bool" - }, - { - "exclude": ["cli", "webui"], - "label": "External host", "multivalue": true, - "name": "externalhost", - "required": false, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", + "cli_name": "delattr", + "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", - "required": false, - "type": "str" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, - "type": "bool" - }, - { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "hbacrule/1", - "version": "1" - }, - { - "attr_name": "add_host", - "doc": "Add target hosts and hostgroups to an HBAC rule.", - "full_name": "hbacrule_add_host/1", - "name": "hbacrule_add_host", - "obj_class": "hbacrule/1", + "full_name": "otpconfig_mod/1", "output": [ { - "name": "result", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": "Number of members added", - "name": "completed", - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "NoneType", + "name": "value" } ], + "obj_class": "otpconfig/1", + "topic_topic": "otpconfig/1" + }, + { + "name": "otpconfig_show", + "doc": "Show the current OTP configuration.", + "attr_name": "show", + "version": "1", "params": [ { - "cli_name": "name", - "label": "Rule name", - "name": "cn", - "type": "str" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - }, + } + ], + "full_name": "otpconfig_show/1", + "output": [ { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "alwaysask": true, - "cli_name": "hosts", - "doc": "hosts to add", - "label": "member host", - "multivalue": true, - "name": "host", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "alwaysask": true, - "cli_name": "hostgroups", - "doc": "host groups to add", - "label": "member host group", - "multivalue": true, - "name": "hostgroup", - "required": false, - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "NoneType", + "name": "value" } ], - "topic_topic": "hbacrule/1", - "version": "1" + "obj_class": "otpconfig/1", + "topic_topic": "otpconfig/1" }, { - "attr_name": "add_service", - "doc": "Add services to an HBAC rule.", - "full_name": "hbacrule_add_service/1", - "name": "hbacrule_add_service", - "obj_class": "hbacrule/1", - "output": [ + "name": "otptoken_add", + "doc": "Add a new OTP token.", + "attr_name": "add", + "version": "1", + "params": [ { - "name": "result", - "type": "dict" + "cli_name": "id", + "name": "ipatokenuniqueid", + "required": false, + "label": "Unique ID", + "positional": true, + "type": "str" }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "name": "type", + "cli_metavar": "['totp', 'hotp', 'TOTP', 'HOTP']", + "default": [ + "totp" + ], + "doc": "Type of the token", + "required": false, + "label": "Type", + "type": "str" }, { - "doc": "Number of members added", - "name": "completed", - "type": "int" - } - ], - "params": [ + "cli_name": "desc", + "name": "description", + "doc": "Token description (informational only)", + "required": false, + "label": "Description", + "type": "str" + }, { - "cli_name": "name", - "label": "Rule name", - "name": "cn", + "cli_name": "owner", + "name": "ipatokenowner", + "doc": "Assigned user of the token (default: self)", + "required": false, + "label": "Owner", "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, + "cli_name": "disabled", + "name": "ipatokendisabled", + "doc": "Mark the token as disabled (default: false)", + "required": false, + "label": "Disabled", "type": "bool" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "cli_name": "not_before", + "name": "ipatokennotbefore", + "doc": "First date/time the token can be used", + "required": false, + "label": "Validity start", + "type": "datetime" + }, + { + "cli_name": "not_after", + "name": "ipatokennotafter", + "doc": "Last date/time the token can be used", + "required": false, + "label": "Validity end", + "type": "datetime" + }, + { + "cli_name": "vendor", + "name": "ipatokenvendor", + "doc": "Token vendor name (informational only)", + "required": false, + "label": "Vendor", + "type": "str" + }, + { + "cli_name": "model", + "name": "ipatokenmodel", + "doc": "Token model (informational only)", + "required": false, + "label": "Model", + "type": "str" + }, + { + "cli_name": "serial", + "name": "ipatokenserial", + "doc": "Token serial (informational only)", + "required": false, + "label": "Serial", + "type": "str" + }, + { + "cli_name": "key", + "name": "ipatokenotpkey", + "doc": "Token secret (Base32; default: random)", + "required": false, + "label": "Key", + "sensitive": true, + "type": "bytes", + "default_from_param": [], + "no_convert": true + }, + { + "cli_name": "algo", + "name": "ipatokenotpalgorithm", + "cli_metavar": "['sha1', 'sha256', 'sha384', 'sha512']", + "default": [ + "sha1" + ], + "doc": "Token hash algorithm", + "required": false, + "label": "Algorithm", + "type": "str" + }, + { + "cli_name": "digits", + "name": "ipatokenotpdigits", + "cli_metavar": "['6', '8']", + "default": [ + "6" + ], + "doc": "Number of digits each token code will have", + "required": false, + "label": "Digits", + "type": "int" + }, + { + "cli_name": "offset", + "name": "ipatokentotpclockoffset", + "default": [ + "0" + ], + "doc": "TOTP token / FreeIPA server time difference", + "required": false, + "label": "Clock offset", + "type": "int" + }, + { + "cli_name": "interval", + "name": "ipatokentotptimestep", + "default": [ + "30" + ], + "doc": "Length of TOTP token code validity", + "required": false, + "label": "Clock interval", + "type": "int" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "cli_name": "counter", + "name": "ipatokenhotpcounter", + "default": [ + "0" + ], + "doc": "Initial counter for the HOTP token", + "required": false, + "label": "Counter", + "type": "int" }, { - "alwaysask": true, - "cli_name": "hbacsvcs", - "doc": "HBAC services to add", - "label": "member HBAC service", - "multivalue": true, - "name": "hbacsvc", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "alwaysask": true, - "cli_name": "hbacsvcgroups", - "doc": "HBAC service groups to add", - "label": "member HBAC service group", - "multivalue": true, - "name": "hbacsvcgroup", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" - } - ], - "topic_topic": "hbacrule/1", - "version": "1" - }, - { - "attr_name": "add_sourcehost", - "exclude": ["cli"], - "full_name": "hbacrule_add_sourcehost/1", - "name": "hbacrule_add_sourcehost", - "obj_class": "hbacrule/1", - "output": [ - { - "name": "result", - "type": "dict" }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "name": "qrcode", + "default": [ + "False" + ], + "required": false, + "label": "(deprecated)", + "exclude": [ + "cli", + "webui" + ], + "type": "bool" }, { - "doc": "Number of members added", - "name": "completed", - "type": "int" - } - ], - "params": [ - { - "cli_name": "name", - "label": "Rule name", - "name": "cn", - "type": "str" + "positional": false, + "default": [ + "False" + ], + "type": "bool", + "name": "no_qrcode", + "label": "Do not display QR code" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - }, - { - "alwaysask": true, - "cli_name": "hosts", - "doc": "hosts to add", - "label": "member host", - "multivalue": true, - "name": "host", - "required": false, - "type": "str" - }, - { - "alwaysask": true, - "cli_name": "hostgroups", - "doc": "host groups to add", - "label": "member host group", - "multivalue": true, - "name": "hostgroup", - "required": false, - "type": "str" } ], - "topic_topic": "hbacrule/1", - "version": "1" - }, - { - "attr_name": "add_user", - "doc": "Add users and groups to an HBAC rule.", - "full_name": "hbacrule_add_user/1", - "name": "hbacrule_add_user", - "obj_class": "hbacrule/1", + "full_name": "otptoken_add/1", "output": [ { - "name": "result", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": "Number of members added", - "name": "completed", - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "otptoken/1", + "topic_topic": "otptoken/1" + }, + { + "name": "otptoken_add_managedby", + "doc": "Add users that can manage this token.", + "attr_name": "add_managedby", + "version": "1", "params": [ { - "cli_name": "name", - "label": "Rule name", - "name": "cn", - "type": "str" + "type": "str", + "cli_name": "id", + "name": "ipatokenuniqueid", + "label": "Unique ID" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "alwaysask": true, "cli_name": "users", - "doc": "users to add", - "label": "member user", - "multivalue": true, "name": "user", - "required": false, - "type": "str" - }, - { "alwaysask": true, - "cli_name": "groups", - "doc": "groups to add", - "label": "member group", - "multivalue": true, - "name": "group", + "doc": "users to add", "required": false, + "label": "member user", + "multivalue": true, "type": "str" } ], - "topic_topic": "hbacrule/1", - "version": "1" - }, - { - "attr_name": "del", - "doc": "Delete an HBAC rule.", - "full_name": "hbacrule_del/1", - "name": "hbacrule_del", - "obj_class": "hbacrule/1", + "full_name": "otptoken_add_managedby/1", "output": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" }, { - "multivalue": true, - "name": "value", - "type": "str" + "doc": "Number of members added", + "type": "int", + "name": "completed" } ], + "obj_class": "otptoken/1", + "topic_topic": "otptoken/1" + }, + { + "name": "otptoken_del", + "doc": "Delete an OTP token.", + "attr_name": "del", + "version": "1", "params": [ { - "cli_name": "name", - "label": "Rule name", + "cli_name": "id", + "label": "Unique ID", "multivalue": true, - "name": "cn", + "name": "ipatokenuniqueid", "type": "str" }, { "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", "positional": false, "type": "bool" } ], - "topic_topic": "hbacrule/1", - "version": "1" - }, - { - "attr_name": "disable", - "doc": "Disable an HBAC rule.", - "full_name": "hbacrule_disable/1", - "name": "hbacrule_disable", - "obj_class": "hbacrule/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" - }, - { - "doc": "True means the operation was successful", - "name": "result", - "type": "bool" - }, - { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "name", - "label": "Rule name", - "name": "cn", - "type": "str" - } - ], - "topic_topic": "hbacrule/1", - "version": "1" - }, - { - "attr_name": "enable", - "doc": "Enable an HBAC rule.", - "full_name": "hbacrule_enable/1", - "name": "hbacrule_enable", - "obj_class": "hbacrule/1", + "full_name": "otptoken_del/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "True means the operation was successful", - "name": "result", - "type": "bool" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "name", - "label": "Rule name", - "name": "cn", - "type": "str" + "type": "str", + "multivalue": true, + "name": "value" } ], - "topic_topic": "hbacrule/1", - "version": "1" + "obj_class": "otptoken/1", + "topic_topic": "otptoken/1" }, { + "name": "otptoken_find", + "doc": "Search for OTP token.", "attr_name": "find", - "doc": "Search for HBAC rules.", - "full_name": "hbacrule_find/1", - "name": "hbacrule_find", - "obj_class": "hbacrule/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" - }, - { - "multivalue": true, - "name": "result", - "type": "dict" - }, - { - "doc": "Number of entries returned", - "name": "count", - "type": "int" - }, - { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" - } - ], + "version": "1", "params": [ { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, - "type": "str" + "type": "str", + "name": "criteria" }, { - "cli_name": "name", - "label": "Rule name", - "name": "cn", + "type": "str", "required": false, - "type": "str" + "cli_name": "id", + "name": "ipatokenuniqueid", + "label": "Unique ID" }, { + "name": "type", + "cli_metavar": "['totp', 'hotp', 'TOTP', 'HOTP']", "alwaysask": true, - "cli_metavar": "['allow', 'deny']", - "cli_name": "type", - "default": ["allow"], - "doc": "Rule type (allow)", - "exclude": ["webui", "cli"], - "label": "Rule type", - "name": "accessruletype", - "required": false, - "type": "str" - }, - { - "cli_metavar": "['all']", - "cli_name": "usercat", - "doc": "User category the rule applies to", - "label": "User category", - "name": "usercategory", - "required": false, - "type": "str" - }, - { - "cli_metavar": "['all']", - "cli_name": "hostcat", - "doc": "Host category the rule applies to", - "label": "Host category", - "name": "hostcategory", - "required": false, - "type": "str" - }, - { - "cli_metavar": "['all']", - "cli_name": "srchostcat", - "doc": "Source host category the rule applies to", - "exclude": ["cli", "webui"], - "label": "Source host category", - "name": "sourcehostcategory", - "required": false, - "type": "str" - }, - { - "cli_metavar": "['all']", - "cli_name": "servicecat", - "doc": "Service category the rule applies to", - "label": "Service category", - "name": "servicecategory", + "default": [ + "totp" + ], + "doc": "Type of the token", "required": false, + "label": "Type", "type": "str" }, { "cli_name": "desc", - "label": "Description", "name": "description", + "doc": "Token description (informational only)", "required": false, + "label": "Description", "type": "str" }, { - "exclude": ["cli", "webui"], - "label": "Enabled", - "name": "ipaenabledflag", - "required": false, - "type": "bool" - }, - { - "exclude": ["cli", "webui"], - "label": "External host", - "multivalue": true, - "name": "externalhost", + "cli_name": "owner", + "name": "ipatokenowner", + "doc": "Assigned user of the token (default: self)", "required": false, + "label": "Owner", "type": "str" }, { - "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", - "required": false, - "type": "int" - }, - { - "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", - "required": false, - "type": "int" - }, - { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" - }, - { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - }, - { - "default": ["True"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui", "cli"], - "name": "no_members", - "positional": false, - "type": "bool" - }, - { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"name\")", - "label": "Primary key only", - "name": "pkey_only", + "cli_name": "disabled", + "name": "ipatokendisabled", + "doc": "Mark the token as disabled (default: false)", "required": false, + "label": "Disabled", "type": "bool" - } - ], - "topic_topic": "hbacrule/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify an HBAC rule.", - "full_name": "hbacrule_mod/1", - "name": "hbacrule_mod", - "obj_class": "hbacrule/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" - }, - { - "name": "result", - "type": "dict" - }, - { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "name", - "label": "Rule name", - "name": "cn", - "type": "str" }, { - "alwaysask": true, - "cli_metavar": "['allow', 'deny']", - "cli_name": "type", - "default": ["allow"], - "doc": "Rule type (allow)", - "exclude": ["webui", "cli"], - "label": "Rule type", - "name": "accessruletype", + "cli_name": "not_before", + "name": "ipatokennotbefore", + "doc": "First date/time the token can be used", "required": false, - "type": "str" + "label": "Validity start", + "type": "datetime" }, { - "cli_metavar": "['all']", - "cli_name": "usercat", - "doc": "User category the rule applies to", - "label": "User category", - "name": "usercategory", + "cli_name": "not_after", + "name": "ipatokennotafter", + "doc": "Last date/time the token can be used", "required": false, - "type": "str" + "label": "Validity end", + "type": "datetime" }, { - "cli_metavar": "['all']", - "cli_name": "hostcat", - "doc": "Host category the rule applies to", - "label": "Host category", - "name": "hostcategory", + "cli_name": "vendor", + "name": "ipatokenvendor", + "doc": "Token vendor name (informational only)", "required": false, + "label": "Vendor", "type": "str" }, { - "cli_metavar": "['all']", - "cli_name": "srchostcat", - "doc": "Source host category the rule applies to", - "exclude": ["cli", "webui"], - "label": "Source host category", - "name": "sourcehostcategory", + "cli_name": "model", + "name": "ipatokenmodel", + "doc": "Token model (informational only)", "required": false, + "label": "Model", "type": "str" }, { - "cli_metavar": "['all']", - "cli_name": "servicecat", - "doc": "Service category the rule applies to", - "label": "Service category", - "name": "servicecategory", + "cli_name": "serial", + "name": "ipatokenserial", + "doc": "Token serial (informational only)", "required": false, + "label": "Serial", "type": "str" }, { - "cli_name": "desc", - "label": "Description", - "name": "description", + "cli_name": "algo", + "name": "ipatokenotpalgorithm", + "cli_metavar": "['sha1', 'sha256', 'sha384', 'sha512']", + "alwaysask": true, + "default": [ + "sha1" + ], + "doc": "Token hash algorithm", "required": false, + "label": "Algorithm", "type": "str" }, { - "exclude": ["cli", "webui"], - "label": "Enabled", - "name": "ipaenabledflag", + "cli_name": "digits", + "name": "ipatokenotpdigits", + "cli_metavar": "['6', '8']", + "alwaysask": true, + "default": [ + "6" + ], + "doc": "Number of digits each token code will have", "required": false, - "type": "bool" + "label": "Digits", + "type": "int" }, { - "exclude": ["cli", "webui"], - "label": "External host", - "multivalue": true, - "name": "externalhost", + "cli_name": "offset", + "name": "ipatokentotpclockoffset", + "alwaysask": true, + "default": [ + "0" + ], + "doc": "TOTP token / FreeIPA server time difference", "required": false, - "type": "str" + "label": "Clock offset", + "type": "int" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", + "cli_name": "interval", + "name": "ipatokentotptimestep", + "alwaysask": true, + "default": [ + "30" + ], + "doc": "Length of TOTP token code validity", "required": false, - "type": "str" + "label": "Clock interval", + "type": "int" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", + "cli_name": "counter", + "name": "ipatokenhotpcounter", + "alwaysask": true, + "default": [ + "0" + ], + "doc": "Initial counter for the HOTP token", "required": false, - "type": "str" + "label": "Counter", + "type": "int" }, { - "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, - "name": "delattr", + "doc": "Time limit of search in seconds (0 is unlimited)", "required": false, - "type": "str" + "type": "int", + "name": "timelimit", + "label": "Time Limit" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "doc": "Maximum number of entries returned (0 is unlimited)", + "required": false, + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "True" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui", + "cli" + ], + "type": "bool" + }, + { + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"id\")", + "required": false, + "label": "Primary key only", "type": "bool" } ], - "topic_topic": "hbacrule/1", - "version": "1" - }, - { - "attr_name": "remove_host", - "doc": "Remove target hosts and hostgroups from an HBAC rule.", - "full_name": "hbacrule_remove_host/1", - "name": "hbacrule_remove_host", - "obj_class": "hbacrule/1", + "full_name": "otptoken_find/1", "output": [ { - "name": "result", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" + "type": "dict", + "multivalue": true, + "name": "result" }, { - "doc": "Number of members removed", - "name": "completed", - "type": "int" + "doc": "Number of entries returned", + "type": "int", + "name": "count" + }, + { + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], + "obj_class": "otptoken/1", + "topic_topic": "otptoken/1" + }, + { + "name": "otptoken_mod", + "doc": "Modify a OTP token.", + "attr_name": "mod", + "version": "1", "params": [ { - "cli_name": "name", - "label": "Rule name", - "name": "cn", - "type": "str" + "type": "str", + "cli_name": "id", + "name": "ipatokenuniqueid", + "label": "Unique ID" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "cli_name": "desc", + "name": "description", + "doc": "Token description (informational only)", + "required": false, + "label": "Description", + "type": "str" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "cli_name": "owner", + "name": "ipatokenowner", + "doc": "Assigned user of the token (default: self)", + "required": false, + "label": "Owner", + "type": "str" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, + "cli_name": "disabled", + "name": "ipatokendisabled", + "doc": "Mark the token as disabled (default: false)", + "required": false, + "label": "Disabled", "type": "bool" }, { - "alwaysask": true, - "cli_name": "hosts", - "doc": "hosts to remove", - "label": "member host", - "multivalue": true, - "name": "host", + "cli_name": "not_before", + "name": "ipatokennotbefore", + "doc": "First date/time the token can be used", "required": false, - "type": "str" + "label": "Validity start", + "type": "datetime" }, { - "alwaysask": true, - "cli_name": "hostgroups", - "doc": "host groups to remove", - "label": "member host group", - "multivalue": true, - "name": "hostgroup", + "cli_name": "not_after", + "name": "ipatokennotafter", + "doc": "Last date/time the token can be used", "required": false, - "type": "str" - } - ], - "topic_topic": "hbacrule/1", - "version": "1" - }, - { - "attr_name": "remove_service", - "doc": "Remove service and service groups from an HBAC rule.", - "full_name": "hbacrule_remove_service/1", - "name": "hbacrule_remove_service", - "obj_class": "hbacrule/1", - "output": [ - { - "name": "result", - "type": "dict" - }, - { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" + "label": "Validity end", + "type": "datetime" }, { - "doc": "Number of members removed", - "name": "completed", - "type": "int" - } - ], - "params": [ - { - "cli_name": "name", - "label": "Rule name", - "name": "cn", + "cli_name": "vendor", + "name": "ipatokenvendor", + "doc": "Token vendor name (informational only)", + "required": false, + "label": "Vendor", "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" - }, - { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "cli_name": "model", + "name": "ipatokenmodel", + "doc": "Token model (informational only)", + "required": false, + "label": "Model", + "type": "str" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "cli_name": "serial", + "name": "ipatokenserial", + "doc": "Token serial (informational only)", + "required": false, + "label": "Serial", + "type": "str" }, { - "alwaysask": true, - "cli_name": "hbacsvcs", - "doc": "HBAC services to remove", - "label": "member HBAC service", - "multivalue": true, - "name": "hbacsvc", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "alwaysask": true, - "cli_name": "hbacsvcgroups", - "doc": "HBAC service groups to remove", - "label": "member HBAC service group", - "multivalue": true, - "name": "hbacsvcgroup", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" - } - ], - "topic_topic": "hbacrule/1", - "version": "1" - }, - { - "attr_name": "remove_sourcehost", - "exclude": ["cli"], - "full_name": "hbacrule_remove_sourcehost/1", - "name": "hbacrule_remove_sourcehost", - "obj_class": "hbacrule/1", - "output": [ - { - "name": "result", - "type": "dict" }, { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" + "cli_name": "delattr", + "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" }, { - "doc": "Number of members removed", - "name": "completed", - "type": "int" - } - ], - "params": [ - { - "cli_name": "name", - "label": "Rule name", - "name": "cn", - "type": "str" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "alwaysask": true, - "cli_name": "hosts", - "doc": "hosts to remove", - "label": "member host", - "multivalue": true, - "name": "host", - "required": false, - "type": "str" - }, - { - "alwaysask": true, - "cli_name": "hostgroups", - "doc": "host groups to remove", - "label": "member host group", - "multivalue": true, - "name": "hostgroup", + "cli_name": "rename", + "name": "rename", + "doc": "Rename the OTP token object", "required": false, + "label": "Rename", "type": "str" } ], - "topic_topic": "hbacrule/1", - "version": "1" - }, - { - "attr_name": "remove_user", - "doc": "Remove users and groups from an HBAC rule.", - "full_name": "hbacrule_remove_user/1", - "name": "hbacrule_remove_user", - "obj_class": "hbacrule/1", + "full_name": "otptoken_mod/1", "output": [ { - "name": "result", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": "Number of members removed", - "name": "completed", - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "otptoken/1", + "topic_topic": "otptoken/1" + }, + { + "name": "otptoken_remove_managedby", + "doc": "Remove users that can manage this token.", + "attr_name": "remove_managedby", + "version": "1", "params": [ { - "cli_name": "name", - "label": "Rule name", - "name": "cn", - "type": "str" + "type": "str", + "cli_name": "id", + "name": "ipatokenuniqueid", + "label": "Unique ID" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "alwaysask": true, "cli_name": "users", - "doc": "users to remove", - "label": "member user", - "multivalue": true, "name": "user", - "required": false, - "type": "str" - }, - { "alwaysask": true, - "cli_name": "groups", - "doc": "groups to remove", - "label": "member group", - "multivalue": true, - "name": "group", + "doc": "users to remove", "required": false, + "label": "member user", + "multivalue": true, "type": "str" } ], - "topic_topic": "hbacrule/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display the properties of an HBAC rule.", - "full_name": "hbacrule_show/1", - "name": "hbacrule_show", - "obj_class": "hbacrule/1", + "full_name": "otptoken_remove_managedby/1", "output": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "name": "result", - "type": "dict" + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "Number of members removed", + "type": "int", + "name": "completed" } ], + "obj_class": "otptoken/1", + "topic_topic": "otptoken/1" + }, + { + "name": "otptoken_show", + "doc": "Display information about an OTP token.", + "attr_name": "show", + "version": "1", "params": [ { - "cli_name": "name", - "label": "Rule name", - "name": "cn", - "type": "str" + "type": "str", + "cli_name": "id", + "name": "ipatokenuniqueid", + "label": "Unique ID" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "hbacrule/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Add a new HBAC service.", - "full_name": "hbacsvc_add/1", - "name": "hbacsvc_add", - "obj_class": "hbacsvc/1", + "full_name": "otptoken_show/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "otptoken/1", + "topic_topic": "otptoken/1" + }, + { + "name": "output_find", + "doc": "Search for command outputs.", + "attr_name": "find", + "version": "1", "params": [ { - "cli_name": "service", - "doc": "HBAC service", - "label": "Service name", - "name": "cn", + "type": "str", "no_convert": true, - "type": "str" - }, - { - "cli_name": "desc", - "doc": "HBAC service description", - "label": "Description", - "name": "description", - "required": false, - "type": "str" - }, - { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", - "required": false, - "type": "str" + "cli_name": "command", + "name": "commandfull_name", + "label": "Full name" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", + "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, - "type": "str" + "type": "str", + "name": "criteria" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"name\")", + "required": false, + "label": "Primary key only", "type": "bool" } ], - "topic_topic": "hbacsvc/1", - "version": "1" - }, - { - "attr_name": "del", - "doc": "Delete an existing HBAC service.", - "full_name": "hbacsvc_del/1", - "name": "hbacsvc_del", - "obj_class": "hbacsvc/1", + "full_name": "output_find/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "type": "dict", + "multivalue": true, + "name": "result" }, { - "multivalue": true, - "name": "value", - "type": "str" + "doc": "Number of entries returned", + "type": "int", + "name": "count" + }, + { + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], + "obj_class": "output/1", + "topic_topic": "schema/1" + }, + { + "name": "output_show", + "doc": "Display information about a command output.", + "attr_name": "show", + "version": "1", "params": [ { - "cli_name": "service", - "doc": "HBAC service", - "label": "Service name", - "multivalue": true, - "name": "cn", + "type": "str", "no_convert": true, - "type": "str" + "cli_name": "command", + "name": "commandfull_name", + "label": "Full name" }, { - "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", - "name": "continue", + "no_convert": true, + "type": "str", + "name": "name", + "label": "Name" + }, + { + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "hbacsvc/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for HBAC services.", - "full_name": "hbacsvc_find/1", - "name": "hbacsvc_find", - "obj_class": "hbacsvc/1", + "full_name": "output_show/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" - }, - { - "multivalue": true, - "name": "result", - "type": "dict" + "type": "str", + "name": "summary" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "type": "dict", + "name": "result" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "output/1", + "topic_topic": "schema/1" + }, + { + "name": "param_find", + "doc": "Search command parameters.", + "attr_name": "find", + "version": "1", "params": [ { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, - "required": false, - "type": "str" - }, - { - "cli_name": "service", - "doc": "HBAC service", - "label": "Service name", - "name": "cn", + "type": "str", "no_convert": true, - "required": false, - "type": "str" - }, - { - "cli_name": "desc", - "doc": "HBAC service description", - "label": "Description", - "name": "description", - "required": false, - "type": "str" - }, - { - "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", - "required": false, - "type": "int" + "cli_name": "metaobject", + "name": "metaobjectfull_name", + "label": "Full name" }, - { - "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", + { + "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, - "type": "int" + "type": "str", + "name": "criteria" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["True"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui", "cli"], - "name": "no_members", - "positional": false, - "type": "bool" - }, - { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"service\")", - "label": "Primary key only", "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"name\")", "required": false, + "label": "Primary key only", "type": "bool" } ], - "topic_topic": "hbacsvc/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify an HBAC service.", - "full_name": "hbacsvc_mod/1", - "name": "hbacsvc_mod", - "obj_class": "hbacsvc/1", + "full_name": "param_find/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "multivalue": true, + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "Number of entries returned", + "type": "int", + "name": "count" + }, + { + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], + "obj_class": "param/1", + "topic_topic": "schema/1" + }, + { + "name": "param_show", + "doc": "Display information about a command parameter.", + "attr_name": "show", + "version": "1", "params": [ { - "cli_name": "service", - "doc": "HBAC service", - "label": "Service name", - "name": "cn", + "type": "str", "no_convert": true, - "type": "str" - }, - { - "cli_name": "desc", - "doc": "HBAC service description", - "label": "Description", - "name": "description", - "required": false, - "type": "str" - }, - { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", - "required": false, - "type": "str" - }, - { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", - "required": false, - "type": "str" - }, - { - "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, - "name": "delattr", - "required": false, - "type": "str" + "cli_name": "metaobject", + "name": "metaobjectfull_name", + "label": "Full name" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "no_convert": true, + "type": "str", + "name": "name", + "label": "Name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" + } + ], + "full_name": "param_show/1", + "output": [ + { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "type": "dict", + "name": "result" + }, + { + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "topic_topic": "hbacsvc/1", - "version": "1" + "obj_class": "param/1", + "topic_topic": "schema/1" }, { - "attr_name": "show", - "doc": "Display information about an HBAC service.", - "full_name": "hbacsvc_show/1", - "name": "hbacsvc_show", - "obj_class": "hbacsvc/1", + "name": "passwd", + "doc": "Set a user's password.", + "version": "1", + "params": [ + { + "cli_name": "user", + "name": "principal", + "label": "User name", + "type": "Principal", + "default_from_param": [], + "no_convert": true + }, + { + "sensitive": true, + "type": "str", + "name": "password", + "label": "New Password" + }, + { + "name": "current_password", + "confirm": false, + "label": "Current Password", + "sensitive": true, + "type": "str", + "default_from_param": [ + "principal" + ] + }, + { + "name": "otp", + "confirm": false, + "doc": "One Time Password", + "required": false, + "label": "OTP", + "sensitive": true, + "type": "str" + } + ], + "full_name": "passwd/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "doc": "True means the operation was successful", + "type": "bool", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "type": "str", + "name": "value" } ], + "topic_topic": "passwd/1" + }, + { + "name": "permission_add", + "doc": "Add a new permission.", + "attr_name": "add", + "version": "1", "params": [ { - "cli_name": "service", - "doc": "HBAC service", - "label": "Service name", + "type": "str", + "cli_name": "name", "name": "cn", - "no_convert": true, + "label": "Permission name" + }, + { + "cli_name": "right", + "name": "ipapermright", + "cli_metavar": "['read', 'search', 'compare', 'write', 'add', 'delete', 'all']", + "alwaysask": true, + "doc": "Rights to grant (read, search, compare, write, add, delete, all)", + "required": false, + "label": "Granted rights", + "multivalue": true, "type": "str" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "name": "attrs", + "doc": "All attributes to which the permission applies", + "required": false, + "label": "Effective attributes", + "multivalue": true, + "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", + "cli_name": "bindtype", + "name": "ipapermbindruletype", + "cli_metavar": "['permission', 'all', 'anonymous']", + "default": [ + "permission" + ], + "doc": "Bind rule type", + "label": "Bind rule type", "positional": false, - "type": "bool" + "type": "str" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "cli_name": "subtree", + "name": "ipapermlocation", + "alwaysask": true, + "doc": "Subtree to apply permissions to", + "required": false, + "label": "Subtree", + "type": "DN", + "no_convert": true }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "hbacsvc/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Add a new HBAC service group.", - "full_name": "hbacsvcgroup_add/1", - "name": "hbacsvcgroup_add", - "obj_class": "hbacsvcgroup/1", - "output": [ + "cli_name": "filter", + "name": "extratargetfilter", + "doc": "Extra target filter", + "required": false, + "label": "Extra target filter", + "multivalue": true, + "type": "str" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "cli_name": "rawfilter", + "name": "ipapermtargetfilter", + "doc": "All target filters, including those implied by type and memberof", "required": false, + "label": "Raw target filter", + "multivalue": true, "type": "str" }, { - "name": "result", - "type": "dict" + "cli_name": "target", + "name": "ipapermtarget", + "doc": "Optional DN to apply the permission to (must be in the subtree, but may not yet exist)", + "required": false, + "label": "Target DN", + "type": "DN" + }, + { + "cli_name": "targetto", + "name": "ipapermtargetto", + "doc": "Optional DN subtree where an entry can be moved to (must be in the subtree, but may not yet exist)", + "required": false, + "label": "Target DN subtree", + "type": "DN" + }, + { + "cli_name": "targetfrom", + "name": "ipapermtargetfrom", + "doc": "Optional DN subtree from where an entry can be moved (must be in the subtree, but may not yet exist)", + "required": false, + "label": "Origin DN subtree", + "type": "DN" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", + "name": "memberof", + "alwaysask": true, + "doc": "Target members of a group (sets memberOf targetfilter)", + "required": false, + "label": "Member of group", + "multivalue": true, "type": "str" - } - ], - "params": [ + }, { - "cli_name": "name", - "label": "Service group name", - "name": "cn", - "no_convert": true, + "name": "targetgroup", + "alwaysask": true, + "doc": "User group to apply permissions to (sets target)", + "required": false, + "label": "Target group", "type": "str" }, { - "cli_name": "desc", - "doc": "HBAC service group description", - "label": "Description", - "name": "description", + "name": "type", + "alwaysask": true, + "doc": "Type of IPA object (sets subtree and objectClass targetfilter)", "required": false, + "label": "Type", "type": "str" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], + "name": "filter", + "doc": "Deprecated; use extratargetfilter", + "required": false, + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], + "type": "str" + }, + { + "name": "subtree", + "doc": "Deprecated; use ipapermlocation", + "required": false, + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], + "type": "str" + }, + { + "name": "permissions", + "doc": "Deprecated; use ipapermright", + "required": false, "multivalue": true, + "exclude": [ + "cli", + "webui" + ], + "type": "str" + }, + { + "cli_name": "setattr", "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "hbacsvcgroup/1", - "version": "1" - }, - { - "attr_name": "add_member", - "doc": "Add members to an HBAC service group.", - "full_name": "hbacsvcgroup_add_member/1", - "name": "hbacsvcgroup_add_member", - "obj_class": "hbacsvcgroup/1", + "full_name": "permission_add/1", "output": [ { - "name": "result", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": "Number of members added", - "name": "completed", - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "permission/1", + "topic_topic": "permission/1" + }, + { + "exclude": [ + "cli" + ], + "name": "permission_add_member", + "doc": "Add members to a permission.", + "attr_name": "add_member", + "version": "1", "params": [ { + "type": "str", "cli_name": "name", - "label": "Service group name", "name": "cn", - "no_convert": true, - "type": "str" + "label": "Permission name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { + "cli_name": "privileges", + "name": "privilege", "alwaysask": true, - "cli_name": "hbacsvcs", - "doc": "HBAC services to add", - "label": "member HBAC service", - "multivalue": true, - "name": "hbacsvc", + "doc": "privileges to add", "required": false, + "label": "member privilege", + "multivalue": true, "type": "str" } ], - "topic_topic": "hbacsvcgroup/1", - "version": "1" - }, - { - "attr_name": "del", - "doc": "Delete an HBAC service group.", - "full_name": "hbacsvcgroup_del/1", - "name": "hbacsvcgroup_del", - "obj_class": "hbacsvcgroup/1", + "full_name": "permission_add_member/1", "output": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" }, { - "multivalue": true, - "name": "value", - "type": "str" + "doc": "Number of members added", + "type": "int", + "name": "completed" } ], + "obj_class": "permission/1", + "topic_topic": "permission/1" + }, + { + "exclude": [ + "cli" + ], + "name": "permission_add_noaci", + "doc": "Add a system permission without an ACI (internal command)", + "attr_name": "add_noaci", + "version": "1", "params": [ { + "type": "str", "cli_name": "name", - "label": "Service group name", - "multivalue": true, "name": "cn", - "no_convert": true, - "type": "str" + "label": "Permission name" }, { - "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", - "name": "continue", "positional": false, + "type": "str", + "multivalue": true, + "name": "ipapermissiontype", + "label": "Permission flags" + }, + { + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "hbacsvcgroup/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for an HBAC service group.", - "full_name": "hbacsvcgroup_find/1", - "name": "hbacsvcgroup_find", - "obj_class": "hbacsvcgroup/1", + "full_name": "permission_add_noaci/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" - }, - { - "multivalue": true, - "name": "result", - "type": "dict" + "type": "str", + "name": "summary" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "type": "dict", + "name": "result" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "permission/1", + "topic_topic": "permission/1" + }, + { + "name": "permission_del", + "doc": "Delete a permission.", + "attr_name": "del", + "version": "1", "params": [ - { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, - "required": false, - "type": "str" - }, { "cli_name": "name", - "label": "Service group name", + "label": "Permission name", + "multivalue": true, "name": "cn", - "no_convert": true, - "required": false, - "type": "str" - }, - { - "cli_name": "desc", - "doc": "HBAC service group description", - "label": "Description", - "name": "description", - "required": false, "type": "str" }, { - "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", - "required": false, - "type": "int" - }, - { - "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", - "required": false, - "type": "int" - }, - { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" - }, - { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", "positional": false, "type": "bool" }, { - "default": ["True"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui", "cli"], - "name": "no_members", + "name": "force", + "default": [ + "False" + ], + "doc": "force delete of SYSTEM permissions", + "label": "Force", "positional": false, - "type": "bool" - }, - { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"name\")", - "label": "Primary key only", - "name": "pkey_only", - "required": false, + "exclude": [ + "cli", + "webui" + ], "type": "bool" } ], - "topic_topic": "hbacsvcgroup/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify an HBAC service group.", - "full_name": "hbacsvcgroup_mod/1", - "name": "hbacsvcgroup_mod", - "obj_class": "hbacsvcgroup/1", + "full_name": "permission_del/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "type": "str", + "multivalue": true, + "name": "value" } ], + "obj_class": "permission/1", + "topic_topic": "permission/1" + }, + { + "name": "permission_find", + "doc": "Search for permissions.", + "attr_name": "find", + "version": "1", "params": [ { + "positional": true, + "doc": "A string searched in all relevant object attributes", + "required": false, + "type": "str", + "name": "criteria" + }, + { + "type": "str", + "required": false, "cli_name": "name", - "label": "Service group name", "name": "cn", - "no_convert": true, + "label": "Permission name" + }, + { + "cli_name": "right", + "name": "ipapermright", + "cli_metavar": "['read', 'search', 'compare', 'write', 'add', 'delete', 'all']", + "doc": "Rights to grant (read, search, compare, write, add, delete, all)", + "required": false, + "label": "Granted rights", + "multivalue": true, "type": "str" }, { - "cli_name": "desc", - "doc": "HBAC service group description", - "label": "Description", - "name": "description", + "name": "attrs", + "doc": "All attributes to which the permission applies", "required": false, + "label": "Effective attributes", + "multivalue": true, "type": "str" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", + "cli_name": "includedattrs", + "name": "ipapermincludedattr", + "doc": "User-specified attributes to which the permission applies", "required": false, + "label": "Included attributes", + "multivalue": true, "type": "str" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", + "cli_name": "excludedattrs", + "name": "ipapermexcludedattr", + "doc": "User-specified attributes to which the permission explicitly does not apply", "required": false, + "label": "Excluded attributes", + "multivalue": true, "type": "str" }, { - "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, - "name": "delattr", + "cli_name": "defaultattrs", + "name": "ipapermdefaultattr", + "doc": "Attributes to which the permission applies by default", "required": false, + "label": "Default attributes", + "multivalue": true, "type": "str" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "cli_name": "bindtype", + "name": "ipapermbindruletype", + "cli_metavar": "['permission', 'all', 'anonymous']", + "alwaysask": true, + "default": [ + "permission" + ], + "doc": "Bind rule type", + "required": false, + "label": "Bind rule type", + "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "cli_name": "subtree", + "name": "ipapermlocation", + "doc": "Subtree to apply permissions to", + "required": false, + "label": "Subtree", + "type": "DN", + "no_convert": true }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "cli_name": "filter", + "name": "extratargetfilter", + "doc": "Extra target filter", + "required": false, + "label": "Extra target filter", + "multivalue": true, + "type": "str" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "hbacsvcgroup/1", - "version": "1" - }, - { - "attr_name": "remove_member", - "doc": "Remove members from an HBAC service group.", - "full_name": "hbacsvcgroup_remove_member/1", - "name": "hbacsvcgroup_remove_member", - "obj_class": "hbacsvcgroup/1", - "output": [ - { - "name": "result", - "type": "dict" + "cli_name": "rawfilter", + "name": "ipapermtargetfilter", + "doc": "All target filters, including those implied by type and memberof", + "required": false, + "label": "Raw target filter", + "multivalue": true, + "type": "str" }, { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" + "cli_name": "target", + "name": "ipapermtarget", + "doc": "Optional DN to apply the permission to (must be in the subtree, but may not yet exist)", + "required": false, + "label": "Target DN", + "type": "DN" }, { - "doc": "Number of members removed", - "name": "completed", - "type": "int" - } - ], - "params": [ - { - "cli_name": "name", - "label": "Service group name", - "name": "cn", - "no_convert": true, - "type": "str" + "cli_name": "targetto", + "name": "ipapermtargetto", + "doc": "Optional DN subtree where an entry can be moved to (must be in the subtree, but may not yet exist)", + "required": false, + "label": "Target DN subtree", + "type": "DN" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "cli_name": "targetfrom", + "name": "ipapermtargetfrom", + "doc": "Optional DN subtree from where an entry can be moved (must be in the subtree, but may not yet exist)", + "required": false, + "label": "Origin DN subtree", + "type": "DN" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "name": "memberof", + "doc": "Target members of a group (sets memberOf targetfilter)", + "required": false, + "label": "Member of group", + "multivalue": true, + "type": "str" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "doc": "User group to apply permissions to (sets target)", + "required": false, + "type": "str", + "name": "targetgroup", + "label": "Target group" }, { - "alwaysask": true, - "cli_name": "hbacsvcs", - "doc": "HBAC services to remove", - "label": "member HBAC service", - "multivalue": true, - "name": "hbacsvc", + "doc": "Type of IPA object (sets subtree and objectClass targetfilter)", "required": false, - "type": "str" - } - ], - "topic_topic": "hbacsvcgroup/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display information about an HBAC service group.", - "full_name": "hbacsvcgroup_show/1", - "name": "hbacsvcgroup_show", - "obj_class": "hbacsvcgroup/1", - "output": [ + "type": "str", + "name": "type", + "label": "Type" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "name": "filter", + "doc": "Deprecated; use extratargetfilter", "required": false, + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "name": "result", - "type": "dict" + "name": "subtree", + "doc": "Deprecated; use ipapermlocation", + "required": false, + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], + "type": "str" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", + "name": "permissions", + "doc": "Deprecated; use ipapermright", + "required": false, + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" - } - ], - "params": [ + }, { - "cli_name": "name", - "label": "Service group name", - "name": "cn", - "no_convert": true, - "type": "str" + "doc": "Time limit of search in seconds (0 is unlimited)", + "required": false, + "type": "int", + "name": "timelimit", + "label": "Time Limit" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "doc": "Maximum number of entries returned (0 is unlimited)", + "required": false, + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "True" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui", + "cli" + ], + "type": "bool" + }, + { + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"name\")", + "required": false, + "label": "Primary key only", "type": "bool" } ], - "topic_topic": "hbacsvcgroup/1", - "version": "1" - }, - { - "doc": "Simulate use of Host-based access controls", - "full_name": "hbactest/1", - "name": "hbactest", + "full_name": "permission_find/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" - }, - { - "doc": "Warning", - "multivalue": true, - "name": "warning", - "required": false - }, - { - "doc": "Matched rules", - "multivalue": true, - "name": "matched", - "required": false + "type": "str", + "name": "summary" }, { - "doc": "Not matched rules", + "type": "dict", "multivalue": true, - "name": "notmatched", - "required": false + "name": "result" }, { - "doc": "Non-existent or invalid rules", - "multivalue": true, - "name": "error", - "required": false + "doc": "Number of entries returned", + "type": "int", + "name": "count" }, { - "doc": "Result of simulation", - "name": "value", - "type": "bool" + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], + "obj_class": "permission/1", + "topic_topic": "permission/1" + }, + { + "name": "permission_mod", + "doc": "Modify a permission.", + "attr_name": "mod", + "version": "1", "params": [ { - "cli_name": "user", - "label": "User name", - "name": "user", - "positional": false, - "type": "str" + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Permission name" }, { - "cli_name": "srchost", - "exclude": ["cli", "webui"], - "label": "Source host", - "name": "sourcehost", + "cli_name": "right", + "name": "ipapermright", + "cli_metavar": "['read', 'search', 'compare', 'write', 'add', 'delete', 'all']", + "doc": "Rights to grant (read, search, compare, write, add, delete, all)", "required": false, + "label": "Granted rights", + "multivalue": true, "type": "str" }, { - "cli_name": "host", - "label": "Target host", - "name": "targethost", - "positional": false, + "name": "attrs", + "doc": "All attributes to which the permission applies", + "required": false, + "label": "Effective attributes", + "multivalue": true, "type": "str" }, { - "cli_name": "service", - "label": "Service", - "name": "service", - "positional": false, + "cli_name": "includedattrs", + "name": "ipapermincludedattr", + "doc": "User-specified attributes to which the permission applies", + "required": false, + "label": "Included attributes", + "multivalue": true, "type": "str" }, { - "cli_name": "rules", - "label": "Rules to test. If not specified, --enabled is assumed", + "cli_name": "excludedattrs", + "name": "ipapermexcludedattr", + "doc": "User-specified attributes to which the permission explicitly does not apply", + "required": false, + "label": "Excluded attributes", "multivalue": true, - "name": "rules", + "type": "str" + }, + { + "cli_name": "bindtype", + "name": "ipapermbindruletype", + "cli_metavar": "['permission', 'all', 'anonymous']", + "alwaysask": true, + "default": [ + "permission" + ], + "doc": "Bind rule type", "required": false, + "label": "Bind rule type", "type": "str" }, { - "cli_name": "nodetail", - "default": ["False"], - "label": - "Hide details which rules are matched, not matched, or invalid", - "name": "nodetail", + "cli_name": "subtree", + "name": "ipapermlocation", + "doc": "Subtree to apply permissions to", "required": false, - "type": "bool" + "label": "Subtree", + "type": "DN", + "no_convert": true }, { - "cli_name": "enabled", - "default": ["False"], - "label": "Include all enabled IPA rules into test [default]", - "name": "enabled", + "cli_name": "filter", + "name": "extratargetfilter", + "doc": "Extra target filter", "required": false, - "type": "bool" + "label": "Extra target filter", + "multivalue": true, + "type": "str" }, { - "cli_name": "disabled", - "default": ["False"], - "label": "Include all disabled IPA rules into test", - "name": "disabled", + "cli_name": "rawfilter", + "name": "ipapermtargetfilter", + "doc": "All target filters, including those implied by type and memberof", "required": false, - "type": "bool" + "label": "Raw target filter", + "multivalue": true, + "type": "str" }, { - "doc": - "Maximum number of rules to process when no --rules is specified", - "label": "Size Limit", - "name": "sizelimit", + "cli_name": "target", + "name": "ipapermtarget", + "doc": "Optional DN to apply the permission to (must be in the subtree, but may not yet exist)", "required": false, - "type": "int" - } - ], - "topic_topic": "hbactest/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Add a new host.", - "full_name": "host_add/1", - "name": "host_add", - "obj_class": "host/1", - "output": [ + "label": "Target DN", + "type": "DN" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "cli_name": "targetto", + "name": "ipapermtargetto", + "doc": "Optional DN subtree where an entry can be moved to (must be in the subtree, but may not yet exist)", "required": false, - "type": "str" + "label": "Target DN subtree", + "type": "DN" }, { - "name": "result", - "type": "dict" + "cli_name": "targetfrom", + "name": "ipapermtargetfrom", + "doc": "Optional DN subtree from where an entry can be moved (must be in the subtree, but may not yet exist)", + "required": false, + "label": "Origin DN subtree", + "type": "DN" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", + "name": "memberof", + "doc": "Target members of a group (sets memberOf targetfilter)", + "required": false, + "label": "Member of group", + "multivalue": true, "type": "str" - } - ], - "params": [ + }, { - "cli_name": "hostname", - "label": "Host name", - "name": "fqdn", - "no_convert": true, - "type": "str" + "doc": "User group to apply permissions to (sets target)", + "required": false, + "type": "str", + "name": "targetgroup", + "label": "Target group" }, { - "cli_name": "desc", - "doc": "A description of this host", - "label": "Description", - "name": "description", + "doc": "Type of IPA object (sets subtree and objectClass targetfilter)", "required": false, - "type": "str" + "type": "str", + "name": "type", + "label": "Type" }, { - "cli_name": "locality", - "doc": "Host locality (e.g. \"Baltimore, MD\")", - "label": "Locality", - "name": "l", + "name": "filter", + "doc": "Deprecated; use extratargetfilter", "required": false, + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "cli_name": "location", - "doc": "Host location (e.g. \"Lab 2\")", - "label": "Location", - "name": "nshostlocation", + "name": "subtree", + "doc": "Deprecated; use ipapermlocation", "required": false, + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "cli_name": "platform", - "doc": "Host hardware platform (e.g. \"Lenovo T61\")", - "label": "Platform", - "name": "nshardwareplatform", + "name": "permissions", + "doc": "Deprecated; use ipapermright", "required": false, + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "cli_name": "os", - "doc": "Host operating system and version (e.g. \"Fedora 9\")", - "label": "Operating system", - "name": "nsosversion", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "password", - "doc": "Password used in bulk enrollment", - "label": "User password", - "name": "userpassword", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "default": ["False"], - "doc": "Generate a random password to be used in bulk enrollment", - "name": "random", + "cli_name": "delattr", + "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" + }, + { + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, "type": "bool" }, { - "cli_name": "certificate", - "doc": "Base-64 encoded host certificate", - "label": "Certificate", - "multivalue": true, - "name": "usercertificate", - "required": false, - "type": "bytes" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": "Hardware MAC address(es) on this host", - "label": "MAC address", - "multivalue": true, - "name": "macaddress", - "no_convert": true, - "required": false, - "type": "str" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "sshpubkey", - "label": "SSH public key", - "multivalue": true, - "name": "ipasshpubkey", - "no_convert": true, - "required": false, - "type": "str" + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "class", - "doc": - "Host category (semantics placed on this attribute are for local interpretation)", - "label": "Class", - "multivalue": true, - "name": "userclass", + "cli_name": "rename", + "name": "rename", + "doc": "Rename the permission object", "required": false, + "label": "Rename", "type": "str" - }, + } + ], + "full_name": "permission_mod/1", + "output": [ { - "exclude": ["cli", "webui"], - "label": "Assigned ID View", - "name": "ipaassignedidview", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "cli_name": "auth_ind", - "doc": - "Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations.", - "label": "Authentication Indicators", - "multivalue": true, - "name": "krbprincipalauthind", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "cli_name": "requires_pre_auth", - "doc": "Pre-authentication is required for the service", - "label": "Requires pre-authentication", - "name": "ipakrbrequirespreauth", - "required": false, + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "permission/1", + "topic_topic": "permission/1" + }, + { + "exclude": [ + "cli" + ], + "name": "permission_remove_member", + "doc": "Remove members from a permission.", + "attr_name": "remove_member", + "version": "1", + "params": [ + { + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Permission name" + }, + { + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "cli_name": "ok_as_delegate", - "doc": "Client credentials may be delegated to the service", - "label": "Trusted for delegation", - "name": "ipakrbokasdelegate", - "required": false, + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "cli_name": "ok_to_auth_as_delegate", - "doc": - "The service is allowed to authenticate on behalf of a client", - "label": "Trusted to authenticate as user", - "name": "ipakrboktoauthasdelegate", - "required": false, + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", + "cli_name": "privileges", + "name": "privilege", + "alwaysask": true, + "doc": "privileges to remove", "required": false, + "label": "member privilege", + "multivalue": true, "type": "str" + } + ], + "full_name": "permission_remove_member/1", + "output": [ + { + "type": "dict", + "name": "result" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", - "required": false, - "type": "str" + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" }, { - "default": ["False"], - "doc": "force host name even if not in DNS", - "label": "Force", - "name": "force", - "positional": false, - "type": "bool" + "doc": "Number of members removed", + "type": "int", + "name": "completed" + } + ], + "obj_class": "permission/1", + "topic_topic": "permission/1" + }, + { + "name": "permission_show", + "doc": "Display information about a permission.", + "attr_name": "show", + "version": "1", + "params": [ + { + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Permission name" }, { - "default": ["False"], - "doc": "skip reverse DNS detection", - "name": "no_reverse", + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, - { - "doc": "Add the host to DNS with this IP address", - "label": "IP Address", - "name": "ip_address", - "required": false, - "type": "str" - }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "host/1", - "version": "1" - }, - { - "attr_name": "add_cert", - "doc": "Add certificates to host entry", - "full_name": "host_add_cert/1", - "name": "host_add_cert", - "obj_class": "host/1", + "full_name": "permission_show/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "permission/1", + "topic_topic": "permission/1" + }, + { + "name": "ping", + "doc": "Ping a remote server.", + "version": "1", + "params": [], + "full_name": "ping/1", + "output": [ + { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" } ], + "topic_topic": "ping/1" + }, + { + "name": "pkinit_status", + "doc": "Report PKINIT status on the IPA masters", + "attr_name": "status", + "version": "1", "params": [ { - "cli_name": "hostname", - "label": "Host name", - "name": "fqdn", - "no_convert": true, + "positional": true, + "doc": "A string searched in all relevant object attributes", + "required": false, + "type": "str", + "name": "criteria" + }, + { + "cli_name": "server", + "name": "server_server", + "doc": "IPA server hostname", + "required": false, + "label": "Server name", + "type": "str" + }, + { + "cli_name": "status", + "name": "status", + "cli_metavar": "['enabled', 'disabled']", + "doc": "Whether PKINIT is enabled or disabled", + "required": false, + "label": "PKINIT status", "type": "str" }, + { + "doc": "Time limit of search in seconds (0 is unlimited)", + "required": false, + "type": "int", + "name": "timelimit", + "label": "Time Limit" + }, + { + "doc": "Maximum number of entries returned (0 is unlimited)", + "required": false, + "type": "int", + "name": "sizelimit", + "label": "Size Limit" + }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - }, + } + ], + "full_name": "pkinit_status/1", + "output": [ { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "alwaysask": true, - "cli_name": "certificate", - "doc": "Base-64 encoded host certificate", - "label": "Certificate", + "type": "dict", "multivalue": true, - "name": "usercertificate", - "positional": false, - "type": "bytes" + "name": "result" + }, + { + "doc": "Number of entries returned", + "type": "int", + "name": "count" + }, + { + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], - "topic_topic": "host/1", - "version": "1" + "obj_class": "pkinit/1", + "topic_topic": "pkinit/1" }, { - "attr_name": "add_managedby", - "doc": "Add hosts that can manage this host.", - "full_name": "host_add_managedby/1", - "name": "host_add_managedby", - "obj_class": "host/1", + "name": "plugins", + "doc": "Show all loaded plugins.", + "version": "1", + "params": [ + { + "default": [ + "False" + ], + "doc": "Forward to server instead of running locally", + "required": false, + "type": "bool", + "name": "server" + }, + { + "cli_name": "all", + "name": "all", + "default": [ + "True" + ], + "doc": "retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui", + "cli" + ], + "type": "bool" + } + ], + "full_name": "plugins/1", "output": [ { - "name": "result", - "type": "dict" + "doc": "Dictionary mapping plugin names to bases", + "type": "dict", + "name": "result" }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "doc": "Number of plugins loaded", + "type": "int", + "name": "count" }, { - "doc": "Number of members added", - "name": "completed", - "type": "int" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" } ], + "topic_topic": "misc/1" + }, + { + "name": "privilege_add", + "doc": "Add a new privilege.", + "attr_name": "add", + "version": "1", "params": [ { - "cli_name": "hostname", - "label": "Host name", - "name": "fqdn", - "no_convert": true, + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Privilege name" + }, + { + "cli_name": "desc", + "name": "description", + "doc": "Privilege description", + "required": false, + "label": "Description", + "type": "str" + }, + { + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" + }, + { + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - }, - { - "alwaysask": true, - "cli_name": "hosts", - "doc": "hosts to add", - "label": "member host", - "multivalue": true, - "name": "host", - "required": false, - "type": "str" } ], - "topic_topic": "host/1", - "version": "1" - }, - { - "attr_name": "add_principal", - "doc": "Add new principal alias to host entry", - "full_name": "host_add_principal/1", - "name": "host_add_principal", - "obj_class": "host/1", + "full_name": "privilege_add/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "privilege/1", + "topic_topic": "privilege/1" + }, + { + "exclude": [ + "cli" + ], + "name": "privilege_add_member", + "doc": "Add members to a privilege.", + "attr_name": "add_member", + "version": "1", "params": [ { - "cli_name": "hostname", - "label": "Host name", - "name": "fqdn", - "no_convert": true, - "type": "str" - }, - { - "alwaysask": true, - "label": "Principal alias", - "multivalue": true, - "name": "krbprincipalname", - "no_convert": true, - "type": "Principal" + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Privilege name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" + }, + { + "cli_name": "roles", + "name": "role", + "alwaysask": true, + "doc": "roles to add", + "required": false, + "label": "member role", + "multivalue": true, + "type": "str" } ], - "topic_topic": "host/1", - "version": "1" - }, - { - "attr_name": "allow_create_keytab", - "doc": - "Allow users, groups, hosts or host groups to create a keytab of this host.", - "full_name": "host_allow_create_keytab/1", - "name": "host_allow_create_keytab", - "obj_class": "host/1", + "full_name": "privilege_add_member/1", "output": [ { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "type": "dict", + "name": "failed" }, { "doc": "Number of members added", - "name": "completed", - "type": "int" + "type": "int", + "name": "completed" } ], + "obj_class": "privilege/1", + "topic_topic": "privilege/1" + }, + { + "name": "privilege_add_permission", + "doc": "Add permissions to a privilege.", + "attr_name": "add_permission", + "version": "1", "params": [ { - "cli_name": "hostname", - "label": "Host name", - "name": "fqdn", - "no_convert": true, - "type": "str" + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Privilege name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { + "cli_name": "permissions", + "name": "permission", "alwaysask": true, - "cli_name": "users", - "doc": "users to add", - "label": "member user", - "multivalue": true, - "name": "user", + "doc": "permissions", "required": false, + "label": "permission", + "multivalue": true, "type": "str" + } + ], + "full_name": "privilege_add_permission/1", + "output": [ + { + "type": "dict", + "name": "result" }, { - "alwaysask": true, - "cli_name": "groups", - "doc": "groups to add", - "label": "member group", - "multivalue": true, - "name": "group", - "required": false, - "type": "str" + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" }, { - "alwaysask": true, - "cli_name": "hosts", - "doc": "hosts to add", - "label": "member host", + "doc": "Number of permissions added", + "type": "int", + "name": "completed" + } + ], + "obj_class": "privilege/1", + "topic_topic": "privilege/1" + }, + { + "name": "privilege_del", + "doc": "Delete a privilege.", + "attr_name": "del", + "version": "1", + "params": [ + { + "cli_name": "name", + "label": "Privilege name", "multivalue": true, - "name": "host", - "required": false, + "name": "cn", "type": "str" }, { - "alwaysask": true, - "cli_name": "hostgroups", - "doc": "host groups to add", - "label": "member host group", - "multivalue": true, - "name": "hostgroup", - "required": false, - "type": "str" + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", + "positional": false, + "type": "bool" } ], - "topic_topic": "host/1", - "version": "1" - }, - { - "attr_name": "allow_retrieve_keytab", - "doc": - "Allow users, groups, hosts or host groups to retrieve a keytab of this host.", - "full_name": "host_allow_retrieve_keytab/1", - "name": "host_allow_retrieve_keytab", - "obj_class": "host/1", + "full_name": "privilege_del/1", "output": [ { - "name": "result", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "doc": "Number of members added", - "name": "completed", - "type": "int" + "type": "str", + "multivalue": true, + "name": "value" } ], + "obj_class": "privilege/1", + "topic_topic": "privilege/1" + }, + { + "name": "privilege_find", + "doc": "Search for privileges.", + "attr_name": "find", + "version": "1", "params": [ { - "cli_name": "hostname", - "label": "Host name", - "name": "fqdn", - "no_convert": true, + "positional": true, + "doc": "A string searched in all relevant object attributes", + "required": false, + "type": "str", + "name": "criteria" + }, + { + "type": "str", + "required": false, + "cli_name": "name", + "name": "cn", + "label": "Privilege name" + }, + { + "cli_name": "desc", + "name": "description", + "doc": "Privilege description", + "required": false, + "label": "Description", "type": "str" }, + { + "doc": "Time limit of search in seconds (0 is unlimited)", + "required": false, + "type": "int", + "name": "timelimit", + "label": "Time Limit" + }, + { + "doc": "Maximum number of entries returned (0 is unlimited)", + "required": false, + "type": "int", + "name": "sizelimit", + "label": "Size Limit" + }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "True" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui", + "cli" + ], "type": "bool" }, { - "alwaysask": true, - "cli_name": "users", - "doc": "users to add", - "label": "member user", - "multivalue": true, - "name": "user", + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"name\")", "required": false, - "type": "str" - }, + "label": "Primary key only", + "type": "bool" + } + ], + "full_name": "privilege_find/1", + "output": [ { - "alwaysask": true, - "cli_name": "groups", - "doc": "groups to add", - "label": "member group", - "multivalue": true, - "name": "group", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "alwaysask": true, - "cli_name": "hosts", - "doc": "hosts to add", - "label": "member host", + "type": "dict", "multivalue": true, - "name": "host", - "required": false, - "type": "str" + "name": "result" }, { - "alwaysask": true, - "cli_name": "hostgroups", - "doc": "host groups to add", - "label": "member host group", - "multivalue": true, - "name": "hostgroup", - "required": false, - "type": "str" + "doc": "Number of entries returned", + "type": "int", + "name": "count" + }, + { + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], - "topic_topic": "host/1", - "version": "1" + "obj_class": "privilege/1", + "topic_topic": "privilege/1" }, { - "attr_name": "del", - "doc": "Delete a host.", - "full_name": "host_del/1", - "name": "host_del", - "obj_class": "host/1", - "output": [ + "name": "privilege_mod", + "doc": "Modify a privilege.", + "attr_name": "mod", + "version": "1", + "params": [ { - "doc": "User-friendly description of action performed", - "name": "summary", + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Privilege name" + }, + { + "cli_name": "desc", + "name": "description", + "doc": "Privilege description", "required": false, + "label": "Description", "type": "str" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" }, { + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", + "required": false, "multivalue": true, - "name": "value", + "exclude": [ + "webui" + ], "type": "str" - } - ], - "params": [ + }, { - "cli_name": "hostname", - "label": "Host name", + "cli_name": "delattr", + "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", + "required": false, "multivalue": true, - "name": "fqdn", - "no_convert": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", - "name": "continue", + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, { - "default": ["False"], - "doc": - "Remove A, AAAA, SSHFP and PTR records of the host(s) managed by IPA DNS", - "name": "updatedns", - "required": false, + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - } - ], - "topic_topic": "host/1", - "version": "1" - }, - { - "attr_name": "disable", - "doc": - "Disable the Kerberos key, SSL certificate and all services of a host.", - "full_name": "host_disable/1", - "name": "host_disable", - "obj_class": "host/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" }, { - "doc": "True means the operation was successful", - "name": "result", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, { - "cli_name": "hostname", - "label": "Host name", - "name": "fqdn", - "no_convert": true, + "cli_name": "rename", + "name": "rename", + "doc": "Rename the privilege object", + "required": false, + "label": "Rename", "type": "str" } ], - "topic_topic": "host/1", - "version": "1" - }, - { - "attr_name": "disallow_create_keytab", - "doc": - "Disallow users, groups, hosts or host groups to create a keytab of this host.", - "full_name": "host_disallow_create_keytab/1", - "name": "host_disallow_create_keytab", - "obj_class": "host/1", + "full_name": "privilege_mod/1", "output": [ { - "name": "result", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": "Number of members removed", - "name": "completed", - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "privilege/1", + "topic_topic": "privilege/1" + }, + { + "exclude": [ + "cli" + ], + "name": "privilege_remove_member", + "doc": "\n Remove members from a privilege\n ", + "attr_name": "remove_member", + "version": "1", "params": [ { - "cli_name": "hostname", - "label": "Host name", - "name": "fqdn", - "no_convert": true, - "type": "str" + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Privilege name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { + "cli_name": "roles", + "name": "role", "alwaysask": true, - "cli_name": "users", - "doc": "users to remove", - "label": "member user", - "multivalue": true, - "name": "user", - "required": false, - "type": "str" - }, - { - "alwaysask": true, - "cli_name": "groups", - "doc": "groups to remove", - "label": "member group", - "multivalue": true, - "name": "group", - "required": false, - "type": "str" - }, - { - "alwaysask": true, - "cli_name": "hosts", - "doc": "hosts to remove", - "label": "member host", - "multivalue": true, - "name": "host", + "doc": "roles to remove", "required": false, - "type": "str" - }, - { - "alwaysask": true, - "cli_name": "hostgroups", - "doc": "host groups to remove", - "label": "member host group", + "label": "member role", "multivalue": true, - "name": "hostgroup", - "required": false, "type": "str" } ], - "topic_topic": "host/1", - "version": "1" - }, - { - "attr_name": "disallow_retrieve_keytab", - "doc": - "Disallow users, groups, hosts or host groups to retrieve a keytab of this host.", - "full_name": "host_disallow_retrieve_keytab/1", - "name": "host_disallow_retrieve_keytab", - "obj_class": "host/1", + "full_name": "privilege_remove_member/1", "output": [ { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" + "type": "dict", + "name": "failed" }, { "doc": "Number of members removed", - "name": "completed", - "type": "int" + "type": "int", + "name": "completed" } ], + "obj_class": "privilege/1", + "topic_topic": "privilege/1" + }, + { + "name": "privilege_remove_permission", + "doc": "Remove permissions from a privilege.", + "attr_name": "remove_permission", + "version": "1", "params": [ { - "cli_name": "hostname", - "label": "Host name", - "name": "fqdn", - "no_convert": true, - "type": "str" + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Privilege name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { + "cli_name": "permissions", + "name": "permission", "alwaysask": true, - "cli_name": "users", - "doc": "users to remove", - "label": "member user", - "multivalue": true, - "name": "user", - "required": false, - "type": "str" - }, - { - "alwaysask": true, - "cli_name": "groups", - "doc": "groups to remove", - "label": "member group", - "multivalue": true, - "name": "group", - "required": false, - "type": "str" - }, - { - "alwaysask": true, - "cli_name": "hosts", - "doc": "hosts to remove", - "label": "member host", - "multivalue": true, - "name": "host", + "doc": "permissions", "required": false, - "type": "str" - }, - { - "alwaysask": true, - "cli_name": "hostgroups", - "doc": "host groups to remove", - "label": "member host group", + "label": "permission", "multivalue": true, - "name": "hostgroup", - "required": false, "type": "str" } ], - "topic_topic": "host/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for hosts.", - "full_name": "host_find/1", - "name": "host_find", - "obj_class": "host/1", + "full_name": "privilege_remove_permission/1", "output": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" - }, - { - "multivalue": true, - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" + "doc": "Number of permissions removed", + "type": "int", + "name": "completed" } ], + "obj_class": "privilege/1", + "topic_topic": "privilege/1" + }, + { + "name": "privilege_show", + "doc": "Display information about a privilege.", + "attr_name": "show", + "version": "1", "params": [ { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, - "required": false, - "type": "str" - }, - { - "cli_name": "hostname", - "label": "Host name", - "name": "fqdn", - "no_convert": true, - "required": false, - "type": "str" - }, - { - "cli_name": "desc", - "doc": "A description of this host", - "label": "Description", - "name": "description", - "required": false, - "type": "str" - }, - { - "cli_name": "locality", - "doc": "Host locality (e.g. \"Baltimore, MD\")", - "label": "Locality", - "name": "l", - "required": false, - "type": "str" - }, - { - "cli_name": "location", - "doc": "Host location (e.g. \"Lab 2\")", - "label": "Location", - "name": "nshostlocation", - "required": false, - "type": "str" - }, - { - "cli_name": "platform", - "doc": "Host hardware platform (e.g. \"Lenovo T61\")", - "label": "Platform", - "name": "nshardwareplatform", - "required": false, - "type": "str" - }, - { - "cli_name": "os", - "doc": "Host operating system and version (e.g. \"Fedora 9\")", - "label": "Operating system", - "name": "nsosversion", - "required": false, - "type": "str" - }, - { - "cli_name": "password", - "doc": "Password used in bulk enrollment", - "label": "User password", - "name": "userpassword", - "required": false, - "type": "str" - }, - { - "cli_name": "certificate", - "doc": "Base-64 encoded host certificate", - "label": "Certificate", - "multivalue": true, - "name": "usercertificate", - "required": false, - "type": "bytes" - }, - { - "doc": "Hardware MAC address(es) on this host", - "label": "MAC address", - "multivalue": true, - "name": "macaddress", - "no_convert": true, - "required": false, - "type": "str" - }, - { - "cli_name": "class", - "doc": - "Host category (semantics placed on this attribute are for local interpretation)", - "label": "Class", - "multivalue": true, - "name": "userclass", - "required": false, - "type": "str" - }, - { - "exclude": ["cli", "webui"], - "label": "Assigned ID View", - "name": "ipaassignedidview", - "required": false, - "type": "str" - }, - { - "cli_name": "auth_ind", - "doc": - "Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations.", - "label": "Authentication Indicators", - "multivalue": true, - "name": "krbprincipalauthind", - "required": false, - "type": "str" - }, - { - "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", - "required": false, - "type": "int" + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Privilege name" }, { - "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", - "required": false, - "type": "int" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["True"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui", "cli"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - }, - { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"hostname\")", - "label": "Primary key only", - "name": "pkey_only", - "required": false, - "type": "bool" - }, - { - "cli_name": "in_hostgroups", - "doc": "Search for hosts with these member of host groups.", - "label": "host group", - "multivalue": true, - "name": "in_hostgroup", - "no_convert": true, - "required": false, - "type": "str" - }, + } + ], + "full_name": "privilege_show/1", + "output": [ { - "cli_name": "not_in_hostgroups", - "doc": "Search for hosts without these member of host groups.", - "label": "host group", - "multivalue": true, - "name": "not_in_hostgroup", - "no_convert": true, + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "cli_name": "in_netgroups", - "doc": "Search for hosts with these member of netgroups.", - "label": "netgroup", - "multivalue": true, - "name": "in_netgroup", - "no_convert": true, - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "cli_name": "not_in_netgroups", - "doc": "Search for hosts without these member of netgroups.", - "label": "netgroup", - "multivalue": true, - "name": "not_in_netgroup", - "no_convert": true, - "required": false, - "type": "str" - }, + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "privilege/1", + "topic_topic": "privilege/1" + }, + { + "name": "pwpolicy_add", + "doc": "Add a new group password policy.", + "attr_name": "add", + "version": "1", + "params": [ { - "cli_name": "in_roles", - "doc": "Search for hosts with these member of roles.", - "label": "role", - "multivalue": true, - "name": "in_role", - "required": false, - "type": "str" + "type": "str", + "doc": "Manage password policy for specific group", + "cli_name": "group", + "name": "cn", + "label": "Group" }, { - "cli_name": "not_in_roles", - "doc": "Search for hosts without these member of roles.", - "label": "role", - "multivalue": true, - "name": "not_in_role", + "cli_name": "maxlife", + "name": "krbmaxpwdlife", + "doc": "Maximum password lifetime (in days)", "required": false, - "type": "str" + "label": "Max lifetime (days)", + "type": "int" }, { - "cli_name": "in_hbacrules", - "doc": "Search for hosts with these member of HBAC rules.", - "label": "HBAC rule", - "multivalue": true, - "name": "in_hbacrule", + "cli_name": "minlife", + "name": "krbminpwdlife", + "doc": "Minimum password lifetime (in hours)", "required": false, - "type": "str" + "label": "Min lifetime (hours)", + "type": "int" }, { - "cli_name": "not_in_hbacrules", - "doc": "Search for hosts without these member of HBAC rules.", - "label": "HBAC rule", - "multivalue": true, - "name": "not_in_hbacrule", + "cli_name": "history", + "name": "krbpwdhistorylength", + "doc": "Password history size", "required": false, - "type": "str" + "label": "History size", + "type": "int" }, { - "cli_name": "in_sudorules", - "doc": "Search for hosts with these member of sudo rules.", - "label": "sudo rule", - "multivalue": true, - "name": "in_sudorule", + "cli_name": "minclasses", + "name": "krbpwdmindiffchars", + "doc": "Minimum number of character classes", "required": false, - "type": "str" + "label": "Character classes", + "type": "int" }, { - "cli_name": "not_in_sudorules", - "doc": "Search for hosts without these member of sudo rules.", - "label": "sudo rule", - "multivalue": true, - "name": "not_in_sudorule", + "cli_name": "minlength", + "name": "krbpwdminlength", + "doc": "Minimum length of password", "required": false, - "type": "str" + "label": "Min length", + "type": "int" }, { - "alwaysask": true, - "cli_name": "enroll_by_users", - "default_from_param": ["givenname", "sn"], - "doc": "Search for hosts with these enrolled by users.", - "label": "user", - "multivalue": true, - "name": "enroll_by_user", - "no_convert": true, - "required": false, - "type": "str" + "cli_name": "priority", + "name": "cospriority", + "doc": "Priority of the policy (higher number means lower priority", + "label": "Priority", + "positional": false, + "type": "int" }, { - "alwaysask": true, - "cli_name": "not_enroll_by_users", - "default_from_param": ["givenname", "sn"], - "doc": "Search for hosts without these enrolled by users.", - "label": "user", - "multivalue": true, - "name": "not_enroll_by_user", - "no_convert": true, + "cli_name": "maxfail", + "name": "krbpwdmaxfailure", + "doc": "Consecutive failures before lockout", "required": false, - "type": "str" + "label": "Max failures", + "type": "int" }, { - "cli_name": "man_by_hosts", - "doc": "Search for hosts with these managed by hosts.", - "label": "host", - "multivalue": true, - "name": "man_by_host", - "no_convert": true, + "cli_name": "failinterval", + "name": "krbpwdfailurecountinterval", + "doc": "Period after which failure count will be reset (seconds)", "required": false, - "type": "str" + "label": "Failure reset interval", + "type": "int" }, { - "cli_name": "not_man_by_hosts", - "doc": "Search for hosts without these managed by hosts.", - "label": "host", - "multivalue": true, - "name": "not_man_by_host", - "no_convert": true, + "cli_name": "lockouttime", + "name": "krbpwdlockoutduration", + "doc": "Period for which lockout is enforced (seconds)", "required": false, - "type": "str" + "label": "Lockout duration", + "type": "int" }, { - "cli_name": "man_hosts", - "doc": "Search for hosts with these managing hosts.", - "label": "host", - "multivalue": true, - "name": "man_host", - "no_convert": true, + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "not_man_hosts", - "doc": "Search for hosts without these managing hosts.", - "label": "host", - "multivalue": true, - "name": "not_man_host", - "no_convert": true, + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" + }, + { + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" } ], - "topic_topic": "host/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify information about a host.", - "full_name": "host_mod/1", - "name": "host_mod", - "obj_class": "host/1", + "full_name": "pwpolicy_add/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "pwpolicy/1", + "topic_topic": "pwpolicy/1" + }, + { + "name": "pwpolicy_del", + "doc": "Delete a group password policy.", + "attr_name": "del", + "version": "1", "params": [ { - "cli_name": "hostname", - "label": "Host name", - "name": "fqdn", - "no_convert": true, - "type": "str" - }, - { - "cli_name": "desc", - "doc": "A description of this host", - "label": "Description", - "name": "description", - "required": false, - "type": "str" - }, - { - "cli_name": "locality", - "doc": "Host locality (e.g. \"Baltimore, MD\")", - "label": "Locality", - "name": "l", - "required": false, - "type": "str" - }, - { - "cli_name": "location", - "doc": "Host location (e.g. \"Lab 2\")", - "label": "Location", - "name": "nshostlocation", - "required": false, - "type": "str" - }, - { - "cli_name": "platform", - "doc": "Host hardware platform (e.g. \"Lenovo T61\")", - "label": "Platform", - "name": "nshardwareplatform", - "required": false, + "cli_name": "group", + "name": "cn", + "doc": "Manage password policy for specific group", + "label": "Group", + "multivalue": true, "type": "str" }, { - "cli_name": "os", - "doc": "Host operating system and version (e.g. \"Fedora 9\")", - "label": "Operating system", - "name": "nsosversion", - "required": false, - "type": "str" - }, + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", + "positional": false, + "type": "bool" + } + ], + "full_name": "pwpolicy_del/1", + "output": [ { - "cli_name": "password", - "doc": "Password used in bulk enrollment", - "label": "User password", - "name": "userpassword", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "default": ["False"], - "doc": "Generate a random password to be used in bulk enrollment", - "name": "random", - "required": false, - "type": "bool" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "cli_name": "certificate", - "doc": "Base-64 encoded host certificate", - "label": "Certificate", + "type": "str", "multivalue": true, - "name": "usercertificate", - "required": false, - "type": "bytes" - }, + "name": "value" + } + ], + "obj_class": "pwpolicy/1", + "topic_topic": "pwpolicy/1" + }, + { + "name": "pwpolicy_find", + "doc": "Search for group password policies.", + "attr_name": "find", + "version": "1", + "params": [ { - "label": "Principal alias", - "multivalue": true, - "name": "krbprincipalname", - "no_convert": true, + "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, - "type": "Principal" + "type": "str", + "name": "criteria" }, { - "doc": "Hardware MAC address(es) on this host", - "label": "MAC address", - "multivalue": true, - "name": "macaddress", - "no_convert": true, + "cli_name": "group", + "name": "cn", + "doc": "Manage password policy for specific group", "required": false, + "label": "Group", "type": "str" }, { - "cli_name": "sshpubkey", - "label": "SSH public key", - "multivalue": true, - "name": "ipasshpubkey", - "no_convert": true, + "cli_name": "maxlife", + "name": "krbmaxpwdlife", + "doc": "Maximum password lifetime (in days)", "required": false, - "type": "str" + "label": "Max lifetime (days)", + "type": "int" }, { - "cli_name": "class", - "doc": - "Host category (semantics placed on this attribute are for local interpretation)", - "label": "Class", - "multivalue": true, - "name": "userclass", + "cli_name": "minlife", + "name": "krbminpwdlife", + "doc": "Minimum password lifetime (in hours)", "required": false, - "type": "str" + "label": "Min lifetime (hours)", + "type": "int" }, { - "exclude": ["cli", "webui"], - "label": "Assigned ID View", - "name": "ipaassignedidview", + "cli_name": "history", + "name": "krbpwdhistorylength", + "doc": "Password history size", "required": false, - "type": "str" + "label": "History size", + "type": "int" }, { - "cli_name": "auth_ind", - "doc": - "Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations.", - "label": "Authentication Indicators", - "multivalue": true, - "name": "krbprincipalauthind", + "cli_name": "minclasses", + "name": "krbpwdmindiffchars", + "doc": "Minimum number of character classes", "required": false, - "type": "str" + "label": "Character classes", + "type": "int" }, { - "cli_name": "requires_pre_auth", - "doc": "Pre-authentication is required for the service", - "label": "Requires pre-authentication", - "name": "ipakrbrequirespreauth", + "cli_name": "minlength", + "name": "krbpwdminlength", + "doc": "Minimum length of password", "required": false, - "type": "bool" + "label": "Min length", + "type": "int" }, { - "cli_name": "ok_as_delegate", - "doc": "Client credentials may be delegated to the service", - "label": "Trusted for delegation", - "name": "ipakrbokasdelegate", + "cli_name": "priority", + "name": "cospriority", + "doc": "Priority of the policy (higher number means lower priority", "required": false, - "type": "bool" + "label": "Priority", + "type": "int" }, { - "cli_name": "ok_to_auth_as_delegate", - "doc": - "The service is allowed to authenticate on behalf of a client", - "label": "Trusted to authenticate as user", - "name": "ipakrboktoauthasdelegate", + "cli_name": "maxfail", + "name": "krbpwdmaxfailure", + "doc": "Consecutive failures before lockout", "required": false, - "type": "bool" + "label": "Max failures", + "type": "int" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", + "cli_name": "failinterval", + "name": "krbpwdfailurecountinterval", + "doc": "Period after which failure count will be reset (seconds)", "required": false, - "type": "str" + "label": "Failure reset interval", + "type": "int" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", + "cli_name": "lockouttime", + "name": "krbpwdlockoutduration", + "doc": "Period for which lockout is enforced (seconds)", "required": false, - "type": "str" + "label": "Lockout duration", + "type": "int" }, { - "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, - "name": "delattr", + "doc": "Time limit of search in seconds (0 is unlimited)", "required": false, - "type": "str" - }, - { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "type": "int", + "name": "timelimit", + "label": "Time Limit" }, { - "default": ["False"], - "doc": "Update DNS entries", - "name": "updatedns", + "doc": "Maximum number of entries returned (0 is unlimited)", "required": false, - "type": "bool" + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"group\")", + "required": false, + "label": "Primary key only", "type": "bool" } ], - "topic_topic": "host/1", - "version": "1" - }, - { - "attr_name": "remove_cert", - "doc": "Remove certificates from host entry", - "full_name": "host_remove_cert/1", - "name": "host_remove_cert", - "obj_class": "host/1", + "full_name": "pwpolicy_find/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "multivalue": true, + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "Number of entries returned", + "type": "int", + "name": "count" + }, + { + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], + "obj_class": "pwpolicy/1", + "topic_topic": "pwpolicy/1" + }, + { + "name": "pwpolicy_mod", + "doc": "Modify a group password policy.", + "attr_name": "mod", + "version": "1", "params": [ { - "cli_name": "hostname", - "label": "Host name", - "name": "fqdn", - "no_convert": true, + "cli_name": "group", + "name": "cn", + "doc": "Manage password policy for specific group", + "required": false, + "label": "Group", + "positional": true, "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "cli_name": "maxlife", + "name": "krbmaxpwdlife", + "doc": "Maximum password lifetime (in days)", + "required": false, + "label": "Max lifetime (days)", + "type": "int" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "cli_name": "minlife", + "name": "krbminpwdlife", + "doc": "Minimum password lifetime (in hours)", + "required": false, + "label": "Min lifetime (hours)", + "type": "int" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "cli_name": "history", + "name": "krbpwdhistorylength", + "doc": "Password history size", + "required": false, + "label": "History size", + "type": "int" }, { - "alwaysask": true, - "cli_name": "certificate", - "doc": "Base-64 encoded host certificate", - "label": "Certificate", - "multivalue": true, - "name": "usercertificate", - "positional": false, - "type": "bytes" - } - ], - "topic_topic": "host/1", - "version": "1" - }, - { - "attr_name": "remove_managedby", - "doc": "Remove hosts that can manage this host.", - "full_name": "host_remove_managedby/1", - "name": "host_remove_managedby", - "obj_class": "host/1", - "output": [ - { - "name": "result", - "type": "dict" + "cli_name": "minclasses", + "name": "krbpwdmindiffchars", + "doc": "Minimum number of character classes", + "required": false, + "label": "Character classes", + "type": "int" }, { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" + "cli_name": "minlength", + "name": "krbpwdminlength", + "doc": "Minimum length of password", + "required": false, + "label": "Min length", + "type": "int" }, { - "doc": "Number of members removed", - "name": "completed", + "cli_name": "priority", + "name": "cospriority", + "doc": "Priority of the policy (higher number means lower priority", + "required": false, + "label": "Priority", "type": "int" - } - ], - "params": [ - { - "cli_name": "hostname", - "label": "Host name", - "name": "fqdn", - "no_convert": true, - "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "cli_name": "maxfail", + "name": "krbpwdmaxfailure", + "doc": "Consecutive failures before lockout", + "required": false, + "label": "Max failures", + "type": "int" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "cli_name": "failinterval", + "name": "krbpwdfailurecountinterval", + "doc": "Period after which failure count will be reset (seconds)", + "required": false, + "label": "Failure reset interval", + "type": "int" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "cli_name": "lockouttime", + "name": "krbpwdlockoutduration", + "doc": "Period for which lockout is enforced (seconds)", + "required": false, + "label": "Lockout duration", + "type": "int" }, { - "alwaysask": true, - "cli_name": "hosts", - "doc": "hosts to remove", - "label": "member host", - "multivalue": true, - "name": "host", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" - } - ], - "topic_topic": "host/1", - "version": "1" - }, - { - "attr_name": "remove_principal", - "doc": "Remove principal alias from a host entry", - "full_name": "host_remove_principal/1", - "name": "host_remove_principal", - "obj_class": "host/1", - "output": [ + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "name": "result", - "type": "dict" - }, - { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "hostname", - "label": "Host name", - "name": "fqdn", - "no_convert": true, + "cli_name": "delattr", + "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "alwaysask": true, - "label": "Principal alias", - "multivalue": true, - "name": "krbprincipalname", - "no_convert": true, - "type": "Principal" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, - "type": "bool" - }, - { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "host/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display information about a host.", - "full_name": "host_show/1", - "name": "host_show", - "obj_class": "host/1", + "full_name": "pwpolicy_mod/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "pwpolicy/1", + "topic_topic": "pwpolicy/1" + }, + { + "name": "pwpolicy_show", + "doc": "Display information about password policy.", + "attr_name": "show", + "version": "1", "params": [ { - "cli_name": "hostname", - "label": "Host name", - "name": "fqdn", - "no_convert": true, + "cli_name": "group", + "name": "cn", + "doc": "Manage password policy for specific group", + "required": false, + "label": "Group", + "positional": true, "type": "str" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, { - "doc": "file to store certificate in", - "name": "out", + "doc": "Display effective policy for a specific user", "required": false, - "type": "str" + "type": "str", + "name": "user", + "label": "User" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, - "type": "bool" - }, - { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "host/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Add a new hostgroup.", - "full_name": "hostgroup_add/1", - "name": "hostgroup_add", - "obj_class": "hostgroup/1", + "full_name": "pwpolicy_show/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "pwpolicy/1", + "topic_topic": "pwpolicy/1" + }, + { + "name": "radiusproxy_add", + "doc": "Add a new RADIUS proxy server.", + "attr_name": "add", + "version": "1", "params": [ { - "cli_name": "hostgroup_name", - "doc": "Name of host-group", - "label": "Host-group", + "type": "str", + "cli_name": "name", "name": "cn", - "no_convert": true, - "type": "str" + "label": "RADIUS proxy server name" }, { "cli_name": "desc", - "doc": "A description of this host-group", - "label": "Description", "name": "description", + "doc": "A description of this RADIUS proxy server", "required": false, + "label": "Description", "type": "str" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", - "required": false, + "cli_name": "server", + "name": "ipatokenradiusserver", + "doc": "The hostname or IP (with or without port)", + "label": "Server", + "positional": false, "type": "str" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", - "required": false, + "cli_name": "secret", + "name": "ipatokenradiussecret", + "confirm": true, + "doc": "The secret used to encrypt data", + "label": "Secret", + "positional": false, + "sensitive": true, "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "cli_name": "timeout", + "name": "ipatokenradiustimeout", + "doc": "The total timeout across all retries (in seconds)", + "required": false, + "label": "Timeout", + "type": "int" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "cli_name": "retries", + "name": "ipatokenradiusretries", + "doc": "The number of times to retry authentication", + "required": false, + "label": "Retries", + "type": "int" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "hostgroup/1", - "version": "1" - }, - { - "attr_name": "add_member", - "doc": "Add members to a hostgroup.", - "full_name": "hostgroup_add_member/1", - "name": "hostgroup_add_member", - "obj_class": "hostgroup/1", - "output": [ - { - "name": "result", - "type": "dict" + "cli_name": "userattr", + "name": "ipatokenusermapattribute", + "doc": "The username attribute on the user object", + "required": false, + "label": "User attribute", + "type": "str" }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" }, { - "doc": "Number of members added", - "name": "completed", - "type": "int" - } - ], - "params": [ - { - "cli_name": "hostgroup_name", - "doc": "Name of host-group", - "label": "Host-group", - "name": "cn", - "no_convert": true, + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - }, - { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" - }, - { - "alwaysask": true, - "cli_name": "hosts", - "doc": "hosts to add", - "label": "member host", - "multivalue": true, - "name": "host", - "required": false, - "type": "str" - }, - { - "alwaysask": true, - "cli_name": "hostgroups", - "doc": "host groups to add", - "label": "member host group", - "multivalue": true, - "name": "hostgroup", - "required": false, - "type": "str" } ], - "topic_topic": "hostgroup/1", - "version": "1" - }, - { - "attr_name": "del", - "doc": "Delete a hostgroup.", - "full_name": "hostgroup_del/1", - "name": "hostgroup_del", - "obj_class": "hostgroup/1", + "full_name": "radiusproxy_add/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "multivalue": true, - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "radiusproxy/1", + "topic_topic": "radiusproxy/1" + }, + { + "name": "radiusproxy_del", + "doc": "Delete a RADIUS proxy server.", + "attr_name": "del", + "version": "1", "params": [ { - "cli_name": "hostgroup_name", - "doc": "Name of host-group", - "label": "Host-group", + "cli_name": "name", + "label": "RADIUS proxy server name", "multivalue": true, "name": "cn", - "no_convert": true, "type": "str" }, { "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", "positional": false, "type": "bool" } ], - "topic_topic": "hostgroup/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for hostgroups.", - "full_name": "hostgroup_find/1", - "name": "hostgroup_find", - "obj_class": "hostgroup/1", + "full_name": "radiusproxy_del/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" - }, - { - "multivalue": true, - "name": "result", - "type": "dict" + "type": "str", + "name": "summary" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" + "type": "str", + "multivalue": true, + "name": "value" } ], + "obj_class": "radiusproxy/1", + "topic_topic": "radiusproxy/1" + }, + { + "name": "radiusproxy_find", + "doc": "Search for RADIUS proxy servers.", + "attr_name": "find", + "version": "1", "params": [ { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, - "type": "str" + "type": "str", + "name": "criteria" }, { - "cli_name": "hostgroup_name", - "doc": "Name of host-group", - "label": "Host-group", - "name": "cn", - "no_convert": true, + "type": "str", "required": false, - "type": "str" + "cli_name": "name", + "name": "cn", + "label": "RADIUS proxy server name" }, { "cli_name": "desc", - "doc": "A description of this host-group", - "label": "Description", "name": "description", + "doc": "A description of this RADIUS proxy server", "required": false, + "label": "Description", "type": "str" }, { - "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", + "cli_name": "server", + "name": "ipatokenradiusserver", + "doc": "The hostname or IP (with or without port)", + "required": false, + "label": "Server", + "type": "str" + }, + { + "cli_name": "secret", + "name": "ipatokenradiussecret", + "confirm": true, + "doc": "The secret used to encrypt data", + "required": false, + "label": "Secret", + "sensitive": true, + "exclude": [ + "cli", + "webui" + ], + "type": "str" + }, + { + "cli_name": "timeout", + "name": "ipatokenradiustimeout", + "doc": "The total timeout across all retries (in seconds)", "required": false, + "label": "Timeout", "type": "int" }, { - "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", + "cli_name": "retries", + "name": "ipatokenradiusretries", + "doc": "The number of times to retry authentication", "required": false, + "label": "Retries", "type": "int" }, + { + "cli_name": "userattr", + "name": "ipatokenusermapattribute", + "doc": "The username attribute on the user object", + "required": false, + "label": "User attribute", + "type": "str" + }, + { + "doc": "Time limit of search in seconds (0 is unlimited)", + "required": false, + "type": "int", + "name": "timelimit", + "label": "Time Limit" + }, + { + "doc": "Maximum number of entries returned (0 is unlimited)", + "required": false, + "type": "int", + "name": "sizelimit", + "label": "Size Limit" + }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["True"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui", "cli"], - "name": "no_members", - "positional": false, - "type": "bool" - }, - { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"hostgroup-name\")", - "label": "Primary key only", "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"name\")", "required": false, + "label": "Primary key only", "type": "bool" - }, + } + ], + "full_name": "radiusproxy_find/1", + "output": [ { - "cli_name": "hosts", - "doc": "Search for host groups with these member hosts.", - "label": "host", - "multivalue": true, - "name": "host", - "no_convert": true, + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "cli_name": "no_hosts", - "doc": "Search for host groups without these member hosts.", - "label": "host", + "type": "dict", "multivalue": true, - "name": "no_host", - "no_convert": true, - "required": false, - "type": "str" + "name": "result" }, { - "cli_name": "hostgroups", - "doc": "Search for host groups with these member host groups.", - "label": "host group", - "multivalue": true, - "name": "hostgroup", - "no_convert": true, + "doc": "Number of entries returned", + "type": "int", + "name": "count" + }, + { + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" + } + ], + "obj_class": "radiusproxy/1", + "topic_topic": "radiusproxy/1" + }, + { + "name": "radiusproxy_mod", + "doc": "Modify a RADIUS proxy server.", + "attr_name": "mod", + "version": "1", + "params": [ + { + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "RADIUS proxy server name" + }, + { + "cli_name": "desc", + "name": "description", + "doc": "A description of this RADIUS proxy server", "required": false, + "label": "Description", "type": "str" }, { - "cli_name": "no_hostgroups", - "doc": "Search for host groups without these member host groups.", - "label": "host group", - "multivalue": true, - "name": "no_hostgroup", - "no_convert": true, + "cli_name": "server", + "name": "ipatokenradiusserver", + "doc": "The hostname or IP (with or without port)", "required": false, + "label": "Server", "type": "str" }, { - "cli_name": "in_hostgroups", - "doc": "Search for host groups with these member of host groups.", - "label": "host group", - "multivalue": true, - "name": "in_hostgroup", - "no_convert": true, + "cli_name": "secret", + "name": "ipatokenradiussecret", + "confirm": true, + "doc": "The secret used to encrypt data", "required": false, + "label": "Secret", + "sensitive": true, "type": "str" }, { - "cli_name": "not_in_hostgroups", - "doc": - "Search for host groups without these member of host groups.", - "label": "host group", - "multivalue": true, - "name": "not_in_hostgroup", - "no_convert": true, + "cli_name": "timeout", + "name": "ipatokenradiustimeout", + "doc": "The total timeout across all retries (in seconds)", "required": false, - "type": "str" + "label": "Timeout", + "type": "int" }, { - "cli_name": "in_netgroups", - "doc": "Search for host groups with these member of netgroups.", - "label": "netgroup", - "multivalue": true, - "name": "in_netgroup", - "no_convert": true, + "cli_name": "retries", + "name": "ipatokenradiusretries", + "doc": "The number of times to retry authentication", "required": false, - "type": "str" + "label": "Retries", + "type": "int" }, { - "cli_name": "not_in_netgroups", - "doc": - "Search for host groups without these member of netgroups.", - "label": "netgroup", - "multivalue": true, - "name": "not_in_netgroup", - "no_convert": true, + "cli_name": "userattr", + "name": "ipatokenusermapattribute", + "doc": "The username attribute on the user object", "required": false, + "label": "User attribute", "type": "str" }, { - "cli_name": "in_hbacrules", - "doc": "Search for host groups with these member of HBAC rules.", - "label": "HBAC rule", - "multivalue": true, - "name": "in_hbacrule", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "not_in_hbacrules", - "doc": - "Search for host groups without these member of HBAC rules.", - "label": "HBAC rule", - "multivalue": true, - "name": "not_in_hbacrule", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "in_sudorules", - "doc": "Search for host groups with these member of sudo rules.", - "label": "sudo rule", - "multivalue": true, - "name": "in_sudorule", + "cli_name": "delattr", + "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "not_in_sudorules", - "doc": - "Search for host groups without these member of sudo rules.", - "label": "sudo rule", - "multivalue": true, - "name": "not_in_sudorule", + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" + }, + { + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "rename", + "name": "rename", + "doc": "Rename the RADIUS proxy server object", "required": false, + "label": "Rename", "type": "str" } ], - "topic_topic": "hostgroup/1", - "version": "1" + "full_name": "radiusproxy_mod/1", + "output": [ + { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" + }, + { + "type": "dict", + "name": "result" + }, + { + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "radiusproxy/1", + "topic_topic": "radiusproxy/1" }, { - "attr_name": "mod", - "doc": "Modify a hostgroup.", - "full_name": "hostgroup_mod/1", - "name": "hostgroup_mod", - "obj_class": "hostgroup/1", + "name": "radiusproxy_show", + "doc": "Display information about a RADIUS proxy server.", + "attr_name": "show", + "version": "1", + "params": [ + { + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "RADIUS proxy server name" + }, + { + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" + }, + { + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "radiusproxy_show/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "radiusproxy/1", + "topic_topic": "radiusproxy/1" + }, + { + "name": "realmdomains_mod", + "doc": "Modify realm domains.", + "attr_name": "mod", + "version": "1", "params": [ { - "cli_name": "hostgroup_name", - "doc": "Name of host-group", - "label": "Host-group", - "name": "cn", - "no_convert": true, - "type": "str" + "cli_name": "domain", + "name": "associateddomain", + "required": false, + "label": "Domain", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_name": "desc", - "doc": "A description of this host-group", - "label": "Description", - "name": "description", + "cli_name": "add_domain", + "name": "add_domain", "required": false, - "type": "str" + "label": "Add domain", + "type": "str", + "no_convert": true + }, + { + "cli_name": "del_domain", + "name": "del_domain", + "required": false, + "label": "Delete domain", + "type": "str", + "no_convert": true }, { "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", + "name": "force", + "default": [ + "False" + ], + "doc": "Force adding domain even if not in DNS", + "label": "Force", "positional": false, "type": "bool" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "hostgroup/1", - "version": "1" - }, - { - "attr_name": "remove_member", - "doc": "Remove members from a hostgroup.", - "full_name": "hostgroup_remove_member/1", - "name": "hostgroup_remove_member", - "obj_class": "hostgroup/1", + "full_name": "realmdomains_mod/1", "output": [ { - "name": "result", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": "Number of members removed", - "name": "completed", - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "NoneType", + "name": "value" } ], + "obj_class": "realmdomains/1", + "topic_topic": "realmdomains/1" + }, + { + "name": "realmdomains_show", + "doc": "Display the list of realm domains.", + "attr_name": "show", + "version": "1", "params": [ { - "cli_name": "hostgroup_name", - "doc": "Name of host-group", - "label": "Host-group", - "name": "cn", - "no_convert": true, - "type": "str" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - }, - { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" - }, - { - "alwaysask": true, - "cli_name": "hosts", - "doc": "hosts to remove", - "label": "member host", - "multivalue": true, - "name": "host", - "required": false, - "type": "str" - }, - { - "alwaysask": true, - "cli_name": "hostgroups", - "doc": "host groups to remove", - "label": "member host group", - "multivalue": true, - "name": "hostgroup", - "required": false, - "type": "str" } ], - "topic_topic": "hostgroup/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display information about a hostgroup.", - "full_name": "hostgroup_show/1", - "name": "hostgroup_show", - "obj_class": "hostgroup/1", + "full_name": "realmdomains_show/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "NoneType", + "name": "value" } ], + "obj_class": "realmdomains/1", + "topic_topic": "realmdomains/1" + }, + { + "name": "role_add", + "doc": "Add a new role.", + "attr_name": "add", + "version": "1", "params": [ { - "cli_name": "hostgroup_name", - "doc": "Name of host-group", - "label": "Host-group", + "type": "str", + "cli_name": "name", "name": "cn", - "no_convert": true, + "label": "Role name" + }, + { + "cli_name": "desc", + "name": "description", + "doc": "A description of this role-group", + "required": false, + "label": "Description", "type": "str" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" + }, + { + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "hostgroup/1", - "version": "1" - }, - { - "exclude": ["cli"], - "full_name": "i18n_messages/1", - "name": "i18n_messages", - "output": [ - { - "doc": "Dict of I18N messages", - "name": "texts", - "type": "dict" - } - ], - "params": [], - "topic_topic": "internal/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Add a new Group ID override.", - "full_name": "idoverridegroup_add/1", - "name": "idoverridegroup_add", - "obj_class": "idoverridegroup/1", + "full_name": "role_add/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "role/1", + "topic_topic": "role/1" + }, + { + "name": "role_add_member", + "doc": "Add members to a role.", + "attr_name": "add_member", + "version": "1", "params": [ { - "cli_name": "idview", - "label": "ID View Name", - "name": "idviewcn", - "type": "str" + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Role name" }, { - "cli_name": "anchor", - "label": "Anchor to override", - "name": "ipaanchoruuid", - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "desc", - "label": "Description", - "name": "description", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "users", + "name": "user", + "alwaysask": true, + "doc": "users to add", "required": false, + "label": "member user", + "multivalue": true, "type": "str" }, { - "cli_name": "group_name", - "label": "Group name", - "name": "cn", - "no_convert": true, + "cli_name": "groups", + "name": "group", + "alwaysask": true, + "doc": "groups to add", "required": false, + "label": "member group", + "multivalue": true, "type": "str" }, { - "cli_name": "gid", - "doc": "Group ID Number", - "label": "GID", - "name": "gidnumber", + "cli_name": "hosts", + "name": "host", + "alwaysask": true, + "doc": "hosts to add", "required": false, - "type": "int" + "label": "member host", + "multivalue": true, + "type": "str" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", + "cli_name": "hostgroups", + "name": "hostgroup", + "alwaysask": true, + "doc": "host groups to add", "required": false, + "label": "member host group", + "multivalue": true, "type": "str" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", + "cli_name": "services", + "name": "service", + "alwaysask": true, + "doc": "services to add", "required": false, + "label": "member service", + "multivalue": true, "type": "str" + } + ], + "full_name": "role_add_member/1", + "output": [ + { + "type": "dict", + "name": "result" }, { - "default": ["False"], - "doc": - "Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.", - "label": "Fallback to AD DC LDAP", - "name": "fallback_to_ldap", - "required": false, - "type": "bool" + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" + }, + { + "doc": "Number of members added", + "type": "int", + "name": "completed" + } + ], + "obj_class": "role/1", + "topic_topic": "role/1" + }, + { + "name": "role_add_privilege", + "doc": "Add privileges to a role.", + "attr_name": "add_privilege", + "version": "1", + "params": [ + { + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Role name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" + }, + { + "cli_name": "privileges", + "name": "privilege", + "alwaysask": true, + "doc": "privileges", + "required": false, + "label": "privilege", + "multivalue": true, + "type": "str" } ], - "topic_topic": "idviews/1", - "version": "1" - }, - { - "attr_name": "del", - "doc": "Delete an Group ID override.", - "full_name": "idoverridegroup_del/1", - "name": "idoverridegroup_del", - "obj_class": "idoverridegroup/1", + "full_name": "role_add_privilege/1", "output": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" }, { - "multivalue": true, - "name": "value", - "type": "str" + "doc": "Number of privileges added", + "type": "int", + "name": "completed" } ], + "obj_class": "role/1", + "topic_topic": "role/1" + }, + { + "name": "role_del", + "doc": "Delete a role.", + "attr_name": "del", + "version": "1", "params": [ { - "cli_name": "idview", - "label": "ID View Name", - "name": "idviewcn", - "type": "str" - }, - { - "cli_name": "anchor", - "label": "Anchor to override", + "cli_name": "name", + "label": "Role name", "multivalue": true, - "name": "ipaanchoruuid", + "name": "cn", "type": "str" }, { "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", "positional": false, "type": "bool" - }, - { - "default": ["False"], - "doc": - "Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.", - "label": "Fallback to AD DC LDAP", - "name": "fallback_to_ldap", - "required": false, - "type": "bool" } ], - "topic_topic": "idviews/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for an Group ID override.", - "full_name": "idoverridegroup_find/1", - "name": "idoverridegroup_find", - "obj_class": "idoverridegroup/1", + "full_name": "role_del/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "multivalue": true, - "name": "result", - "type": "dict" - }, - { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" + "type": "str", + "multivalue": true, + "name": "value" } ], + "obj_class": "role/1", + "topic_topic": "role/1" + }, + { + "name": "role_find", + "doc": "Search for roles.", + "attr_name": "find", + "version": "1", "params": [ { - "cli_name": "idview", - "label": "ID View Name", - "name": "idviewcn", - "type": "str" - }, - { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, - "type": "str" + "type": "str", + "name": "criteria" }, { - "cli_name": "anchor", - "label": "Anchor to override", - "name": "ipaanchoruuid", + "type": "str", "required": false, - "type": "str" + "cli_name": "name", + "name": "cn", + "label": "Role name" }, { "cli_name": "desc", - "label": "Description", "name": "description", + "doc": "A description of this role-group", "required": false, + "label": "Description", "type": "str" }, - { - "cli_name": "group_name", - "label": "Group name", - "name": "cn", - "no_convert": true, - "required": false, - "type": "str" - }, - { - "cli_name": "gid", - "doc": "Group ID Number", - "label": "GID", - "name": "gidnumber", - "required": false, - "type": "int" - }, { "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", "required": false, - "type": "int" + "type": "int", + "name": "timelimit", + "label": "Time Limit" }, { "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", - "required": false, - "type": "int" - }, - { - "default": ["False"], - "doc": - "Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.", - "label": "Fallback to AD DC LDAP", - "name": "fallback_to_ldap", "required": false, - "type": "bool" + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "True" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui", + "cli" + ], "type": "bool" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"anchor\")", - "label": "Primary key only", "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"name\")", "required": false, + "label": "Primary key only", "type": "bool" } ], - "topic_topic": "idviews/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify an Group ID override.", - "full_name": "idoverridegroup_mod/1", - "name": "idoverridegroup_mod", - "obj_class": "idoverridegroup/1", + "full_name": "role_find/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "multivalue": true, + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "Number of entries returned", + "type": "int", + "name": "count" + }, + { + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], + "obj_class": "role/1", + "topic_topic": "role/1" + }, + { + "name": "role_mod", + "doc": "Modify a role.", + "attr_name": "mod", + "version": "1", "params": [ { - "cli_name": "idview", - "label": "ID View Name", - "name": "idviewcn", - "type": "str" - }, - { - "cli_name": "anchor", - "label": "Anchor to override", - "name": "ipaanchoruuid", - "type": "str" + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Role name" }, { "cli_name": "desc", - "label": "Description", "name": "description", + "doc": "A description of this role-group", "required": false, + "label": "Description", "type": "str" }, - { - "cli_name": "group_name", - "label": "Group name", - "name": "cn", - "no_convert": true, - "required": false, - "type": "str" - }, - { - "cli_name": "gid", - "doc": "Group ID Number", - "label": "GID", - "name": "gidnumber", - "required": false, - "type": "int" - }, { "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, - { - "default": ["False"], - "doc": - "Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.", - "label": "Fallback to AD DC LDAP", - "name": "fallback_to_ldap", - "required": false, - "type": "bool" - }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "rename", - "doc": "Rename the Group ID override object", - "label": "Rename", "name": "rename", + "doc": "Rename the role object", "required": false, + "label": "Rename", "type": "str" } ], - "topic_topic": "idviews/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display information about an Group ID override.", - "full_name": "idoverridegroup_show/1", - "name": "idoverridegroup_show", - "obj_class": "idoverridegroup/1", + "full_name": "role_mod/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "role/1", + "topic_topic": "role/1" + }, + { + "name": "role_remove_member", + "doc": "Remove members from a role.", + "attr_name": "remove_member", + "version": "1", "params": [ { - "cli_name": "idview", - "label": "ID View Name", - "name": "idviewcn", - "type": "str" - }, - { - "cli_name": "anchor", - "label": "Anchor to override", - "name": "ipaanchoruuid", - "type": "str" - }, - { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" - }, - { - "default": ["False"], - "doc": - "Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.", - "label": "Fallback to AD DC LDAP", - "name": "fallback_to_ldap", - "required": false, - "type": "bool" + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Role name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - } - ], - "topic_topic": "idviews/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Add a new User ID override.", - "full_name": "idoverrideuser_add/1", - "name": "idoverrideuser_add", - "obj_class": "idoverrideuser/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" - }, - { - "name": "result", - "type": "dict" - }, - { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "idview", - "label": "ID View Name", - "name": "idviewcn", - "type": "str" }, { - "cli_name": "anchor", - "label": "Anchor to override", - "name": "ipaanchoruuid", - "type": "str" - }, - { - "cli_name": "desc", - "label": "Description", - "name": "description", - "required": false, - "type": "str" + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "login", - "label": "User login", - "name": "uid", - "no_convert": true, + "cli_name": "users", + "name": "user", + "alwaysask": true, + "doc": "users to remove", "required": false, + "label": "member user", + "multivalue": true, "type": "str" }, { - "cli_name": "uid", - "doc": "User ID Number", - "label": "UID", - "name": "uidnumber", - "required": false, - "type": "int" - }, - { - "label": "GECOS", - "name": "gecos", + "cli_name": "groups", + "name": "group", + "alwaysask": true, + "doc": "groups to remove", "required": false, + "label": "member group", + "multivalue": true, "type": "str" }, { - "doc": "Group ID Number", - "label": "GID", - "name": "gidnumber", - "required": false, - "type": "int" - }, - { - "cli_name": "homedir", - "label": "Home directory", - "name": "homedirectory", + "cli_name": "hosts", + "name": "host", + "alwaysask": true, + "doc": "hosts to remove", "required": false, + "label": "member host", + "multivalue": true, "type": "str" }, { - "cli_name": "shell", - "label": "Login shell", - "name": "loginshell", + "cli_name": "hostgroups", + "name": "hostgroup", + "alwaysask": true, + "doc": "host groups to remove", "required": false, + "label": "member host group", + "multivalue": true, "type": "str" }, { - "exclude": ["cli", "webui"], - "name": "ipaoriginaluid", + "cli_name": "services", + "name": "service", + "alwaysask": true, + "doc": "services to remove", "required": false, - "type": "str" - }, - { - "cli_name": "sshpubkey", - "label": "SSH public key", + "label": "member service", "multivalue": true, - "name": "ipasshpubkey", - "no_convert": true, - "required": false, "type": "str" - }, + } + ], + "full_name": "role_remove_member/1", + "output": [ { - "cli_name": "certificate", - "doc": "Base-64 encoded user certificate", - "label": "Certificate", - "multivalue": true, - "name": "usercertificate", - "required": false, - "type": "bytes" + "type": "dict", + "name": "result" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", - "required": false, - "type": "str" + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", - "required": false, - "type": "str" - }, + "doc": "Number of members removed", + "type": "int", + "name": "completed" + } + ], + "obj_class": "role/1", + "topic_topic": "role/1" + }, + { + "name": "role_remove_privilege", + "doc": "Remove privileges from a role.", + "attr_name": "remove_privilege", + "version": "1", + "params": [ { - "default": ["False"], - "doc": - "Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.", - "label": "Fallback to AD DC LDAP", - "name": "fallback_to_ldap", - "required": false, - "type": "bool" + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Role name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" + }, + { + "cli_name": "privileges", + "name": "privilege", + "alwaysask": true, + "doc": "privileges", + "required": false, + "label": "privilege", + "multivalue": true, + "type": "str" } ], - "topic_topic": "idviews/1", - "version": "1" - }, - { - "attr_name": "add_cert", - "doc": "Add one or more certificates to the idoverrideuser entry", - "full_name": "idoverrideuser_add_cert/1", - "name": "idoverrideuser_add_cert", - "obj_class": "idoverrideuser/1", + "full_name": "role_remove_privilege/1", "output": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "name": "result", - "type": "dict" + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "Number of privileges removed", + "type": "int", + "name": "completed" } ], + "obj_class": "role/1", + "topic_topic": "role/1" + }, + { + "name": "role_show", + "doc": "Display information about a role.", + "attr_name": "show", + "version": "1", "params": [ { - "cli_name": "idview", - "label": "ID View Name", - "name": "idviewcn", - "type": "str" - }, - { - "cli_name": "anchor", - "label": "Anchor to override", - "name": "ipaanchoruuid", - "type": "str" + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Role name" }, { - "default": ["False"], - "doc": - "Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.", - "label": "Fallback to AD DC LDAP", - "name": "fallback_to_ldap", - "required": false, + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "alwaysask": true, - "cli_name": "certificate", - "doc": "Base-64 encoded user certificate", - "label": "Certificate", - "multivalue": true, - "name": "usercertificate", + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, - "type": "bytes" + "exclude": [ + "webui" + ], + "type": "bool" } ], - "topic_topic": "idviews/1", - "version": "1" - }, - { - "attr_name": "del", - "doc": "Delete an User ID override.", - "full_name": "idoverrideuser_del/1", - "name": "idoverrideuser_del", - "obj_class": "idoverrideuser/1", + "full_name": "role_show/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "role/1", + "topic_topic": "role/1" + }, + { + "name": "schema", + "version": "1", + "params": [ + { + "type": "str", + "required": false, "multivalue": true, - "name": "value", - "type": "str" + "name": "known_fingerprints", + "label": "Fingerprint of schema cached by client" + } + ], + "full_name": "schema/1", + "exclude": [ + "cli" + ], + "output": [ + { + "name": "result" } ], + "topic_topic": "schema/1" + }, + { + "name": "selfservice_add", + "doc": "Add a new self-service permission.", + "attr_name": "add", + "version": "1", "params": [ { - "cli_name": "idview", - "label": "ID View Name", - "name": "idviewcn", + "doc": "Self-service name", + "label": "Self-service name", + "cli_name": "name", + "name": "aciname", "type": "str" }, { - "cli_name": "anchor", - "label": "Anchor to override", + "cli_name": "permissions", + "name": "permissions", + "doc": "Permissions to grant (read, write). Default is write.", + "required": false, + "label": "Permissions", "multivalue": true, - "name": "ipaanchoruuid", "type": "str" }, { - "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", - "name": "continue", + "cli_name": "attrs", + "name": "attrs", + "doc": "Attributes to which the permission applies.", + "label": "Attributes", "positional": false, + "multivalue": true, + "type": "str", + "no_convert": true + }, + { + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": - "Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.", - "label": "Fallback to AD DC LDAP", - "name": "fallback_to_ldap", - "required": false, + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "idviews/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for an User ID override.", - "full_name": "idoverrideuser_find/1", - "name": "idoverrideuser_find", - "obj_class": "idoverrideuser/1", + "full_name": "selfservice_add/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" - }, - { - "multivalue": true, - "name": "result", - "type": "dict" + "type": "str", + "name": "summary" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "type": "dict", + "name": "result" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "selfservice/1", + "topic_topic": "selfservice/1" + }, + { + "name": "selfservice_del", + "doc": "Delete a self-service permission.", + "attr_name": "del", + "version": "1", "params": [ { - "cli_name": "idview", - "label": "ID View Name", - "name": "idviewcn", + "doc": "Self-service name", + "label": "Self-service name", + "cli_name": "name", + "name": "aciname", "type": "str" - }, + } + ], + "full_name": "selfservice_del/1", + "output": [ { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "cli_name": "anchor", - "label": "Anchor to override", - "name": "ipaanchoruuid", + "doc": "True means the operation was successful", + "type": "bool", + "name": "result" + }, + { + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "selfservice/1", + "topic_topic": "selfservice/1" + }, + { + "name": "selfservice_find", + "doc": "Search for a self-service permission.", + "attr_name": "find", + "version": "1", + "params": [ + { + "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, - "type": "str" + "type": "str", + "name": "criteria" }, { - "cli_name": "desc", - "label": "Description", - "name": "description", + "cli_name": "name", + "name": "aciname", + "doc": "Self-service name", "required": false, + "label": "Self-service name", "type": "str" }, { - "cli_name": "login", - "label": "User login", - "name": "uid", - "no_convert": true, + "cli_name": "permissions", + "name": "permissions", + "doc": "Permissions to grant (read, write). Default is write.", "required": false, + "label": "Permissions", + "multivalue": true, "type": "str" }, { - "cli_name": "uid", - "doc": "User ID Number", - "label": "UID", - "name": "uidnumber", + "cli_name": "attrs", + "name": "attrs", + "doc": "Attributes to which the permission applies.", "required": false, - "type": "int" + "label": "Attributes", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "label": "GECOS", - "name": "gecos", + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"name\")", "required": false, - "type": "str" + "label": "Primary key only", + "type": "bool" }, { - "doc": "Group ID Number", - "label": "GID", - "name": "gidnumber", - "required": false, - "type": "int" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "homedir", - "label": "Home directory", - "name": "homedirectory", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "selfservice_find/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "cli_name": "shell", - "label": "Login shell", - "name": "loginshell", - "required": false, - "type": "str" + "type": "dict", + "multivalue": true, + "name": "result" }, { - "exclude": ["cli", "webui"], - "name": "ipaoriginaluid", - "required": false, - "type": "str" + "doc": "Number of entries returned", + "type": "int", + "name": "count" }, { - "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", - "required": false, - "type": "int" + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" + } + ], + "obj_class": "selfservice/1", + "topic_topic": "selfservice/1" + }, + { + "name": "selfservice_mod", + "doc": "Modify a self-service permission.", + "attr_name": "mod", + "version": "1", + "params": [ + { + "doc": "Self-service name", + "label": "Self-service name", + "cli_name": "name", + "name": "aciname", + "type": "str" }, { - "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", + "cli_name": "permissions", + "name": "permissions", + "doc": "Permissions to grant (read, write). Default is write.", "required": false, - "type": "int" + "label": "Permissions", + "multivalue": true, + "type": "str" }, { - "default": ["False"], - "doc": - "Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.", - "label": "Fallback to AD DC LDAP", - "name": "fallback_to_ldap", + "cli_name": "attrs", + "name": "attrs", + "doc": "Attributes to which the permission applies.", "required": false, - "type": "bool" + "label": "Attributes", + "multivalue": true, + "type": "str", + "no_convert": true }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, - "type": "bool" - }, - { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"anchor\")", - "label": "Primary key only", - "name": "pkey_only", - "required": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "idviews/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify an User ID override.", - "full_name": "idoverrideuser_mod/1", - "name": "idoverrideuser_mod", - "obj_class": "idoverrideuser/1", + "full_name": "selfservice_mod/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "selfservice/1", + "topic_topic": "selfservice/1" + }, + { + "name": "selfservice_show", + "doc": "Display information about a self-service permission.", + "attr_name": "show", + "version": "1", "params": [ { - "cli_name": "idview", - "label": "ID View Name", - "name": "idviewcn", + "doc": "Self-service name", + "label": "Self-service name", + "cli_name": "name", + "name": "aciname", "type": "str" }, { - "cli_name": "anchor", - "label": "Anchor to override", - "name": "ipaanchoruuid", - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "desc", - "label": "Description", - "name": "description", - "required": false, - "type": "str" - }, + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "selfservice_show/1", + "output": [ { - "cli_name": "login", - "label": "User login", - "name": "uid", - "no_convert": true, + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "cli_name": "uid", - "doc": "User ID Number", - "label": "UID", - "name": "uidnumber", - "required": false, - "type": "int" + "type": "dict", + "name": "result" }, { - "label": "GECOS", - "name": "gecos", - "required": false, - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "selfservice/1", + "topic_topic": "selfservice/1" + }, + { + "name": "selinuxusermap_add", + "doc": "Create a new SELinux User Map.", + "attr_name": "add", + "version": "1", + "params": [ + { + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Rule name" }, { - "doc": "Group ID Number", - "label": "GID", - "name": "gidnumber", - "required": false, - "type": "int" + "positional": false, + "type": "str", + "cli_name": "selinuxuser", + "name": "ipaselinuxuser", + "label": "SELinux User" }, { - "cli_name": "homedir", - "label": "Home directory", - "name": "homedirectory", + "cli_name": "hbacrule", + "name": "seealso", + "doc": "HBAC Rule that defines the users, groups and hostgroups", "required": false, + "label": "HBAC Rule", "type": "str" }, { - "cli_name": "shell", - "label": "Login shell", - "name": "loginshell", + "cli_name": "usercat", + "name": "usercategory", + "cli_metavar": "['all']", + "doc": "User category the rule applies to", "required": false, + "label": "User category", "type": "str" }, { - "exclude": ["cli", "webui"], - "name": "ipaoriginaluid", + "cli_name": "hostcat", + "name": "hostcategory", + "cli_metavar": "['all']", + "doc": "Host category the rule applies to", "required": false, + "label": "Host category", "type": "str" }, { - "cli_name": "sshpubkey", - "label": "SSH public key", - "multivalue": true, - "name": "ipasshpubkey", - "no_convert": true, + "type": "str", "required": false, - "type": "str" + "cli_name": "desc", + "name": "description", + "label": "Description" }, { - "cli_name": "certificate", - "doc": "Base-64 encoded user certificate", - "label": "Certificate", - "multivalue": true, - "name": "usercertificate", + "exclude": [ + "cli", + "webui" + ], "required": false, - "type": "bytes" + "type": "bool", + "name": "ipaenabledflag", + "label": "Enabled" }, { "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, - "type": "str" - }, - { - "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], "multivalue": true, - "name": "delattr", - "required": false, + "exclude": [ + "webui" + ], "type": "str" }, - { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" - }, - { - "default": ["False"], - "doc": - "Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.", - "label": "Fallback to AD DC LDAP", - "name": "fallback_to_ldap", - "required": false, - "type": "bool" - }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "cli_name": "rename", - "doc": "Rename the User ID override object", - "label": "Rename", - "name": "rename", - "required": false, - "type": "str" + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" } ], - "topic_topic": "idviews/1", - "version": "1" - }, - { - "attr_name": "remove_cert", - "doc": "Remove one or more certificates to the idoverrideuser entry", - "full_name": "idoverrideuser_remove_cert/1", - "name": "idoverrideuser_remove_cert", - "obj_class": "idoverrideuser/1", + "full_name": "selinuxusermap_add/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "selinuxusermap/1", + "topic_topic": "selinuxusermap/1" + }, + { + "name": "selinuxusermap_add_host", + "doc": "Add target hosts and hostgroups to an SELinux User Map rule.", + "attr_name": "add_host", + "version": "1", "params": [ { - "cli_name": "idview", - "label": "ID View Name", - "name": "idviewcn", - "type": "str" - }, - { - "cli_name": "anchor", - "label": "Anchor to override", - "name": "ipaanchoruuid", - "type": "str" - }, - { - "default": ["False"], - "doc": - "Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.", - "label": "Fallback to AD DC LDAP", - "name": "fallback_to_ldap", - "required": false, - "type": "bool" + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Rule name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "alwaysask": true, - "cli_name": "certificate", - "doc": "Base-64 encoded user certificate", - "label": "Certificate", - "multivalue": true, - "name": "usercertificate", + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, - "type": "bytes" - } - ], - "topic_topic": "idviews/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display information about an User ID override.", - "full_name": "idoverrideuser_show/1", - "name": "idoverrideuser_show", - "obj_class": "idoverrideuser/1", - "output": [ + "exclude": [ + "webui" + ], + "type": "bool" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "cli_name": "hosts", + "name": "host", + "alwaysask": true, + "doc": "hosts to add", "required": false, + "label": "member host", + "multivalue": true, "type": "str" }, { - "name": "result", - "type": "dict" - }, - { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", + "cli_name": "hostgroups", + "name": "hostgroup", + "alwaysask": true, + "doc": "host groups to add", + "required": false, + "label": "member host group", + "multivalue": true, "type": "str" } ], - "params": [ - { - "cli_name": "idview", - "label": "ID View Name", - "name": "idviewcn", - "type": "str" - }, - { - "cli_name": "anchor", - "label": "Anchor to override", - "name": "ipaanchoruuid", - "type": "str" - }, - { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" - }, + "full_name": "selinuxusermap_add_host/1", + "output": [ { - "default": ["False"], - "doc": - "Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.", - "label": "Fallback to AD DC LDAP", - "name": "fallback_to_ldap", - "required": false, - "type": "bool" + "type": "dict", + "name": "result" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "doc": "Number of members added", + "type": "int", + "name": "completed" } ], - "topic_topic": "idviews/1", - "version": "1" + "obj_class": "selinuxusermap/1", + "topic_topic": "selinuxusermap/1" }, { - "attr_name": "add", - "doc": - "\n Add new ID range.\n\n To add a new ID range you always have to specify\n\n --base-id\n --range-size\n\n Additionally\n\n --rid-base\n --secondary-rid-base\n\n may be given for a new ID range for the local domain while\n\n --rid-base\n --dom-sid\n\n must be given to add a new range for a trusted AD domain.\n\n=======\nWARNING:\n\nDNA plugin in 389-ds will allocate IDs based on the ranges configured for the\nlocal domain. Currently the DNA plugin *cannot* be reconfigured itself based\non the local ranges set via this family of commands.\n\nManual configuration change has to be done in the DNA plugin configuration for\nthe new local range. Specifically, The dnaNextRange attribute of 'cn=Posix\nIDs,cn=Distributed Numeric Assignment Plugin,cn=plugins,cn=config' has to be\nmodified to match the new range.\n=======\n\n", - "full_name": "idrange_add/1", - "name": "idrange_add", - "obj_class": "idrange/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" - }, - { - "name": "result", - "type": "dict" - }, - { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], + "name": "selinuxusermap_add_user", + "doc": "Add users and groups to an SELinux User Map rule.", + "attr_name": "add_user", + "version": "1", "params": [ { + "type": "str", "cli_name": "name", - "label": "Range name", "name": "cn", - "type": "str" + "label": "Rule name" }, { - "cli_name": "base_id", - "label": "First Posix ID of the range", - "name": "ipabaseid", + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, - "type": "int" + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "range_size", - "label": "Number of IDs in the range", - "name": "ipaidrangesize", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, - "type": "int" - }, - { - "cli_name": "rid_base", - "label": "First RID of the corresponding RID range", - "name": "ipabaserid", - "required": false, - "type": "int" + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "secondary_rid_base", - "label": "First RID of the secondary RID range", - "name": "ipasecondarybaserid", - "required": false, - "type": "int" + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "dom_sid", - "label": "Domain SID of the trusted domain", - "name": "ipanttrusteddomainsid", + "cli_name": "users", + "name": "user", + "alwaysask": true, + "doc": "users to add", "required": false, + "label": "member user", + "multivalue": true, "type": "str" }, { - "cli_name": "dom_name", - "label": "Name of the trusted domain", - "name": "ipanttrusteddomainname", + "cli_name": "groups", + "name": "group", + "alwaysask": true, + "doc": "groups to add", "required": false, + "label": "member group", + "multivalue": true, "type": "str" - }, + } + ], + "full_name": "selinuxusermap_add_user/1", + "output": [ { - "cli_metavar": - "['ipa-ad-trust-posix', 'ipa-ad-trust', 'ipa-local']", - "cli_name": "type", - "doc": - "ID range type, one of ipa-ad-trust-posix, ipa-ad-trust, ipa-local", - "label": "Range type", - "name": "iparangetype", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", - "required": false, - "type": "str" + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], + "doc": "Number of members added", + "type": "int", + "name": "completed" + } + ], + "obj_class": "selinuxusermap/1", + "topic_topic": "selinuxusermap/1" + }, + { + "name": "selinuxusermap_del", + "doc": "Delete a SELinux User Map.", + "attr_name": "del", + "version": "1", + "params": [ + { + "cli_name": "name", + "label": "Rule name", "multivalue": true, - "name": "addattr", - "required": false, + "name": "cn", "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" - }, - { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", "positional": false, "type": "bool" } ], - "topic_topic": "idrange/1", - "version": "1" - }, - { - "attr_name": "del", - "doc": "Delete an ID range.", - "full_name": "idrange_del/1", - "name": "idrange_del", - "obj_class": "idrange/1", + "full_name": "selinuxusermap_del/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { + "type": "str", "multivalue": true, - "name": "value", - "type": "str" + "name": "value" } ], + "obj_class": "selinuxusermap/1", + "topic_topic": "selinuxusermap/1" + }, + { + "name": "selinuxusermap_disable", + "doc": "Disable an SELinux User Map rule.", + "attr_name": "disable", + "version": "1", "params": [ { + "type": "str", "cli_name": "name", - "label": "Range name", - "multivalue": true, "name": "cn", - "type": "str" + "label": "Rule name" + } + ], + "full_name": "selinuxusermap_disable/1", + "output": [ + { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", - "name": "continue", - "positional": false, - "type": "bool" + "doc": "True means the operation was successful", + "type": "bool", + "name": "result" + }, + { + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "topic_topic": "idrange/1", - "version": "1" + "obj_class": "selinuxusermap/1", + "topic_topic": "selinuxusermap/1" }, { - "attr_name": "find", - "doc": "Search for ranges.", - "full_name": "idrange_find/1", - "name": "idrange_find", - "obj_class": "idrange/1", + "name": "selinuxusermap_enable", + "doc": "Enable an SELinux User Map rule.", + "attr_name": "enable", + "version": "1", + "params": [ + { + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Rule name" + } + ], + "full_name": "selinuxusermap_enable/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" - }, - { - "multivalue": true, - "name": "result", - "type": "dict" + "type": "str", + "name": "summary" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "doc": "True means the operation was successful", + "type": "bool", + "name": "result" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "selinuxusermap/1", + "topic_topic": "selinuxusermap/1" + }, + { + "name": "selinuxusermap_find", + "doc": "Search for SELinux User Maps.", + "attr_name": "find", + "version": "1", "params": [ { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, - "type": "str" + "type": "str", + "name": "criteria" }, { + "type": "str", + "required": false, "cli_name": "name", - "label": "Range name", "name": "cn", - "required": false, - "type": "str" + "label": "Rule name" }, { - "cli_name": "base_id", - "label": "First Posix ID of the range", - "name": "ipabaseid", + "type": "str", "required": false, - "type": "int" + "cli_name": "selinuxuser", + "name": "ipaselinuxuser", + "label": "SELinux User" }, { - "cli_name": "range_size", - "label": "Number of IDs in the range", - "name": "ipaidrangesize", + "cli_name": "hbacrule", + "name": "seealso", + "doc": "HBAC Rule that defines the users, groups and hostgroups", "required": false, - "type": "int" + "label": "HBAC Rule", + "type": "str" }, { - "cli_name": "rid_base", - "label": "First RID of the corresponding RID range", - "name": "ipabaserid", + "cli_name": "usercat", + "name": "usercategory", + "cli_metavar": "['all']", + "doc": "User category the rule applies to", "required": false, - "type": "int" + "label": "User category", + "type": "str" }, { - "cli_name": "secondary_rid_base", - "label": "First RID of the secondary RID range", - "name": "ipasecondarybaserid", + "cli_name": "hostcat", + "name": "hostcategory", + "cli_metavar": "['all']", + "doc": "Host category the rule applies to", "required": false, - "type": "int" + "label": "Host category", + "type": "str" }, { - "cli_name": "dom_sid", - "label": "Domain SID of the trusted domain", - "name": "ipanttrusteddomainsid", + "type": "str", "required": false, - "type": "str" + "cli_name": "desc", + "name": "description", + "label": "Description" }, { - "cli_metavar": - "['ipa-ad-trust-posix', 'ipa-ad-trust', 'ipa-local']", - "cli_name": "type", - "doc": - "ID range type, one of ipa-ad-trust-posix, ipa-ad-trust, ipa-local", - "label": "Range type", - "name": "iparangetype", + "exclude": [ + "cli", + "webui" + ], "required": false, - "type": "str" + "type": "bool", + "name": "ipaenabledflag", + "label": "Enabled" }, { "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", "required": false, - "type": "int" + "type": "int", + "name": "timelimit", + "label": "Time Limit" }, { "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", "required": false, - "type": "int" + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "True" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui", + "cli" + ], "type": "bool" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"name\")", - "label": "Primary key only", "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"name\")", "required": false, + "label": "Primary key only", "type": "bool" } ], - "topic_topic": "idrange/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": - "Modify ID range.\n\n=======\nWARNING:\n\nDNA plugin in 389-ds will allocate IDs based on the ranges configured for the\nlocal domain. Currently the DNA plugin *cannot* be reconfigured itself based\non the local ranges set via this family of commands.\n\nManual configuration change has to be done in the DNA plugin configuration for\nthe new local range. Specifically, The dnaNextRange attribute of 'cn=Posix\nIDs,cn=Distributed Numeric Assignment Plugin,cn=plugins,cn=config' has to be\nmodified to match the new range.\n=======\n\n", - "full_name": "idrange_mod/1", - "name": "idrange_mod", - "obj_class": "idrange/1", + "full_name": "selinuxusermap_find/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "multivalue": true, + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "Number of entries returned", + "type": "int", + "name": "count" + }, + { + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], + "obj_class": "selinuxusermap/1", + "topic_topic": "selinuxusermap/1" + }, + { + "name": "selinuxusermap_mod", + "doc": "Modify a SELinux User Map.", + "attr_name": "mod", + "version": "1", "params": [ { + "type": "str", "cli_name": "name", - "label": "Range name", "name": "cn", + "label": "Rule name" + }, + { + "type": "str", + "required": false, + "cli_name": "selinuxuser", + "name": "ipaselinuxuser", + "label": "SELinux User" + }, + { + "cli_name": "hbacrule", + "name": "seealso", + "doc": "HBAC Rule that defines the users, groups and hostgroups", + "required": false, + "label": "HBAC Rule", "type": "str" }, { - "cli_name": "base_id", - "label": "First Posix ID of the range", - "name": "ipabaseid", + "cli_name": "usercat", + "name": "usercategory", + "cli_metavar": "['all']", + "doc": "User category the rule applies to", "required": false, - "type": "int" + "label": "User category", + "type": "str" }, { - "cli_name": "range_size", - "label": "Number of IDs in the range", - "name": "ipaidrangesize", + "cli_name": "hostcat", + "name": "hostcategory", + "cli_metavar": "['all']", + "doc": "Host category the rule applies to", "required": false, - "type": "int" + "label": "Host category", + "type": "str" }, { - "cli_name": "rid_base", - "label": "First RID of the corresponding RID range", - "name": "ipabaserid", + "type": "str", "required": false, - "type": "int" + "cli_name": "desc", + "name": "description", + "label": "Description" }, { - "cli_name": "secondary_rid_base", - "label": "First RID of the secondary RID range", - "name": "ipasecondarybaserid", + "exclude": [ + "cli", + "webui" + ], "required": false, - "type": "int" + "type": "bool", + "name": "ipaenabledflag", + "label": "Enabled" }, { "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, - { - "cli_name": "dom_sid", - "exclude": ["cli", "webui"], - "label": "Domain SID of the trusted domain", - "name": "ipanttrusteddomainsid", - "required": false, - "type": "str" - }, - { - "cli_name": "dom_name", - "exclude": ["cli", "webui"], - "label": "Name of the trusted domain", - "name": "ipanttrusteddomainname", - "required": false, - "type": "str" - }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, - "type": "bool" - } - ], - "topic_topic": "idrange/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display information about a range.", - "full_name": "idrange_show/1", - "name": "idrange_show", - "obj_class": "idrange/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" - }, - { - "name": "result", - "type": "dict" - }, - { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "name", - "label": "Range name", - "name": "cn", - "type": "str" - }, - { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" - }, - { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "idrange/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Add a new ID View.", - "full_name": "idview_add/1", - "name": "idview_add", - "obj_class": "idview/1", + "full_name": "selinuxusermap_mod/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "selinuxusermap/1", + "topic_topic": "selinuxusermap/1" + }, + { + "name": "selinuxusermap_remove_host", + "doc": "Remove target hosts and hostgroups from an SELinux User Map rule.", + "attr_name": "remove_host", + "version": "1", "params": [ { + "type": "str", "cli_name": "name", - "label": "ID View Name", "name": "cn", - "type": "str" - }, - { - "cli_name": "desc", - "label": "Description", - "name": "description", - "required": false, - "type": "str" - }, - { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", - "required": false, - "type": "str" - }, - { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", - "required": false, - "type": "str" + "label": "Rule name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - } - ], - "topic_topic": "idviews/1", - "version": "1" - }, - { - "attr_name": "apply", - "doc": - "Applies ID View to specified hosts or current members of specified hostgroups. If any other ID View is applied to the host, it is overridden.", - "full_name": "idview_apply/1", - "name": "idview_apply", - "obj_class": "idview/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" - }, - { - "doc": "Hosts that this ID View was applied to.", - "name": "succeeded", - "type": "dict" }, { - "doc": - "Hosts or hostgroups that this ID View could not be applied to.", - "name": "failed", - "type": "dict" - }, - { - "doc": "Number of hosts the ID View was applied to:", - "name": "completed", - "type": "int" - } - ], - "params": [ - { - "cli_name": "name", - "label": "ID View Name", - "name": "cn", - "type": "str" + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { "cli_name": "hosts", - "doc": "Hosts to apply the ID View to", - "label": "hosts", - "multivalue": true, "name": "host", + "alwaysask": true, + "doc": "hosts to remove", "required": false, + "label": "member host", + "multivalue": true, "type": "str" }, { "cli_name": "hostgroups", - "doc": - "Hostgroups to whose hosts apply the ID View to. Please note that view is not applied automatically to any hosts added to the hostgroup after running the idview-apply command.", - "label": "hostgroups", - "multivalue": true, "name": "hostgroup", + "alwaysask": true, + "doc": "host groups to remove", "required": false, + "label": "member host group", + "multivalue": true, "type": "str" } ], - "topic_topic": "idviews/1", - "version": "1" - }, - { - "attr_name": "del", - "doc": "Delete an ID View.", - "full_name": "idview_del/1", - "name": "idview_del", - "obj_class": "idview/1", + "full_name": "selinuxusermap_remove_host/1", "output": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" - }, - { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "multivalue": true, - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "name", - "label": "ID View Name", - "multivalue": true, - "name": "cn", - "type": "str" + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" }, { - "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", - "name": "continue", - "positional": false, - "type": "bool" + "doc": "Number of members removed", + "type": "int", + "name": "completed" } ], - "topic_topic": "idviews/1", - "version": "1" + "obj_class": "selinuxusermap/1", + "topic_topic": "selinuxusermap/1" }, { - "attr_name": "find", - "doc": "Search for an ID View.", - "full_name": "idview_find/1", - "name": "idview_find", - "obj_class": "idview/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" - }, - { - "multivalue": true, - "name": "result", - "type": "dict" - }, - { - "doc": "Number of entries returned", - "name": "count", - "type": "int" - }, - { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" - } - ], + "name": "selinuxusermap_remove_user", + "doc": "Remove users and groups from an SELinux User Map rule.", + "attr_name": "remove_user", + "version": "1", "params": [ { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, - "required": false, - "type": "str" - }, - { + "type": "str", "cli_name": "name", - "label": "ID View Name", "name": "cn", - "required": false, - "type": "str" - }, - { - "cli_name": "desc", - "label": "Description", - "name": "description", - "required": false, - "type": "str" - }, - { - "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", - "required": false, - "type": "int" - }, - { - "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", - "required": false, - "type": "int" + "label": "Rule name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"name\")", - "label": "Primary key only", - "name": "pkey_only", - "required": false, + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - } - ], - "topic_topic": "idviews/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify an ID View.", - "full_name": "idview_mod/1", - "name": "idview_mod", - "obj_class": "idview/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" - }, - { - "name": "result", - "type": "dict" - }, - { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "name", - "label": "ID View Name", - "name": "cn", - "type": "str" }, { - "cli_name": "desc", - "label": "Description", - "name": "description", + "cli_name": "users", + "name": "user", + "alwaysask": true, + "doc": "users to remove", "required": false, - "type": "str" - }, - { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], + "label": "member user", "multivalue": true, - "name": "setattr", - "required": false, "type": "str" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", + "cli_name": "groups", + "name": "group", + "alwaysask": true, + "doc": "groups to remove", "required": false, - "type": "str" - }, - { - "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], + "label": "member group", "multivalue": true, - "name": "delattr", - "required": false, - "type": "str" - }, - { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" - }, - { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" - }, - { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - }, - { - "cli_name": "rename", - "doc": "Rename the ID View object", - "label": "Rename", - "name": "rename", - "required": false, "type": "str" } - ], - "topic_topic": "idviews/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display information about an ID View.", - "full_name": "idview_show/1", - "name": "idview_show", - "obj_class": "idview/1", + ], + "full_name": "selinuxusermap_remove_user/1", "output": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "name": "result", - "type": "dict" + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "Number of members removed", + "type": "int", + "name": "completed" } ], + "obj_class": "selinuxusermap/1", + "topic_topic": "selinuxusermap/1" + }, + { + "name": "selinuxusermap_show", + "doc": "Display the properties of a SELinux User Map rule.", + "attr_name": "show", + "version": "1", "params": [ { + "type": "str", "cli_name": "name", - "label": "ID View Name", "name": "cn", - "type": "str" + "label": "Rule name" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, - { - "cli_name": "show_hosts", - "default": ["False"], - "doc": "Enumerate all the hosts the view applies to.", - "name": "show_hosts", - "required": false, - "type": "bool" - }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "idviews/1", - "version": "1" - }, - { - "attr_name": "unapply", - "doc": - "Clears ID View from specified hosts or current members of specified hostgroups.", - "full_name": "idview_unapply/1", - "name": "idview_unapply", - "obj_class": "idview/1", + "full_name": "selinuxusermap_show/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "Hosts that ID View was cleared from.", - "name": "succeeded", - "type": "dict" - }, - { - "doc": - "Hosts or hostgroups that ID View could not be cleared from.", - "name": "failed", - "type": "dict" - }, - { - "doc": "Number of hosts that had a ID View was unset:", - "name": "completed", - "type": "int" - } - ], - "params": [ - { - "cli_name": "hosts", - "doc": "Hosts to clear (any) ID View from.", - "label": "hosts", - "multivalue": true, - "name": "host", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "cli_name": "hostgroups", - "doc": - "Hostgroups whose hosts should have ID Views cleared. Note that view is not cleared automatically from any host added to the hostgroup after running idview-unapply command.", - "label": "hostgroups", - "multivalue": true, - "name": "hostgroup", - "required": false, - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "topic_topic": "idviews/1", - "version": "1" + "obj_class": "selinuxusermap/1", + "topic_topic": "selinuxusermap/1" }, { - "doc": "Join an IPA domain", - "exclude": ["cli"], - "full_name": "join/1", - "name": "join", - "output": [], + "exclude": [ + "cli" + ], + "name": "server_conncheck", + "doc": "Check connection to remote IPA server.", + "attr_name": "conncheck", + "version": "1", "params": [ { - "cli_name": "hostname", - "default_from_param": [], - "doc": "The hostname to register as", + "doc": "IPA server hostname", + "label": "Server name", + "cli_name": "name", "name": "cn", "type": "str" }, { - "default_from_param": [], - "doc": "The IPA realm", - "name": "realm", - "positional": false, - "type": "str" - }, - { - "cli_name": "platform", - "doc": "Hardware platform of the host (e.g. Lenovo T61)", - "name": "nshardwareplatform", - "required": false, - "type": "str" - }, - { - "cli_name": "os", - "doc": "Operating System and version of the host (e.g. Fedora 9)", - "name": "nsosversion", - "required": false, + "doc": "Remote IPA server hostname", + "label": "Remote server name", + "cli_name": "remote_name", + "name": "remote_cn", "type": "str" } ], - "topic_topic": "join/1", - "version": "1" - }, - { - "doc": "\n Export plugin meta-data for the webUI.\n ", - "exclude": ["cli"], - "full_name": "json_metadata/1", - "name": "json_metadata", + "full_name": "server_conncheck/1", "output": [ { - "doc": "Dict of JSON encoded IPA Objects", - "name": "objects", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Dict of JSON encoded IPA Methods", - "name": "methods", - "type": "dict" + "doc": "True means the operation was successful", + "type": "bool", + "name": "result" }, { - "doc": "Dict of JSON encoded IPA Commands", - "name": "commands", - "type": "dict" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "server/1", + "topic_topic": "server/1" + }, + { + "name": "server_del", + "doc": "Delete IPA server.", + "attr_name": "del", + "version": "1", "params": [ { - "doc": "Name of object to export", - "name": "objname", - "positional": true, - "required": false, + "cli_name": "name", + "name": "cn", + "doc": "IPA server hostname", + "label": "Server name", + "multivalue": true, "type": "str" }, { - "doc": "Name of method to export", - "name": "methodname", - "positional": true, - "required": false, - "type": "str" + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", + "positional": false, + "type": "bool" }, { - "doc": "Name of object to export", - "name": "object", + "name": "ignore_topology_disconnect", + "default": [ + "False" + ], + "doc": "Ignore topology connectivity problems after removal", "required": false, - "type": "str" + "label": "Ignore topology errors", + "type": "bool" }, { - "doc": "Name of method to export", - "name": "method", + "name": "ignore_last_of_role", + "default": [ + "False" + ], + "doc": "Skip a check whether the last CA master or DNS server is removed", "required": false, - "type": "str" + "label": "Ignore check for last remaining CA or DNS server", + "type": "bool" }, { - "doc": "Name of command to export", - "name": "command", + "name": "force", + "default": [ + "False" + ], + "doc": "Force server removal even if it does not exist", "required": false, - "type": "str" + "label": "Force server removal", + "type": "bool" } ], - "topic_topic": "internal/1", - "version": "1" - }, - { - "exclude": ["cli"], - "full_name": "kra_is_enabled/1", - "name": "kra_is_enabled", + "full_name": "server_del/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "True means the operation was successful", - "name": "result", - "type": "bool" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "NoneType" + "type": "str", + "multivalue": true, + "name": "value" } ], - "params": [], - "topic_topic": "vault/1", - "version": "1" + "obj_class": "server/1", + "topic_topic": "server/1" }, { - "attr_name": "mod", - "doc": "Modify Kerberos ticket policy.", - "full_name": "krbtpolicy_mod/1", - "name": "krbtpolicy_mod", - "obj_class": "krbtpolicy/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" - }, - { - "name": "result", - "type": "dict" - }, - { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], + "name": "server_find", + "doc": "Search for IPA servers.", + "attr_name": "find", + "version": "1", "params": [ { - "cli_name": "user", - "doc": "Manage ticket policy for specific user", - "label": "User name", - "name": "uid", "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, - "type": "str" + "type": "str", + "name": "criteria" }, { - "cli_name": "maxlife", - "doc": "Maximum ticket life (seconds)", - "label": "Max life", - "name": "krbmaxticketlife", + "cli_name": "name", + "name": "cn", + "doc": "IPA server hostname", "required": false, - "type": "int" + "label": "Server name", + "type": "str" }, { - "cli_name": "maxrenew", - "doc": "Maximum renewable age (seconds)", - "label": "Max renew", - "name": "krbmaxrenewableage", + "cli_name": "minlevel", + "name": "ipamindomainlevel", + "doc": "Minimum domain level", "required": false, + "label": "Min domain level", "type": "int" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", + "cli_name": "maxlevel", + "name": "ipamaxdomainlevel", + "doc": "Maximum domain level", "required": false, - "type": "str" + "label": "Max domain level", + "type": "int" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", + "doc": "Time limit of search in seconds (0 is unlimited)", "required": false, - "type": "str" + "type": "int", + "name": "timelimit", + "label": "Time Limit" }, { - "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, - "name": "delattr", + "doc": "Maximum number of entries returned (0 is unlimited)", "required": false, - "type": "str" - }, - { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - } - ], - "topic_topic": "krbtpolicy/1", - "version": "1" - }, - { - "attr_name": "reset", - "doc": "Reset Kerberos ticket policy to the default values.", - "full_name": "krbtpolicy_reset/1", - "name": "krbtpolicy_reset", - "obj_class": "krbtpolicy/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" - }, - { - "name": "result", - "type": "dict" - }, - { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "user", - "doc": "Manage ticket policy for specific user", - "label": "User name", - "name": "uid", - "positional": true, - "required": false, - "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", + "name": "no_members", + "default": [ + "True" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui", + "cli" + ], "type": "bool" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"name\")", + "required": false, + "label": "Primary key only", "type": "bool" - } - ], - "topic_topic": "krbtpolicy/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display the current Kerberos ticket policy.", - "full_name": "krbtpolicy_show/1", - "name": "krbtpolicy_show", - "obj_class": "krbtpolicy/1", - "output": [ + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "cli_name": "topologysuffixes", + "name": "topologysuffix", + "doc": "Search for servers with these managed suffixes.", "required": false, + "label": "suffix", + "multivalue": true, "type": "str" }, { - "name": "result", - "type": "dict" - }, - { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "user", - "doc": "Manage ticket policy for specific user", - "label": "User name", - "name": "uid", - "positional": true, + "cli_name": "no_topologysuffixes", + "name": "no_topologysuffix", + "doc": "Search for servers without these managed suffixes.", "required": false, + "label": "suffix", + "multivalue": true, "type": "str" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "cli_name": "in_locations", + "name": "in_location", + "doc": "Search for servers with these ipa locations.", + "required": false, + "label": "location", + "multivalue": true, + "type": "DNSName" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "cli_name": "not_in_locations", + "name": "not_in_location", + "doc": "Search for servers without these ipa locations.", + "required": false, + "label": "location", + "multivalue": true, + "type": "DNSName" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "cli_name": "servroles", + "name": "servrole", + "doc": "Search for servers with these enabled roles.", + "required": false, + "label": "role", + "multivalue": true, + "type": "str" } ], - "topic_topic": "krbtpolicy/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Add a new IPA location.", - "full_name": "location_add/1", - "name": "location_add", - "obj_class": "location/1", + "full_name": "server_find/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "multivalue": true, + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "DNSName" + "doc": "Number of entries returned", + "type": "int", + "name": "count" + }, + { + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], + "obj_class": "server/1", + "topic_topic": "server/1" + }, + { + "name": "server_mod", + "doc": "Modify information about an IPA server.", + "attr_name": "mod", + "version": "1", "params": [ { + "doc": "IPA server hostname", + "label": "Server name", "cli_name": "name", - "doc": "IPA location name", - "label": "Location name", - "name": "idnsname", + "name": "cn", + "type": "str" + }, + { + "cli_name": "location", + "name": "ipalocation_location", + "doc": "Server location", + "required": false, + "label": "Location", "type": "DNSName" }, { - "doc": "IPA Location description", - "label": "Description", - "name": "description", + "cli_name": "service_weight", + "name": "ipaserviceweight", + "doc": "Weight for server services", "required": false, - "type": "str" + "label": "Service weight", + "type": "int" }, { "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" + }, + { + "cli_name": "delattr", + "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, + { + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" + }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - } - ], - "topic_topic": "location/1", - "version": "1" - }, - { - "attr_name": "del", - "doc": "Delete an IPA location.", - "full_name": "location_del/1", - "name": "location_del", - "obj_class": "location/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" - }, - { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" - }, - { - "multivalue": true, - "name": "value", - "type": "DNSName" - } - ], - "params": [ - { - "cli_name": "name", - "doc": "IPA location name", - "label": "Location name", - "multivalue": true, - "name": "idnsname", - "type": "DNSName" }, { - "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", - "name": "continue", + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "location/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for IPA locations.", - "full_name": "location_find/1", - "name": "location_find", - "obj_class": "location/1", + "full_name": "server_mod/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" - }, - { - "multivalue": true, - "name": "result", - "type": "dict" + "type": "str", + "name": "summary" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "type": "dict", + "name": "result" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "server/1", + "topic_topic": "server/1" + }, + { + "name": "server_role_find", + "doc": "Find a server role on a server(s)", + "attr_name": "find", + "version": "1", "params": [ { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, + "positional": true, + "doc": "A string searched in all relevant object attributes", + "required": false, + "type": "str", + "name": "criteria" + }, + { + "cli_name": "server", + "name": "server_server", + "doc": "IPA server hostname", "required": false, + "label": "Server name", "type": "str" }, { - "cli_name": "name", - "doc": "IPA location name", - "label": "Location name", - "name": "idnsname", + "cli_name": "role", + "name": "role_servrole", + "doc": "IPA server role name", "required": false, - "type": "DNSName" + "label": "Role name", + "type": "str" }, { - "doc": "IPA Location description", - "label": "Description", - "name": "description", + "cli_name": "status", + "name": "status", + "cli_metavar": "['enabled', 'configured', 'hidden', 'absent']", + "alwaysask": true, + "default": [ + "enabled" + ], + "doc": "Status of the role", "required": false, + "label": "Role status", "type": "str" }, { "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", "required": false, - "type": "int" + "type": "int", + "name": "timelimit", + "label": "Time Limit" }, { "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", "required": false, - "type": "int" + "type": "int", + "name": "sizelimit", + "label": "Size Limit" + }, + { + "positional": false, + "default": [ + "False" + ], + "type": "bool", + "name": "include_master", + "doc": "Include IPA master entries" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, - "type": "bool" - }, - { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"name\")", - "label": "Primary key only", - "name": "pkey_only", - "required": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "location/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify information about an IPA location.", - "full_name": "location_mod/1", - "name": "location_mod", - "obj_class": "location/1", + "full_name": "server_role_find/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "multivalue": true, + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "DNSName" + "doc": "Number of entries returned", + "type": "int", + "name": "count" + }, + { + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], + "obj_class": "server_role/1", + "topic_topic": "serverrole/1" + }, + { + "name": "server_role_show", + "doc": "Show role status on a server", + "attr_name": "show", + "version": "1", "params": [ { - "cli_name": "name", - "doc": "IPA location name", - "label": "Location name", - "name": "idnsname", - "type": "DNSName" - }, - { - "doc": "IPA Location description", - "label": "Description", - "name": "description", - "required": false, - "type": "str" - }, - { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", - "required": false, - "type": "str" - }, - { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", - "required": false, - "type": "str" - }, - { - "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, - "name": "delattr", - "required": false, + "doc": "IPA server hostname", + "label": "Server name", + "cli_name": "server", + "name": "server_server", "type": "str" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "type": "str", + "doc": "IPA server role name", + "cli_name": "role", + "name": "role_servrole", + "label": "Role name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "location/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display information about an IPA location.", - "full_name": "location_show/1", - "name": "location_show", - "obj_class": "location/1", + "full_name": "server_role_show/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" - }, - { - "name": "result", - "type": "dict" + "type": "str", + "name": "summary" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "DNSName" + "type": "dict", + "name": "result" }, { - "doc": "Servers in location", - "name": "servers", - "type": "dict" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "NoneType", + "name": "value" } ], + "obj_class": "server_role/1", + "topic_topic": "serverrole/1" + }, + { + "name": "server_show", + "doc": "Show IPA server.", + "attr_name": "show", + "version": "1", "params": [ { + "doc": "IPA server hostname", + "label": "Server name", "cli_name": "name", - "doc": "IPA location name", - "label": "Location name", - "name": "idnsname", - "type": "DNSName" + "name": "cn", + "type": "str" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "location/1", - "version": "1" - }, - { - "doc": "Migrate users and groups from DS to IPA.", - "full_name": "migrate_ds/1", - "name": "migrate_ds", + "full_name": "server_show/1", "output": [ { - "doc": "Lists of objects migrated; categorized by type.", - "name": "result", - "type": "dict" - }, - { - "doc": - "Lists of objects that could not be migrated; categorized by type.", - "name": "failed", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "False if migration mode was disabled.", - "name": "enabled", - "type": "bool" + "type": "dict", + "name": "result" }, { - "doc": - "False if migration fails because the compatibility plug-in is enabled.", - "name": "compat", - "type": "bool" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "server/1", + "topic_topic": "server/1" + }, + { + "name": "server_state", + "doc": "Set enabled/hidden state of a server.", + "attr_name": "state", + "version": "1", "params": [ { - "cli_name": "ldap_uri", - "doc": "LDAP URI of DS server to migrate from", - "label": "LDAP URI", - "name": "ldapuri", + "doc": "IPA server hostname", + "label": "Server name", + "cli_name": "name", + "name": "cn", "type": "str" }, { - "cli_name": "password", - "confirm": false, - "doc": "bind password", - "label": "Password", - "name": "bindpw", - "sensitive": true, + "name": "state", + "cli_metavar": "['enabled', 'hidden']", + "doc": "Server state", + "label": "State", + "positional": false, "type": "str" - }, + } + ], + "full_name": "server_state/1", + "output": [ { - "cli_name": "bind_dn", - "default": ["cn=directory manager"], - "label": "Bind DN", - "name": "binddn", + "doc": "User-friendly description of action performed", "required": false, - "type": "DN" + "type": "str", + "name": "summary" }, { - "cli_name": "user_container", - "default": ["ou=people"], - "doc": "DN of container for users in DS relative to base DN", - "label": "User container", - "name": "usercontainer", - "positional": false, - "type": "DN" + "doc": "True means the operation was successful", + "type": "bool", + "name": "result" }, { - "cli_name": "group_container", - "default": ["ou=groups"], - "doc": "DN of container for groups in DS relative to base DN", - "label": "Group container", - "name": "groupcontainer", - "positional": false, - "type": "DN" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "server/1", + "topic_topic": "server/1" + }, + { + "name": "service_add", + "doc": "Add a new IPA service.", + "attr_name": "add", + "version": "1", + "params": [ + { + "cli_name": "canonical_principal", + "name": "krbcanonicalname", + "doc": "Service principal", + "label": "Principal name", + "type": "Principal", + "no_convert": true }, { - "cli_name": "user_objectclass", - "default": ["person"], - "doc": "Objectclasses used to search for user entries in DS", - "label": "User object class", + "cli_name": "certificate", + "name": "usercertificate", + "doc": "Base-64 encoded service certificate", + "required": false, + "label": "Certificate", "multivalue": true, - "name": "userobjectclass", - "positional": false, - "type": "str" + "type": "Certificate" }, { - "cli_name": "group_objectclass", - "default": ["groupOfUniqueNames", "groupOfNames"], - "doc": "Objectclasses used to search for group entries in DS", - "label": "Group object class", + "cli_name": "pac_type", + "name": "ipakrbauthzdata", + "cli_metavar": "['MS-PAC', 'PAD', 'NONE']", + "doc": "Override default list of supported PAC types. Use 'NONE' to disable PAC support for this service, e.g. this might be necessary for NFS services.", + "required": false, + "label": "PAC type", "multivalue": true, - "name": "groupobjectclass", - "positional": false, "type": "str" }, { - "cli_name": "user_ignore_objectclass", - "default": [], - "doc": "Objectclasses to be ignored for user entries in DS", - "label": "Ignore user object class", - "multivalue": true, - "name": "userignoreobjectclass", + "cli_name": "auth_ind", + "name": "krbprincipalauthind", + "doc": "Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations.", "required": false, + "label": "Authentication Indicators", + "multivalue": true, "type": "str" }, { - "cli_name": "user_ignore_attribute", - "default": [], - "doc": "Attributes to be ignored for user entries in DS", - "label": "Ignore user attribute", - "multivalue": true, - "name": "userignoreattribute", + "cli_name": "requires_pre_auth", + "name": "ipakrbrequirespreauth", + "doc": "Pre-authentication is required for the service", "required": false, - "type": "str" + "label": "Requires pre-authentication", + "type": "bool" }, { - "cli_name": "group_ignore_objectclass", - "default": [], - "doc": "Objectclasses to be ignored for group entries in DS", - "label": "Ignore group object class", - "multivalue": true, - "name": "groupignoreobjectclass", + "cli_name": "ok_as_delegate", + "name": "ipakrbokasdelegate", + "doc": "Client credentials may be delegated to the service", "required": false, - "type": "str" + "label": "Trusted for delegation", + "type": "bool" }, { - "cli_name": "group_ignore_attribute", - "default": [], - "doc": "Attributes to be ignored for group entries in DS", - "label": "Ignore group attribute", + "cli_name": "ok_to_auth_as_delegate", + "name": "ipakrboktoauthasdelegate", + "doc": "The service is allowed to authenticate on behalf of a client", + "required": false, + "label": "Trusted to authenticate as user", + "type": "bool" + }, + { + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", + "required": false, "multivalue": true, - "name": "groupignoreattribute", + "exclude": [ + "webui" + ], + "type": "str" + }, + { + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "group_overwrite_gid", - "default": ["False"], - "doc": - "When migrating a group already existing in IPA domain overwrite the group GID and report as success", - "label": "Overwrite GID", - "name": "groupoverwritegid", + "name": "force", + "default": [ + "False" + ], + "doc": "force principal name even if not in DNS", + "label": "Force", "positional": false, "type": "bool" }, { - "cli_metavar": "['RFC2307bis', 'RFC2307']", - "cli_name": "schema", - "default": ["RFC2307bis"], - "doc": - "The schema used on the LDAP server. Supported values are RFC2307 and RFC2307bis. The default is RFC2307bis", - "label": "LDAP schema", - "name": "schema", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "default": ["False"], - "doc": - "Continuous operation mode. Errors are reported but the process continues", - "label": "Continue", - "name": "continue", - "required": false, + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "cli_name": "base_dn", - "doc": "Base DN on remote LDAP server", - "label": "Base DN", - "name": "basedn", + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "service_add/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "DN" + "type": "str", + "name": "summary" }, { - "cli_name": "with_compat", - "default": ["False"], - "doc": "Allows migration despite the usage of compat plugin", - "label": "Ignore compat plugin", - "name": "compat", - "required": false, - "type": "bool" + "type": "dict", + "name": "result" }, { - "cli_name": "ca_cert_file", - "doc": "Load CA certificate of LDAP server from FILE", - "label": "CA certificate", - "name": "cacertfile", - "required": false, - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "Principal", + "name": "value" + } + ], + "obj_class": "service/1", + "topic_topic": "service/1" + }, + { + "name": "service_add_cert", + "doc": "Add new certificates to a service", + "attr_name": "add_cert", + "version": "1", + "params": [ + { + "cli_name": "canonical_principal", + "name": "krbcanonicalname", + "doc": "Service principal", + "label": "Principal name", + "type": "Principal", + "no_convert": true }, { - "cli_name": "use_default_group", - "default": ["True"], - "doc": - "Add migrated users without a group to a default group (default: true)", - "label": "Add to default group", - "name": "use_def_group", - "required": false, + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "cli_metavar": "['base', 'subtree', 'onelevel']", - "cli_name": "scope", - "default": ["onelevel"], - "doc": - "LDAP search scope for users and groups: base, onelevel, or subtree. Defaults to onelevel", - "label": "Search scope", - "name": "scope", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, - "type": "str" + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "exclude_groups", - "default": [], - "doc": "groups to exclude from migration", - "multivalue": true, - "name": "exclude_groups", - "required": false, - "type": "str" + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "exclude_users", - "default": [], - "doc": "users to exclude from migration", + "cli_name": "certificate", + "name": "usercertificate", + "alwaysask": true, + "doc": "Base-64 encoded service certificate", + "label": "Certificate", + "positional": false, "multivalue": true, - "name": "exclude_users", - "required": false, - "type": "str" + "type": "Certificate" } ], - "topic_topic": "migration/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Add a new netgroup.", - "full_name": "netgroup_add/1", - "name": "netgroup_add", - "obj_class": "netgroup/1", + "full_name": "service_add_cert/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "Principal", + "name": "value" } ], + "obj_class": "service/1", + "topic_topic": "service/1" + }, + { + "name": "service_add_host", + "doc": "Add hosts that can manage this service.", + "attr_name": "add_host", + "version": "1", "params": [ { - "cli_name": "name", - "label": "Netgroup name", - "name": "cn", - "no_convert": true, - "type": "str" + "cli_name": "canonical_principal", + "name": "krbcanonicalname", + "doc": "Service principal", + "label": "Principal name", + "type": "Principal", + "no_convert": true }, { - "cli_name": "desc", - "doc": "Netgroup description", - "label": "Description", - "name": "description", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "nisdomain", - "label": "NIS domain name", - "name": "nisdomainname", - "required": false, - "type": "str" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_metavar": "['all']", - "cli_name": "usercat", - "doc": "User category the rule applies to", - "label": "User category", - "name": "usercategory", - "required": false, - "type": "str" + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_metavar": "['all']", - "cli_name": "hostcat", - "doc": "Host category the rule applies to", - "label": "Host category", - "name": "hostcategory", + "cli_name": "hosts", + "name": "host", + "alwaysask": true, + "doc": "hosts to add", "required": false, + "label": "member host", + "multivalue": true, "type": "str" + } + ], + "full_name": "service_add_host/1", + "output": [ + { + "type": "dict", + "name": "result" }, { - "exclude": ["cli", "webui"], - "label": "External host", - "multivalue": true, - "name": "externalhost", - "required": false, - "type": "str" + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", - "required": false, - "type": "str" + "doc": "Number of members added", + "type": "int", + "name": "completed" + } + ], + "obj_class": "service/1", + "topic_topic": "service/1" + }, + { + "name": "service_add_principal", + "doc": "Add new principal alias to a service", + "attr_name": "add_principal", + "version": "1", + "params": [ + { + "cli_name": "canonical_principal", + "name": "krbcanonicalname", + "doc": "Service principal", + "label": "Principal name", + "type": "Principal", + "no_convert": true }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], + "cli_name": "principal", + "name": "krbprincipalname", + "alwaysask": true, + "doc": "Service principal alias", + "label": "Principal alias", "multivalue": true, - "name": "addattr", - "required": false, - "type": "str" + "type": "Principal", + "no_convert": true }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "netgroup/1", - "version": "1" - }, - { - "attr_name": "add_member", - "doc": "Add members to a netgroup.", - "full_name": "netgroup_add_member/1", - "name": "netgroup_add_member", - "obj_class": "netgroup/1", + "full_name": "service_add_principal/1", "output": [ { - "name": "result", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": "Number of members added", - "name": "completed", - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "Principal", + "name": "value" } ], + "obj_class": "service/1", + "topic_topic": "service/1" + }, + { + "name": "service_allow_create_keytab", + "doc": "Allow users, groups, hosts or host groups to create a keytab of this service.", + "attr_name": "allow_create_keytab", + "version": "1", "params": [ { - "cli_name": "name", - "label": "Netgroup name", - "name": "cn", - "no_convert": true, - "type": "str" + "cli_name": "canonical_principal", + "name": "krbcanonicalname", + "doc": "Service principal", + "label": "Principal name", + "type": "Principal", + "no_convert": true }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "alwaysask": true, "cli_name": "users", + "name": "user", + "alwaysask": true, "doc": "users to add", + "required": false, "label": "member user", "multivalue": true, - "name": "user", - "required": false, "type": "str" }, { - "alwaysask": true, "cli_name": "groups", + "name": "group", + "alwaysask": true, "doc": "groups to add", + "required": false, "label": "member group", "multivalue": true, - "name": "group", - "required": false, "type": "str" }, { - "alwaysask": true, "cli_name": "hosts", + "name": "host", + "alwaysask": true, "doc": "hosts to add", + "required": false, "label": "member host", "multivalue": true, - "name": "host", - "required": false, "type": "str" }, { - "alwaysask": true, "cli_name": "hostgroups", - "doc": "host groups to add", - "label": "member host group", - "multivalue": true, "name": "hostgroup", - "required": false, - "type": "str" - }, - { "alwaysask": true, - "cli_name": "netgroups", - "doc": "netgroups to add", - "label": "member netgroup", - "multivalue": true, - "name": "netgroup", + "doc": "host groups to add", "required": false, + "label": "member host group", + "multivalue": true, "type": "str" } ], - "topic_topic": "netgroup/1", - "version": "1" - }, - { - "attr_name": "del", - "doc": "Delete a netgroup.", - "full_name": "netgroup_del/1", - "name": "netgroup_del", - "obj_class": "netgroup/1", + "full_name": "service_allow_create_keytab/1", "output": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" - }, - { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "multivalue": true, - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "name", - "label": "Netgroup name", - "multivalue": true, - "name": "cn", - "no_convert": true, - "type": "str" + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" }, { - "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", - "name": "continue", - "positional": false, - "type": "bool" + "doc": "Number of members added", + "type": "int", + "name": "completed" } ], - "topic_topic": "netgroup/1", - "version": "1" + "obj_class": "service/1", + "topic_topic": "service/1" }, { - "attr_name": "find", - "doc": "Search for a netgroup.", - "full_name": "netgroup_find/1", - "name": "netgroup_find", - "obj_class": "netgroup/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" - }, - { - "multivalue": true, - "name": "result", - "type": "dict" - }, - { - "doc": "Number of entries returned", - "name": "count", - "type": "int" - }, - { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" - } - ], + "name": "service_allow_retrieve_keytab", + "doc": "Allow users, groups, hosts or host groups to retrieve a keytab of this service.", + "attr_name": "allow_retrieve_keytab", + "version": "1", "params": [ { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, - "required": false, - "type": "str" - }, - { - "cli_name": "name", - "label": "Netgroup name", - "name": "cn", - "no_convert": true, - "required": false, - "type": "str" - }, - { - "cli_name": "desc", - "doc": "Netgroup description", - "label": "Description", - "name": "description", - "required": false, - "type": "str" - }, - { - "cli_name": "nisdomain", - "label": "NIS domain name", - "name": "nisdomainname", - "required": false, - "type": "str" - }, - { - "cli_name": "uuid", - "doc": "IPA unique ID", - "label": "IPA unique ID", - "name": "ipauniqueid", - "required": false, - "type": "str" - }, - { - "cli_metavar": "['all']", - "cli_name": "usercat", - "doc": "User category the rule applies to", - "label": "User category", - "name": "usercategory", - "required": false, - "type": "str" - }, - { - "cli_metavar": "['all']", - "cli_name": "hostcat", - "doc": "Host category the rule applies to", - "label": "Host category", - "name": "hostcategory", - "required": false, - "type": "str" - }, - { - "exclude": ["cli", "webui"], - "label": "External host", - "multivalue": true, - "name": "externalhost", - "required": false, - "type": "str" - }, - { - "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", - "required": false, - "type": "int" - }, - { - "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", - "required": false, - "type": "int" - }, - { - "default": ["False"], - "exclude": ["webui", "cli"], - "name": "private", - "positional": false, - "type": "bool" - }, - { - "cli_name": "managed", - "default": ["False"], - "default_from_param": ["private"], - "doc": "search for managed groups", - "name": "managed", - "positional": false, - "type": "bool" + "cli_name": "canonical_principal", + "name": "krbcanonicalname", + "doc": "Service principal", + "label": "Principal name", + "type": "Principal", + "no_convert": true }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["True"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui", "cli"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"name\")", - "label": "Primary key only", - "name": "pkey_only", - "required": false, - "type": "bool" - }, - { - "cli_name": "netgroups", - "doc": "Search for netgroups with these member netgroups.", - "label": "netgroup", - "multivalue": true, - "name": "netgroup", - "no_convert": true, - "required": false, - "type": "str" - }, - { - "cli_name": "no_netgroups", - "doc": "Search for netgroups without these member netgroups.", - "label": "netgroup", - "multivalue": true, - "name": "no_netgroup", - "no_convert": true, - "required": false, - "type": "str" - }, - { - "alwaysask": true, "cli_name": "users", - "default_from_param": ["givenname", "sn"], - "doc": "Search for netgroups with these member users.", - "label": "user", - "multivalue": true, "name": "user", - "no_convert": true, - "required": false, - "type": "str" - }, - { "alwaysask": true, - "cli_name": "no_users", - "default_from_param": ["givenname", "sn"], - "doc": "Search for netgroups without these member users.", - "label": "user", - "multivalue": true, - "name": "no_user", - "no_convert": true, + "doc": "users to add", "required": false, + "label": "member user", + "multivalue": true, "type": "str" }, { "cli_name": "groups", - "doc": "Search for netgroups with these member groups.", - "label": "group", - "multivalue": true, "name": "group", - "no_convert": true, + "alwaysask": true, + "doc": "groups to add", "required": false, - "type": "str" - }, - { - "cli_name": "no_groups", - "doc": "Search for netgroups without these member groups.", - "label": "group", + "label": "member group", "multivalue": true, - "name": "no_group", - "no_convert": true, - "required": false, "type": "str" }, { "cli_name": "hosts", - "doc": "Search for netgroups with these member hosts.", - "label": "host", - "multivalue": true, "name": "host", - "no_convert": true, + "alwaysask": true, + "doc": "hosts to add", "required": false, - "type": "str" - }, - { - "cli_name": "no_hosts", - "doc": "Search for netgroups without these member hosts.", - "label": "host", + "label": "member host", "multivalue": true, - "name": "no_host", - "no_convert": true, - "required": false, "type": "str" }, { "cli_name": "hostgroups", - "doc": "Search for netgroups with these member host groups.", - "label": "host group", - "multivalue": true, "name": "hostgroup", - "no_convert": true, - "required": false, - "type": "str" - }, - { - "cli_name": "no_hostgroups", - "doc": "Search for netgroups without these member host groups.", - "label": "host group", - "multivalue": true, - "name": "no_hostgroup", - "no_convert": true, - "required": false, - "type": "str" - }, - { - "cli_name": "in_netgroups", - "doc": "Search for netgroups with these member of netgroups.", - "label": "netgroup", - "multivalue": true, - "name": "in_netgroup", - "no_convert": true, + "alwaysask": true, + "doc": "host groups to add", "required": false, - "type": "str" - }, - { - "cli_name": "not_in_netgroups", - "doc": "Search for netgroups without these member of netgroups.", - "label": "netgroup", + "label": "member host group", "multivalue": true, - "name": "not_in_netgroup", - "no_convert": true, - "required": false, "type": "str" } ], - "topic_topic": "netgroup/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify a netgroup.", - "full_name": "netgroup_mod/1", - "name": "netgroup_mod", - "obj_class": "netgroup/1", + "full_name": "service_allow_retrieve_keytab/1", "output": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "name": "result", - "type": "dict" + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "Number of members added", + "type": "int", + "name": "completed" } ], + "obj_class": "service/1", + "topic_topic": "service/1" + }, + { + "name": "service_del", + "doc": "Delete an IPA service.", + "attr_name": "del", + "version": "1", "params": [ { - "cli_name": "name", - "label": "Netgroup name", - "name": "cn", - "no_convert": true, - "type": "str" - }, - { - "cli_name": "desc", - "doc": "Netgroup description", - "label": "Description", - "name": "description", - "required": false, - "type": "str" - }, - { - "cli_name": "nisdomain", - "label": "NIS domain name", - "name": "nisdomainname", - "required": false, - "type": "str" - }, - { - "cli_metavar": "['all']", - "cli_name": "usercat", - "doc": "User category the rule applies to", - "label": "User category", - "name": "usercategory", - "required": false, - "type": "str" - }, - { - "cli_metavar": "['all']", - "cli_name": "hostcat", - "doc": "Host category the rule applies to", - "label": "Host category", - "name": "hostcategory", - "required": false, - "type": "str" - }, - { - "exclude": ["cli", "webui"], - "label": "External host", - "multivalue": true, - "name": "externalhost", - "required": false, - "type": "str" - }, - { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", - "required": false, - "type": "str" - }, - { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", - "required": false, - "type": "str" - }, - { - "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], + "cli_name": "canonical_principal", + "name": "krbcanonicalname", + "doc": "Service principal", + "label": "Principal name", "multivalue": true, - "name": "delattr", - "required": false, - "type": "str" + "type": "Principal", + "no_convert": true }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", "positional": false, "type": "bool" - }, + } + ], + "full_name": "service_del/1", + "output": [ { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "type": "Principal", + "multivalue": true, + "name": "value" } ], - "topic_topic": "netgroup/1", - "version": "1" + "obj_class": "service/1", + "topic_topic": "service/1" }, { - "attr_name": "remove_member", - "doc": "Remove members from a netgroup.", - "full_name": "netgroup_remove_member/1", - "name": "netgroup_remove_member", - "obj_class": "netgroup/1", + "name": "service_disable", + "doc": "Disable the Kerberos key and SSL certificate of a service.", + "attr_name": "disable", + "version": "1", + "params": [ + { + "cli_name": "canonical_principal", + "name": "krbcanonicalname", + "doc": "Service principal", + "label": "Principal name", + "type": "Principal", + "no_convert": true + } + ], + "full_name": "service_disable/1", "output": [ { - "name": "result", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" + "doc": "True means the operation was successful", + "type": "bool", + "name": "result" }, { - "doc": "Number of members removed", - "name": "completed", - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "Principal", + "name": "value" } ], + "obj_class": "service/1", + "topic_topic": "service/1" + }, + { + "name": "service_disallow_create_keytab", + "doc": "Disallow users, groups, hosts or host groups to create a keytab of this service.", + "attr_name": "disallow_create_keytab", + "version": "1", "params": [ { - "cli_name": "name", - "label": "Netgroup name", - "name": "cn", - "no_convert": true, - "type": "str" + "cli_name": "canonical_principal", + "name": "krbcanonicalname", + "doc": "Service principal", + "label": "Principal name", + "type": "Principal", + "no_convert": true }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "alwaysask": true, "cli_name": "users", + "name": "user", + "alwaysask": true, "doc": "users to remove", + "required": false, "label": "member user", "multivalue": true, - "name": "user", - "required": false, "type": "str" }, { - "alwaysask": true, "cli_name": "groups", + "name": "group", + "alwaysask": true, "doc": "groups to remove", + "required": false, "label": "member group", "multivalue": true, - "name": "group", - "required": false, "type": "str" }, { - "alwaysask": true, "cli_name": "hosts", + "name": "host", + "alwaysask": true, "doc": "hosts to remove", + "required": false, "label": "member host", "multivalue": true, - "name": "host", - "required": false, "type": "str" }, { - "alwaysask": true, "cli_name": "hostgroups", - "doc": "host groups to remove", - "label": "member host group", - "multivalue": true, "name": "hostgroup", - "required": false, - "type": "str" - }, - { "alwaysask": true, - "cli_name": "netgroups", - "doc": "netgroups to remove", - "label": "member netgroup", - "multivalue": true, - "name": "netgroup", + "doc": "host groups to remove", "required": false, + "label": "member host group", + "multivalue": true, "type": "str" } ], - "topic_topic": "netgroup/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display information about a netgroup.", - "full_name": "netgroup_show/1", - "name": "netgroup_show", - "obj_class": "netgroup/1", + "full_name": "service_disallow_create_keytab/1", "output": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "name": "result", - "type": "dict" + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "Number of members removed", + "type": "int", + "name": "completed" } ], + "obj_class": "service/1", + "topic_topic": "service/1" + }, + { + "name": "service_disallow_retrieve_keytab", + "doc": "Disallow users, groups, hosts or host groups to retrieve a keytab of this service.", + "attr_name": "disallow_retrieve_keytab", + "version": "1", "params": [ { - "cli_name": "name", - "label": "Netgroup name", - "name": "cn", - "no_convert": true, - "type": "str" - }, - { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "cli_name": "canonical_principal", + "name": "krbcanonicalname", + "doc": "Service principal", + "label": "Principal name", + "type": "Principal", + "no_convert": true }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - } - ], - "topic_topic": "netgroup/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify OTP configuration options.", - "full_name": "otpconfig_mod/1", - "name": "otpconfig_mod", - "obj_class": "otpconfig/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" - }, - { - "name": "result", - "type": "dict" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "NoneType" - } - ], - "params": [ - { - "cli_name": "totp_auth_window", - "doc": "TOTP authentication time variance (seconds)", - "label": "TOTP authentication Window", - "name": "ipatokentotpauthwindow", - "required": false, - "type": "int" - }, - { - "cli_name": "totp_sync_window", - "doc": "TOTP synchronization time variance (seconds)", - "label": "TOTP Synchronization Window", - "name": "ipatokentotpsyncwindow", - "required": false, - "type": "int" - }, - { - "cli_name": "hotp_auth_window", - "doc": "HOTP authentication skip-ahead", - "label": "HOTP Authentication Window", - "name": "ipatokenhotpauthwindow", - "required": false, - "type": "int" - }, - { - "cli_name": "hotp_sync_window", - "doc": "HOTP synchronization skip-ahead", - "label": "HOTP Synchronization Window", - "name": "ipatokenhotpsyncwindow", + "cli_name": "users", + "name": "user", + "alwaysask": true, + "doc": "users to remove", "required": false, - "type": "int" - }, - { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], + "label": "member user", "multivalue": true, - "name": "setattr", - "required": false, "type": "str" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", + "cli_name": "groups", + "name": "group", + "alwaysask": true, + "doc": "groups to remove", "required": false, + "label": "member group", + "multivalue": true, "type": "str" }, { - "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, - "name": "delattr", + "cli_name": "hosts", + "name": "host", + "alwaysask": true, + "doc": "hosts to remove", "required": false, + "label": "member host", + "multivalue": true, "type": "str" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" - }, - { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" - }, - { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "otpconfig/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Show the current OTP configuration.", - "full_name": "otpconfig_show/1", - "name": "otpconfig_show", - "obj_class": "otpconfig/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", + "cli_name": "hostgroups", + "name": "hostgroup", + "alwaysask": true, + "doc": "host groups to remove", "required": false, + "label": "member host group", + "multivalue": true, "type": "str" - }, - { - "name": "result", - "type": "dict" - }, - { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "NoneType" } ], - "params": [ + "full_name": "service_disallow_retrieve_keytab/1", + "output": [ { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "type": "dict", + "name": "result" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "doc": "Number of members removed", + "type": "int", + "name": "completed" } ], - "topic_topic": "otpconfig/1", - "version": "1" + "obj_class": "service/1", + "topic_topic": "service/1" }, { - "attr_name": "add", - "doc": "Add a new OTP token.", - "full_name": "otptoken_add/1", - "name": "otptoken_add", - "obj_class": "otptoken/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" - }, - { - "name": "result", - "type": "dict" - }, - { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], + "name": "service_find", + "doc": "Search for IPA services.", + "attr_name": "find", + "version": "1", "params": [ { - "cli_name": "id", - "label": "Unique ID", - "name": "ipatokenuniqueid", "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, - "type": "str" - }, - { - "cli_metavar": "['totp', 'hotp', 'TOTP', 'HOTP']", - "default": ["totp"], - "doc": "Type of the token", - "label": "Type", - "name": "type", - "required": false, - "type": "str" - }, - { - "cli_name": "desc", - "doc": "Token description (informational only)", - "label": "Description", - "name": "description", - "required": false, - "type": "str" - }, - { - "cli_name": "owner", - "doc": "Assigned user of the token (default: self)", - "label": "Owner", - "name": "ipatokenowner", - "required": false, - "type": "str" - }, - { - "cli_name": "disabled", - "doc": "Mark the token as disabled (default: false)", - "label": "Disabled", - "name": "ipatokendisabled", - "required": false, - "type": "bool" - }, - { - "cli_name": "not_before", - "doc": "First date/time the token can be used", - "label": "Validity start", - "name": "ipatokennotbefore", - "required": false, - "type": "datetime" - }, - { - "cli_name": "not_after", - "doc": "Last date/time the token can be used", - "label": "Validity end", - "name": "ipatokennotafter", - "required": false, - "type": "datetime" - }, - { - "cli_name": "vendor", - "doc": "Token vendor name (informational only)", - "label": "Vendor", - "name": "ipatokenvendor", - "required": false, - "type": "str" - }, - { - "cli_name": "model", - "doc": "Token model (informational only)", - "label": "Model", - "name": "ipatokenmodel", - "required": false, - "type": "str" + "type": "str", + "name": "criteria" }, { - "cli_name": "serial", - "doc": "Token serial (informational only)", - "label": "Serial", - "name": "ipatokenserial", + "cli_name": "canonical_principal", + "name": "krbcanonicalname", + "doc": "Service principal", "required": false, - "type": "str" + "label": "Principal name", + "type": "Principal", + "no_convert": true }, { - "cli_name": "key", - "default_from_param": [], - "doc": "Token secret (Base32; default: random)", - "label": "Key", - "name": "ipatokenotpkey", - "no_convert": true, + "cli_name": "principal", + "name": "krbprincipalname", + "doc": "Service principal alias", "required": false, - "sensitive": true, - "type": "bytes" + "label": "Principal alias", + "multivalue": true, + "type": "Principal", + "no_convert": true }, { - "cli_metavar": "['sha1', 'sha256', 'sha384', 'sha512']", - "cli_name": "algo", - "default": ["sha1"], - "doc": "Token hash algorithm", - "label": "Algorithm", - "name": "ipatokenotpalgorithm", + "cli_name": "pac_type", + "name": "ipakrbauthzdata", + "cli_metavar": "['MS-PAC', 'PAD', 'NONE']", + "doc": "Override default list of supported PAC types. Use 'NONE' to disable PAC support for this service, e.g. this might be necessary for NFS services.", "required": false, + "label": "PAC type", + "multivalue": true, "type": "str" }, { - "cli_metavar": "['6', '8']", - "cli_name": "digits", - "default": ["6"], - "doc": "Number of digits each token code will have", - "label": "Digits", - "name": "ipatokenotpdigits", - "required": false, - "type": "int" - }, - { - "cli_name": "offset", - "default": ["0"], - "doc": "TOTP token / FreeIPA server time difference", - "label": "Clock offset", - "name": "ipatokentotpclockoffset", - "required": false, - "type": "int" - }, - { - "cli_name": "interval", - "default": ["30"], - "doc": "Length of TOTP token code validity", - "label": "Clock interval", - "name": "ipatokentotptimestep", - "required": false, - "type": "int" - }, - { - "cli_name": "counter", - "default": ["0"], - "doc": "Initial counter for the HOTP token", - "label": "Counter", - "name": "ipatokenhotpcounter", + "cli_name": "auth_ind", + "name": "krbprincipalauthind", + "doc": "Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations.", "required": false, - "type": "int" - }, - { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], + "label": "Authentication Indicators", "multivalue": true, - "name": "setattr", - "required": false, "type": "str" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", + "doc": "Time limit of search in seconds (0 is unlimited)", "required": false, - "type": "str" + "type": "int", + "name": "timelimit", + "label": "Time Limit" }, { - "default": ["False"], - "exclude": ["cli", "webui"], - "label": "(deprecated)", - "name": "qrcode", + "doc": "Maximum number of entries returned (0 is unlimited)", "required": false, - "type": "bool" - }, - { - "default": ["False"], - "label": "Do not display QR code", - "name": "no_qrcode", - "positional": false, - "type": "bool" + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "otptoken/1", - "version": "1" - }, - { - "attr_name": "add_managedby", - "doc": "Add users that can manage this token.", - "full_name": "otptoken_add_managedby/1", - "name": "otptoken_add_managedby", - "obj_class": "otptoken/1", - "output": [ - { - "name": "result", - "type": "dict" - }, - { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" - }, - { - "doc": "Number of members added", - "name": "completed", - "type": "int" - } - ], - "params": [ - { - "cli_name": "id", - "label": "Unique ID", - "name": "ipatokenuniqueid", - "type": "str" - }, - { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" - }, - { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - }, - { - "default": ["False"], + "default": [ + "True" + ], "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", "positional": false, + "exclude": [ + "webui", + "cli" + ], "type": "bool" }, { - "alwaysask": true, - "cli_name": "users", - "doc": "users to add", - "label": "member user", - "multivalue": true, - "name": "user", - "required": false, - "type": "str" - } - ], - "topic_topic": "otptoken/1", - "version": "1" - }, - { - "attr_name": "del", - "doc": "Delete an OTP token.", - "full_name": "otptoken_del/1", - "name": "otptoken_del", - "obj_class": "otptoken/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"canonical-principal\")", "required": false, - "type": "str" - }, - { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "label": "Primary key only", + "type": "bool" }, { + "cli_name": "man_by_hosts", + "name": "man_by_host", + "doc": "Search for services with these managed by hosts.", + "required": false, + "label": "host", "multivalue": true, - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "id", - "label": "Unique ID", - "multivalue": true, - "name": "ipatokenuniqueid", - "type": "str" + "type": "str", + "no_convert": true }, { - "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", - "name": "continue", - "positional": false, - "type": "bool" + "cli_name": "not_man_by_hosts", + "name": "not_man_by_host", + "doc": "Search for services without these managed by hosts.", + "required": false, + "label": "host", + "multivalue": true, + "type": "str", + "no_convert": true } ], - "topic_topic": "otptoken/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for OTP token.", - "full_name": "otptoken_find/1", - "name": "otptoken_find", - "obj_class": "otptoken/1", + "full_name": "service_find/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { + "type": "dict", "multivalue": true, - "name": "result", - "type": "dict" + "name": "result" }, { "doc": "Number of entries returned", - "name": "count", - "type": "int" + "type": "int", + "name": "count" }, { "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" + "type": "bool", + "name": "truncated" } ], + "obj_class": "service/1", + "topic_topic": "service/1" + }, + { + "name": "service_mod", + "doc": "Modify an existing IPA service.", + "attr_name": "mod", + "version": "1", "params": [ { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, - "required": false, - "type": "str" + "cli_name": "canonical_principal", + "name": "krbcanonicalname", + "doc": "Service principal", + "label": "Principal name", + "type": "Principal", + "no_convert": true }, { - "cli_name": "id", - "label": "Unique ID", - "name": "ipatokenuniqueid", + "cli_name": "principal", + "name": "krbprincipalname", + "doc": "Service principal alias", "required": false, - "type": "str" + "label": "Principal alias", + "multivalue": true, + "type": "Principal", + "no_convert": true }, { - "alwaysask": true, - "cli_metavar": "['totp', 'hotp', 'TOTP', 'HOTP']", - "default": ["totp"], - "doc": "Type of the token", - "label": "Type", - "name": "type", + "cli_name": "certificate", + "name": "usercertificate", + "doc": "Base-64 encoded service certificate", "required": false, - "type": "str" + "label": "Certificate", + "multivalue": true, + "type": "Certificate" }, { - "cli_name": "desc", - "doc": "Token description (informational only)", - "label": "Description", - "name": "description", + "cli_name": "pac_type", + "name": "ipakrbauthzdata", + "cli_metavar": "['MS-PAC', 'PAD', 'NONE']", + "doc": "Override default list of supported PAC types. Use 'NONE' to disable PAC support for this service, e.g. this might be necessary for NFS services.", "required": false, + "label": "PAC type", + "multivalue": true, "type": "str" }, { - "cli_name": "owner", - "doc": "Assigned user of the token (default: self)", - "label": "Owner", - "name": "ipatokenowner", + "cli_name": "auth_ind", + "name": "krbprincipalauthind", + "doc": "Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations.", "required": false, + "label": "Authentication Indicators", + "multivalue": true, "type": "str" }, { - "cli_name": "disabled", - "doc": "Mark the token as disabled (default: false)", - "label": "Disabled", - "name": "ipatokendisabled", + "cli_name": "requires_pre_auth", + "name": "ipakrbrequirespreauth", + "doc": "Pre-authentication is required for the service", "required": false, + "label": "Requires pre-authentication", "type": "bool" }, { - "cli_name": "not_before", - "doc": "First date/time the token can be used", - "label": "Validity start", - "name": "ipatokennotbefore", + "cli_name": "ok_as_delegate", + "name": "ipakrbokasdelegate", + "doc": "Client credentials may be delegated to the service", "required": false, - "type": "datetime" + "label": "Trusted for delegation", + "type": "bool" }, { - "cli_name": "not_after", - "doc": "Last date/time the token can be used", - "label": "Validity end", - "name": "ipatokennotafter", + "cli_name": "ok_to_auth_as_delegate", + "name": "ipakrboktoauthasdelegate", + "doc": "The service is allowed to authenticate on behalf of a client", "required": false, - "type": "datetime" + "label": "Trusted to authenticate as user", + "type": "bool" }, { - "cli_name": "vendor", - "doc": "Token vendor name (informational only)", - "label": "Vendor", - "name": "ipatokenvendor", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "model", - "doc": "Token model (informational only)", - "label": "Model", - "name": "ipatokenmodel", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "serial", - "doc": "Token serial (informational only)", - "label": "Serial", - "name": "ipatokenserial", + "cli_name": "delattr", + "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "alwaysask": true, - "cli_metavar": "['sha1', 'sha256', 'sha384', 'sha512']", - "cli_name": "algo", - "default": ["sha1"], - "doc": "Token hash algorithm", - "label": "Algorithm", - "name": "ipatokenotpalgorithm", - "required": false, - "type": "str" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { - "alwaysask": true, - "cli_metavar": "['6', '8']", - "cli_name": "digits", - "default": ["6"], - "doc": "Number of digits each token code will have", - "label": "Digits", - "name": "ipatokenotpdigits", - "required": false, - "type": "int" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "alwaysask": true, - "cli_name": "offset", - "default": ["0"], - "doc": "TOTP token / FreeIPA server time difference", - "label": "Clock offset", - "name": "ipatokentotpclockoffset", - "required": false, - "type": "int" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "alwaysask": true, - "cli_name": "interval", - "default": ["30"], - "doc": "Length of TOTP token code validity", - "label": "Clock interval", - "name": "ipatokentotptimestep", - "required": false, - "type": "int" - }, + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "service_mod/1", + "output": [ { - "alwaysask": true, - "cli_name": "counter", - "default": ["0"], - "doc": "Initial counter for the HOTP token", - "label": "Counter", - "name": "ipatokenhotpcounter", + "doc": "User-friendly description of action performed", "required": false, - "type": "int" + "type": "str", + "name": "summary" }, { - "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", - "required": false, - "type": "int" + "type": "dict", + "name": "result" }, { - "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", - "required": false, - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "Principal", + "name": "value" + } + ], + "obj_class": "service/1", + "topic_topic": "service/1" + }, + { + "name": "service_remove_cert", + "doc": "Remove certificates from a service", + "attr_name": "remove_cert", + "version": "1", + "params": [ + { + "cli_name": "canonical_principal", + "name": "krbcanonicalname", + "doc": "Service principal", + "label": "Principal name", + "type": "Principal", + "no_convert": true }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["True"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui", "cli"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"id\")", - "label": "Primary key only", - "name": "pkey_only", - "required": false, - "type": "bool" + "cli_name": "certificate", + "name": "usercertificate", + "alwaysask": true, + "doc": "Base-64 encoded service certificate", + "label": "Certificate", + "positional": false, + "multivalue": true, + "type": "Certificate" } ], - "topic_topic": "otptoken/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify a OTP token.", - "full_name": "otptoken_mod/1", - "name": "otptoken_mod", - "obj_class": "otptoken/1", + "full_name": "service_remove_cert/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "Principal", + "name": "value" } ], + "obj_class": "service/1", + "topic_topic": "service/1" + }, + { + "name": "service_remove_host", + "doc": "Remove hosts that can manage this service.", + "attr_name": "remove_host", + "version": "1", "params": [ { - "cli_name": "id", - "label": "Unique ID", - "name": "ipatokenuniqueid", - "type": "str" + "cli_name": "canonical_principal", + "name": "krbcanonicalname", + "doc": "Service principal", + "label": "Principal name", + "type": "Principal", + "no_convert": true }, { - "cli_name": "desc", - "doc": "Token description (informational only)", - "label": "Description", - "name": "description", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "owner", - "doc": "Assigned user of the token (default: self)", - "label": "Owner", - "name": "ipatokenowner", - "required": false, - "type": "str" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "disabled", - "doc": "Mark the token as disabled (default: false)", - "label": "Disabled", - "name": "ipatokendisabled", - "required": false, + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "cli_name": "not_before", - "doc": "First date/time the token can be used", - "label": "Validity start", - "name": "ipatokennotbefore", + "cli_name": "hosts", + "name": "host", + "alwaysask": true, + "doc": "hosts to remove", "required": false, - "type": "datetime" + "label": "member host", + "multivalue": true, + "type": "str" + } + ], + "full_name": "service_remove_host/1", + "output": [ + { + "type": "dict", + "name": "result" }, { - "cli_name": "not_after", - "doc": "Last date/time the token can be used", - "label": "Validity end", - "name": "ipatokennotafter", - "required": false, - "type": "datetime" + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" }, { - "cli_name": "vendor", - "doc": "Token vendor name (informational only)", - "label": "Vendor", - "name": "ipatokenvendor", - "required": false, - "type": "str" + "doc": "Number of members removed", + "type": "int", + "name": "completed" + } + ], + "obj_class": "service/1", + "topic_topic": "service/1" + }, + { + "name": "service_remove_principal", + "doc": "Remove principal alias from a service", + "attr_name": "remove_principal", + "version": "1", + "params": [ + { + "cli_name": "canonical_principal", + "name": "krbcanonicalname", + "doc": "Service principal", + "label": "Principal name", + "type": "Principal", + "no_convert": true }, { - "cli_name": "model", - "doc": "Token model (informational only)", - "label": "Model", - "name": "ipatokenmodel", - "required": false, - "type": "str" + "cli_name": "principal", + "name": "krbprincipalname", + "alwaysask": true, + "doc": "Service principal alias", + "label": "Principal alias", + "multivalue": true, + "type": "Principal", + "no_convert": true }, { - "cli_name": "serial", - "doc": "Token serial (informational only)", - "label": "Serial", - "name": "ipatokenserial", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", - "required": false, - "type": "str" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "service_remove_principal/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, - "name": "delattr", - "required": false, - "type": "str" + "type": "dict", + "name": "result" + }, + { + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "Principal", + "name": "value" + } + ], + "obj_class": "service/1", + "topic_topic": "service/1" + }, + { + "name": "service_show", + "doc": "Display information about an IPA service.", + "attr_name": "show", + "version": "1", + "params": [ + { + "cli_name": "canonical_principal", + "name": "krbcanonicalname", + "doc": "Service principal", + "label": "Principal name", + "type": "Principal", + "no_convert": true }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, + { + "doc": "file to store certificate in", + "required": false, + "type": "str", + "name": "out" + }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - }, - { - "cli_name": "rename", - "doc": "Rename the OTP token object", - "label": "Rename", - "name": "rename", - "required": false, - "type": "str" } ], - "topic_topic": "otptoken/1", - "version": "1" - }, - { - "attr_name": "remove_managedby", - "doc": "Remove users that can manage this token.", - "full_name": "otptoken_remove_managedby/1", - "name": "otptoken_remove_managedby", - "obj_class": "otptoken/1", + "full_name": "service_show/1", "output": [ { - "name": "result", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": "Number of members removed", - "name": "completed", - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "Principal", + "name": "value" } ], + "obj_class": "service/1", + "topic_topic": "service/1" + }, + { + "name": "servicedelegationrule_add", + "doc": "Create a new service delegation rule.", + "attr_name": "add", + "version": "1", "params": [ { - "cli_name": "id", - "label": "Unique ID", - "name": "ipatokenuniqueid", + "type": "str", + "cli_name": "delegation_name", + "name": "cn", + "label": "Delegation name" + }, + { + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" + }, + { + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, - "type": "bool" - }, - { - "alwaysask": true, - "cli_name": "users", - "doc": "users to remove", - "label": "member user", - "multivalue": true, - "name": "user", - "required": false, - "type": "str" - } - ], - "topic_topic": "otptoken/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display information about an OTP token.", - "full_name": "otptoken_show/1", - "name": "otptoken_show", - "obj_class": "otptoken/1", + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "servicedelegationrule_add/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "servicedelegationrule/1", + "topic_topic": "servicedelegation/1" + }, + { + "name": "servicedelegationrule_add_member", + "doc": "Add member to a named service delegation rule.", + "attr_name": "add_member", + "version": "1", "params": [ { - "cli_name": "id", - "label": "Unique ID", - "name": "ipatokenuniqueid", - "type": "str" - }, - { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "type": "str", + "cli_name": "delegation_name", + "name": "cn", + "label": "Delegation name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - } - ], - "topic_topic": "otptoken/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for command outputs.", - "full_name": "output_find/1", - "name": "output_find", - "obj_class": "output/1", - "output": [ + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "cli_name": "principals", + "name": "principal", + "alwaysask": true, + "doc": "principal to add", "required": false, + "label": "member principal", + "multivalue": true, "type": "str" - }, + } + ], + "full_name": "servicedelegationrule_add_member/1", + "output": [ { - "multivalue": true, - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" + "doc": "Number of members added", + "type": "int", + "name": "completed" } ], + "obj_class": "servicedelegationrule/1", + "topic_topic": "servicedelegation/1" + }, + { + "name": "servicedelegationrule_add_target", + "doc": "Add target to a named service delegation rule.", + "attr_name": "add_target", + "version": "1", "params": [ { - "cli_name": "command", - "label": "Full name", - "name": "commandfull_name", - "no_convert": true, - "type": "str" - }, - { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, - "required": false, - "type": "str" + "type": "str", + "cli_name": "delegation_name", + "name": "cn", + "label": "Delegation name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"name\")", - "label": "Primary key only", - "name": "pkey_only", - "required": false, + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" + }, + { + "cli_name": "servicedelegationtargets", + "name": "servicedelegationtarget", + "alwaysask": true, + "doc": "service delegation targets to add", + "required": false, + "label": "member service delegation target", + "multivalue": true, + "type": "str" } ], - "topic_topic": "schema/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display information about a command output.", - "full_name": "output_show/1", - "name": "output_show", - "obj_class": "output/1", + "full_name": "servicedelegationrule_add_target/1", "output": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "name": "result", - "type": "dict" + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "Number of members added", + "type": "int", + "name": "completed" } ], + "obj_class": "servicedelegationrule/1", + "topic_topic": "servicedelegation/1" + }, + { + "name": "servicedelegationrule_del", + "doc": "Delete service delegation.", + "attr_name": "del", + "version": "1", "params": [ { - "cli_name": "command", - "label": "Full name", - "name": "commandfull_name", - "no_convert": true, - "type": "str" - }, - { - "label": "Name", - "name": "name", - "no_convert": true, + "cli_name": "delegation_name", + "label": "Delegation name", + "multivalue": true, + "name": "cn", "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" - }, - { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", "positional": false, "type": "bool" } ], - "topic_topic": "schema/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search command parameters.", - "full_name": "param_find/1", - "name": "param_find", - "obj_class": "param/1", + "full_name": "servicedelegationrule_del/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" - }, - { - "multivalue": true, - "name": "result", - "type": "dict" + "type": "str", + "name": "summary" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" + "type": "str", + "multivalue": true, + "name": "value" } ], + "obj_class": "servicedelegationrule/1", + "topic_topic": "servicedelegation/1" + }, + { + "name": "servicedelegationrule_find", + "doc": "Search for service delegations rule.", + "attr_name": "find", + "version": "1", "params": [ { - "cli_name": "metaobject", - "label": "Full name", - "name": "metaobjectfull_name", - "no_convert": true, - "type": "str" + "positional": true, + "doc": "A string searched in all relevant object attributes", + "required": false, + "type": "str", + "name": "criteria" }, { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, + "type": "str", "required": false, - "type": "str" + "cli_name": "delegation_name", + "name": "cn", + "label": "Delegation name" + }, + { + "doc": "Time limit of search in seconds (0 is unlimited)", + "required": false, + "type": "int", + "name": "timelimit", + "label": "Time Limit" + }, + { + "doc": "Maximum number of entries returned (0 is unlimited)", + "required": false, + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "True" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui", + "cli" + ], "type": "bool" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"name\")", - "label": "Primary key only", "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"delegation-name\")", "required": false, + "label": "Primary key only", "type": "bool" } ], - "topic_topic": "schema/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display information about a command parameter.", - "full_name": "param_show/1", - "name": "param_show", - "obj_class": "param/1", + "full_name": "servicedelegationrule_find/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "multivalue": true, + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "Number of entries returned", + "type": "int", + "name": "count" + }, + { + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], + "obj_class": "servicedelegationrule/1", + "topic_topic": "servicedelegation/1" + }, + { + "name": "servicedelegationrule_remove_member", + "doc": "Remove member from a named service delegation rule.", + "attr_name": "remove_member", + "version": "1", "params": [ { - "cli_name": "metaobject", - "label": "Full name", - "name": "metaobjectfull_name", - "no_convert": true, - "type": "str" - }, - { - "label": "Name", - "name": "name", - "no_convert": true, - "type": "str" + "type": "str", + "cli_name": "delegation_name", + "name": "cn", + "label": "Delegation name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - } - ], - "topic_topic": "schema/1", - "version": "1" - }, - { - "doc": "Set a user's password.", - "full_name": "passwd/1", - "name": "passwd", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" }, { - "doc": "True means the operation was successful", - "name": "result", + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "user", - "default_from_param": [], - "label": "User name", + "cli_name": "principals", "name": "principal", - "no_convert": true, - "type": "Principal" - }, - { - "label": "New Password", - "name": "password", - "sensitive": true, - "type": "str" - }, - { - "confirm": false, - "default_from_param": ["principal"], - "label": "Current Password", - "name": "current_password", - "sensitive": true, - "type": "str" - }, - { - "confirm": false, - "doc": "One Time Password", - "label": "OTP", - "name": "otp", + "alwaysask": true, + "doc": "principal to remove", "required": false, - "sensitive": true, + "label": "member principal", + "multivalue": true, "type": "str" } ], - "topic_topic": "passwd/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Add a new permission.", - "full_name": "permission_add/1", - "name": "permission_add", - "obj_class": "permission/1", + "full_name": "servicedelegationrule_remove_member/1", "output": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "name": "result", - "type": "dict" + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "Number of members removed", + "type": "int", + "name": "completed" } ], + "obj_class": "servicedelegationrule/1", + "topic_topic": "servicedelegation/1" + }, + { + "name": "servicedelegationrule_remove_target", + "doc": "Remove target from a named service delegation rule.", + "attr_name": "remove_target", + "version": "1", "params": [ { - "cli_name": "name", - "label": "Permission name", + "type": "str", + "cli_name": "delegation_name", "name": "cn", - "type": "str" + "label": "Delegation name" }, { - "alwaysask": true, - "cli_metavar": - "['read', 'search', 'compare', 'write', 'add', 'delete', 'all']", - "cli_name": "right", - "doc": - "Rights to grant (read, search, compare, write, add, delete, all)", - "label": "Granted rights", - "multivalue": true, - "name": "ipapermright", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": "All attributes to which the permission applies", - "label": "Effective attributes", - "multivalue": true, - "name": "attrs", - "required": false, - "type": "str" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_metavar": "['permission', 'all', 'anonymous']", - "cli_name": "bindtype", - "default": ["permission"], - "doc": "Bind rule type", - "label": "Bind rule type", - "name": "ipapermbindruletype", + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, - "type": "str" + "exclude": [ + "webui" + ], + "type": "bool" }, { + "cli_name": "servicedelegationtargets", + "name": "servicedelegationtarget", "alwaysask": true, - "cli_name": "subtree", - "doc": "Subtree to apply permissions to", - "label": "Subtree", - "name": "ipapermlocation", - "no_convert": true, + "doc": "service delegation targets to remove", "required": false, - "type": "DN" - }, - { - "cli_name": "filter", - "doc": "Extra target filter", - "label": "Extra target filter", + "label": "member service delegation target", "multivalue": true, - "name": "extratargetfilter", - "required": false, "type": "str" - }, + } + ], + "full_name": "servicedelegationrule_remove_target/1", + "output": [ { - "cli_name": "rawfilter", - "doc": - "All target filters, including those implied by type and memberof", - "label": "Raw target filter", - "multivalue": true, - "name": "ipapermtargetfilter", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "cli_name": "target", - "doc": - "Optional DN to apply the permission to (must be in the subtree, but may not yet exist)", - "label": "Target DN", - "name": "ipapermtarget", - "required": false, - "type": "DN" + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" }, { - "cli_name": "targetto", - "doc": - "Optional DN subtree where an entry can be moved to (must be in the subtree, but may not yet exist)", - "label": "Target DN subtree", - "name": "ipapermtargetto", - "required": false, - "type": "DN" - }, + "doc": "Number of members removed", + "type": "int", + "name": "completed" + } + ], + "obj_class": "servicedelegationrule/1", + "topic_topic": "servicedelegation/1" + }, + { + "name": "servicedelegationrule_show", + "doc": "Display information about a named service delegation rule.", + "attr_name": "show", + "version": "1", + "params": [ { - "cli_name": "targetfrom", - "doc": - "Optional DN subtree from where an entry can be moved (must be in the subtree, but may not yet exist)", - "label": "Origin DN subtree", - "name": "ipapermtargetfrom", - "required": false, - "type": "DN" + "type": "str", + "cli_name": "delegation_name", + "name": "cn", + "label": "Delegation name" }, { - "alwaysask": true, - "doc": "Target members of a group (sets memberOf targetfilter)", - "label": "Member of group", - "multivalue": true, - "name": "memberof", - "required": false, - "type": "str" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { - "alwaysask": true, - "doc": "User group to apply permissions to (sets target)", - "label": "Target group", - "name": "targetgroup", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "alwaysask": true, - "doc": - "Type of IPA object (sets subtree and objectClass targetfilter)", - "label": "Type", - "name": "type", - "required": false, - "type": "str" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": "Deprecated; use extratargetfilter", - "exclude": ["cli", "webui"], - "multivalue": true, - "name": "filter", + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "servicedelegationrule_show/1", + "output": [ + { + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "Deprecated; use ipapermlocation", - "exclude": ["cli", "webui"], - "multivalue": true, - "name": "subtree", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "doc": "Deprecated; use ipapermright", - "exclude": ["cli", "webui"], - "multivalue": true, - "name": "permissions", - "required": false, - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "servicedelegationrule/1", + "topic_topic": "servicedelegation/1" + }, + { + "name": "servicedelegationtarget_add", + "doc": "Create a new service delegation target.", + "attr_name": "add", + "version": "1", + "params": [ + { + "type": "str", + "cli_name": "delegation_name", + "name": "cn", + "label": "Delegation name" }, { "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, - "type": "bool" - }, - { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "permission/1", - "version": "1" - }, - { - "attr_name": "add_member", - "doc": "Add members to a permission.", - "exclude": ["cli"], - "full_name": "permission_add_member/1", - "name": "permission_add_member", - "obj_class": "permission/1", + "full_name": "servicedelegationtarget_add/1", "output": [ { - "name": "result", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": "Number of members added", - "name": "completed", - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "servicedelegationtarget/1", + "topic_topic": "servicedelegation/1" + }, + { + "name": "servicedelegationtarget_add_member", + "doc": "Add member to a named service delegation target.", + "attr_name": "add_member", + "version": "1", "params": [ { - "cli_name": "name", - "label": "Permission name", + "type": "str", + "cli_name": "delegation_name", "name": "cn", - "type": "str" + "label": "Delegation name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" - }, - { + "cli_name": "principals", + "name": "principal", "alwaysask": true, - "cli_name": "privileges", - "doc": "privileges to add", - "label": "member privilege", - "multivalue": true, - "name": "privilege", + "doc": "principal to add", "required": false, + "label": "member principal", + "multivalue": true, "type": "str" } ], - "topic_topic": "permission/1", - "version": "1" + "full_name": "servicedelegationtarget_add_member/1", + "output": [ + { + "type": "dict", + "name": "result" + }, + { + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" + }, + { + "doc": "Number of members added", + "type": "int", + "name": "completed" + } + ], + "obj_class": "servicedelegationtarget/1", + "topic_topic": "servicedelegation/1" }, { - "attr_name": "add_noaci", - "doc": "Add a system permission without an ACI (internal command)", - "exclude": ["cli"], - "full_name": "permission_add_noaci/1", - "name": "permission_add_noaci", - "obj_class": "permission/1", + "name": "servicedelegationtarget_del", + "doc": "Delete service delegation target.", + "attr_name": "del", + "version": "1", + "params": [ + { + "cli_name": "delegation_name", + "label": "Delegation name", + "multivalue": true, + "name": "cn", + "type": "str" + }, + { + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", + "positional": false, + "type": "bool" + } + ], + "full_name": "servicedelegationtarget_del/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "type": "str", + "multivalue": true, + "name": "value" } ], + "obj_class": "servicedelegationtarget/1", + "topic_topic": "servicedelegation/1" + }, + { + "name": "servicedelegationtarget_find", + "doc": "Search for service delegation target.", + "attr_name": "find", + "version": "1", "params": [ { - "cli_name": "name", - "label": "Permission name", + "positional": true, + "doc": "A string searched in all relevant object attributes", + "required": false, + "type": "str", + "name": "criteria" + }, + { + "type": "str", + "required": false, + "cli_name": "delegation_name", "name": "cn", - "type": "str" + "label": "Delegation name" }, { - "label": "Permission flags", - "multivalue": true, - "name": "ipapermissiontype", - "positional": false, - "type": "str" + "doc": "Time limit of search in seconds (0 is unlimited)", + "required": false, + "type": "int", + "name": "timelimit", + "label": "Time Limit" + }, + { + "doc": "Maximum number of entries returned (0 is unlimited)", + "required": false, + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"delegation-name\")", + "required": false, + "label": "Primary key only", "type": "bool" } ], - "topic_topic": "permission/1", - "version": "1" - }, - { - "attr_name": "del", - "doc": "Delete a permission.", - "full_name": "permission_del/1", - "name": "permission_del", - "obj_class": "permission/1", + "full_name": "servicedelegationtarget_find/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "type": "dict", + "multivalue": true, + "name": "result" }, { - "multivalue": true, - "name": "value", - "type": "str" + "doc": "Number of entries returned", + "type": "int", + "name": "count" + }, + { + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], + "obj_class": "servicedelegationtarget/1", + "topic_topic": "servicedelegation/1" + }, + { + "name": "servicedelegationtarget_remove_member", + "doc": "Remove member from a named service delegation target.", + "attr_name": "remove_member", + "version": "1", "params": [ { - "cli_name": "name", - "label": "Permission name", - "multivalue": true, + "type": "str", + "cli_name": "delegation_name", "name": "cn", - "type": "str" + "label": "Delegation name" }, { - "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", - "name": "continue", + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "force delete of SYSTEM permissions", - "exclude": ["cli", "webui"], - "label": "Force", - "name": "force", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - } - ], - "topic_topic": "permission/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for permissions.", - "full_name": "permission_find/1", - "name": "permission_find", - "obj_class": "permission/1", - "output": [ + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "cli_name": "principals", + "name": "principal", + "alwaysask": true, + "doc": "principal to remove", "required": false, + "label": "member principal", + "multivalue": true, "type": "str" - }, + } + ], + "full_name": "servicedelegationtarget_remove_member/1", + "output": [ { - "multivalue": true, - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" + "doc": "Number of members removed", + "type": "int", + "name": "completed" } ], + "obj_class": "servicedelegationtarget/1", + "topic_topic": "servicedelegation/1" + }, + { + "name": "servicedelegationtarget_show", + "doc": "Display information about a named service delegation target.", + "attr_name": "show", + "version": "1", "params": [ { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, - "required": false, - "type": "str" - }, - { - "cli_name": "name", - "label": "Permission name", + "type": "str", + "cli_name": "delegation_name", "name": "cn", - "required": false, - "type": "str" + "label": "Delegation name" }, { - "cli_metavar": - "['read', 'search', 'compare', 'write', 'add', 'delete', 'all']", - "cli_name": "right", - "doc": - "Rights to grant (read, search, compare, write, add, delete, all)", - "label": "Granted rights", - "multivalue": true, - "name": "ipapermright", - "required": false, - "type": "str" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { - "doc": "All attributes to which the permission applies", - "label": "Effective attributes", - "multivalue": true, - "name": "attrs", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "includedattrs", - "doc": - "User-specified attributes to which the permission applies", - "label": "Included attributes", - "multivalue": true, - "name": "ipapermincludedattr", - "required": false, - "type": "str" - }, + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "servicedelegationtarget_show/1", + "output": [ { - "cli_name": "excludedattrs", - "doc": - "User-specified attributes to which the permission explicitly does not apply", - "label": "Excluded attributes", - "multivalue": true, - "name": "ipapermexcludedattr", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "cli_name": "defaultattrs", - "doc": "Attributes to which the permission applies by default", - "label": "Default attributes", - "multivalue": true, - "name": "ipapermdefaultattr", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "servicedelegationtarget/1", + "topic_topic": "servicedelegation/1" + }, + { + "name": "session_logout", + "doc": "\n RPC command used to log the current user out of their session.\n ", + "version": "1", + "params": [], + "full_name": "session_logout/1", + "exclude": [ + "cli" + ], + "output": [ + { + "name": "result" + } + ], + "topic_topic": "session/1" + }, + { + "name": "sidgen_was_run", + "doc": "Determine whether ipa-adtrust-install has been run with sidgen task", + "version": "1", + "params": [], + "full_name": "sidgen_was_run/1", + "exclude": [ + "cli" + ], + "output": [ + { + "name": "result" + } + ], + "topic_topic": "trust/1" + }, + { + "name": "stageuser_activate", + "doc": "Activate a stage user.", + "attr_name": "activate", + "version": "1", + "params": [ + { + "cli_name": "login", + "name": "uid", "alwaysask": true, - "cli_metavar": "['permission', 'all', 'anonymous']", - "cli_name": "bindtype", - "default": ["permission"], - "doc": "Bind rule type", - "label": "Bind rule type", - "name": "ipapermbindruletype", - "required": false, - "type": "str" + "label": "User login", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true }, { - "cli_name": "subtree", - "doc": "Subtree to apply permissions to", - "label": "Subtree", - "name": "ipapermlocation", - "no_convert": true, - "required": false, - "type": "DN" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "filter", - "doc": "Extra target filter", - "label": "Extra target filter", - "multivalue": true, - "name": "extratargetfilter", - "required": false, - "type": "str" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "rawfilter", - "doc": - "All target filters, including those implied by type and memberof", - "label": "Raw target filter", - "multivalue": true, - "name": "ipapermtargetfilter", - "required": false, - "type": "str" - }, + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "stageuser_activate/1", + "output": [ { - "cli_name": "target", - "doc": - "Optional DN to apply the permission to (must be in the subtree, but may not yet exist)", - "label": "Target DN", - "name": "ipapermtarget", + "doc": "User-friendly description of action performed", "required": false, - "type": "DN" + "type": "str", + "name": "summary" }, { - "cli_name": "targetto", - "doc": - "Optional DN subtree where an entry can be moved to (must be in the subtree, but may not yet exist)", - "label": "Target DN subtree", - "name": "ipapermtargetto", - "required": false, - "type": "DN" + "type": "dict", + "name": "result" }, { - "cli_name": "targetfrom", - "doc": - "Optional DN subtree from where an entry can be moved (must be in the subtree, but may not yet exist)", - "label": "Origin DN subtree", - "name": "ipapermtargetfrom", - "required": false, - "type": "DN" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "stageuser/1", + "topic_topic": "stageuser/1" + }, + { + "name": "stageuser_add", + "doc": "Add a new stage user.", + "attr_name": "add", + "version": "1", + "params": [ + { + "cli_name": "login", + "name": "uid", + "alwaysask": true, + "label": "User login", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true }, { - "doc": "Target members of a group (sets memberOf targetfilter)", - "label": "Member of group", - "multivalue": true, - "name": "memberof", - "required": false, - "type": "str" + "positional": false, + "type": "str", + "cli_name": "first", + "name": "givenname", + "label": "First name" }, { - "doc": "User group to apply permissions to (sets target)", - "label": "Target group", - "name": "targetgroup", - "required": false, - "type": "str" + "positional": false, + "type": "str", + "cli_name": "last", + "name": "sn", + "label": "Last name" }, { - "doc": - "Type of IPA object (sets subtree and objectClass targetfilter)", - "label": "Type", - "name": "type", - "required": false, - "type": "str" + "positional": false, + "type": "str", + "name": "cn", + "default_from_param": [ + "givenname", + "sn" + ], + "label": "Full name" }, { - "doc": "Deprecated; use extratargetfilter", - "exclude": ["cli", "webui"], - "multivalue": true, - "name": "filter", "required": false, - "type": "str" + "type": "str", + "name": "displayname", + "default_from_param": [ + "givenname", + "sn" + ], + "label": "Display name" }, { - "doc": "Deprecated; use ipapermlocation", - "exclude": ["cli", "webui"], - "multivalue": true, - "name": "subtree", "required": false, - "type": "str" + "type": "str", + "name": "initials", + "default_from_param": [ + "givenname", + "sn" + ], + "label": "Initials" }, { - "doc": "Deprecated; use ipapermright", - "exclude": ["cli", "webui"], - "multivalue": true, - "name": "permissions", + "type": "str", "required": false, - "type": "str" + "cli_name": "homedir", + "name": "homedirectory", + "label": "Home directory" }, { - "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", "required": false, - "type": "int" + "type": "str", + "name": "gecos", + "default_from_param": [ + "givenname", + "sn" + ], + "label": "GECOS" }, { - "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", + "type": "str", "required": false, - "type": "int" + "cli_name": "shell", + "name": "loginshell", + "label": "Login shell" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "cli_name": "principal", + "name": "krbprincipalname", + "required": false, + "label": "Principal alias", + "multivalue": true, + "type": "Principal", + "default_from_param": [ + "uid" + ], + "no_convert": true }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "type": "datetime", + "required": false, + "cli_name": "principal_expiration", + "name": "krbprincipalexpiration", + "label": "Kerberos principal expiration" }, { - "default": ["True"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui", "cli"], - "name": "no_members", - "positional": false, - "type": "bool" + "type": "datetime", + "required": false, + "cli_name": "password_expiration", + "name": "krbpasswordexpiration", + "label": "User password expiration" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"name\")", - "label": "Primary key only", - "name": "pkey_only", + "cli_name": "email", + "name": "mail", "required": false, - "type": "bool" - } - ], - "topic_topic": "permission/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify a permission.", - "full_name": "permission_mod/1", - "name": "permission_mod", - "obj_class": "permission/1", - "output": [ + "label": "Email address", + "multivalue": true, + "type": "str" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "cli_name": "password", + "name": "userpassword", + "doc": "Prompt to set the user password", "required": false, + "label": "Password", + "sensitive": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "name": "result", - "type": "dict" + "default": [ + "False" + ], + "doc": "Generate a random user password", + "required": false, + "type": "bool", + "name": "random" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ + "cli_name": "uid", + "name": "uidnumber", + "doc": "User ID Number (system will assign one if not provided)", + "required": false, + "label": "UID", + "type": "int" + }, { - "cli_name": "name", - "label": "Permission name", - "name": "cn", - "type": "str" + "doc": "Group ID Number", + "required": false, + "type": "int", + "name": "gidnumber", + "label": "GID" }, { - "cli_metavar": - "['read', 'search', 'compare', 'write', 'add', 'delete', 'all']", - "cli_name": "right", - "doc": - "Rights to grant (read, search, compare, write, add, delete, all)", - "label": "Granted rights", - "multivalue": true, - "name": "ipapermright", + "type": "str", "required": false, - "type": "str" + "cli_name": "street", + "name": "street", + "label": "Street address" }, { - "doc": "All attributes to which the permission applies", - "label": "Effective attributes", - "multivalue": true, - "name": "attrs", + "type": "str", "required": false, - "type": "str" + "cli_name": "city", + "name": "l", + "label": "City" }, { - "cli_name": "includedattrs", - "doc": - "User-specified attributes to which the permission applies", - "label": "Included attributes", - "multivalue": true, - "name": "ipapermincludedattr", + "type": "str", "required": false, - "type": "str" + "cli_name": "state", + "name": "st", + "label": "State/Province" }, { - "cli_name": "excludedattrs", - "doc": - "User-specified attributes to which the permission explicitly does not apply", - "label": "Excluded attributes", - "multivalue": true, - "name": "ipapermexcludedattr", "required": false, - "type": "str" + "type": "str", + "name": "postalcode", + "label": "ZIP" }, { - "alwaysask": true, - "cli_metavar": "['permission', 'all', 'anonymous']", - "cli_name": "bindtype", - "default": ["permission"], - "doc": "Bind rule type", - "label": "Bind rule type", - "name": "ipapermbindruletype", + "cli_name": "phone", + "name": "telephonenumber", "required": false, + "label": "Telephone Number", + "multivalue": true, "type": "str" }, { - "cli_name": "subtree", - "doc": "Subtree to apply permissions to", - "label": "Subtree", - "name": "ipapermlocation", - "no_convert": true, + "type": "str", "required": false, - "type": "DN" + "multivalue": true, + "name": "mobile", + "label": "Mobile Telephone Number" }, { - "cli_name": "filter", - "doc": "Extra target filter", - "label": "Extra target filter", + "type": "str", + "required": false, "multivalue": true, - "name": "extratargetfilter", + "name": "pager", + "label": "Pager Number" + }, + { + "cli_name": "fax", + "name": "facsimiletelephonenumber", "required": false, + "label": "Fax Number", + "multivalue": true, "type": "str" }, { - "cli_name": "rawfilter", - "doc": - "All target filters, including those implied by type and memberof", - "label": "Raw target filter", - "multivalue": true, - "name": "ipapermtargetfilter", + "type": "str", "required": false, - "type": "str" + "cli_name": "orgunit", + "name": "ou", + "label": "Org. Unit" }, { - "cli_name": "target", - "doc": - "Optional DN to apply the permission to (must be in the subtree, but may not yet exist)", - "label": "Target DN", - "name": "ipapermtarget", "required": false, - "type": "DN" + "type": "str", + "name": "title", + "label": "Job Title" }, { - "cli_name": "targetto", - "doc": - "Optional DN subtree where an entry can be moved to (must be in the subtree, but may not yet exist)", - "label": "Target DN subtree", - "name": "ipapermtargetto", "required": false, - "type": "DN" + "type": "str", + "name": "manager", + "label": "Manager" }, { - "cli_name": "targetfrom", - "doc": - "Optional DN subtree from where an entry can be moved (must be in the subtree, but may not yet exist)", - "label": "Origin DN subtree", - "name": "ipapermtargetfrom", + "type": "str", "required": false, - "type": "DN" + "multivalue": true, + "name": "carlicense", + "label": "Car License" }, { - "doc": "Target members of a group (sets memberOf targetfilter)", - "label": "Member of group", + "cli_name": "sshpubkey", + "name": "ipasshpubkey", + "required": false, + "label": "SSH public key", "multivalue": true, - "name": "memberof", + "type": "str", + "no_convert": true + }, + { + "cli_name": "user_auth_type", + "name": "ipauserauthtype", + "cli_metavar": "['password', 'radius', 'otp']", + "doc": "Types of supported user authentication", "required": false, + "label": "User authentication types", + "multivalue": true, "type": "str" }, { - "doc": "User group to apply permissions to (sets target)", - "label": "Target group", - "name": "targetgroup", + "cli_name": "class", + "name": "userclass", + "doc": "User category (semantics placed on this attribute are for local interpretation)", "required": false, + "label": "Class", + "multivalue": true, "type": "str" }, { - "doc": - "Type of IPA object (sets subtree and objectClass targetfilter)", - "label": "Type", - "name": "type", + "type": "str", "required": false, - "type": "str" + "cli_name": "radius", + "name": "ipatokenradiusconfiglink", + "label": "RADIUS proxy configuration" }, { - "doc": "Deprecated; use extratargetfilter", - "exclude": ["cli", "webui"], - "multivalue": true, - "name": "filter", + "type": "str", "required": false, - "type": "str" + "cli_name": "radius_username", + "name": "ipatokenradiususername", + "label": "RADIUS proxy username" }, { - "doc": "Deprecated; use ipapermlocation", - "exclude": ["cli", "webui"], + "type": "str", + "required": false, "multivalue": true, - "name": "subtree", + "name": "departmentnumber", + "label": "Department Number" + }, + { "required": false, - "type": "str" + "type": "str", + "name": "employeenumber", + "label": "Employee Number" }, { - "doc": "Deprecated; use ipapermright", - "exclude": ["cli", "webui"], - "multivalue": true, - "name": "permissions", "required": false, - "type": "str" + "type": "str", + "name": "employeetype", + "label": "Employee Type" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], + "required": false, + "type": "str", + "name": "preferredlanguage", + "label": "Preferred Language" + }, + { + "cli_name": "certificate", + "name": "usercertificate", + "doc": "Base-64 encoded user certificate", + "required": false, + "label": "Certificate", "multivalue": true, + "type": "Certificate" + }, + { + "cli_name": "setattr", "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, - "type": "str" - }, - { - "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], "multivalue": true, - "name": "delattr", - "required": false, + "exclude": [ + "webui" + ], "type": "str" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, + "cli_name": "from_delete", + "name": "from_delete", + "doc": "Create Stage user in from a delete user", + "required": false, + "exclude": [ + "cli", + "webui" + ], "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - }, - { - "cli_name": "rename", - "doc": "Rename the permission object", - "label": "Rename", - "name": "rename", - "required": false, - "type": "str" } ], - "topic_topic": "permission/1", - "version": "1" - }, - { - "attr_name": "remove_member", - "doc": "Remove members from a permission.", - "exclude": ["cli"], - "full_name": "permission_remove_member/1", - "name": "permission_remove_member", - "obj_class": "permission/1", + "full_name": "stageuser_add/1", "output": [ { - "name": "result", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": "Number of members removed", - "name": "completed", - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "stageuser/1", + "topic_topic": "stageuser/1" + }, + { + "name": "stageuser_add_cert", + "doc": "Add one or more certificates to the stageuser entry", + "attr_name": "add_cert", + "version": "1", "params": [ { - "cli_name": "name", - "label": "Permission name", - "name": "cn", - "type": "str" + "cli_name": "login", + "name": "uid", + "alwaysask": true, + "label": "User login", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { + "cli_name": "certificate", + "name": "usercertificate", "alwaysask": true, - "cli_name": "privileges", - "doc": "privileges to remove", - "label": "member privilege", + "doc": "Base-64 encoded user certificate", + "label": "Certificate", + "positional": false, "multivalue": true, - "name": "privilege", - "required": false, - "type": "str" + "type": "Certificate" } ], - "topic_topic": "permission/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display information about a permission.", - "full_name": "permission_show/1", - "name": "permission_show", - "obj_class": "permission/1", + "full_name": "stageuser_add_cert/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" - }, - { - "name": "result", - "type": "dict" - }, - { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "name", - "label": "Permission name", - "name": "cn", - "type": "str" - }, - { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" - }, - { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "type": "str", + "name": "summary" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "type": "dict", + "name": "result" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "permission/1", - "version": "1" - }, - { - "doc": "Ping a remote server.", - "full_name": "ping/1", - "name": "ping", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "params": [], - "topic_topic": "ping/1", - "version": "1" + "obj_class": "stageuser/1", + "topic_topic": "stageuser/1" }, { - "doc": "Enable or Disable Anonymous PKINIT.", - "full_name": "pkinit_anonymous/1", - "name": "pkinit_anonymous", - "output": [ - { - "name": "result" - } - ], + "name": "stageuser_add_certmapdata", + "doc": "Add one or more certificate mappings to the stage user entry.", + "attr_name": "add_certmapdata", + "version": "1", "params": [ { - "name": "action", - "type": "str" - } - ], - "topic_topic": "pkinit/1", - "version": "1" - }, - { - "doc": "Show all loaded plugins.", - "full_name": "plugins/1", - "name": "plugins", - "output": [ - { - "doc": "Dictionary mapping plugin names to bases", - "name": "result", - "type": "dict" - }, - { - "doc": "Number of plugins loaded", - "name": "count", - "type": "int" + "cli_name": "login", + "name": "uid", + "alwaysask": true, + "label": "User login", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "cli_name": "certmapdata", + "name": "ipacertmapdata", + "alwaysask": false, + "doc": "Certificate mapping data", "required": false, + "label": "Certificate mapping data", + "positional": true, + "multivalue": true, "type": "str" - } - ], - "params": [ - { - "default": ["False"], - "doc": "Forward to server instead of running locally", - "name": "server", - "required": false, - "type": "bool" }, { - "cli_name": "all", - "default": ["True"], - "doc": - "retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui", "cli"], - "name": "all", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "misc/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Add a new privilege.", - "full_name": "privilege_add/1", - "name": "privilege_add", - "obj_class": "privilege/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", + "cli_name": "issuer", + "name": "issuer", + "doc": "Issuer of the certificate", "required": false, - "type": "str" - }, - { - "name": "result", - "type": "dict" - }, - { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "name", - "label": "Privilege name", - "name": "cn", - "type": "str" + "label": "Issuer", + "type": "DN" }, { - "cli_name": "desc", - "doc": "Privilege description", - "label": "Description", - "name": "description", + "cli_name": "subject", + "name": "subject", + "doc": "Subject of the certificate", "required": false, - "type": "str" + "label": "Subject", + "type": "DN" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", + "cli_name": "certificate", + "name": "certificate", + "doc": "Base-64 encoded user certificate", "required": false, - "type": "str" - }, - { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], + "label": "Certificate", "multivalue": true, - "name": "addattr", - "required": false, - "type": "str" + "type": "Certificate" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "privilege/1", - "version": "1" - }, - { - "attr_name": "add_member", - "doc": "Add members to a privilege.", - "exclude": ["cli"], - "full_name": "privilege_add_member/1", - "name": "privilege_add_member", - "obj_class": "privilege/1", + "full_name": "stageuser_add_certmapdata/1", "output": [ { - "name": "result", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": "Number of members added", - "name": "completed", - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "stageuser/1", + "topic_topic": "stageuser/1" + }, + { + "name": "stageuser_add_manager", + "doc": "Add a manager to the stage user entry", + "attr_name": "add_manager", + "version": "1", "params": [ { - "cli_name": "name", - "label": "Privilege name", - "name": "cn", - "type": "str" + "cli_name": "login", + "name": "uid", + "alwaysask": true, + "label": "User login", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { + "cli_name": "users", + "name": "user", "alwaysask": true, - "cli_name": "roles", - "doc": "roles to add", - "label": "member role", - "multivalue": true, - "name": "role", + "doc": "users to add", "required": false, + "label": "member user", + "multivalue": true, "type": "str" } ], - "topic_topic": "privilege/1", - "version": "1" - }, - { - "attr_name": "add_permission", - "doc": "Add permissions to a privilege.", - "full_name": "privilege_add_permission/1", - "name": "privilege_add_permission", - "obj_class": "privilege/1", + "full_name": "stageuser_add_manager/1", "output": [ { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "type": "dict", + "name": "failed" }, { - "doc": "Number of permissions added", - "name": "completed", - "type": "int" + "doc": "Number of members added", + "type": "int", + "name": "completed" } ], + "obj_class": "stageuser/1", + "topic_topic": "stageuser/1" + }, + { + "name": "stageuser_add_principal", + "doc": "Add new principal alias to the stageuser entry", + "attr_name": "add_principal", + "version": "1", "params": [ { - "cli_name": "name", - "label": "Privilege name", - "name": "cn", - "type": "str" + "cli_name": "login", + "name": "uid", + "alwaysask": true, + "label": "User login", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true + }, + { + "cli_name": "principal", + "name": "krbprincipalname", + "alwaysask": true, + "label": "Principal alias", + "multivalue": true, + "type": "Principal", + "default_from_param": [ + "uid" + ], + "no_convert": true }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, - "type": "bool" - }, - { - "alwaysask": true, - "cli_name": "permissions", - "doc": "permissions", - "label": "permission", - "multivalue": true, - "name": "permission", - "required": false, - "type": "str" + "exclude": [ + "webui" + ], + "type": "bool" } ], - "topic_topic": "privilege/1", - "version": "1" - }, - { - "attr_name": "del", - "doc": "Delete a privilege.", - "full_name": "privilege_del/1", - "name": "privilege_del", - "obj_class": "privilege/1", + "full_name": "stageuser_add_principal/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "multivalue": true, - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "stageuser/1", + "topic_topic": "stageuser/1" + }, + { + "name": "stageuser_del", + "doc": "Delete a stage user.", + "attr_name": "del", + "version": "1", "params": [ { - "cli_name": "name", - "label": "Privilege name", + "cli_name": "login", + "name": "uid", + "alwaysask": true, + "label": "User login", "multivalue": true, - "name": "cn", - "type": "str" + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true }, { "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", "positional": false, "type": "bool" } ], - "topic_topic": "privilege/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for privileges.", - "full_name": "privilege_find/1", - "name": "privilege_find", - "obj_class": "privilege/1", + "full_name": "stageuser_del/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" - }, - { - "multivalue": true, - "name": "result", - "type": "dict" + "type": "str", + "name": "summary" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" + "type": "str", + "multivalue": true, + "name": "value" } ], + "obj_class": "stageuser/1", + "topic_topic": "stageuser/1" + }, + { + "name": "stageuser_find", + "doc": "Search for stage users.", + "attr_name": "find", + "version": "1", "params": [ { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, - "type": "str" + "type": "str", + "name": "criteria" }, { - "cli_name": "name", - "label": "Privilege name", - "name": "cn", + "cli_name": "login", + "name": "uid", + "alwaysask": true, "required": false, - "type": "str" + "label": "User login", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true }, { - "cli_name": "desc", - "doc": "Privilege description", - "label": "Description", - "name": "description", + "type": "str", "required": false, - "type": "str" + "cli_name": "first", + "name": "givenname", + "label": "First name" }, { - "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", + "type": "str", "required": false, - "type": "int" + "cli_name": "last", + "name": "sn", + "label": "Last name" }, { - "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", + "name": "cn", + "alwaysask": true, "required": false, - "type": "int" + "label": "Full name", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ] }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "name": "displayname", + "alwaysask": true, + "required": false, + "label": "Display name", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ] }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "name": "initials", + "alwaysask": true, + "required": false, + "label": "Initials", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ] }, { - "default": ["True"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui", "cli"], - "name": "no_members", - "positional": false, - "type": "bool" + "type": "str", + "required": false, + "cli_name": "homedir", + "name": "homedirectory", + "label": "Home directory" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"name\")", - "label": "Primary key only", - "name": "pkey_only", + "name": "gecos", + "alwaysask": true, "required": false, - "type": "bool" - } - ], - "topic_topic": "privilege/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify a privilege.", - "full_name": "privilege_mod/1", - "name": "privilege_mod", - "obj_class": "privilege/1", - "output": [ + "label": "GECOS", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ] + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "type": "str", "required": false, - "type": "str" + "cli_name": "shell", + "name": "loginshell", + "label": "Login shell" }, { - "name": "result", - "type": "dict" + "cli_name": "principal", + "name": "krbprincipalname", + "alwaysask": true, + "required": false, + "label": "Principal alias", + "multivalue": true, + "type": "Principal", + "default_from_param": [ + "uid" + ], + "no_convert": true }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ + "type": "datetime", + "required": false, + "cli_name": "principal_expiration", + "name": "krbprincipalexpiration", + "label": "Kerberos principal expiration" + }, { - "cli_name": "name", - "label": "Privilege name", - "name": "cn", - "type": "str" + "type": "datetime", + "required": false, + "cli_name": "password_expiration", + "name": "krbpasswordexpiration", + "label": "User password expiration" }, { - "cli_name": "desc", - "doc": "Privilege description", - "label": "Description", - "name": "description", + "cli_name": "email", + "name": "mail", "required": false, + "label": "Email address", + "multivalue": true, "type": "str" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", + "cli_name": "password", + "name": "userpassword", + "doc": "Prompt to set the user password", "required": false, + "label": "Password", + "sensitive": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", + "cli_name": "uid", + "name": "uidnumber", + "doc": "User ID Number (system will assign one if not provided)", "required": false, - "type": "str" + "label": "UID", + "type": "int" }, { - "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, - "name": "delattr", + "doc": "Group ID Number", "required": false, - "type": "str" + "type": "int", + "name": "gidnumber", + "label": "GID" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "type": "str", + "required": false, + "cli_name": "street", + "name": "street", + "label": "Street address" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "type": "str", + "required": false, + "cli_name": "city", + "name": "l", + "label": "City" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "type": "str", + "required": false, + "cli_name": "state", + "name": "st", + "label": "State/Province" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "postalcode", + "label": "ZIP" }, { - "cli_name": "rename", - "doc": "Rename the privilege object", - "label": "Rename", - "name": "rename", + "cli_name": "phone", + "name": "telephonenumber", "required": false, + "label": "Telephone Number", + "multivalue": true, "type": "str" - } - ], - "topic_topic": "privilege/1", - "version": "1" - }, - { - "attr_name": "remove_member", - "doc": "\n Remove members from a privilege\n ", - "exclude": ["cli"], - "full_name": "privilege_remove_member/1", - "name": "privilege_remove_member", - "obj_class": "privilege/1", - "output": [ - { - "name": "result", - "type": "dict" }, { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" + "type": "str", + "required": false, + "multivalue": true, + "name": "mobile", + "label": "Mobile Telephone Number" }, { - "doc": "Number of members removed", - "name": "completed", - "type": "int" - } - ], - "params": [ + "type": "str", + "required": false, + "multivalue": true, + "name": "pager", + "label": "Pager Number" + }, { - "cli_name": "name", - "label": "Privilege name", - "name": "cn", + "cli_name": "fax", + "name": "facsimiletelephonenumber", + "required": false, + "label": "Fax Number", + "multivalue": true, "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "type": "str", + "required": false, + "cli_name": "orgunit", + "name": "ou", + "label": "Org. Unit" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "title", + "label": "Job Title" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "manager", + "label": "Manager" }, { - "alwaysask": true, - "cli_name": "roles", - "doc": "roles to remove", - "label": "member role", - "multivalue": true, - "name": "role", + "type": "str", "required": false, - "type": "str" - } - ], - "topic_topic": "privilege/1", - "version": "1" - }, - { - "attr_name": "remove_permission", - "doc": "Remove permissions from a privilege.", - "full_name": "privilege_remove_permission/1", - "name": "privilege_remove_permission", - "obj_class": "privilege/1", - "output": [ - { - "name": "result", - "type": "dict" + "multivalue": true, + "name": "carlicense", + "label": "Car License" }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "cli_name": "user_auth_type", + "name": "ipauserauthtype", + "cli_metavar": "['password', 'radius', 'otp']", + "doc": "Types of supported user authentication", + "required": false, + "label": "User authentication types", + "multivalue": true, + "type": "str" }, { - "doc": "Number of permissions removed", - "name": "completed", - "type": "int" - } - ], - "params": [ - { - "cli_name": "name", - "label": "Privilege name", - "name": "cn", + "cli_name": "class", + "name": "userclass", + "doc": "User category (semantics placed on this attribute are for local interpretation)", + "required": false, + "label": "Class", + "multivalue": true, "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "type": "str", + "required": false, + "cli_name": "radius", + "name": "ipatokenradiusconfiglink", + "label": "RADIUS proxy configuration" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "type": "str", + "required": false, + "cli_name": "radius_username", + "name": "ipatokenradiususername", + "label": "RADIUS proxy username" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "type": "str", + "required": false, + "multivalue": true, + "name": "departmentnumber", + "label": "Department Number" }, { - "alwaysask": true, - "cli_name": "permissions", - "doc": "permissions", - "label": "permission", - "multivalue": true, - "name": "permission", "required": false, - "type": "str" - } - ], - "topic_topic": "privilege/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display information about a privilege.", - "full_name": "privilege_show/1", - "name": "privilege_show", - "obj_class": "privilege/1", - "output": [ + "type": "str", + "name": "employeenumber", + "label": "Employee Number" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "employeetype", + "label": "Employee Type" }, { - "name": "result", - "type": "dict" + "required": false, + "type": "str", + "name": "preferredlanguage", + "label": "Preferred Language" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ + "cli_name": "certificate", + "name": "usercertificate", + "doc": "Base-64 encoded user certificate", + "required": false, + "label": "Certificate", + "multivalue": true, + "type": "Certificate" + }, { - "cli_name": "name", - "label": "Privilege name", - "name": "cn", - "type": "str" + "doc": "Time limit of search in seconds (0 is unlimited)", + "required": false, + "type": "int", + "name": "timelimit", + "label": "Time Limit" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "doc": "Maximum number of entries returned (0 is unlimited)", + "required": false, + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "True" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui", + "cli" + ], "type": "bool" - } - ], - "topic_topic": "privilege/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Add a new group password policy.", - "full_name": "pwpolicy_add/1", - "name": "pwpolicy_add", - "obj_class": "pwpolicy/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" - }, - { - "name": "result", - "type": "dict" - }, - { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "group", - "doc": "Manage password policy for specific group", - "label": "Group", - "name": "cn", - "type": "str" - }, - { - "cli_name": "maxlife", - "doc": "Maximum password lifetime (in days)", - "label": "Max lifetime (days)", - "name": "krbmaxpwdlife", - "required": false, - "type": "int" - }, - { - "cli_name": "minlife", - "doc": "Minimum password lifetime (in hours)", - "label": "Min lifetime (hours)", - "name": "krbminpwdlife", - "required": false, - "type": "int" - }, - { - "cli_name": "history", - "doc": "Password history size", - "label": "History size", - "name": "krbpwdhistorylength", - "required": false, - "type": "int" }, { - "cli_name": "minclasses", - "doc": "Minimum number of character classes", - "label": "Character classes", - "name": "krbpwdmindiffchars", + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"login\")", "required": false, - "type": "int" + "label": "Primary key only", + "type": "bool" }, { - "cli_name": "minlength", - "doc": "Minimum length of password", - "label": "Min length", - "name": "krbpwdminlength", + "cli_name": "in_groups", + "name": "in_group", + "doc": "Search for stage users with these member of groups.", "required": false, - "type": "int" - }, - { - "cli_name": "priority", - "doc": - "Priority of the policy (higher number means lower priority", - "label": "Priority", - "name": "cospriority", - "positional": false, - "type": "int" + "label": "group", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_name": "maxfail", - "doc": "Consecutive failures before lockout", - "label": "Max failures", - "name": "krbpwdmaxfailure", + "cli_name": "not_in_groups", + "name": "not_in_group", + "doc": "Search for stage users without these member of groups.", "required": false, - "type": "int" + "label": "group", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_name": "failinterval", - "doc": "Period after which failure count will be reset (seconds)", - "label": "Failure reset interval", - "name": "krbpwdfailurecountinterval", + "cli_name": "in_netgroups", + "name": "in_netgroup", + "doc": "Search for stage users with these member of netgroups.", "required": false, - "type": "int" + "label": "netgroup", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_name": "lockouttime", - "doc": "Period for which lockout is enforced (seconds)", - "label": "Lockout duration", - "name": "krbpwdlockoutduration", + "cli_name": "not_in_netgroups", + "name": "not_in_netgroup", + "doc": "Search for stage users without these member of netgroups.", "required": false, - "type": "int" + "label": "netgroup", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", + "cli_name": "in_roles", + "name": "in_role", + "doc": "Search for stage users with these member of roles.", "required": false, + "label": "role", + "multivalue": true, "type": "str" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", + "cli_name": "not_in_roles", + "name": "not_in_role", + "doc": "Search for stage users without these member of roles.", "required": false, + "label": "role", + "multivalue": true, "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" - }, - { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "pwpolicy/1", - "version": "1" - }, - { - "attr_name": "del", - "doc": "Delete a group password policy.", - "full_name": "pwpolicy_del/1", - "name": "pwpolicy_del", - "obj_class": "pwpolicy/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", + "cli_name": "in_hbacrules", + "name": "in_hbacrule", + "doc": "Search for stage users with these member of HBAC rules.", "required": false, + "label": "HBAC rule", + "multivalue": true, "type": "str" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" - }, - { + "cli_name": "not_in_hbacrules", + "name": "not_in_hbacrule", + "doc": "Search for stage users without these member of HBAC rules.", + "required": false, + "label": "HBAC rule", "multivalue": true, - "name": "value", "type": "str" - } - ], - "params": [ + }, { - "cli_name": "group", - "doc": "Manage password policy for specific group", - "label": "Group", + "cli_name": "in_sudorules", + "name": "in_sudorule", + "doc": "Search for stage users with these member of sudo rules.", + "required": false, + "label": "sudo rule", "multivalue": true, - "name": "cn", "type": "str" }, { - "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", - "name": "continue", - "positional": false, - "type": "bool" + "cli_name": "not_in_sudorules", + "name": "not_in_sudorule", + "doc": "Search for stage users without these member of sudo rules.", + "required": false, + "label": "sudo rule", + "multivalue": true, + "type": "str" } ], - "topic_topic": "pwpolicy/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for group password policies.", - "full_name": "pwpolicy_find/1", - "name": "pwpolicy_find", - "obj_class": "pwpolicy/1", + "full_name": "stageuser_find/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { + "type": "dict", "multivalue": true, - "name": "result", - "type": "dict" + "name": "result" }, { "doc": "Number of entries returned", - "name": "count", - "type": "int" + "type": "int", + "name": "count" }, { "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" + "type": "bool", + "name": "truncated" } ], + "obj_class": "stageuser/1", + "topic_topic": "stageuser/1" + }, + { + "name": "stageuser_mod", + "doc": "Modify a stage user.", + "attr_name": "mod", + "version": "1", "params": [ { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, + "cli_name": "login", + "name": "uid", + "alwaysask": true, + "label": "User login", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true + }, + { + "type": "str", "required": false, - "type": "str" + "cli_name": "first", + "name": "givenname", + "label": "First name" + }, + { + "type": "str", + "required": false, + "cli_name": "last", + "name": "sn", + "label": "Last name" }, { - "cli_name": "group", - "doc": "Manage password policy for specific group", - "label": "Group", "name": "cn", + "alwaysask": true, "required": false, - "type": "str" + "label": "Full name", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ] }, { - "cli_name": "maxlife", - "doc": "Maximum password lifetime (in days)", - "label": "Max lifetime (days)", - "name": "krbmaxpwdlife", + "name": "displayname", + "alwaysask": true, "required": false, - "type": "int" + "label": "Display name", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ] }, { - "cli_name": "minlife", - "doc": "Minimum password lifetime (in hours)", - "label": "Min lifetime (hours)", - "name": "krbminpwdlife", + "name": "initials", + "alwaysask": true, "required": false, - "type": "int" + "label": "Initials", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ] }, { - "cli_name": "history", - "doc": "Password history size", - "label": "History size", - "name": "krbpwdhistorylength", + "type": "str", "required": false, - "type": "int" + "cli_name": "homedir", + "name": "homedirectory", + "label": "Home directory" }, { - "cli_name": "minclasses", - "doc": "Minimum number of character classes", - "label": "Character classes", - "name": "krbpwdmindiffchars", + "name": "gecos", + "alwaysask": true, "required": false, - "type": "int" + "label": "GECOS", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ] }, { - "cli_name": "minlength", - "doc": "Minimum length of password", - "label": "Min length", - "name": "krbpwdminlength", + "type": "str", "required": false, - "type": "int" + "cli_name": "shell", + "name": "loginshell", + "label": "Login shell" }, { - "cli_name": "priority", - "doc": - "Priority of the policy (higher number means lower priority", - "label": "Priority", - "name": "cospriority", + "cli_name": "principal", + "name": "krbprincipalname", + "alwaysask": true, "required": false, - "type": "int" + "label": "Principal alias", + "multivalue": true, + "type": "Principal", + "default_from_param": [ + "uid" + ], + "no_convert": true }, { - "cli_name": "maxfail", - "doc": "Consecutive failures before lockout", - "label": "Max failures", - "name": "krbpwdmaxfailure", + "type": "datetime", "required": false, - "type": "int" + "cli_name": "principal_expiration", + "name": "krbprincipalexpiration", + "label": "Kerberos principal expiration" }, { - "cli_name": "failinterval", - "doc": "Period after which failure count will be reset (seconds)", - "label": "Failure reset interval", - "name": "krbpwdfailurecountinterval", + "type": "datetime", "required": false, - "type": "int" + "cli_name": "password_expiration", + "name": "krbpasswordexpiration", + "label": "User password expiration" }, { - "cli_name": "lockouttime", - "doc": "Period for which lockout is enforced (seconds)", - "label": "Lockout duration", - "name": "krbpwdlockoutduration", + "cli_name": "email", + "name": "mail", "required": false, - "type": "int" + "label": "Email address", + "multivalue": true, + "type": "str" }, { - "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", + "cli_name": "password", + "name": "userpassword", + "doc": "Prompt to set the user password", "required": false, - "type": "int" + "label": "Password", + "sensitive": true, + "exclude": [ + "webui" + ], + "type": "str" }, { - "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", + "default": [ + "False" + ], + "doc": "Generate a random user password", + "required": false, + "type": "bool", + "name": "random" + }, + { + "cli_name": "uid", + "name": "uidnumber", + "doc": "User ID Number (system will assign one if not provided)", "required": false, + "label": "UID", "type": "int" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "doc": "Group ID Number", + "required": false, + "type": "int", + "name": "gidnumber", + "label": "GID" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "type": "str", + "required": false, + "cli_name": "street", + "name": "street", + "label": "Street address" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"group\")", - "label": "Primary key only", - "name": "pkey_only", + "type": "str", "required": false, - "type": "bool" - } - ], - "topic_topic": "pwpolicy/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify a group password policy.", - "full_name": "pwpolicy_mod/1", - "name": "pwpolicy_mod", - "obj_class": "pwpolicy/1", - "output": [ + "cli_name": "city", + "name": "l", + "label": "City" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "type": "str", "required": false, - "type": "str" + "cli_name": "state", + "name": "st", + "label": "State/Province" }, { - "name": "result", - "type": "dict" + "required": false, + "type": "str", + "name": "postalcode", + "label": "ZIP" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", + "cli_name": "phone", + "name": "telephonenumber", + "required": false, + "label": "Telephone Number", + "multivalue": true, "type": "str" - } - ], - "params": [ + }, { - "cli_name": "group", - "doc": "Manage password policy for specific group", - "label": "Group", - "name": "cn", - "positional": true, + "type": "str", + "required": false, + "multivalue": true, + "name": "mobile", + "label": "Mobile Telephone Number" + }, + { + "type": "str", + "required": false, + "multivalue": true, + "name": "pager", + "label": "Pager Number" + }, + { + "cli_name": "fax", + "name": "facsimiletelephonenumber", "required": false, + "label": "Fax Number", + "multivalue": true, "type": "str" }, { - "cli_name": "maxlife", - "doc": "Maximum password lifetime (in days)", - "label": "Max lifetime (days)", - "name": "krbmaxpwdlife", + "type": "str", "required": false, - "type": "int" + "cli_name": "orgunit", + "name": "ou", + "label": "Org. Unit" }, { - "cli_name": "minlife", - "doc": "Minimum password lifetime (in hours)", - "label": "Min lifetime (hours)", - "name": "krbminpwdlife", "required": false, - "type": "int" + "type": "str", + "name": "title", + "label": "Job Title" }, { - "cli_name": "history", - "doc": "Password history size", - "label": "History size", - "name": "krbpwdhistorylength", "required": false, - "type": "int" + "type": "str", + "name": "manager", + "label": "Manager" }, { - "cli_name": "minclasses", - "doc": "Minimum number of character classes", - "label": "Character classes", - "name": "krbpwdmindiffchars", + "type": "str", "required": false, - "type": "int" + "multivalue": true, + "name": "carlicense", + "label": "Car License" }, { - "cli_name": "minlength", - "doc": "Minimum length of password", - "label": "Min length", - "name": "krbpwdminlength", + "cli_name": "sshpubkey", + "name": "ipasshpubkey", "required": false, - "type": "int" + "label": "SSH public key", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_name": "priority", - "doc": - "Priority of the policy (higher number means lower priority", - "label": "Priority", - "name": "cospriority", + "cli_name": "user_auth_type", + "name": "ipauserauthtype", + "cli_metavar": "['password', 'radius', 'otp']", + "doc": "Types of supported user authentication", "required": false, - "type": "int" + "label": "User authentication types", + "multivalue": true, + "type": "str" }, { - "cli_name": "maxfail", - "doc": "Consecutive failures before lockout", - "label": "Max failures", - "name": "krbpwdmaxfailure", + "cli_name": "class", + "name": "userclass", + "doc": "User category (semantics placed on this attribute are for local interpretation)", "required": false, - "type": "int" + "label": "Class", + "multivalue": true, + "type": "str" }, { - "cli_name": "failinterval", - "doc": "Period after which failure count will be reset (seconds)", - "label": "Failure reset interval", - "name": "krbpwdfailurecountinterval", + "type": "str", "required": false, - "type": "int" + "cli_name": "radius", + "name": "ipatokenradiusconfiglink", + "label": "RADIUS proxy configuration" }, { - "cli_name": "lockouttime", - "doc": "Period for which lockout is enforced (seconds)", - "label": "Lockout duration", - "name": "krbpwdlockoutduration", + "type": "str", "required": false, - "type": "int" + "cli_name": "radius_username", + "name": "ipatokenradiususername", + "label": "RADIUS proxy username" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], + "type": "str", + "required": false, + "multivalue": true, + "name": "departmentnumber", + "label": "Department Number" + }, + { + "required": false, + "type": "str", + "name": "employeenumber", + "label": "Employee Number" + }, + { + "required": false, + "type": "str", + "name": "employeetype", + "label": "Employee Type" + }, + { + "required": false, + "type": "str", + "name": "preferredlanguage", + "label": "Preferred Language" + }, + { + "cli_name": "certificate", + "name": "usercertificate", + "doc": "Base-64 encoded user certificate", + "required": false, + "label": "Certificate", "multivalue": true, + "type": "Certificate" + }, + { + "cli_name": "setattr", "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" + }, + { + "cli_name": "rename", + "name": "rename", + "alwaysask": true, + "doc": "Rename the stage user object", + "required": false, + "label": "Rename", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true } ], - "topic_topic": "pwpolicy/1", - "version": "1" + "full_name": "stageuser_mod/1", + "output": [ + { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" + }, + { + "type": "dict", + "name": "result" + }, + { + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "stageuser/1", + "topic_topic": "stageuser/1" }, { - "attr_name": "show", - "doc": "Display information about password policy.", - "full_name": "pwpolicy_show/1", - "name": "pwpolicy_show", - "obj_class": "pwpolicy/1", + "name": "stageuser_remove_cert", + "doc": "Remove one or more certificates to the stageuser entry", + "attr_name": "remove_cert", + "version": "1", + "params": [ + { + "cli_name": "login", + "name": "uid", + "alwaysask": true, + "label": "User login", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true + }, + { + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "certificate", + "name": "usercertificate", + "alwaysask": true, + "doc": "Base-64 encoded user certificate", + "label": "Certificate", + "positional": false, + "multivalue": true, + "type": "Certificate" + } + ], + "full_name": "stageuser_remove_cert/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "stageuser/1", + "topic_topic": "stageuser/1" + }, + { + "name": "stageuser_remove_certmapdata", + "doc": "Remove one or more certificate mappings from the stage user entry.", + "attr_name": "remove_certmapdata", + "version": "1", "params": [ { - "cli_name": "group", - "doc": "Manage password policy for specific group", - "label": "Group", - "name": "cn", - "positional": true, + "cli_name": "login", + "name": "uid", + "alwaysask": true, + "label": "User login", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true + }, + { + "cli_name": "certmapdata", + "name": "ipacertmapdata", + "alwaysask": false, + "doc": "Certificate mapping data", "required": false, + "label": "Certificate mapping data", + "positional": true, + "multivalue": true, "type": "str" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "cli_name": "issuer", + "name": "issuer", + "doc": "Issuer of the certificate", + "required": false, + "label": "Issuer", + "type": "DN" + }, + { + "cli_name": "subject", + "name": "subject", + "doc": "Subject of the certificate", + "required": false, + "label": "Subject", + "type": "DN" }, { - "doc": "Display effective policy for a specific user", - "label": "User", - "name": "user", + "cli_name": "certificate", + "name": "certificate", + "doc": "Base-64 encoded user certificate", "required": false, - "type": "str" + "label": "Certificate", + "multivalue": true, + "type": "Certificate" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "pwpolicy/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Add a new RADIUS proxy server.", - "full_name": "radiusproxy_add/1", - "name": "radiusproxy_add", - "obj_class": "radiusproxy/1", + "full_name": "stageuser_remove_certmapdata/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "stageuser/1", + "topic_topic": "stageuser/1" + }, + { + "name": "stageuser_remove_manager", + "doc": "Remove a manager to the stage user entry", + "attr_name": "remove_manager", + "version": "1", "params": [ { - "cli_name": "name", - "label": "RADIUS proxy server name", - "name": "cn", - "type": "str" + "cli_name": "login", + "name": "uid", + "alwaysask": true, + "label": "User login", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true }, { - "cli_name": "desc", - "doc": "A description of this RADIUS proxy server", - "label": "Description", - "name": "description", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "server", - "doc": "The hostname or IP (with or without port)", - "label": "Server", - "multivalue": true, - "name": "ipatokenradiusserver", + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, - "type": "str" + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "secret", - "confirm": true, - "doc": "The secret used to encrypt data", - "label": "Secret", - "name": "ipatokenradiussecret", + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, - "sensitive": true, - "type": "str" + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "timeout", - "doc": "The total timeout across all retries (in seconds)", - "label": "Timeout", - "name": "ipatokenradiustimeout", + "cli_name": "users", + "name": "user", + "alwaysask": true, + "doc": "users to remove", "required": false, - "type": "int" - }, + "label": "member user", + "multivalue": true, + "type": "str" + } + ], + "full_name": "stageuser_remove_manager/1", + "output": [ { - "cli_name": "retries", - "doc": "The number of times to retry authentication", - "label": "Retries", - "name": "ipatokenradiusretries", - "required": false, - "type": "int" + "type": "dict", + "name": "result" }, { - "cli_name": "userattr", - "doc": "The username attribute on the user object", - "label": "User attribute", - "name": "ipatokenusermapattribute", - "required": false, - "type": "str" + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", - "required": false, - "type": "str" + "doc": "Number of members removed", + "type": "int", + "name": "completed" + } + ], + "obj_class": "stageuser/1", + "topic_topic": "stageuser/1" + }, + { + "name": "stageuser_remove_principal", + "doc": "Remove principal alias from the stageuser entry", + "attr_name": "remove_principal", + "version": "1", + "params": [ + { + "cli_name": "login", + "name": "uid", + "alwaysask": true, + "label": "User login", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], + "cli_name": "principal", + "name": "krbprincipalname", + "alwaysask": true, + "label": "Principal alias", "multivalue": true, - "name": "addattr", - "required": false, - "type": "str" + "type": "Principal", + "default_from_param": [ + "uid" + ], + "no_convert": true }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "radiusproxy/1", - "version": "1" - }, - { - "attr_name": "del", - "doc": "Delete a RADIUS proxy server.", - "full_name": "radiusproxy_del/1", - "name": "radiusproxy_del", - "obj_class": "radiusproxy/1", + "full_name": "stageuser_remove_principal/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "multivalue": true, - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "stageuser/1", + "topic_topic": "stageuser/1" + }, + { + "name": "stageuser_show", + "doc": "Display information about a stage user.", + "attr_name": "show", + "version": "1", "params": [ { - "cli_name": "name", - "label": "RADIUS proxy server name", - "multivalue": true, - "name": "cn", - "type": "str" + "cli_name": "login", + "name": "uid", + "alwaysask": true, + "label": "User login", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true }, { - "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", - "name": "continue", + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" + }, + { + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "radiusproxy/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for RADIUS proxy servers.", - "full_name": "radiusproxy_find/1", - "name": "radiusproxy_find", - "obj_class": "radiusproxy/1", + "full_name": "stageuser_show/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" - }, - { - "multivalue": true, - "name": "result", - "type": "dict" + "type": "str", + "name": "summary" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "type": "dict", + "name": "result" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "stageuser/1", + "topic_topic": "stageuser/1" + }, + { + "name": "sudocmd_add", + "doc": "Create new Sudo Command.", + "attr_name": "add", + "version": "1", "params": [ { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, - "required": false, - "type": "str" - }, - { - "cli_name": "name", - "label": "RADIUS proxy server name", - "name": "cn", - "required": false, - "type": "str" + "type": "str", + "cli_name": "command", + "name": "sudocmd", + "label": "Sudo Command" }, { "cli_name": "desc", - "doc": "A description of this RADIUS proxy server", - "label": "Description", "name": "description", + "doc": "A description of this command", "required": false, + "label": "Description", "type": "str" }, { - "cli_name": "server", - "doc": "The hostname or IP (with or without port)", - "label": "Server", - "multivalue": true, - "name": "ipatokenradiusserver", - "required": false, - "type": "str" - }, - { - "cli_name": "secret", - "confirm": true, - "doc": "The secret used to encrypt data", - "exclude": ["cli", "webui"], - "label": "Secret", - "name": "ipatokenradiussecret", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, - "sensitive": true, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "timeout", - "doc": "The total timeout across all retries (in seconds)", - "label": "Timeout", - "name": "ipatokenradiustimeout", - "required": false, - "type": "int" - }, - { - "cli_name": "retries", - "doc": "The number of times to retry authentication", - "label": "Retries", - "name": "ipatokenradiusretries", - "required": false, - "type": "int" - }, - { - "cli_name": "userattr", - "doc": "The username attribute on the user object", - "label": "User attribute", - "name": "ipatokenusermapattribute", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, - { - "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", - "required": false, - "type": "int" - }, - { - "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", - "required": false, - "type": "int" - }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"name\")", - "label": "Primary key only", - "name": "pkey_only", - "required": false, + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "radiusproxy/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify a RADIUS proxy server.", - "full_name": "radiusproxy_mod/1", - "name": "radiusproxy_mod", - "obj_class": "radiusproxy/1", + "full_name": "sudocmd_add/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "sudocmd/1", + "topic_topic": "sudocmd/1" + }, + { + "name": "sudocmd_del", + "doc": "Delete Sudo Command.", + "attr_name": "del", + "version": "1", "params": [ { - "cli_name": "name", - "label": "RADIUS proxy server name", - "name": "cn", + "cli_name": "command", + "label": "Sudo Command", + "multivalue": true, + "name": "sudocmd", "type": "str" }, { - "cli_name": "desc", - "doc": "A description of this RADIUS proxy server", - "label": "Description", - "name": "description", - "required": false, - "type": "str" - }, + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", + "positional": false, + "type": "bool" + } + ], + "full_name": "sudocmd_del/1", + "output": [ { - "cli_name": "server", - "doc": "The hostname or IP (with or without port)", - "label": "Server", - "multivalue": true, - "name": "ipatokenradiusserver", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "cli_name": "secret", - "confirm": true, - "doc": "The secret used to encrypt data", - "label": "Secret", - "name": "ipatokenradiussecret", - "required": false, - "sensitive": true, - "type": "str" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "cli_name": "timeout", - "doc": "The total timeout across all retries (in seconds)", - "label": "Timeout", - "name": "ipatokenradiustimeout", - "required": false, - "type": "int" - }, + "type": "str", + "multivalue": true, + "name": "value" + } + ], + "obj_class": "sudocmd/1", + "topic_topic": "sudocmd/1" + }, + { + "name": "sudocmd_find", + "doc": "Search for Sudo Commands.", + "attr_name": "find", + "version": "1", + "params": [ { - "cli_name": "retries", - "doc": "The number of times to retry authentication", - "label": "Retries", - "name": "ipatokenradiusretries", + "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, - "type": "int" + "type": "str", + "name": "criteria" }, { - "cli_name": "userattr", - "doc": "The username attribute on the user object", - "label": "User attribute", - "name": "ipatokenusermapattribute", + "type": "str", "required": false, - "type": "str" + "cli_name": "command", + "name": "sudocmd", + "label": "Sudo Command" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", + "cli_name": "desc", + "name": "description", + "doc": "A description of this command", "required": false, + "label": "Description", "type": "str" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", + "doc": "Time limit of search in seconds (0 is unlimited)", "required": false, - "type": "str" + "type": "int", + "name": "timelimit", + "label": "Time Limit" }, { - "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, - "name": "delattr", + "doc": "Maximum number of entries returned (0 is unlimited)", "required": false, - "type": "str" - }, - { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "cli_name": "rename", - "doc": "Rename the RADIUS proxy server object", - "label": "Rename", - "name": "rename", - "required": false, - "type": "str" - } - ], - "topic_topic": "radiusproxy/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display information about a RADIUS proxy server.", - "full_name": "radiusproxy_show/1", - "name": "radiusproxy_show", - "obj_class": "radiusproxy/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" - }, - { - "name": "result", - "type": "dict" - }, - { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "name", - "label": "RADIUS proxy server name", - "name": "cn", - "type": "str" - }, - { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" - }, - { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", + "name": "no_members", + "default": [ + "True" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui", + "cli" + ], "type": "bool" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"command\")", + "required": false, + "label": "Primary key only", "type": "bool" } ], - "topic_topic": "radiusproxy/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify realm domains.", - "full_name": "realmdomains_mod/1", - "name": "realmdomains_mod", - "obj_class": "realmdomains/1", + "full_name": "sudocmd_find/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" + }, + { + "type": "dict", + "multivalue": true, + "name": "result" }, { - "name": "result", - "type": "dict" + "doc": "Number of entries returned", + "type": "int", + "name": "count" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "NoneType" + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], + "obj_class": "sudocmd/1", + "topic_topic": "sudocmd/1" + }, + { + "name": "sudocmd_mod", + "doc": "Modify Sudo Command.", + "attr_name": "mod", + "version": "1", "params": [ { - "cli_name": "domain", - "label": "Domain", - "multivalue": true, - "name": "associateddomain", - "no_convert": true, - "required": false, - "type": "str" - }, - { - "cli_name": "add_domain", - "label": "Add domain", - "name": "add_domain", - "no_convert": true, - "required": false, - "type": "str" + "type": "str", + "cli_name": "command", + "name": "sudocmd", + "label": "Sudo Command" }, { - "cli_name": "del_domain", - "label": "Delete domain", - "name": "del_domain", - "no_convert": true, + "cli_name": "desc", + "name": "description", + "doc": "A description of this command", "required": false, + "label": "Description", "type": "str" }, { "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", "name": "rights", - "positional": false, - "type": "bool" - }, - { - "default": ["False"], - "doc": "Force adding domain even if not in DNS", - "label": "Force", - "name": "force", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "realmdomains/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display the list of realm domains.", - "full_name": "realmdomains_show/1", - "name": "realmdomains_show", - "obj_class": "realmdomains/1", + "full_name": "sudocmd_mod/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "NoneType" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "sudocmd/1", + "topic_topic": "sudocmd/1" + }, + { + "name": "sudocmd_show", + "doc": "Display Sudo Command.", + "attr_name": "show", + "version": "1", "params": [ { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", + "type": "str", + "cli_name": "command", + "name": "sudocmd", + "label": "Sudo Command" + }, + { "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "realmdomains/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Add a new role.", - "full_name": "role_add/1", - "name": "role_add", - "obj_class": "role/1", + "full_name": "sudocmd_show/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "sudocmd/1", + "topic_topic": "sudocmd/1" + }, + { + "name": "sudocmdgroup_add", + "doc": "Create new Sudo Command Group.", + "attr_name": "add", + "version": "1", "params": [ { - "cli_name": "name", - "label": "Role name", + "type": "str", + "no_convert": true, + "cli_name": "sudocmdgroup_name", "name": "cn", - "type": "str" + "label": "Sudo Command Group" }, { "cli_name": "desc", - "doc": "A description of this role-group", - "label": "Description", "name": "description", + "doc": "Group description", "required": false, + "label": "Description", "type": "str" }, { "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "role/1", - "version": "1" - }, - { - "attr_name": "add_member", - "doc": "Add members to a role.", - "full_name": "role_add_member/1", - "name": "role_add_member", - "obj_class": "role/1", + "full_name": "sudocmdgroup_add/1", "output": [ { - "name": "result", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": "Number of members added", - "name": "completed", - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "sudocmdgroup/1", + "topic_topic": "sudocmdgroup/1" + }, + { + "name": "sudocmdgroup_add_member", + "doc": "Add members to Sudo Command Group.", + "attr_name": "add_member", + "version": "1", "params": [ { - "cli_name": "name", - "label": "Role name", + "type": "str", + "no_convert": true, + "cli_name": "sudocmdgroup_name", "name": "cn", - "type": "str" + "label": "Sudo Command Group" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { + "cli_name": "sudocmds", + "name": "sudocmd", "alwaysask": true, - "cli_name": "users", - "doc": "users to add", - "label": "member user", - "multivalue": true, - "name": "user", - "required": false, - "type": "str" - }, - { - "alwaysask": true, - "cli_name": "groups", - "doc": "groups to add", - "label": "member group", - "multivalue": true, - "name": "group", - "required": false, - "type": "str" - }, - { - "alwaysask": true, - "cli_name": "hosts", - "doc": "hosts to add", - "label": "member host", - "multivalue": true, - "name": "host", - "required": false, - "type": "str" - }, - { - "alwaysask": true, - "cli_name": "hostgroups", - "doc": "host groups to add", - "label": "member host group", - "multivalue": true, - "name": "hostgroup", + "doc": "sudo commands to add", "required": false, - "type": "str" - }, - { - "alwaysask": true, - "cli_name": "services", - "doc": "services to add", - "label": "member service", + "label": "member sudo command", "multivalue": true, - "name": "service", - "required": false, "type": "str" } ], - "topic_topic": "role/1", - "version": "1" - }, - { - "attr_name": "add_privilege", - "doc": "Add privileges to a role.", - "full_name": "role_add_privilege/1", - "name": "role_add_privilege", - "obj_class": "role/1", + "full_name": "sudocmdgroup_add_member/1", "output": [ { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { "doc": "Members that could not be added", - "name": "failed", - "type": "dict" - }, - { - "doc": "Number of privileges added", - "name": "completed", - "type": "int" - } - ], - "params": [ - { - "cli_name": "name", - "label": "Role name", - "name": "cn", - "type": "str" - }, - { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" - }, - { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - }, - { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "type": "dict", + "name": "failed" }, { - "alwaysask": true, - "cli_name": "privileges", - "doc": "privileges", - "label": "privilege", - "multivalue": true, - "name": "privilege", - "required": false, - "type": "str" + "doc": "Number of members added", + "type": "int", + "name": "completed" } ], - "topic_topic": "role/1", - "version": "1" + "obj_class": "sudocmdgroup/1", + "topic_topic": "sudocmdgroup/1" }, { + "name": "sudocmdgroup_del", + "doc": "Delete Sudo Command Group.", "attr_name": "del", - "doc": "Delete a role.", - "full_name": "role_del/1", - "name": "role_del", - "obj_class": "role/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" - }, - { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" - }, - { - "multivalue": true, - "name": "value", - "type": "str" - } - ], + "version": "1", "params": [ { - "cli_name": "name", - "label": "Role name", - "multivalue": true, + "cli_name": "sudocmdgroup_name", "name": "cn", - "type": "str" + "label": "Sudo Command Group", + "multivalue": true, + "type": "str", + "no_convert": true }, { "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", "positional": false, "type": "bool" } ], - "topic_topic": "role/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for roles.", - "full_name": "role_find/1", - "name": "role_find", - "obj_class": "role/1", + "full_name": "sudocmdgroup_del/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" - }, - { - "multivalue": true, - "name": "result", - "type": "dict" + "type": "str", + "name": "summary" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" + "type": "str", + "multivalue": true, + "name": "value" } ], + "obj_class": "sudocmdgroup/1", + "topic_topic": "sudocmdgroup/1" + }, + { + "name": "sudocmdgroup_find", + "doc": "Search for Sudo Command Groups.", + "attr_name": "find", + "version": "1", "params": [ { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, - "type": "str" + "type": "str", + "name": "criteria" }, { - "cli_name": "name", - "label": "Role name", + "cli_name": "sudocmdgroup_name", "name": "cn", "required": false, - "type": "str" + "label": "Sudo Command Group", + "type": "str", + "no_convert": true }, { "cli_name": "desc", - "doc": "A description of this role-group", - "label": "Description", "name": "description", + "doc": "Group description", "required": false, + "label": "Description", "type": "str" }, { "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", "required": false, - "type": "int" + "type": "int", + "name": "timelimit", + "label": "Time Limit" }, { "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", "required": false, - "type": "int" + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["True"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui", "cli"], "name": "no_members", + "default": [ + "True" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui", + "cli" + ], "type": "bool" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"name\")", - "label": "Primary key only", "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"sudocmdgroup-name\")", "required": false, + "label": "Primary key only", "type": "bool" } ], - "topic_topic": "role/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify a role.", - "full_name": "role_mod/1", - "name": "role_mod", - "obj_class": "role/1", + "full_name": "sudocmdgroup_find/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "multivalue": true, + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "Number of entries returned", + "type": "int", + "name": "count" + }, + { + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], + "obj_class": "sudocmdgroup/1", + "topic_topic": "sudocmdgroup/1" + }, + { + "name": "sudocmdgroup_mod", + "doc": "Modify Sudo Command Group.", + "attr_name": "mod", + "version": "1", "params": [ { - "cli_name": "name", - "label": "Role name", + "type": "str", + "no_convert": true, + "cli_name": "sudocmdgroup_name", "name": "cn", - "type": "str" + "label": "Sudo Command Group" }, { "cli_name": "desc", - "doc": "A description of this role-group", - "label": "Description", "name": "description", + "doc": "Group description", "required": false, + "label": "Description", "type": "str" }, { "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" - }, - { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - }, - { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" - }, - { - "cli_name": "rename", - "doc": "Rename the role object", - "label": "Rename", - "name": "rename", - "required": false, - "type": "str" - } - ], - "topic_topic": "role/1", - "version": "1" - }, - { - "attr_name": "remove_member", - "doc": "Remove members from a role.", - "full_name": "role_remove_member/1", - "name": "role_remove_member", - "obj_class": "role/1", - "output": [ - { - "name": "result", - "type": "dict" - }, - { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" - }, - { - "doc": "Number of members removed", - "name": "completed", - "type": "int" - } - ], - "params": [ - { - "cli_name": "name", - "label": "Role name", - "name": "cn", - "type": "str" - }, - { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", - "positional": false, - "type": "bool" - }, - { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" - }, - { - "alwaysask": true, - "cli_name": "users", - "doc": "users to remove", - "label": "member user", - "multivalue": true, - "name": "user", - "required": false, - "type": "str" - }, - { - "alwaysask": true, - "cli_name": "groups", - "doc": "groups to remove", - "label": "member group", - "multivalue": true, - "name": "group", - "required": false, - "type": "str" - }, - { - "alwaysask": true, - "cli_name": "hosts", - "doc": "hosts to remove", - "label": "member host", - "multivalue": true, - "name": "host", - "required": false, - "type": "str" - }, - { - "alwaysask": true, - "cli_name": "hostgroups", - "doc": "host groups to remove", - "label": "member host group", - "multivalue": true, - "name": "hostgroup", - "required": false, - "type": "str" + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "alwaysask": true, - "cli_name": "services", - "doc": "services to remove", - "label": "member service", - "multivalue": true, - "name": "service", - "required": false, - "type": "str" + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" } ], - "topic_topic": "role/1", - "version": "1" - }, - { - "attr_name": "remove_privilege", - "doc": "Remove privileges from a role.", - "full_name": "role_remove_privilege/1", - "name": "role_remove_privilege", - "obj_class": "role/1", + "full_name": "sudocmdgroup_mod/1", "output": [ { - "name": "result", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": "Number of privileges removed", - "name": "completed", - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "sudocmdgroup/1", + "topic_topic": "sudocmdgroup/1" + }, + { + "name": "sudocmdgroup_remove_member", + "doc": "Remove members from Sudo Command Group.", + "attr_name": "remove_member", + "version": "1", "params": [ { - "cli_name": "name", - "label": "Role name", + "type": "str", + "no_convert": true, + "cli_name": "sudocmdgroup_name", "name": "cn", - "type": "str" + "label": "Sudo Command Group" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { + "cli_name": "sudocmds", + "name": "sudocmd", "alwaysask": true, - "cli_name": "privileges", - "doc": "privileges", - "label": "privilege", - "multivalue": true, - "name": "privilege", + "doc": "sudo commands to remove", "required": false, + "label": "member sudo command", + "multivalue": true, "type": "str" } ], - "topic_topic": "role/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display information about a role.", - "full_name": "role_show/1", - "name": "role_show", - "obj_class": "role/1", + "full_name": "sudocmdgroup_remove_member/1", "output": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "name": "result", - "type": "dict" + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "Number of members removed", + "type": "int", + "name": "completed" } ], + "obj_class": "sudocmdgroup/1", + "topic_topic": "sudocmdgroup/1" + }, + { + "name": "sudocmdgroup_show", + "doc": "Display Sudo Command Group.", + "attr_name": "show", + "version": "1", "params": [ { - "cli_name": "name", - "label": "Role name", + "type": "str", + "no_convert": true, + "cli_name": "sudocmdgroup_name", "name": "cn", - "type": "str" + "label": "Sudo Command Group" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "role/1", - "version": "1" - }, - { - "exclude": ["cli"], - "full_name": "schema/1", - "name": "schema", - "output": [ - { - "name": "result" - } - ], - "params": [ - { - "label": "Fingerprint of schema cached by client", - "multivalue": true, - "name": "known_fingerprints", - "required": false, - "type": "str" - } - ], - "topic_topic": "schema/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Add a new self-service permission.", - "full_name": "selfservice_add/1", - "name": "selfservice_add", - "obj_class": "selfservice/1", + "full_name": "sudocmdgroup_show/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "sudocmdgroup/1", + "topic_topic": "sudocmdgroup/1" + }, + { + "name": "sudorule_add", + "doc": "Create new Sudo Rule.", + "attr_name": "add", + "version": "1", "params": [ { - "cli_name": "name", - "doc": "Self-service name", - "label": "Self-service name", - "name": "aciname", - "type": "str" + "type": "str", + "cli_name": "sudorule_name", + "name": "cn", + "label": "Rule name" }, { - "cli_name": "permissions", - "doc": "Permissions to grant (read, write). Default is write.", - "label": "Permissions", - "multivalue": true, - "name": "permissions", + "type": "str", "required": false, - "type": "str" - }, - { - "cli_name": "attrs", - "doc": "Attributes to which the permission applies.", - "label": "Attributes", - "multivalue": true, - "name": "attrs", - "no_convert": true, - "positional": false, - "type": "str" + "cli_name": "desc", + "name": "description", + "label": "Description" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "exclude": [ + "cli", + "webui" + ], + "required": false, + "type": "bool", + "name": "ipaenabledflag", + "label": "Enabled" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "selfservice/1", - "version": "1" - }, - { - "attr_name": "del", - "doc": "Delete a self-service permission.", - "full_name": "selfservice_del/1", - "name": "selfservice_del", - "obj_class": "selfservice/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", + "cli_name": "usercat", + "name": "usercategory", + "cli_metavar": "['all']", + "doc": "User category the rule applies to", "required": false, + "label": "User category", "type": "str" }, { - "doc": "True means the operation was successful", - "name": "result", - "type": "bool" - }, - { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", + "cli_name": "hostcat", + "name": "hostcategory", + "cli_metavar": "['all']", + "doc": "Host category the rule applies to", + "required": false, + "label": "Host category", "type": "str" - } - ], - "params": [ + }, { - "cli_name": "name", - "doc": "Self-service name", - "label": "Self-service name", - "name": "aciname", + "cli_name": "cmdcat", + "name": "cmdcategory", + "cli_metavar": "['all']", + "doc": "Command category the rule applies to", + "required": false, + "label": "Command category", "type": "str" - } - ], - "topic_topic": "selfservice/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for a self-service permission.", - "full_name": "selfservice_find/1", - "name": "selfservice_find", - "obj_class": "selfservice/1", - "output": [ + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "cli_name": "runasusercat", + "name": "ipasudorunasusercategory", + "cli_metavar": "['all']", + "doc": "RunAs User category the rule applies to", "required": false, + "label": "RunAs User category", "type": "str" }, { - "multivalue": true, - "name": "result", - "type": "dict" + "cli_name": "runasgroupcat", + "name": "ipasudorunasgroupcategory", + "cli_metavar": "['all']", + "doc": "RunAs Group category the rule applies to", + "required": false, + "label": "RunAs Group category", + "type": "str" }, { - "doc": "Number of entries returned", - "name": "count", + "cli_name": "order", + "name": "sudoorder", + "alwaysask": true, + "default": [ + "0" + ], + "doc": "integer to order the Sudo rules", + "required": false, + "label": "Sudo order", "type": "int" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" - } - ], - "params": [ + "cli_name": "externaluser", + "name": "externaluser", + "doc": "External User the rule applies to (sudorule-find only)", + "required": false, + "label": "External User", + "type": "str" + }, { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, + "name": "externalhost", "required": false, + "label": "External host", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "cli_name": "name", - "doc": "Self-service name", - "label": "Self-service name", - "name": "aciname", + "cli_name": "runasexternaluser", + "name": "ipasudorunasextuser", + "doc": "External User the commands can run as (sudorule-find only)", "required": false, + "label": "RunAs External User", "type": "str" }, { - "cli_name": "permissions", - "doc": "Permissions to grant (read, write). Default is write.", - "label": "Permissions", - "multivalue": true, - "name": "permissions", + "cli_name": "runasexternalgroup", + "name": "ipasudorunasextgroup", + "doc": "External Group the commands can run as (sudorule-find only)", "required": false, + "label": "RunAs External Group", "type": "str" }, { - "cli_name": "attrs", - "doc": "Attributes to which the permission applies.", - "label": "Attributes", - "multivalue": true, - "name": "attrs", - "no_convert": true, + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"name\")", - "label": "Primary key only", - "name": "pkey_only", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, - "type": "bool" + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "selfservice/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify a self-service permission.", - "full_name": "selfservice_mod/1", - "name": "selfservice_mod", - "obj_class": "selfservice/1", + "full_name": "sudorule_add/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "sudorule/1", + "topic_topic": "sudorule/1" + }, + { + "name": "sudorule_add_allow_command", + "doc": "Add commands and sudo command groups affected by Sudo Rule.", + "attr_name": "add_allow_command", + "version": "1", "params": [ { - "cli_name": "name", - "doc": "Self-service name", - "label": "Self-service name", - "name": "aciname", - "type": "str" + "type": "str", + "cli_name": "sudorule_name", + "name": "cn", + "label": "Rule name" }, { - "cli_name": "permissions", - "doc": "Permissions to grant (read, write). Default is write.", - "label": "Permissions", - "multivalue": true, - "name": "permissions", + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "sudocmds", + "name": "sudocmd", + "alwaysask": true, + "doc": "sudo commands to add", "required": false, + "label": "member sudo command", + "multivalue": true, "type": "str" }, { - "cli_name": "attrs", - "doc": "Attributes to which the permission applies.", - "label": "Attributes", - "multivalue": true, - "name": "attrs", - "no_convert": true, + "cli_name": "sudocmdgroups", + "name": "sudocmdgroup", + "alwaysask": true, + "doc": "sudo command groups to add", "required": false, + "label": "member sudo command group", + "multivalue": true, "type": "str" + } + ], + "full_name": "sudorule_add_allow_command/1", + "output": [ + { + "type": "dict", + "name": "result" + }, + { + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" + }, + { + "doc": "Number of members added", + "type": "int", + "name": "completed" + } + ], + "obj_class": "sudorule/1", + "topic_topic": "sudorule/1" + }, + { + "name": "sudorule_add_deny_command", + "doc": "Add commands and sudo command groups affected by Sudo Rule.", + "attr_name": "add_deny_command", + "version": "1", + "params": [ + { + "type": "str", + "cli_name": "sudorule_name", + "name": "cn", + "label": "Rule name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" + }, + { + "cli_name": "sudocmds", + "name": "sudocmd", + "alwaysask": true, + "doc": "sudo commands to add", + "required": false, + "label": "member sudo command", + "multivalue": true, + "type": "str" + }, + { + "cli_name": "sudocmdgroups", + "name": "sudocmdgroup", + "alwaysask": true, + "doc": "sudo command groups to add", + "required": false, + "label": "member sudo command group", + "multivalue": true, + "type": "str" } ], - "topic_topic": "selfservice/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display information about a self-service permission.", - "full_name": "selfservice_show/1", - "name": "selfservice_show", - "obj_class": "selfservice/1", + "full_name": "sudorule_add_deny_command/1", "output": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "name": "result", - "type": "dict" + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "Number of members added", + "type": "int", + "name": "completed" } ], + "obj_class": "sudorule/1", + "topic_topic": "sudorule/1" + }, + { + "name": "sudorule_add_host", + "doc": "Add hosts and hostgroups affected by Sudo Rule.", + "attr_name": "add_host", + "version": "1", "params": [ { - "cli_name": "name", - "doc": "Self-service name", - "label": "Self-service name", - "name": "aciname", - "type": "str" + "type": "str", + "cli_name": "sudorule_name", + "name": "cn", + "label": "Rule name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" + }, + { + "cli_name": "hosts", + "name": "host", + "alwaysask": true, + "doc": "hosts to add", + "required": false, + "label": "member host", + "multivalue": true, + "type": "str" + }, + { + "cli_name": "hostgroups", + "name": "hostgroup", + "alwaysask": true, + "doc": "host groups to add", + "required": false, + "label": "member host group", + "multivalue": true, + "type": "str" + }, + { + "type": "str", + "required": false, + "multivalue": true, + "name": "hostmask", + "label": "host masks of allowed hosts" } ], - "topic_topic": "selfservice/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Create a new SELinux User Map.", - "full_name": "selinuxusermap_add/1", - "name": "selinuxusermap_add", - "obj_class": "selinuxusermap/1", + "full_name": "sudorule_add_host/1", "output": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "name": "result", - "type": "dict" + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "Number of members added", + "type": "int", + "name": "completed" } ], + "obj_class": "sudorule/1", + "topic_topic": "sudorule/1" + }, + { + "name": "sudorule_add_option", + "doc": "Add an option to the Sudo Rule.", + "attr_name": "add_option", + "version": "1", "params": [ { - "cli_name": "name", - "label": "Rule name", + "type": "str", + "cli_name": "sudorule_name", "name": "cn", - "type": "str" + "label": "Rule name" }, { - "cli_name": "selinuxuser", - "label": "SELinux User", - "name": "ipaselinuxuser", "positional": false, - "type": "str" + "type": "str", + "cli_name": "sudooption", + "name": "ipasudoopt", + "label": "Sudo Option" }, { - "cli_name": "hbacrule", - "doc": "HBAC Rule that defines the users, groups and hostgroups", - "label": "HBAC Rule", - "name": "seealso", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_metavar": "['all']", - "cli_name": "usercat", - "doc": "User category the rule applies to", - "label": "User category", - "name": "usercategory", - "required": false, - "type": "str" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_metavar": "['all']", - "cli_name": "hostcat", - "doc": "Host category the rule applies to", - "label": "Host category", - "name": "hostcategory", - "required": false, - "type": "str" - }, + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "sudorule_add_option/1", + "output": [ { - "cli_name": "desc", - "label": "Description", - "name": "description", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "exclude": ["cli", "webui"], - "label": "Enabled", - "name": "ipaenabledflag", - "required": false, - "type": "bool" + "type": "dict", + "name": "result" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", - "required": false, - "type": "str" - }, + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "sudorule/1", + "topic_topic": "sudorule/1" + }, + { + "name": "sudorule_add_runasgroup", + "doc": "Add group for Sudo to execute as.", + "attr_name": "add_runasgroup", + "version": "1", + "params": [ { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", - "required": false, - "type": "str" + "type": "str", + "cli_name": "sudorule_name", + "name": "cn", + "label": "Rule name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" + }, + { + "cli_name": "groups", + "name": "group", + "alwaysask": true, + "doc": "groups to add", + "required": false, + "label": "member group", + "multivalue": true, + "type": "str" } ], - "topic_topic": "selinuxusermap/1", - "version": "1" - }, - { - "attr_name": "add_host", - "doc": "Add target hosts and hostgroups to an SELinux User Map rule.", - "full_name": "selinuxusermap_add_host/1", - "name": "selinuxusermap_add_host", - "obj_class": "selinuxusermap/1", + "full_name": "sudorule_add_runasgroup/1", "output": [ { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "type": "dict", + "name": "failed" }, { "doc": "Number of members added", - "name": "completed", - "type": "int" + "type": "int", + "name": "completed" } ], + "obj_class": "sudorule/1", + "topic_topic": "sudorule/1" + }, + { + "name": "sudorule_add_runasuser", + "doc": "Add users and groups for Sudo to execute as.", + "attr_name": "add_runasuser", + "version": "1", "params": [ { - "cli_name": "name", - "label": "Rule name", + "type": "str", + "cli_name": "sudorule_name", "name": "cn", - "type": "str" + "label": "Rule name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { + "cli_name": "users", + "name": "user", "alwaysask": true, - "cli_name": "hosts", - "doc": "hosts to add", - "label": "member host", - "multivalue": true, - "name": "host", + "doc": "users to add", "required": false, + "label": "member user", + "multivalue": true, "type": "str" }, { + "cli_name": "groups", + "name": "group", "alwaysask": true, - "cli_name": "hostgroups", - "doc": "host groups to add", - "label": "member host group", - "multivalue": true, - "name": "hostgroup", + "doc": "groups to add", "required": false, + "label": "member group", + "multivalue": true, "type": "str" } ], - "topic_topic": "selinuxusermap/1", - "version": "1" - }, - { - "attr_name": "add_user", - "doc": "Add users and groups to an SELinux User Map rule.", - "full_name": "selinuxusermap_add_user/1", - "name": "selinuxusermap_add_user", - "obj_class": "selinuxusermap/1", + "full_name": "sudorule_add_runasuser/1", "output": [ { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "type": "dict", + "name": "failed" }, { "doc": "Number of members added", - "name": "completed", - "type": "int" + "type": "int", + "name": "completed" } ], + "obj_class": "sudorule/1", + "topic_topic": "sudorule/1" + }, + { + "name": "sudorule_add_user", + "doc": "Add users and groups affected by Sudo Rule.", + "attr_name": "add_user", + "version": "1", "params": [ { - "cli_name": "name", - "label": "Rule name", + "type": "str", + "cli_name": "sudorule_name", "name": "cn", - "type": "str" + "label": "Rule name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "alwaysask": true, "cli_name": "users", + "name": "user", + "alwaysask": true, "doc": "users to add", + "required": false, "label": "member user", "multivalue": true, - "name": "user", - "required": false, "type": "str" }, { - "alwaysask": true, "cli_name": "groups", + "name": "group", + "alwaysask": true, "doc": "groups to add", + "required": false, "label": "member group", "multivalue": true, - "name": "group", - "required": false, "type": "str" } ], - "topic_topic": "selinuxusermap/1", - "version": "1" - }, - { - "attr_name": "del", - "doc": "Delete a SELinux User Map.", - "full_name": "selinuxusermap_del/1", - "name": "selinuxusermap_del", - "obj_class": "selinuxusermap/1", + "full_name": "sudorule_add_user/1", "output": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" }, { - "multivalue": true, - "name": "value", - "type": "str" + "doc": "Number of members added", + "type": "int", + "name": "completed" } ], + "obj_class": "sudorule/1", + "topic_topic": "sudorule/1" + }, + { + "name": "sudorule_del", + "doc": "Delete Sudo Rule.", + "attr_name": "del", + "version": "1", "params": [ { - "cli_name": "name", + "cli_name": "sudorule_name", "label": "Rule name", "multivalue": true, "name": "cn", @@ -35160,14874 +40946,15308 @@ }, { "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", "positional": false, "type": "bool" } ], - "topic_topic": "selinuxusermap/1", - "version": "1" - }, - { - "attr_name": "disable", - "doc": "Disable an SELinux User Map rule.", - "full_name": "selinuxusermap_disable/1", - "name": "selinuxusermap_disable", - "obj_class": "selinuxusermap/1", + "full_name": "sudorule_del/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "True means the operation was successful", - "name": "result", - "type": "bool" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "type": "str", + "multivalue": true, + "name": "value" } ], + "obj_class": "sudorule/1", + "topic_topic": "sudorule/1" + }, + { + "name": "sudorule_disable", + "doc": "Disable a Sudo Rule.", + "attr_name": "disable", + "version": "1", "params": [ { - "cli_name": "name", - "label": "Rule name", + "type": "str", + "cli_name": "sudorule_name", "name": "cn", - "type": "str" + "label": "Rule name" } ], - "topic_topic": "selinuxusermap/1", - "version": "1" - }, - { - "attr_name": "enable", - "doc": "Enable an SELinux User Map rule.", - "full_name": "selinuxusermap_enable/1", - "name": "selinuxusermap_enable", - "obj_class": "selinuxusermap/1", + "full_name": "sudorule_disable/1", "output": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" - }, - { - "doc": "True means the operation was successful", - "name": "result", - "type": "bool" - }, - { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "name": "result" } ], + "obj_class": "sudorule/1", + "topic_topic": "sudorule/1" + }, + { + "name": "sudorule_enable", + "doc": "Enable a Sudo Rule.", + "attr_name": "enable", + "version": "1", "params": [ { - "cli_name": "name", - "label": "Rule name", + "type": "str", + "cli_name": "sudorule_name", "name": "cn", - "type": "str" + "label": "Rule name" + } + ], + "full_name": "sudorule_enable/1", + "output": [ + { + "name": "result" } ], - "topic_topic": "selinuxusermap/1", - "version": "1" + "obj_class": "sudorule/1", + "topic_topic": "sudorule/1" }, { + "name": "sudorule_find", + "doc": "Search for Sudo Rule.", "attr_name": "find", - "doc": "Search for SELinux User Maps.", - "full_name": "selinuxusermap_find/1", - "name": "selinuxusermap_find", - "obj_class": "selinuxusermap/1", - "output": [ + "version": "1", + "params": [ { - "doc": "User-friendly description of action performed", - "name": "summary", + "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, - "type": "str" + "type": "str", + "name": "criteria" }, { - "multivalue": true, - "name": "result", - "type": "dict" + "type": "str", + "required": false, + "cli_name": "sudorule_name", + "name": "cn", + "label": "Rule name" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "type": "str", + "required": false, + "cli_name": "desc", + "name": "description", + "label": "Description" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" - } - ], - "params": [ + "exclude": [ + "cli", + "webui" + ], + "required": false, + "type": "bool", + "name": "ipaenabledflag", + "label": "Enabled" + }, { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, + "cli_name": "usercat", + "name": "usercategory", + "cli_metavar": "['all']", + "doc": "User category the rule applies to", "required": false, + "label": "User category", "type": "str" }, { - "cli_name": "name", - "label": "Rule name", - "name": "cn", + "cli_name": "hostcat", + "name": "hostcategory", + "cli_metavar": "['all']", + "doc": "Host category the rule applies to", "required": false, + "label": "Host category", "type": "str" }, { - "cli_name": "selinuxuser", - "label": "SELinux User", - "name": "ipaselinuxuser", + "cli_name": "cmdcat", + "name": "cmdcategory", + "cli_metavar": "['all']", + "doc": "Command category the rule applies to", "required": false, + "label": "Command category", "type": "str" }, { - "cli_name": "hbacrule", - "doc": "HBAC Rule that defines the users, groups and hostgroups", - "label": "HBAC Rule", - "name": "seealso", + "cli_name": "runasusercat", + "name": "ipasudorunasusercategory", + "cli_metavar": "['all']", + "doc": "RunAs User category the rule applies to", "required": false, + "label": "RunAs User category", "type": "str" }, { + "cli_name": "runasgroupcat", + "name": "ipasudorunasgroupcategory", "cli_metavar": "['all']", - "cli_name": "usercat", - "doc": "User category the rule applies to", - "label": "User category", - "name": "usercategory", + "doc": "RunAs Group category the rule applies to", "required": false, + "label": "RunAs Group category", "type": "str" }, { - "cli_metavar": "['all']", - "cli_name": "hostcat", - "doc": "Host category the rule applies to", - "label": "Host category", - "name": "hostcategory", + "cli_name": "order", + "name": "sudoorder", + "alwaysask": true, + "default": [ + "0" + ], + "doc": "integer to order the Sudo rules", + "required": false, + "label": "Sudo order", + "type": "int" + }, + { + "cli_name": "externaluser", + "name": "externaluser", + "doc": "External User the rule applies to (sudorule-find only)", "required": false, + "label": "External User", "type": "str" }, { - "cli_name": "desc", - "label": "Description", - "name": "description", + "name": "externalhost", "required": false, + "label": "External host", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "exclude": ["cli", "webui"], - "label": "Enabled", - "name": "ipaenabledflag", + "cli_name": "runasexternaluser", + "name": "ipasudorunasextuser", + "doc": "External User the commands can run as (sudorule-find only)", "required": false, - "type": "bool" + "label": "RunAs External User", + "type": "str" + }, + { + "cli_name": "runasexternalgroup", + "name": "ipasudorunasextgroup", + "doc": "External Group the commands can run as (sudorule-find only)", + "required": false, + "label": "RunAs External Group", + "type": "str" }, { "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", "required": false, - "type": "int" + "type": "int", + "name": "timelimit", + "label": "Time Limit" }, { "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", "required": false, - "type": "int" + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["True"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui", "cli"], "name": "no_members", + "default": [ + "True" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui", + "cli" + ], "type": "bool" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"name\")", - "label": "Primary key only", "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"sudorule-name\")", "required": false, + "label": "Primary key only", "type": "bool" } ], - "topic_topic": "selinuxusermap/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify a SELinux User Map.", - "full_name": "selinuxusermap_mod/1", - "name": "selinuxusermap_mod", - "obj_class": "selinuxusermap/1", + "full_name": "sudorule_find/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "multivalue": true, + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "Number of entries returned", + "type": "int", + "name": "count" + }, + { + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], + "obj_class": "sudorule/1", + "topic_topic": "sudorule/1" + }, + { + "name": "sudorule_mod", + "doc": "Modify Sudo Rule.", + "attr_name": "mod", + "version": "1", "params": [ { - "cli_name": "name", - "label": "Rule name", + "type": "str", + "cli_name": "sudorule_name", "name": "cn", + "label": "Rule name" + }, + { + "type": "str", + "required": false, + "cli_name": "desc", + "name": "description", + "label": "Description" + }, + { + "exclude": [ + "cli", + "webui" + ], + "required": false, + "type": "bool", + "name": "ipaenabledflag", + "label": "Enabled" + }, + { + "cli_name": "usercat", + "name": "usercategory", + "cli_metavar": "['all']", + "doc": "User category the rule applies to", + "required": false, + "label": "User category", "type": "str" }, { - "cli_name": "selinuxuser", - "label": "SELinux User", - "name": "ipaselinuxuser", + "cli_name": "hostcat", + "name": "hostcategory", + "cli_metavar": "['all']", + "doc": "Host category the rule applies to", "required": false, + "label": "Host category", "type": "str" }, { - "cli_name": "hbacrule", - "doc": "HBAC Rule that defines the users, groups and hostgroups", - "label": "HBAC Rule", - "name": "seealso", + "cli_name": "cmdcat", + "name": "cmdcategory", + "cli_metavar": "['all']", + "doc": "Command category the rule applies to", + "required": false, + "label": "Command category", + "type": "str" + }, + { + "cli_name": "runasusercat", + "name": "ipasudorunasusercategory", + "cli_metavar": "['all']", + "doc": "RunAs User category the rule applies to", + "required": false, + "label": "RunAs User category", + "type": "str" + }, + { + "cli_name": "runasgroupcat", + "name": "ipasudorunasgroupcategory", + "cli_metavar": "['all']", + "doc": "RunAs Group category the rule applies to", "required": false, + "label": "RunAs Group category", "type": "str" }, { - "cli_metavar": "['all']", - "cli_name": "usercat", - "doc": "User category the rule applies to", - "label": "User category", - "name": "usercategory", + "cli_name": "order", + "name": "sudoorder", + "alwaysask": true, + "default": [ + "0" + ], + "doc": "integer to order the Sudo rules", + "required": false, + "label": "Sudo order", + "type": "int" + }, + { + "cli_name": "externaluser", + "name": "externaluser", + "doc": "External User the rule applies to (sudorule-find only)", "required": false, + "label": "External User", "type": "str" }, { - "cli_metavar": "['all']", - "cli_name": "hostcat", - "doc": "Host category the rule applies to", - "label": "Host category", - "name": "hostcategory", + "name": "externalhost", "required": false, + "label": "External host", + "multivalue": true, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "cli_name": "desc", - "label": "Description", - "name": "description", + "cli_name": "runasexternaluser", + "name": "ipasudorunasextuser", + "doc": "External User the commands can run as (sudorule-find only)", "required": false, + "label": "RunAs External User", "type": "str" }, { - "exclude": ["cli", "webui"], - "label": "Enabled", - "name": "ipaenabledflag", + "cli_name": "runasexternalgroup", + "name": "ipasudorunasextgroup", + "doc": "External Group the commands can run as (sudorule-find only)", "required": false, - "type": "bool" + "label": "RunAs External Group", + "type": "str" }, { "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" + }, + { + "cli_name": "rename", + "name": "rename", + "doc": "Rename the sudo rule object", + "required": false, + "label": "Rename", + "type": "str" } ], - "topic_topic": "selinuxusermap/1", - "version": "1" - }, - { - "attr_name": "remove_host", - "doc": - "Remove target hosts and hostgroups from an SELinux User Map rule.", - "full_name": "selinuxusermap_remove_host/1", - "name": "selinuxusermap_remove_host", - "obj_class": "selinuxusermap/1", + "full_name": "sudorule_mod/1", "output": [ { - "name": "result", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": "Number of members removed", - "name": "completed", - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "sudorule/1", + "topic_topic": "sudorule/1" + }, + { + "name": "sudorule_remove_allow_command", + "doc": "Remove commands and sudo command groups affected by Sudo Rule.", + "attr_name": "remove_allow_command", + "version": "1", "params": [ { - "cli_name": "name", - "label": "Rule name", + "type": "str", + "cli_name": "sudorule_name", "name": "cn", - "type": "str" + "label": "Rule name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { + "cli_name": "sudocmds", + "name": "sudocmd", "alwaysask": true, - "cli_name": "hosts", - "doc": "hosts to remove", - "label": "member host", - "multivalue": true, - "name": "host", + "doc": "sudo commands to remove", "required": false, + "label": "member sudo command", + "multivalue": true, "type": "str" }, { + "cli_name": "sudocmdgroups", + "name": "sudocmdgroup", "alwaysask": true, - "cli_name": "hostgroups", - "doc": "host groups to remove", - "label": "member host group", - "multivalue": true, - "name": "hostgroup", + "doc": "sudo command groups to remove", "required": false, + "label": "member sudo command group", + "multivalue": true, "type": "str" } ], - "topic_topic": "selinuxusermap/1", - "version": "1" - }, - { - "attr_name": "remove_user", - "doc": "Remove users and groups from an SELinux User Map rule.", - "full_name": "selinuxusermap_remove_user/1", - "name": "selinuxusermap_remove_user", - "obj_class": "selinuxusermap/1", + "full_name": "sudorule_remove_allow_command/1", "output": [ { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" + "type": "dict", + "name": "failed" }, { "doc": "Number of members removed", - "name": "completed", - "type": "int" + "type": "int", + "name": "completed" } ], + "obj_class": "sudorule/1", + "topic_topic": "sudorule/1" + }, + { + "name": "sudorule_remove_deny_command", + "doc": "Remove commands and sudo command groups affected by Sudo Rule.", + "attr_name": "remove_deny_command", + "version": "1", "params": [ { - "cli_name": "name", - "label": "Rule name", + "type": "str", + "cli_name": "sudorule_name", "name": "cn", - "type": "str" + "label": "Rule name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { + "cli_name": "sudocmds", + "name": "sudocmd", "alwaysask": true, - "cli_name": "users", - "doc": "users to remove", - "label": "member user", - "multivalue": true, - "name": "user", + "doc": "sudo commands to remove", "required": false, + "label": "member sudo command", + "multivalue": true, "type": "str" }, { + "cli_name": "sudocmdgroups", + "name": "sudocmdgroup", "alwaysask": true, - "cli_name": "groups", - "doc": "groups to remove", - "label": "member group", - "multivalue": true, - "name": "group", + "doc": "sudo command groups to remove", "required": false, + "label": "member sudo command group", + "multivalue": true, "type": "str" } ], - "topic_topic": "selinuxusermap/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display the properties of a SELinux User Map rule.", - "full_name": "selinuxusermap_show/1", - "name": "selinuxusermap_show", - "obj_class": "selinuxusermap/1", + "full_name": "sudorule_remove_deny_command/1", "output": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "name": "result", - "type": "dict" + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "Number of members removed", + "type": "int", + "name": "completed" } ], + "obj_class": "sudorule/1", + "topic_topic": "sudorule/1" + }, + { + "name": "sudorule_remove_host", + "doc": "Remove hosts and hostgroups affected by Sudo Rule.", + "attr_name": "remove_host", + "version": "1", "params": [ { - "cli_name": "name", - "label": "Rule name", + "type": "str", + "cli_name": "sudorule_name", "name": "cn", - "type": "str" - }, - { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "label": "Rule name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - } - ], - "topic_topic": "selinuxusermap/1", - "version": "1" - }, - { - "attr_name": "conncheck", - "doc": "Check connection to remote IPA server.", - "exclude": ["cli"], - "full_name": "server_conncheck/1", - "name": "server_conncheck", - "obj_class": "server/1", - "output": [ + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "cli_name": "hosts", + "name": "host", + "alwaysask": true, + "doc": "hosts to remove", "required": false, + "label": "member host", + "multivalue": true, "type": "str" }, { - "doc": "True means the operation was successful", - "name": "result", - "type": "bool" - }, - { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "name", - "doc": "IPA server hostname", - "label": "Server name", - "name": "cn", + "cli_name": "hostgroups", + "name": "hostgroup", + "alwaysask": true, + "doc": "host groups to remove", + "required": false, + "label": "member host group", + "multivalue": true, "type": "str" }, { - "cli_name": "remote_name", - "doc": "Remote IPA server hostname", - "label": "Remote server name", - "name": "remote_cn", - "type": "str" + "type": "str", + "required": false, + "multivalue": true, + "name": "hostmask", + "label": "host masks of allowed hosts" } ], - "topic_topic": "server/1", - "version": "1" - }, - { - "attr_name": "del", - "doc": "Delete IPA server.", - "full_name": "server_del/1", - "name": "server_del", - "obj_class": "server/1", + "full_name": "sudorule_remove_host/1", "output": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" }, { - "multivalue": true, - "name": "value", - "type": "str" + "doc": "Number of members removed", + "type": "int", + "name": "completed" } ], + "obj_class": "sudorule/1", + "topic_topic": "sudorule/1" + }, + { + "name": "sudorule_remove_option", + "doc": "Remove an option from Sudo Rule.", + "attr_name": "remove_option", + "version": "1", "params": [ { - "cli_name": "name", - "doc": "IPA server hostname", - "label": "Server name", - "multivalue": true, + "type": "str", + "cli_name": "sudorule_name", "name": "cn", - "type": "str" + "label": "Rule name" }, { - "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", - "name": "continue", "positional": false, - "type": "bool" + "type": "str", + "cli_name": "sudooption", + "name": "ipasudoopt", + "label": "Sudo Option" }, { - "default": ["False"], - "doc": "Ignore topology connectivity problems after removal", - "label": "Ignore topology errors", - "name": "ignore_topology_disconnect", - "required": false, + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": - "Skip a check whether the last CA master or DNS server is removed", - "label": "Ignore check for last remaining CA or DNS server", - "name": "ignore_last_of_role", - "required": false, + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Force server removal even if it does not exist", - "label": "Force server removal", - "name": "force", - "required": false, + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "server/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for IPA servers.", - "full_name": "server_find/1", - "name": "server_find", - "obj_class": "server/1", + "full_name": "sudorule_remove_option/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" - }, - { - "multivalue": true, - "name": "result", - "type": "dict" + "type": "str", + "name": "summary" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "type": "dict", + "name": "result" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "sudorule/1", + "topic_topic": "sudorule/1" + }, + { + "name": "sudorule_remove_runasgroup", + "doc": "Remove group for Sudo to execute as.", + "attr_name": "remove_runasgroup", + "version": "1", "params": [ { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, - "required": false, - "type": "str" + "type": "str", + "cli_name": "sudorule_name", + "name": "cn", + "label": "Rule name" }, { - "cli_name": "name", - "doc": "IPA server hostname", - "label": "Server name", - "name": "cn", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "minlevel", - "doc": "Minimum domain level", - "label": "Min domain level", - "name": "ipamindomainlevel", - "required": false, - "type": "int" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "maxlevel", - "doc": "Maximum domain level", - "label": "Max domain level", - "name": "ipamaxdomainlevel", - "required": false, - "type": "int" + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", + "cli_name": "groups", + "name": "group", + "alwaysask": true, + "doc": "groups to remove", "required": false, - "type": "int" + "label": "member group", + "multivalue": true, + "type": "str" + } + ], + "full_name": "sudorule_remove_runasgroup/1", + "output": [ + { + "type": "dict", + "name": "result" }, { - "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", - "required": false, - "type": "int" + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" + }, + { + "doc": "Number of members removed", + "type": "int", + "name": "completed" + } + ], + "obj_class": "sudorule/1", + "topic_topic": "sudorule/1" + }, + { + "name": "sudorule_remove_runasuser", + "doc": "Remove users and groups for Sudo to execute as.", + "attr_name": "remove_runasuser", + "version": "1", + "params": [ + { + "type": "str", + "cli_name": "sudorule_name", + "name": "cn", + "label": "Rule name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["True"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui", "cli"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"name\")", - "label": "Primary key only", - "name": "pkey_only", - "required": false, - "type": "bool" - }, - { - "cli_name": "topologysuffixes", - "doc": "Search for servers with these managed suffixes.", - "label": "suffix", - "multivalue": true, - "name": "topologysuffix", + "cli_name": "users", + "name": "user", + "alwaysask": true, + "doc": "users to remove", "required": false, - "type": "str" - }, - { - "cli_name": "no_topologysuffixes", - "doc": "Search for servers without these managed suffixes.", - "label": "suffix", + "label": "member user", "multivalue": true, - "name": "no_topologysuffix", - "required": false, "type": "str" }, { - "cli_name": "in_locations", - "doc": "Search for servers with these ipa locations.", - "label": "location", - "multivalue": true, - "name": "in_location", - "required": false, - "type": "DNSName" - }, - { - "cli_name": "not_in_locations", - "doc": "Search for servers without these ipa locations.", - "label": "location", - "multivalue": true, - "name": "not_in_location", + "cli_name": "groups", + "name": "group", + "alwaysask": true, + "doc": "groups to remove", "required": false, - "type": "DNSName" - }, - { - "cli_name": "servroles", - "doc": "Search for servers with these enabled roles.", - "label": "role", + "label": "member group", "multivalue": true, - "name": "servrole", - "required": false, "type": "str" } ], - "topic_topic": "server/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify information about an IPA server.", - "full_name": "server_mod/1", - "name": "server_mod", - "obj_class": "server/1", + "full_name": "sudorule_remove_runasuser/1", "output": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "name": "result", - "type": "dict" + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "Number of members removed", + "type": "int", + "name": "completed" } ], + "obj_class": "sudorule/1", + "topic_topic": "sudorule/1" + }, + { + "name": "sudorule_remove_user", + "doc": "Remove users and groups affected by Sudo Rule.", + "attr_name": "remove_user", + "version": "1", "params": [ { - "cli_name": "name", - "doc": "IPA server hostname", - "label": "Server name", + "type": "str", + "cli_name": "sudorule_name", "name": "cn", - "type": "str" + "label": "Rule name" + }, + { + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "location", - "doc": "Server location", - "label": "Location", - "name": "ipalocation_location", - "required": false, - "type": "DNSName" + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_name": "service_weight", - "doc": "Weight for server services", - "label": "Service weight", - "name": "ipaserviceweight", + "cli_name": "users", + "name": "user", + "alwaysask": true, + "doc": "users to remove", "required": false, - "type": "int" - }, - { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], + "label": "member user", "multivalue": true, - "name": "setattr", - "required": false, "type": "str" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", + "cli_name": "groups", + "name": "group", + "alwaysask": true, + "doc": "groups to remove", "required": false, + "label": "member group", + "multivalue": true, "type": "str" + } + ], + "full_name": "sudorule_remove_user/1", + "output": [ + { + "type": "dict", + "name": "result" }, { - "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, - "name": "delattr", - "required": false, - "type": "str" + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" + }, + { + "doc": "Number of members removed", + "type": "int", + "name": "completed" + } + ], + "obj_class": "sudorule/1", + "topic_topic": "sudorule/1" + }, + { + "name": "sudorule_show", + "doc": "Display Sudo Rule.", + "attr_name": "show", + "version": "1", + "params": [ + { + "type": "str", + "cli_name": "sudorule_name", + "name": "cn", + "label": "Rule name" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "server/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Find a server role on a server(s)", - "full_name": "server_role_find/1", - "name": "server_role_find", - "obj_class": "server_role/1", + "full_name": "sudorule_show/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" - }, - { - "multivalue": true, - "name": "result", - "type": "dict" + "type": "str", + "name": "summary" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "type": "dict", + "name": "result" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "sudorule/1", + "topic_topic": "sudorule/1" + }, + { + "name": "topic_find", + "doc": "Search for help topics.", + "attr_name": "find", + "version": "1", "params": [ { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, - "type": "str" - }, - { - "cli_name": "server", - "doc": "IPA server hostname", - "label": "Server name", - "name": "server_server", - "required": false, - "type": "str" - }, - { - "cli_name": "role", - "doc": "IPA server role name", - "label": "Role name", - "name": "role_servrole", - "required": false, - "type": "str" - }, - { - "alwaysask": true, - "cli_metavar": "['enabled', 'configured', 'absent']", - "cli_name": "status", - "default": ["enabled"], - "doc": "Status of the role", - "label": "Role status", - "name": "status", - "required": false, - "type": "str" - }, - { - "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", - "required": false, - "type": "int" - }, - { - "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", - "required": false, - "type": "int" + "type": "str", + "name": "criteria" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"name\")", + "required": false, + "label": "Primary key only", "type": "bool" } ], - "topic_topic": "serverrole/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Show role status on a server", - "full_name": "server_role_show/1", - "name": "server_role_show", - "obj_class": "server_role/1", + "full_name": "topic_find/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "multivalue": true, + "name": "result" + }, + { + "doc": "Number of entries returned", + "type": "int", + "name": "count" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "NoneType" + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], + "obj_class": "topic/1", + "topic_topic": "schema/1" + }, + { + "name": "topic_show", + "doc": "Display information about a help topic.", + "attr_name": "show", + "version": "1", "params": [ { - "cli_name": "server", - "doc": "IPA server hostname", - "label": "Server name", - "name": "server_server", - "type": "str" - }, - { - "cli_name": "role", - "doc": "IPA server role name", - "label": "Role name", - "name": "role_servrole", - "type": "str" + "no_convert": true, + "type": "str", + "name": "full_name", + "label": "Full name" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "serverrole/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Show IPA server.", - "full_name": "server_show/1", - "name": "server_show", - "obj_class": "server/1", + "full_name": "topic_show/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "topic/1", + "topic_topic": "schema/1" + }, + { + "name": "topologysegment_add", + "doc": "Add a new segment.", + "attr_name": "add", + "version": "1", "params": [ { - "cli_name": "name", - "doc": "IPA server hostname", - "label": "Server name", - "name": "cn", - "type": "str" + "type": "str", + "cli_name": "topologysuffix", + "name": "topologysuffixcn", + "label": "Suffix name" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "cli_name": "name", + "name": "cn", + "alwaysask": true, + "doc": "Arbitrary string identifying the segment", + "label": "Segment name", + "type": "str", + "default_from_param": [ + "iparepltoposegmentleftnode", + "iparepltoposegmentrightnode" + ], + "no_convert": true }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", + "cli_name": "leftnode", + "name": "iparepltoposegmentleftnode", + "doc": "Left replication node - an IPA server", + "label": "Left node", "positional": false, - "type": "bool" + "type": "str", + "no_convert": true }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", + "cli_name": "rightnode", + "name": "iparepltoposegmentrightnode", + "doc": "Right replication node - an IPA server", + "label": "Right node", "positional": false, - "type": "bool" + "type": "str", + "no_convert": true }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", + "cli_name": "direction", + "name": "iparepltoposegmentdirection", + "cli_metavar": "['both', 'left-right', 'right-left']", + "default": [ + "both" + ], + "doc": "Direction of replication between left and right replication node", + "label": "Connectivity", "positional": false, - "type": "bool" - } - ], - "topic_topic": "server/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Add a new IPA service.", - "full_name": "service_add/1", - "name": "service_add", - "obj_class": "service/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "name": "result", - "type": "dict" - }, - { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "Principal" - } - ], - "params": [ - { - "cli_name": "canonical_principal", - "doc": "Service principal", - "label": "Principal name", - "name": "krbcanonicalname", - "no_convert": true, - "type": "Principal" - }, - { - "cli_name": "certificate", - "doc": "Base-64 encoded service certificate", - "label": "Certificate", - "multivalue": true, - "name": "usercertificate", + "cli_name": "stripattrs", + "name": "nsds5replicastripattrs", + "doc": "A space separated list of attributes which are removed from replication updates.", "required": false, - "type": "bytes" + "label": "Attributes to strip", + "type": "str", + "no_convert": true }, { - "cli_metavar": "['MS-PAC', 'PAD', 'NONE']", - "cli_name": "pac_type", - "doc": - "Override default list of supported PAC types. Use 'NONE' to disable PAC support for this service, e.g. this might be necessary for NFS services.", - "label": "PAC type", - "multivalue": true, - "name": "ipakrbauthzdata", + "cli_name": "replattrs", + "name": "nsds5replicatedattributelist", + "doc": "Attributes that are not replicated to a consumer server during a fractional update. E.g., `(objectclass=*) $ EXCLUDE accountlockout memberof", "required": false, + "label": "Attributes to replicate", "type": "str" }, { - "cli_name": "auth_ind", - "doc": - "Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations.", - "label": "Authentication Indicators", - "multivalue": true, - "name": "krbprincipalauthind", + "cli_name": "replattrstotal", + "name": "nsds5replicatedattributelisttotal", + "doc": "Attributes that are not replicated to a consumer server during a total update. E.g. (objectclass=*) $ EXCLUDE accountlockout", "required": false, + "label": "Attributes for total update", "type": "str" }, { - "cli_name": "requires_pre_auth", - "doc": "Pre-authentication is required for the service", - "label": "Requires pre-authentication", - "name": "ipakrbrequirespreauth", - "required": false, - "type": "bool" - }, - { - "cli_name": "ok_as_delegate", - "doc": "Client credentials may be delegated to the service", - "label": "Trusted for delegation", - "name": "ipakrbokasdelegate", + "cli_name": "timeout", + "name": "nsds5replicatimeout", + "doc": "Number of seconds outbound LDAP operations waits for a response from the remote replica before timing out and failing", "required": false, - "type": "bool" + "label": "Session timeout", + "type": "int" }, { - "cli_name": "ok_to_auth_as_delegate", - "doc": - "The service is allowed to authenticate on behalf of a client", - "label": "Trusted to authenticate as user", - "name": "ipakrboktoauthasdelegate", + "cli_name": "enabled", + "name": "nsds5replicaenabled", + "cli_metavar": "['on', 'off']", + "doc": "Whether a replication agreement is active, meaning whether replication is occurring per that agreement", "required": false, - "type": "bool" + "label": "Replication agreement enabled", + "exclude": [ + "cli", + "webui" + ], + "type": "str" }, { "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, - { - "default": ["False"], - "doc": "force principal name even if not in DNS", - "label": "Force", - "name": "force", - "positional": false, - "type": "bool" - }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, - "type": "bool" - }, - { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "service/1", - "version": "1" - }, - { - "attr_name": "add_cert", - "doc": "Add new certificates to a service", - "full_name": "service_add_cert/1", - "name": "service_add_cert", - "obj_class": "service/1", + "full_name": "topologysegment_add/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "Principal" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "topologysegment/1", + "topic_topic": "topology/1" + }, + { + "name": "topologysegment_del", + "doc": "Delete a segment.", + "attr_name": "del", + "version": "1", "params": [ { - "cli_name": "canonical_principal", - "doc": "Service principal", - "label": "Principal name", - "name": "krbcanonicalname", - "no_convert": true, - "type": "Principal" - }, - { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "type": "str", + "cli_name": "topologysuffix", + "name": "topologysuffixcn", + "label": "Suffix name" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "cli_name": "name", + "name": "cn", + "alwaysask": true, + "doc": "Arbitrary string identifying the segment", + "label": "Segment name", + "multivalue": true, + "type": "str", + "default_from_param": [ + "iparepltoposegmentleftnode", + "iparepltoposegmentrightnode" + ], + "no_convert": true }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", "positional": false, "type": "bool" - }, - { - "alwaysask": true, - "cli_name": "certificate", - "doc": "Base-64 encoded service certificate", - "label": "Certificate", - "multivalue": true, - "name": "usercertificate", - "positional": false, - "type": "bytes" } ], - "topic_topic": "service/1", - "version": "1" - }, - { - "attr_name": "add_host", - "doc": "Add hosts that can manage this service.", - "full_name": "service_add_host/1", - "name": "service_add_host", - "obj_class": "service/1", + "full_name": "topologysegment_del/1", "output": [ { - "name": "result", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "doc": "Number of members added", - "name": "completed", - "type": "int" + "type": "str", + "multivalue": true, + "name": "value" } ], + "obj_class": "topologysegment/1", + "topic_topic": "topology/1" + }, + { + "name": "topologysegment_find", + "doc": "Search for topology segments.", + "attr_name": "find", + "version": "1", "params": [ { - "cli_name": "canonical_principal", - "doc": "Service principal", - "label": "Principal name", - "name": "krbcanonicalname", - "no_convert": true, - "type": "Principal" + "type": "str", + "cli_name": "topologysuffix", + "name": "topologysuffixcn", + "label": "Suffix name" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "positional": true, + "doc": "A string searched in all relevant object attributes", + "required": false, + "type": "str", + "name": "criteria" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "cli_name": "name", + "name": "cn", + "alwaysask": true, + "doc": "Arbitrary string identifying the segment", + "required": false, + "label": "Segment name", + "type": "str", + "default_from_param": [ + "iparepltoposegmentleftnode", + "iparepltoposegmentrightnode" + ], + "no_convert": true }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "cli_name": "leftnode", + "name": "iparepltoposegmentleftnode", + "doc": "Left replication node - an IPA server", + "required": false, + "label": "Left node", + "type": "str", + "no_convert": true + }, + { + "cli_name": "rightnode", + "name": "iparepltoposegmentrightnode", + "doc": "Right replication node - an IPA server", + "required": false, + "label": "Right node", + "type": "str", + "no_convert": true }, { + "cli_name": "direction", + "name": "iparepltoposegmentdirection", + "cli_metavar": "['both', 'left-right', 'right-left']", "alwaysask": true, - "cli_name": "hosts", - "doc": "hosts to add", - "label": "member host", - "multivalue": true, - "name": "host", + "default": [ + "both" + ], + "doc": "Direction of replication between left and right replication node", "required": false, + "label": "Connectivity", + "exclude": [ + "cli", + "webui" + ], "type": "str" - } - ], - "topic_topic": "service/1", - "version": "1" - }, - { - "attr_name": "add_principal", - "doc": "Add new principal alias to a service", - "full_name": "service_add_principal/1", - "name": "service_add_principal", - "obj_class": "service/1", - "output": [ + }, + { + "cli_name": "stripattrs", + "name": "nsds5replicastripattrs", + "doc": "A space separated list of attributes which are removed from replication updates.", + "required": false, + "label": "Attributes to strip", + "type": "str", + "no_convert": true + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "cli_name": "replattrs", + "name": "nsds5replicatedattributelist", + "doc": "Attributes that are not replicated to a consumer server during a fractional update. E.g., `(objectclass=*) $ EXCLUDE accountlockout memberof", "required": false, + "label": "Attributes to replicate", "type": "str" }, { - "name": "result", - "type": "dict" + "cli_name": "replattrstotal", + "name": "nsds5replicatedattributelisttotal", + "doc": "Attributes that are not replicated to a consumer server during a total update. E.g. (objectclass=*) $ EXCLUDE accountlockout", + "required": false, + "label": "Attributes for total update", + "type": "str" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "Principal" - } - ], - "params": [ + "cli_name": "timeout", + "name": "nsds5replicatimeout", + "doc": "Number of seconds outbound LDAP operations waits for a response from the remote replica before timing out and failing", + "required": false, + "label": "Session timeout", + "type": "int" + }, { - "cli_name": "canonical_principal", - "doc": "Service principal", - "label": "Principal name", - "name": "krbcanonicalname", - "no_convert": true, - "type": "Principal" + "cli_name": "enabled", + "name": "nsds5replicaenabled", + "cli_metavar": "['on', 'off']", + "doc": "Whether a replication agreement is active, meaning whether replication is occurring per that agreement", + "required": false, + "label": "Replication agreement enabled", + "exclude": [ + "cli", + "webui" + ], + "type": "str" }, { - "alwaysask": true, - "cli_name": "principal", - "doc": "Service principal alias", - "label": "Principal alias", - "multivalue": true, - "name": "krbprincipalname", - "no_convert": true, - "type": "Principal" + "doc": "Time limit of search in seconds (0 is unlimited)", + "required": false, + "type": "int", + "name": "timelimit", + "label": "Time Limit" + }, + { + "doc": "Maximum number of entries returned (0 is unlimited)", + "required": false, + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"name\")", + "required": false, + "label": "Primary key only", "type": "bool" } ], - "topic_topic": "service/1", - "version": "1" - }, - { - "attr_name": "allow_create_keytab", - "doc": - "Allow users, groups, hosts or host groups to create a keytab of this service.", - "full_name": "service_allow_create_keytab/1", - "name": "service_allow_create_keytab", - "obj_class": "service/1", + "full_name": "topologysegment_find/1", "output": [ { - "name": "result", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "type": "dict", + "multivalue": true, + "name": "result" }, { - "doc": "Number of members added", - "name": "completed", - "type": "int" + "doc": "Number of entries returned", + "type": "int", + "name": "count" + }, + { + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], + "obj_class": "topologysegment/1", + "topic_topic": "topology/1" + }, + { + "name": "topologysegment_mod", + "doc": "Modify a segment.", + "attr_name": "mod", + "version": "1", "params": [ { - "cli_name": "canonical_principal", - "doc": "Service principal", - "label": "Principal name", - "name": "krbcanonicalname", - "no_convert": true, - "type": "Principal" + "type": "str", + "cli_name": "topologysuffix", + "name": "topologysuffixcn", + "label": "Suffix name" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "cli_name": "name", + "name": "cn", + "alwaysask": true, + "doc": "Arbitrary string identifying the segment", + "label": "Segment name", + "type": "str", + "default_from_param": [ + "iparepltoposegmentleftnode", + "iparepltoposegmentrightnode" + ], + "no_convert": true }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "cli_name": "stripattrs", + "name": "nsds5replicastripattrs", + "doc": "A space separated list of attributes which are removed from replication updates.", + "required": false, + "label": "Attributes to strip", + "type": "str", + "no_convert": true }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "cli_name": "replattrs", + "name": "nsds5replicatedattributelist", + "doc": "Attributes that are not replicated to a consumer server during a fractional update. E.g., `(objectclass=*) $ EXCLUDE accountlockout memberof", + "required": false, + "label": "Attributes to replicate", + "type": "str" }, { - "alwaysask": true, - "cli_name": "users", - "doc": "users to add", - "label": "member user", - "multivalue": true, - "name": "user", + "cli_name": "replattrstotal", + "name": "nsds5replicatedattributelisttotal", + "doc": "Attributes that are not replicated to a consumer server during a total update. E.g. (objectclass=*) $ EXCLUDE accountlockout", "required": false, + "label": "Attributes for total update", "type": "str" }, { - "alwaysask": true, - "cli_name": "groups", - "doc": "groups to add", - "label": "member group", - "multivalue": true, - "name": "group", + "cli_name": "timeout", + "name": "nsds5replicatimeout", + "doc": "Number of seconds outbound LDAP operations waits for a response from the remote replica before timing out and failing", "required": false, - "type": "str" + "label": "Session timeout", + "type": "int" }, { - "alwaysask": true, - "cli_name": "hosts", - "doc": "hosts to add", - "label": "member host", - "multivalue": true, - "name": "host", + "cli_name": "enabled", + "name": "nsds5replicaenabled", + "cli_metavar": "['on', 'off']", + "doc": "Whether a replication agreement is active, meaning whether replication is occurring per that agreement", "required": false, + "label": "Replication agreement enabled", + "exclude": [ + "cli", + "webui" + ], "type": "str" }, { - "alwaysask": true, - "cli_name": "hostgroups", - "doc": "host groups to add", - "label": "member host group", - "multivalue": true, - "name": "hostgroup", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" - } - ], - "topic_topic": "service/1", - "version": "1" - }, - { - "attr_name": "allow_retrieve_keytab", - "doc": - "Allow users, groups, hosts or host groups to retrieve a keytab of this service.", - "full_name": "service_allow_retrieve_keytab/1", - "name": "service_allow_retrieve_keytab", - "obj_class": "service/1", - "output": [ - { - "name": "result", - "type": "dict" }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" }, { - "doc": "Number of members added", - "name": "completed", - "type": "int" - } - ], - "params": [ + "cli_name": "delattr", + "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" + }, { - "cli_name": "canonical_principal", - "doc": "Service principal", - "label": "Principal name", - "name": "krbcanonicalname", - "no_convert": true, - "type": "Principal" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - }, - { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" - }, - { - "alwaysask": true, - "cli_name": "users", - "doc": "users to add", - "label": "member user", - "multivalue": true, - "name": "user", - "required": false, - "type": "str" - }, + } + ], + "full_name": "topologysegment_mod/1", + "output": [ { - "alwaysask": true, - "cli_name": "groups", - "doc": "groups to add", - "label": "member group", - "multivalue": true, - "name": "group", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "alwaysask": true, - "cli_name": "hosts", - "doc": "hosts to add", - "label": "member host", - "multivalue": true, - "name": "host", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "alwaysask": true, - "cli_name": "hostgroups", - "doc": "host groups to add", - "label": "member host group", - "multivalue": true, - "name": "hostgroup", - "required": false, - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "topic_topic": "service/1", - "version": "1" + "obj_class": "topologysegment/1", + "topic_topic": "topology/1" }, { - "attr_name": "del", - "doc": "Delete an IPA service.", - "full_name": "service_del/1", - "name": "service_del", - "obj_class": "service/1", - "output": [ + "name": "topologysegment_reinitialize", + "doc": "Request a full re-initialization of the node retrieving data from the other node.", + "attr_name": "reinitialize", + "version": "1", + "params": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "str", + "cli_name": "topologysuffix", + "name": "topologysuffixcn", + "label": "Suffix name" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "cli_name": "name", + "name": "cn", + "alwaysask": true, + "doc": "Arbitrary string identifying the segment", + "label": "Segment name", + "type": "str", + "default_from_param": [ + "iparepltoposegmentleftnode", + "iparepltoposegmentrightnode" + ], + "no_convert": true }, { - "multivalue": true, - "name": "value", - "type": "Principal" - } - ], - "params": [ + "default": [ + "False" + ], + "doc": "Initialize left node", + "required": false, + "type": "bool", + "name": "left" + }, { - "cli_name": "canonical_principal", - "doc": "Service principal", - "label": "Principal name", - "multivalue": true, - "name": "krbcanonicalname", - "no_convert": true, - "type": "Principal" + "default": [ + "False" + ], + "doc": "Initialize right node", + "required": false, + "type": "bool", + "name": "right" }, { - "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", - "name": "continue", - "positional": false, - "type": "bool" + "default": [ + "False" + ], + "doc": "Stop already started refresh of chosen node(s)", + "required": false, + "type": "bool", + "name": "stop" } ], - "topic_topic": "service/1", - "version": "1" - }, - { - "attr_name": "disable", - "doc": "Disable the Kerberos key and SSL certificate of a service.", - "full_name": "service_disable/1", - "name": "service_disable", - "obj_class": "service/1", + "full_name": "topologysegment_reinitialize/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { "doc": "True means the operation was successful", - "name": "result", - "type": "bool" + "type": "bool", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "Principal" - } - ], - "params": [ - { - "cli_name": "canonical_principal", - "doc": "Service principal", - "label": "Principal name", - "name": "krbcanonicalname", - "no_convert": true, - "type": "Principal" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "topic_topic": "service/1", - "version": "1" + "obj_class": "topologysegment/1", + "topic_topic": "topology/1" }, { - "attr_name": "disallow_create_keytab", - "doc": - "Disallow users, groups, hosts or host groups to create a keytab of this service.", - "full_name": "service_disallow_create_keytab/1", - "name": "service_disallow_create_keytab", - "obj_class": "service/1", - "output": [ + "name": "topologysegment_show", + "doc": "Display a segment.", + "attr_name": "show", + "version": "1", + "params": [ { - "name": "result", - "type": "dict" + "type": "str", + "cli_name": "topologysuffix", + "name": "topologysuffixcn", + "label": "Suffix name" }, { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" + "cli_name": "name", + "name": "cn", + "alwaysask": true, + "doc": "Arbitrary string identifying the segment", + "label": "Segment name", + "type": "str", + "default_from_param": [ + "iparepltoposegmentleftnode", + "iparepltoposegmentrightnode" + ], + "no_convert": true }, { - "doc": "Number of members removed", - "name": "completed", - "type": "int" - } - ], - "params": [ - { - "cli_name": "canonical_principal", - "doc": "Service principal", - "label": "Principal name", - "name": "krbcanonicalname", - "no_convert": true, - "type": "Principal" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - }, - { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" - }, - { - "alwaysask": true, - "cli_name": "users", - "doc": "users to remove", - "label": "member user", - "multivalue": true, - "name": "user", - "required": false, - "type": "str" - }, + } + ], + "full_name": "topologysegment_show/1", + "output": [ { - "alwaysask": true, - "cli_name": "groups", - "doc": "groups to remove", - "label": "member group", - "multivalue": true, - "name": "group", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "alwaysask": true, - "cli_name": "hosts", - "doc": "hosts to remove", - "label": "member host", - "multivalue": true, - "name": "host", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "alwaysask": true, - "cli_name": "hostgroups", - "doc": "host groups to remove", - "label": "member host group", - "multivalue": true, - "name": "hostgroup", - "required": false, - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "topic_topic": "service/1", - "version": "1" + "obj_class": "topologysegment/1", + "topic_topic": "topology/1" }, { - "attr_name": "disallow_retrieve_keytab", - "doc": - "Disallow users, groups, hosts or host groups to retrieve a keytab of this service.", - "full_name": "service_disallow_retrieve_keytab/1", - "name": "service_disallow_retrieve_keytab", - "obj_class": "service/1", - "output": [ - { - "name": "result", - "type": "dict" - }, - { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" - }, - { - "doc": "Number of members removed", - "name": "completed", - "type": "int" - } + "exclude": [ + "cli" ], + "name": "topologysuffix_add", + "doc": "Add a new topology suffix to be managed.", + "attr_name": "add", + "version": "1", "params": [ { - "cli_name": "canonical_principal", - "doc": "Service principal", - "label": "Principal name", - "name": "krbcanonicalname", - "no_convert": true, - "type": "Principal" - }, - { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" - }, - { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Suffix name" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", "positional": false, - "type": "bool" + "type": "DN", + "cli_name": "suffix_dn", + "name": "iparepltopoconfroot", + "label": "Managed LDAP suffix DN" }, { - "alwaysask": true, - "cli_name": "users", - "doc": "users to remove", - "label": "member user", - "multivalue": true, - "name": "user", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "alwaysask": true, - "cli_name": "groups", - "doc": "groups to remove", - "label": "member group", - "multivalue": true, - "name": "group", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "alwaysask": true, - "cli_name": "hosts", - "doc": "hosts to remove", - "label": "member host", - "multivalue": true, - "name": "host", - "required": false, - "type": "str" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "alwaysask": true, - "cli_name": "hostgroups", - "doc": "host groups to remove", - "label": "member host group", - "multivalue": true, - "name": "hostgroup", - "required": false, - "type": "str" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" } ], - "topic_topic": "service/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for IPA services.", - "full_name": "service_find/1", - "name": "service_find", - "obj_class": "service/1", + "full_name": "topologysuffix_add/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "multivalue": true, - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "topologysuffix/1", + "topic_topic": "topology/1" + }, + { + "exclude": [ + "cli" + ], + "name": "topologysuffix_del", + "doc": "Delete a topology suffix.", + "attr_name": "del", + "version": "1", + "params": [ + { + "cli_name": "name", + "label": "Suffix name", + "multivalue": true, + "name": "cn", + "type": "str" }, { - "doc": "True if not all results were returned", - "name": "truncated", + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", + "positional": false, "type": "bool" } ], - "params": [ + "full_name": "topologysuffix_del/1", + "output": [ { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "cli_name": "canonical_principal", - "doc": "Service principal", - "label": "Principal name", - "name": "krbcanonicalname", - "no_convert": true, - "required": false, - "type": "Principal" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "cli_name": "principal", - "doc": "Service principal alias", - "label": "Principal alias", + "type": "str", "multivalue": true, - "name": "krbprincipalname", - "no_convert": true, + "name": "value" + } + ], + "obj_class": "topologysuffix/1", + "topic_topic": "topology/1" + }, + { + "name": "topologysuffix_find", + "doc": "Search for topology suffixes.", + "attr_name": "find", + "version": "1", + "params": [ + { + "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, - "type": "Principal" + "type": "str", + "name": "criteria" }, { - "cli_metavar": "['MS-PAC', 'PAD', 'NONE']", - "cli_name": "pac_type", - "doc": - "Override default list of supported PAC types. Use 'NONE' to disable PAC support for this service, e.g. this might be necessary for NFS services.", - "label": "PAC type", - "multivalue": true, - "name": "ipakrbauthzdata", + "type": "str", "required": false, - "type": "str" + "cli_name": "name", + "name": "cn", + "label": "Suffix name" }, { - "cli_name": "auth_ind", - "doc": - "Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations.", - "label": "Authentication Indicators", - "multivalue": true, - "name": "krbprincipalauthind", + "type": "DN", "required": false, - "type": "str" + "cli_name": "suffix_dn", + "name": "iparepltopoconfroot", + "label": "Managed LDAP suffix DN" }, { "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", "required": false, - "type": "int" + "type": "int", + "name": "timelimit", + "label": "Time Limit" }, { "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", "required": false, - "type": "int" + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["True"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui", "cli"], - "name": "no_members", - "positional": false, - "type": "bool" - }, - { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"canonical-principal\")", - "label": "Primary key only", "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"name\")", "required": false, + "label": "Primary key only", "type": "bool" - }, - { - "cli_name": "man_by_hosts", - "doc": "Search for services with these managed by hosts.", - "label": "host", - "multivalue": true, - "name": "man_by_host", - "no_convert": true, - "required": false, - "type": "str" - }, - { - "cli_name": "not_man_by_hosts", - "doc": "Search for services without these managed by hosts.", - "label": "host", - "multivalue": true, - "name": "not_man_by_host", - "no_convert": true, - "required": false, - "type": "str" } ], - "topic_topic": "service/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify an existing IPA service.", - "full_name": "service_mod/1", - "name": "service_mod", - "obj_class": "service/1", + "full_name": "topologysuffix_find/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" - }, - { - "name": "result", - "type": "dict" - }, - { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "Principal" - } - ], - "params": [ - { - "cli_name": "canonical_principal", - "doc": "Service principal", - "label": "Principal name", - "name": "krbcanonicalname", - "no_convert": true, - "type": "Principal" - }, - { - "cli_name": "principal", - "doc": "Service principal alias", - "label": "Principal alias", - "multivalue": true, - "name": "krbprincipalname", - "no_convert": true, - "required": false, - "type": "Principal" - }, - { - "cli_name": "certificate", - "doc": "Base-64 encoded service certificate", - "label": "Certificate", - "multivalue": true, - "name": "usercertificate", "required": false, - "type": "bytes" + "type": "str", + "name": "summary" }, { - "cli_metavar": "['MS-PAC', 'PAD', 'NONE']", - "cli_name": "pac_type", - "doc": - "Override default list of supported PAC types. Use 'NONE' to disable PAC support for this service, e.g. this might be necessary for NFS services.", - "label": "PAC type", + "type": "dict", "multivalue": true, - "name": "ipakrbauthzdata", - "required": false, - "type": "str" + "name": "result" }, { - "cli_name": "auth_ind", - "doc": - "Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations.", - "label": "Authentication Indicators", - "multivalue": true, - "name": "krbprincipalauthind", - "required": false, - "type": "str" + "doc": "Number of entries returned", + "type": "int", + "name": "count" }, { - "cli_name": "requires_pre_auth", - "doc": "Pre-authentication is required for the service", - "label": "Requires pre-authentication", - "name": "ipakrbrequirespreauth", - "required": false, - "type": "bool" - }, + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" + } + ], + "obj_class": "topologysuffix/1", + "topic_topic": "topology/1" + }, + { + "exclude": [ + "cli" + ], + "name": "topologysuffix_mod", + "doc": "Modify a topology suffix.", + "attr_name": "mod", + "version": "1", + "params": [ { - "cli_name": "ok_as_delegate", - "doc": "Client credentials may be delegated to the service", - "label": "Trusted for delegation", - "name": "ipakrbokasdelegate", - "required": false, - "type": "bool" + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Suffix name" }, { - "cli_name": "ok_to_auth_as_delegate", - "doc": - "The service is allowed to authenticate on behalf of a client", - "label": "Trusted to authenticate as user", - "name": "ipakrboktoauthasdelegate", + "type": "DN", "required": false, - "type": "bool" + "cli_name": "suffix_dn", + "name": "iparepltopoconfroot", + "label": "Managed LDAP suffix DN" }, { "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, - "type": "bool" - }, - { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "service/1", - "version": "1" - }, - { - "attr_name": "remove_cert", - "doc": "Remove certificates from a service", - "full_name": "service_remove_cert/1", - "name": "service_remove_cert", - "obj_class": "service/1", + "full_name": "topologysuffix_mod/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "Principal" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "topologysuffix/1", + "topic_topic": "topology/1" + }, + { + "name": "topologysuffix_show", + "doc": "Show managed suffix.", + "attr_name": "show", + "version": "1", "params": [ { - "cli_name": "canonical_principal", - "doc": "Service principal", - "label": "Principal name", - "name": "krbcanonicalname", - "no_convert": true, - "type": "Principal" + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Suffix name" + }, + { + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" + } + ], + "full_name": "topologysuffix_show/1", + "output": [ + { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "type": "dict", + "name": "result" }, { - "alwaysask": true, - "cli_name": "certificate", - "doc": "Base-64 encoded service certificate", - "label": "Certificate", - "multivalue": true, - "name": "usercertificate", - "positional": false, - "type": "bytes" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "topic_topic": "service/1", - "version": "1" + "obj_class": "topologysuffix/1", + "topic_topic": "topology/1" }, { - "attr_name": "remove_host", - "doc": "Remove hosts that can manage this service.", - "full_name": "service_remove_host/1", - "name": "service_remove_host", - "obj_class": "service/1", - "output": [ - { - "name": "result", - "type": "dict" - }, + "name": "topologysuffix_verify", + "doc": "\nVerify replication topology for suffix.\n\nChecks done:\n 1. check if a topology is not disconnected. In other words if there are\n replication paths between all servers.\n 2. check if servers don't have more than the recommended number of\n replication agreements\n", + "attr_name": "verify", + "version": "1", + "params": [ { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" - }, + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Suffix name" + } + ], + "full_name": "topologysuffix_verify/1", + "output": [ { - "doc": "Number of members removed", - "name": "completed", - "type": "int" + "name": "result" } ], + "obj_class": "topologysuffix/1", + "topic_topic": "topology/1" + }, + { + "name": "trust_add", + "doc": "\nAdd new trust to use.\n\nThis command establishes trust relationship to another domain\nwhich becomes 'trusted'. As result, users of the trusted domain\nmay access resources of this domain.\n\nOnly trusts to Active Directory domains are supported right now.\n\nThe command can be safely run multiple times against the same domain,\nthis will cause change to trust relationship credentials on both\nsides.\n\nNote that if the command was previously run with a specific range type,\nor with automatic detection of the range type, and you want to configure a\ndifferent range type, you may need to delete first the ID range using\nipa idrange-del before retrying the command with the desired range type.\n ", + "attr_name": "add", + "version": "1", "params": [ { - "cli_name": "canonical_principal", - "doc": "Service principal", - "label": "Principal name", - "name": "krbcanonicalname", - "no_convert": true, - "type": "Principal" + "type": "str", + "cli_name": "realm", + "name": "cn", + "label": "Realm name" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", + "cli_name": "type", + "name": "trust_type", + "cli_metavar": "['ad']", + "default": [ + "ad" + ], + "label": "Trust type (ad for Active Directory, default)", "positional": false, - "type": "bool" + "type": "str" }, { - "alwaysask": true, - "cli_name": "hosts", - "doc": "hosts to remove", - "label": "member host", - "multivalue": true, - "name": "host", + "type": "str", + "required": false, + "cli_name": "admin", + "name": "realm_admin", + "label": "Active Directory domain administrator" + }, + { + "cli_name": "password", + "name": "realm_passwd", + "confirm": false, "required": false, + "label": "Active Directory domain administrator's password", + "sensitive": true, "type": "str" - } - ], - "topic_topic": "service/1", - "version": "1" - }, - { - "attr_name": "remove_principal", - "doc": "Remove principal alias from a service", - "full_name": "service_remove_principal/1", - "name": "service_remove_principal", - "obj_class": "service/1", - "output": [ + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "type": "str", + "required": false, + "cli_name": "server", + "name": "realm_server", + "label": "Domain controller for the Active Directory domain (optional)" + }, + { + "cli_name": "trust_secret", + "name": "trust_secret", + "confirm": false, "required": false, + "label": "Shared secret for the trust", + "sensitive": true, "type": "str" }, { - "name": "result", - "type": "dict" + "type": "int", + "required": false, + "cli_name": "base_id", + "name": "base_id", + "label": "First Posix ID of the range reserved for the trusted domain" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "Principal" - } - ], - "params": [ + "type": "int", + "required": false, + "cli_name": "range_size", + "name": "range_size", + "label": "Size of the ID range reserved for the trusted domain" + }, { - "cli_name": "canonical_principal", - "doc": "Service principal", - "label": "Principal name", - "name": "krbcanonicalname", - "no_convert": true, - "type": "Principal" + "cli_name": "range_type", + "name": "range_type", + "cli_metavar": "['ipa-ad-trust', 'ipa-ad-trust-posix']", + "doc": "Type of trusted domain ID range, one of ipa-ad-trust, ipa-ad-trust-posix", + "required": false, + "label": "Range type", + "type": "str" }, { + "cli_name": "two_way", + "name": "bidirectional", "alwaysask": true, - "cli_name": "principal", - "doc": "Service principal alias", - "label": "Principal alias", - "multivalue": true, - "name": "krbprincipalname", - "no_convert": true, - "type": "Principal" + "default": [ + "False" + ], + "doc": "Establish bi-directional trust. By default trust is inbound one-way only.", + "required": false, + "label": "Two-way trust", + "type": "bool" + }, + { + "cli_name": "external", + "name": "external", + "alwaysask": true, + "default": [ + "False" + ], + "doc": "Establish external trust to a domain in another forest. The trust is not transitive beyond the domain.", + "required": false, + "label": "External trust", + "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, - "type": "bool" - }, - { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "service/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display information about an IPA service.", - "full_name": "service_show/1", - "name": "service_show", - "obj_class": "service/1", + "full_name": "trust_add/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "Principal" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "trust/1", + "topic_topic": "trust/1" + }, + { + "name": "trust_del", + "doc": "Delete a trust.", + "attr_name": "del", + "version": "1", "params": [ { - "cli_name": "canonical_principal", - "doc": "Service principal", - "label": "Principal name", - "name": "krbcanonicalname", - "no_convert": true, - "type": "Principal" - }, - { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" - }, - { - "doc": "file to store certificate in", - "name": "out", - "required": false, + "cli_name": "realm", + "label": "Realm name", + "multivalue": true, + "name": "cn", "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" - }, - { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - }, - { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", "positional": false, "type": "bool" } ], - "topic_topic": "service/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Create a new service delegation rule.", - "full_name": "servicedelegationrule_add/1", - "name": "servicedelegationrule_add", - "obj_class": "servicedelegationrule/1", + "full_name": "trust_del/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "type": "str", + "multivalue": true, + "name": "value" } ], + "obj_class": "trust/1", + "topic_topic": "trust/1" + }, + { + "name": "trust_fetch_domains", + "doc": "Refresh list of the domains associated with the trust", + "attr_name": "fetch_domains", + "version": "1", "params": [ { - "cli_name": "delegation_name", - "label": "Delegation name", + "type": "str", + "cli_name": "realm", "name": "cn", - "type": "str" + "label": "Realm name" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" + }, + { + "type": "str", "required": false, - "type": "str" + "cli_name": "admin", + "name": "realm_admin", + "label": "Active Directory domain administrator" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", + "cli_name": "password", + "name": "realm_passwd", + "confirm": false, "required": false, + "label": "Active Directory domain administrator's password", + "sensitive": true, "type": "str" }, + { + "type": "str", + "required": false, + "cli_name": "server", + "name": "realm_server", + "label": "Domain controller for the Active Directory domain (optional)" + }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, - "type": "bool" - }, - { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "servicedelegation/1", - "version": "1" - }, - { - "attr_name": "add_member", - "doc": "Add member to a named service delegation rule.", - "full_name": "servicedelegationrule_add_member/1", - "name": "servicedelegationrule_add_member", - "obj_class": "servicedelegationrule/1", + "full_name": "trust_fetch_domains/1", "output": [ { - "name": "result", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "type": "dict", + "multivalue": true, + "name": "result" }, { - "doc": "Number of members added", - "name": "completed", - "type": "int" + "doc": "Number of entries returned", + "type": "int", + "name": "count" + }, + { + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], + "obj_class": "trust/1", + "topic_topic": "trust/1" + }, + { + "name": "trust_find", + "doc": "Search for trusts.", + "attr_name": "find", + "version": "1", "params": [ { - "cli_name": "delegation_name", - "label": "Delegation name", - "name": "cn", - "type": "str" + "positional": true, + "doc": "A string searched in all relevant object attributes", + "required": false, + "type": "str", + "name": "criteria" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "type": "str", + "required": false, + "cli_name": "realm", + "name": "cn", + "label": "Realm name" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "type": "str", + "required": false, + "cli_name": "flat_name", + "name": "ipantflatname", + "label": "Domain NetBIOS name" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "type": "str", + "required": false, + "cli_name": "sid", + "name": "ipanttrusteddomainsid", + "label": "Domain Security Identifier" }, { - "alwaysask": true, - "cli_name": "principals", - "doc": "principal to add", - "label": "member principal", - "multivalue": true, - "name": "principal", + "cli_name": "sid_blacklist_incoming", + "name": "ipantsidblacklistincoming", "required": false, + "label": "SID blacklist incoming", + "multivalue": true, "type": "str" - } - ], - "topic_topic": "servicedelegation/1", - "version": "1" - }, - { - "attr_name": "add_target", - "doc": "Add target to a named service delegation rule.", - "full_name": "servicedelegationrule_add_target/1", - "name": "servicedelegationrule_add_target", - "obj_class": "servicedelegationrule/1", - "output": [ - { - "name": "result", - "type": "dict" }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "cli_name": "sid_blacklist_outgoing", + "name": "ipantsidblacklistoutgoing", + "required": false, + "label": "SID blacklist outgoing", + "multivalue": true, + "type": "str" }, { - "doc": "Number of members added", - "name": "completed", - "type": "int" - } - ], - "params": [ + "doc": "Time limit of search in seconds (0 is unlimited)", + "required": false, + "type": "int", + "name": "timelimit", + "label": "Time Limit" + }, { - "cli_name": "delegation_name", - "label": "Delegation name", - "name": "cn", - "type": "str" + "doc": "Maximum number of entries returned (0 is unlimited)", + "required": false, + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" - }, - { - "alwaysask": true, - "cli_name": "servicedelegationtargets", - "doc": "service delegation targets to add", - "label": "member service delegation target", - "multivalue": true, - "name": "servicedelegationtarget", + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"realm\")", "required": false, - "type": "str" + "label": "Primary key only", + "type": "bool" } ], - "topic_topic": "servicedelegation/1", - "version": "1" - }, - { - "attr_name": "del", - "doc": "Delete service delegation.", - "full_name": "servicedelegationrule_del/1", - "name": "servicedelegationrule_del", - "obj_class": "servicedelegationrule/1", + "full_name": "trust_find/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" - }, - { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "type": "str", + "name": "summary" }, { + "type": "dict", "multivalue": true, - "name": "value", - "type": "str" - } - ], - "params": [ + "name": "result" + }, { - "cli_name": "delegation_name", - "label": "Delegation name", - "multivalue": true, - "name": "cn", - "type": "str" + "doc": "Number of entries returned", + "type": "int", + "name": "count" }, { - "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", - "name": "continue", - "positional": false, - "type": "bool" + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], - "topic_topic": "servicedelegation/1", - "version": "1" + "obj_class": "trust/1", + "topic_topic": "trust/1" }, { - "attr_name": "find", - "doc": "Search for service delegations rule.", - "full_name": "servicedelegationrule_find/1", - "name": "servicedelegationrule_find", - "obj_class": "servicedelegationrule/1", - "output": [ + "name": "trust_mod", + "doc": "\n Modify a trust (for future use).\n\n Currently only the default option to modify the LDAP attributes is\n available. More specific options will be added in coming releases.\n ", + "attr_name": "mod", + "version": "1", + "params": [ { - "doc": "User-friendly description of action performed", - "name": "summary", + "type": "str", + "cli_name": "realm", + "name": "cn", + "label": "Realm name" + }, + { + "cli_name": "sid_blacklist_incoming", + "name": "ipantsidblacklistincoming", "required": false, + "label": "SID blacklist incoming", + "multivalue": true, "type": "str" }, { + "cli_name": "sid_blacklist_outgoing", + "name": "ipantsidblacklistoutgoing", + "required": false, + "label": "SID blacklist outgoing", "multivalue": true, - "name": "result", - "type": "dict" + "type": "str" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "cli_name": "upn_suffixes", + "name": "ipantadditionalsuffixes", + "required": false, + "label": "UPN suffixes", + "multivalue": true, + "type": "str" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" - } - ], - "params": [ - { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "delegation_name", - "label": "Delegation name", - "name": "cn", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", + "cli_name": "delattr", + "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, - "type": "int" + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" }, { - "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", - "required": false, - "type": "int" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" + } + ], + "full_name": "trust_mod/1", + "output": [ + { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "default": ["True"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui", "cli"], - "name": "no_members", - "positional": false, - "type": "bool" + "type": "dict", + "name": "result" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"delegation-name\")", - "label": "Primary key only", - "name": "pkey_only", - "required": false, - "type": "bool" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "topic_topic": "servicedelegation/1", - "version": "1" + "obj_class": "trust/1", + "topic_topic": "trust/1" }, { - "attr_name": "remove_member", - "doc": "Remove member from a named service delegation rule.", - "full_name": "servicedelegationrule_remove_member/1", - "name": "servicedelegationrule_remove_member", - "obj_class": "servicedelegationrule/1", - "output": [ + "name": "trust_resolve", + "doc": "Resolve security identifiers of users and groups in trusted domains", + "version": "1", + "params": [ { - "name": "result", - "type": "dict" + "positional": false, + "type": "str", + "multivalue": true, + "name": "sids", + "label": "Security Identifiers (SIDs)" }, { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "doc": "Number of members removed", - "name": "completed", - "type": "int" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "trust_resolve/1", + "exclude": [ + "cli" + ], + "output": [ + { + "type": "dict", + "multivalue": true, + "name": "result" } ], + "topic_topic": "trust/1" + }, + { + "name": "trust_show", + "doc": "Display information about a trust.", + "attr_name": "show", + "version": "1", "params": [ { - "cli_name": "delegation_name", - "label": "Delegation name", + "type": "str", + "cli_name": "realm", "name": "cn", - "type": "str" + "label": "Realm name" + }, + { + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" + } + ], + "full_name": "trust_show/1", + "output": [ + { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "type": "dict", + "name": "result" }, { - "alwaysask": true, - "cli_name": "principals", - "doc": "principal to remove", - "label": "member principal", - "multivalue": true, - "name": "principal", - "required": false, - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "topic_topic": "servicedelegation/1", - "version": "1" + "obj_class": "trust/1", + "topic_topic": "trust/1" }, { - "attr_name": "remove_target", - "doc": "Remove target from a named service delegation rule.", - "full_name": "servicedelegationrule_remove_target/1", - "name": "servicedelegationrule_remove_target", - "obj_class": "servicedelegationrule/1", - "output": [ + "name": "trustconfig_mod", + "doc": "Modify global trust configuration.", + "attr_name": "mod", + "version": "1", + "params": [ { - "name": "result", - "type": "dict" + "type": "str", + "required": false, + "cli_name": "fallback_primary_group", + "name": "ipantfallbackprimarygroup", + "label": "Fallback primary group" }, { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" }, { - "doc": "Number of members removed", - "name": "completed", - "type": "int" - } - ], - "params": [ + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" + }, { - "cli_name": "delegation_name", - "label": "Delegation name", - "name": "cn", + "cli_name": "delattr", + "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", + "cli_name": "type", + "name": "trust_type", + "cli_metavar": "['ad']", + "default": [ + "ad" + ], + "label": "Trust type (ad for Active Directory, default)", "positional": false, - "type": "bool" + "type": "str" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "alwaysask": true, - "cli_name": "servicedelegationtargets", - "doc": "service delegation targets to remove", - "label": "member service delegation target", - "multivalue": true, - "name": "servicedelegationtarget", - "required": false, - "type": "str" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" } ], - "topic_topic": "servicedelegation/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display information about a named service delegation rule.", - "full_name": "servicedelegationrule_show/1", - "name": "servicedelegationrule_show", - "obj_class": "servicedelegationrule/1", + "full_name": "trustconfig_mod/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "type": "str", + "name": "value" } ], + "obj_class": "trustconfig/1", + "topic_topic": "trust/1" + }, + { + "name": "trustconfig_show", + "doc": "Show global trust configuration.", + "attr_name": "show", + "version": "1", "params": [ { - "cli_name": "delegation_name", - "label": "Delegation name", - "name": "cn", - "type": "str" - }, - { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, + { + "cli_name": "type", + "name": "trust_type", + "cli_metavar": "['ad']", + "default": [ + "ad" + ], + "label": "Trust type (ad for Active Directory, default)", + "positional": false, + "type": "str" + }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - }, - { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "servicedelegation/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Create a new service delegation target.", - "full_name": "servicedelegationtarget_add/1", - "name": "servicedelegationtarget_add", - "obj_class": "servicedelegationtarget/1", + } + ], + "full_name": "trustconfig_show/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "type": "str", + "name": "value" } ], + "obj_class": "trustconfig/1", + "topic_topic": "trust/1" + }, + { + "exclude": [ + "cli" + ], + "name": "trustdomain_add", + "doc": "Allow access from the trusted domain", + "attr_name": "add", + "version": "1", "params": [ { - "cli_name": "delegation_name", - "label": "Delegation name", + "type": "str", + "cli_name": "trust", + "name": "trustcn", + "label": "Realm name" + }, + { + "type": "str", + "cli_name": "domain", "name": "cn", - "type": "str" + "label": "Domain name" + }, + { + "type": "str", + "required": false, + "cli_name": "flat_name", + "name": "ipantflatname", + "label": "Domain NetBIOS name" + }, + { + "type": "str", + "required": false, + "cli_name": "sid", + "name": "ipanttrusteddomainsid", + "label": "Domain Security Identifier" }, { "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" + }, + { + "cli_name": "type", + "name": "trust_type", + "cli_metavar": "['ad']", + "default": [ + "ad" + ], + "label": "Trust type (ad for Active Directory, default)", + "positional": false, "type": "str" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "servicedelegation/1", - "version": "1" - }, - { - "attr_name": "add_member", - "doc": "Add member to a named service delegation target.", - "full_name": "servicedelegationtarget_add_member/1", - "name": "servicedelegationtarget_add_member", - "obj_class": "servicedelegationtarget/1", + "full_name": "trustdomain_add/1", "output": [ { - "name": "result", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": "Number of members added", - "name": "completed", - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "trustdomain/1", + "topic_topic": "trust/1" + }, + { + "name": "trustdomain_del", + "doc": "Remove information about the domain associated with the trust.", + "attr_name": "del", + "version": "1", "params": [ { - "cli_name": "delegation_name", - "label": "Delegation name", + "type": "str", + "cli_name": "trust", + "name": "trustcn", + "label": "Realm name" + }, + { + "cli_name": "domain", + "label": "Domain name", + "multivalue": true, "name": "cn", "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", "positional": false, "type": "bool" + } + ], + "full_name": "trustdomain_del/1", + "output": [ + { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "alwaysask": true, - "cli_name": "principals", - "doc": "principal to add", - "label": "member principal", + "type": "str", "multivalue": true, - "name": "principal", - "required": false, - "type": "str" + "name": "value" } ], - "topic_topic": "servicedelegation/1", - "version": "1" + "obj_class": "trustdomain/1", + "topic_topic": "trust/1" }, { - "attr_name": "del", - "doc": "Delete service delegation target.", - "full_name": "servicedelegationtarget_del/1", - "name": "servicedelegationtarget_del", - "obj_class": "servicedelegationtarget/1", + "name": "trustdomain_disable", + "doc": "Disable use of IPA resources by the domain of the trust", + "attr_name": "disable", + "version": "1", + "params": [ + { + "type": "str", + "cli_name": "trust", + "name": "trustcn", + "label": "Realm name" + }, + { + "type": "str", + "cli_name": "domain", + "name": "cn", + "label": "Domain name" + } + ], + "full_name": "trustdomain_disable/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "doc": "True means the operation was successful", + "type": "bool", + "name": "result" }, { - "multivalue": true, - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "trustdomain/1", + "topic_topic": "trust/1" + }, + { + "name": "trustdomain_enable", + "doc": "Allow use of IPA resources by the domain of the trust", + "attr_name": "enable", + "version": "1", "params": [ { - "cli_name": "delegation_name", - "label": "Delegation name", - "multivalue": true, - "name": "cn", - "type": "str" + "type": "str", + "cli_name": "trust", + "name": "trustcn", + "label": "Realm name" }, { - "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", - "name": "continue", - "positional": false, - "type": "bool" + "type": "str", + "cli_name": "domain", + "name": "cn", + "label": "Domain name" } ], - "topic_topic": "servicedelegation/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for service delegation target.", - "full_name": "servicedelegationtarget_find/1", - "name": "servicedelegationtarget_find", - "obj_class": "servicedelegationtarget/1", + "full_name": "trustdomain_enable/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" - }, - { - "multivalue": true, - "name": "result", - "type": "dict" + "type": "str", + "name": "summary" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "doc": "True means the operation was successful", + "type": "bool", + "name": "result" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "trustdomain/1", + "topic_topic": "trust/1" + }, + { + "name": "trustdomain_find", + "doc": "Search domains of the trust", + "attr_name": "find", + "version": "1", "params": [ { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", + "type": "str", + "cli_name": "trust", + "name": "trustcn", + "label": "Realm name" + }, + { "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, - "type": "str" + "type": "str", + "name": "criteria" }, { - "cli_name": "delegation_name", - "label": "Delegation name", + "type": "str", + "required": false, + "cli_name": "domain", "name": "cn", + "label": "Domain name" + }, + { + "type": "str", "required": false, - "type": "str" + "cli_name": "flat_name", + "name": "ipantflatname", + "label": "Domain NetBIOS name" + }, + { + "type": "str", + "required": false, + "cli_name": "sid", + "name": "ipanttrusteddomainsid", + "label": "Domain Security Identifier" }, { "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", "required": false, - "type": "int" + "type": "int", + "name": "timelimit", + "label": "Time Limit" }, { "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", "required": false, - "type": "int" + "type": "int", + "name": "sizelimit", + "label": "Size Limit" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"delegation-name\")", - "label": "Primary key only", "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"domain\")", "required": false, + "label": "Primary key only", "type": "bool" } ], - "topic_topic": "servicedelegation/1", - "version": "1" - }, - { - "attr_name": "remove_member", - "doc": "Remove member from a named service delegation target.", - "full_name": "servicedelegationtarget_remove_member/1", - "name": "servicedelegationtarget_remove_member", - "obj_class": "servicedelegationtarget/1", + "full_name": "trustdomain_find/1", "output": [ { - "name": "result", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" + "type": "dict", + "multivalue": true, + "name": "result" }, { - "doc": "Number of members removed", - "name": "completed", - "type": "int" + "doc": "Number of entries returned", + "type": "int", + "name": "count" + }, + { + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], + "obj_class": "trustdomain/1", + "topic_topic": "trust/1" + }, + { + "exclude": [ + "cli" + ], + "name": "trustdomain_mod", + "doc": "Modify trustdomain of the trust", + "attr_name": "mod", + "version": "1", "params": [ { - "cli_name": "delegation_name", - "label": "Delegation name", - "name": "cn", - "type": "str" + "type": "str", + "cli_name": "trust", + "name": "trustcn", + "label": "Realm name" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "type": "str", + "cli_name": "domain", + "name": "cn", + "label": "Domain name" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "type": "str", + "required": false, + "cli_name": "flat_name", + "name": "ipantflatname", + "label": "Domain NetBIOS name" }, { - "alwaysask": true, - "cli_name": "principals", - "doc": "principal to remove", - "label": "member principal", - "multivalue": true, - "name": "principal", + "type": "str", "required": false, - "type": "str" - } - ], - "topic_topic": "servicedelegation/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display information about a named service delegation target.", - "full_name": "servicedelegationtarget_show/1", - "name": "servicedelegationtarget_show", - "obj_class": "servicedelegationtarget/1", - "output": [ + "cli_name": "sid", + "name": "ipanttrusteddomainsid", + "label": "Domain Security Identifier" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "cli_name": "setattr", + "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "name": "result", - "type": "dict" - }, - { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", + "cli_name": "addattr", + "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" - } - ], - "params": [ + }, { - "cli_name": "delegation_name", - "label": "Delegation name", - "name": "cn", + "cli_name": "delattr", + "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" - }, - { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", + "cli_name": "type", + "name": "trust_type", + "cli_metavar": "['ad']", + "default": [ + "ad" + ], + "label": "Trust type (ad for Active Directory, default)", "positional": false, - "type": "bool" - } - ], - "topic_topic": "servicedelegation/1", - "version": "1" - }, - { - "doc": - "\n RPC command used to log the current user out of their session.\n ", - "exclude": ["cli"], - "full_name": "session_logout/1", - "name": "session_logout", - "output": [ - { - "name": "result" - } - ], - "params": [], - "topic_topic": "session/1", - "version": "1" - }, - { - "doc": - "Determine whether ipa-adtrust-install has been run with sidgen task", - "exclude": ["cli"], - "full_name": "sidgen_was_run/1", - "name": "sidgen_was_run", - "output": [ - { - "name": "result" - } - ], - "params": [], - "topic_topic": "trust/1", - "version": "1" - }, - { - "attr_name": "activate", - "doc": "Activate a stage user.", - "full_name": "stageuser_activate/1", - "name": "stageuser_activate", - "obj_class": "stageuser/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" - }, - { - "name": "result", - "type": "dict" - }, - { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ - { - "alwaysask": true, - "cli_name": "login", - "default_from_param": ["givenname", "sn"], - "label": "User login", - "name": "uid", - "no_convert": true, "type": "str" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, - "type": "bool" - }, - { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "stageuser/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Add a new stage user.", - "full_name": "stageuser_add/1", - "name": "stageuser_add", - "obj_class": "stageuser/1", + "full_name": "trustdomain_mod/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "trustdomain/1", + "topic_topic": "trust/1" + }, + { + "name": "user_add", + "doc": "Add a new user.", + "attr_name": "add", + "version": "1", "params": [ { - "alwaysask": true, "cli_name": "login", - "default_from_param": ["givenname", "sn"], - "label": "User login", "name": "uid", - "no_convert": true, - "type": "str" + "alwaysask": true, + "label": "User login", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true }, { + "positional": false, + "type": "str", "cli_name": "first", - "label": "First name", "name": "givenname", - "positional": false, - "type": "str" + "label": "First name" }, { + "positional": false, + "type": "str", "cli_name": "last", - "label": "Last name", "name": "sn", - "positional": false, - "type": "str" + "label": "Last name" }, { - "default_from_param": ["givenname", "sn"], - "label": "Full name", - "name": "cn", "positional": false, - "type": "str" + "type": "str", + "name": "cn", + "default_from_param": [ + "givenname", + "sn" + ], + "label": "Full name" }, { - "default_from_param": ["givenname", "sn"], - "label": "Display name", - "name": "displayname", "required": false, - "type": "str" + "type": "str", + "name": "displayname", + "default_from_param": [ + "givenname", + "sn" + ], + "label": "Display name" }, { - "default_from_param": ["givenname", "sn"], - "label": "Initials", - "name": "initials", "required": false, - "type": "str" + "type": "str", + "name": "initials", + "default_from_param": [ + "givenname", + "sn" + ], + "label": "Initials" }, { + "type": "str", + "required": false, "cli_name": "homedir", - "label": "Home directory", "name": "homedirectory", - "required": false, - "type": "str" + "label": "Home directory" }, { - "default_from_param": ["givenname", "sn"], - "label": "GECOS", - "name": "gecos", "required": false, - "type": "str" + "type": "str", + "name": "gecos", + "default_from_param": [ + "givenname", + "sn" + ], + "label": "GECOS" }, { + "type": "str", + "required": false, "cli_name": "shell", - "label": "Login shell", "name": "loginshell", - "required": false, - "type": "str" + "label": "Login shell" }, { "cli_name": "principal", - "default_from_param": ["uid"], - "label": "Principal alias", - "multivalue": true, "name": "krbprincipalname", - "no_convert": true, "required": false, - "type": "Principal" + "label": "Principal alias", + "multivalue": true, + "type": "Principal", + "default_from_param": [ + "uid" + ], + "no_convert": true }, { + "type": "datetime", + "required": false, "cli_name": "principal_expiration", - "label": "Kerberos principal expiration", "name": "krbprincipalexpiration", + "label": "Kerberos principal expiration" + }, + { + "type": "datetime", "required": false, - "type": "datetime" + "cli_name": "password_expiration", + "name": "krbpasswordexpiration", + "label": "User password expiration" }, { "cli_name": "email", - "label": "Email address", - "multivalue": true, "name": "mail", "required": false, + "label": "Email address", + "multivalue": true, "type": "str" }, { "cli_name": "password", - "doc": "Prompt to set the user password", - "exclude": ["webui"], - "label": "Password", "name": "userpassword", + "doc": "Prompt to set the user password", "required": false, + "label": "Password", "sensitive": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "default": ["False"], + "default": [ + "False" + ], "doc": "Generate a random user password", - "name": "random", "required": false, - "type": "bool" + "type": "bool", + "name": "random" }, { "cli_name": "uid", - "doc": "User ID Number (system will assign one if not provided)", - "label": "UID", "name": "uidnumber", + "doc": "User ID Number (system will assign one if not provided)", "required": false, + "label": "UID", "type": "int" }, { "doc": "Group ID Number", - "label": "GID", - "name": "gidnumber", "required": false, - "type": "int" + "type": "int", + "name": "gidnumber", + "label": "GID" }, { + "type": "str", + "required": false, "cli_name": "street", - "label": "Street address", "name": "street", - "required": false, - "type": "str" + "label": "Street address" }, { + "type": "str", + "required": false, "cli_name": "city", - "label": "City", "name": "l", - "required": false, - "type": "str" + "label": "City" }, { + "type": "str", + "required": false, "cli_name": "state", - "label": "State/Province", "name": "st", - "required": false, - "type": "str" + "label": "State/Province" }, { - "label": "ZIP", - "name": "postalcode", "required": false, - "type": "str" + "type": "str", + "name": "postalcode", + "label": "ZIP" }, { "cli_name": "phone", - "label": "Telephone Number", - "multivalue": true, "name": "telephonenumber", "required": false, + "label": "Telephone Number", + "multivalue": true, "type": "str" }, { - "label": "Mobile Telephone Number", + "type": "str", + "required": false, "multivalue": true, "name": "mobile", - "required": false, - "type": "str" + "label": "Mobile Telephone Number" }, { - "label": "Pager Number", + "type": "str", + "required": false, "multivalue": true, "name": "pager", - "required": false, - "type": "str" + "label": "Pager Number" }, { "cli_name": "fax", - "label": "Fax Number", - "multivalue": true, "name": "facsimiletelephonenumber", "required": false, + "label": "Fax Number", + "multivalue": true, "type": "str" }, { + "type": "str", + "required": false, "cli_name": "orgunit", - "label": "Org. Unit", "name": "ou", - "required": false, - "type": "str" + "label": "Org. Unit" }, { - "label": "Job Title", - "name": "title", "required": false, - "type": "str" + "type": "str", + "name": "title", + "label": "Job Title" }, { - "label": "Manager", - "name": "manager", "required": false, - "type": "str" + "type": "str", + "name": "manager", + "label": "Manager" }, { - "label": "Car License", + "type": "str", + "required": false, "multivalue": true, "name": "carlicense", - "required": false, - "type": "str" + "label": "Car License" }, { "cli_name": "sshpubkey", - "label": "SSH public key", - "multivalue": true, "name": "ipasshpubkey", - "no_convert": true, "required": false, - "type": "str" + "label": "SSH public key", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_metavar": "['password', 'radius', 'otp']", "cli_name": "user_auth_type", + "name": "ipauserauthtype", + "cli_metavar": "['password', 'radius', 'otp']", "doc": "Types of supported user authentication", + "required": false, "label": "User authentication types", "multivalue": true, - "name": "ipauserauthtype", - "required": false, "type": "str" }, { "cli_name": "class", - "doc": - "User category (semantics placed on this attribute are for local interpretation)", - "label": "Class", - "multivalue": true, "name": "userclass", + "doc": "User category (semantics placed on this attribute are for local interpretation)", "required": false, + "label": "Class", + "multivalue": true, "type": "str" }, { + "type": "str", + "required": false, "cli_name": "radius", - "label": "RADIUS proxy configuration", "name": "ipatokenradiusconfiglink", - "required": false, - "type": "str" + "label": "RADIUS proxy configuration" }, { + "type": "str", + "required": false, "cli_name": "radius_username", - "label": "RADIUS proxy username", "name": "ipatokenradiususername", - "required": false, - "type": "str" + "label": "RADIUS proxy username" }, { - "label": "Department Number", + "type": "str", + "required": false, "multivalue": true, "name": "departmentnumber", - "required": false, - "type": "str" + "label": "Department Number" }, { - "label": "Employee Number", - "name": "employeenumber", "required": false, - "type": "str" + "type": "str", + "name": "employeenumber", + "label": "Employee Number" }, { - "label": "Employee Type", - "name": "employeetype", "required": false, - "type": "str" + "type": "str", + "name": "employeetype", + "label": "Employee Type" }, { - "label": "Preferred Language", - "name": "preferredlanguage", "required": false, - "type": "str" + "type": "str", + "name": "preferredlanguage", + "label": "Preferred Language" }, { "cli_name": "certificate", + "name": "usercertificate", "doc": "Base-64 encoded user certificate", + "required": false, "label": "Certificate", "multivalue": true, - "name": "usercertificate", + "type": "Certificate" + }, + { + "cli_name": "disabled", + "name": "nsaccountlock", + "alwaysask": true, + "default": [ + "False" + ], "required": false, - "type": "bytes" + "label": "Account disabled", + "exclude": [ + "cli", + "webui" + ], + "type": "bool" }, { "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "from_delete", - "doc": "Create Stage user in from a delete user", - "exclude": ["cli", "webui"], - "name": "from_delete", - "required": false, + "cli_name": "noprivate", + "name": "noprivate", + "default": [ + "False" + ], + "doc": "Don't create user private group", + "positional": false, "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "stageuser/1", - "version": "1" + "full_name": "user_add/1", + "output": [ + { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" + }, + { + "type": "dict", + "name": "result" + }, + { + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "user/1", + "topic_topic": "user/1" }, { - "attr_name": "add_manager", - "doc": "Add a manager to the stage user entry", - "full_name": "stageuser_add_manager/1", - "name": "stageuser_add_manager", - "obj_class": "stageuser/1", + "name": "user_add_cert", + "doc": "Add one or more certificates to the user entry", + "attr_name": "add_cert", + "version": "1", + "params": [ + { + "cli_name": "login", + "name": "uid", + "alwaysask": true, + "label": "User login", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true + }, + { + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "certificate", + "name": "usercertificate", + "alwaysask": true, + "doc": "Base-64 encoded user certificate", + "label": "Certificate", + "positional": false, + "multivalue": true, + "type": "Certificate" + } + ], + "full_name": "user_add_cert/1", "output": [ { - "name": "result", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": "Number of members added", - "name": "completed", - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "user/1", + "topic_topic": "user/1" + }, + { + "name": "user_add_certmapdata", + "doc": "Add one or more certificate mappings to the user entry.", + "attr_name": "add_certmapdata", + "version": "1", "params": [ { - "alwaysask": true, "cli_name": "login", - "default_from_param": ["givenname", "sn"], - "label": "User login", "name": "uid", - "no_convert": true, + "alwaysask": true, + "label": "User login", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true + }, + { + "cli_name": "certmapdata", + "name": "ipacertmapdata", + "alwaysask": false, + "doc": "Certificate mapping data", + "required": false, + "label": "Certificate mapping data", + "positional": true, + "multivalue": true, "type": "str" }, + { + "cli_name": "issuer", + "name": "issuer", + "doc": "Issuer of the certificate", + "required": false, + "label": "Issuer", + "type": "DN" + }, + { + "cli_name": "subject", + "name": "subject", + "doc": "Subject of the certificate", + "required": false, + "label": "Subject", + "type": "DN" + }, + { + "cli_name": "certificate", + "name": "certificate", + "doc": "Base-64 encoded user certificate", + "required": false, + "label": "Certificate", + "multivalue": true, + "type": "Certificate" + }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" + } + ], + "full_name": "user_add_certmapdata/1", + "output": [ + { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" + }, + { + "type": "dict", + "name": "result" }, { + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "user/1", + "topic_topic": "user/1" + }, + { + "name": "user_add_manager", + "doc": "Add a manager to the user entry", + "attr_name": "add_manager", + "version": "1", + "params": [ + { + "cli_name": "login", + "name": "uid", "alwaysask": true, + "label": "User login", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true + }, + { + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { "cli_name": "users", + "name": "user", + "alwaysask": true, "doc": "users to add", + "required": false, "label": "member user", "multivalue": true, - "name": "user", - "required": false, "type": "str" } ], - "topic_topic": "stageuser/1", - "version": "1" + "full_name": "user_add_manager/1", + "output": [ + { + "type": "dict", + "name": "result" + }, + { + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" + }, + { + "doc": "Number of members added", + "type": "int", + "name": "completed" + } + ], + "obj_class": "user/1", + "topic_topic": "user/1" }, { - "attr_name": "del", - "doc": "Delete a stage user.", - "full_name": "stageuser_del/1", - "name": "stageuser_del", - "obj_class": "stageuser/1", + "name": "user_add_principal", + "doc": "Add new principal alias to the user entry", + "attr_name": "add_principal", + "version": "1", + "params": [ + { + "cli_name": "login", + "name": "uid", + "alwaysask": true, + "label": "User login", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true + }, + { + "cli_name": "principal", + "name": "krbprincipalname", + "alwaysask": true, + "label": "Principal alias", + "multivalue": true, + "type": "Principal", + "default_from_param": [ + "uid" + ], + "no_convert": true + }, + { + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "user_add_principal/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "multivalue": true, - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "user/1", + "topic_topic": "user/1" + }, + { + "name": "user_del", + "doc": "Delete a user.", + "attr_name": "del", + "version": "1", "params": [ { - "alwaysask": true, "cli_name": "login", - "default_from_param": ["givenname", "sn"], + "name": "uid", + "alwaysask": true, "label": "User login", "multivalue": true, - "name": "uid", - "no_convert": true, - "type": "str" + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true }, { "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", "positional": false, "type": "bool" + }, + { + "exclude": [ + "cli" + ], + "required": false, + "type": "bool", + "name": "preserve" } ], - "topic_topic": "stageuser/1", - "version": "1" + "full_name": "user_del/1", + "output": [ + { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" + }, + { + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" + }, + { + "type": "str", + "multivalue": true, + "name": "value" + } + ], + "obj_class": "user/1", + "topic_topic": "user/1" }, { - "attr_name": "find", - "doc": "Search for stage users.", - "full_name": "stageuser_find/1", - "name": "stageuser_find", - "obj_class": "stageuser/1", + "name": "user_disable", + "doc": "Disable a user account.", + "attr_name": "disable", + "version": "1", + "params": [ + { + "cli_name": "login", + "name": "uid", + "alwaysask": true, + "label": "User login", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true + } + ], + "full_name": "user_disable/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "multivalue": true, - "name": "result", - "type": "dict" + "doc": "True means the operation was successful", + "type": "bool", + "name": "result" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "user/1", + "topic_topic": "user/1" + }, + { + "name": "user_enable", + "doc": "Enable a user account.", + "attr_name": "enable", + "version": "1", + "params": [ + { + "cli_name": "login", + "name": "uid", + "alwaysask": true, + "label": "User login", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true + } + ], + "full_name": "user_enable/1", + "output": [ + { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" + "doc": "True means the operation was successful", + "type": "bool", + "name": "result" + }, + { + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "user/1", + "topic_topic": "user/1" + }, + { + "name": "user_find", + "doc": "Search for users.", + "attr_name": "find", + "version": "1", "params": [ { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", "positional": true, + "doc": "A string searched in all relevant object attributes", "required": false, - "type": "str" + "type": "str", + "name": "criteria" }, { - "alwaysask": true, "cli_name": "login", - "default_from_param": ["givenname", "sn"], - "label": "User login", "name": "uid", - "no_convert": true, + "alwaysask": true, "required": false, - "type": "str" + "label": "User login", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true }, { + "type": "str", + "required": false, "cli_name": "first", - "label": "First name", "name": "givenname", - "required": false, - "type": "str" + "label": "First name" }, { + "type": "str", + "required": false, "cli_name": "last", - "label": "Last name", "name": "sn", - "required": false, - "type": "str" + "label": "Last name" }, { - "alwaysask": true, - "default_from_param": ["givenname", "sn"], - "label": "Full name", "name": "cn", + "alwaysask": true, "required": false, - "type": "str" + "label": "Full name", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ] }, { - "alwaysask": true, - "default_from_param": ["givenname", "sn"], - "label": "Display name", "name": "displayname", + "alwaysask": true, "required": false, - "type": "str" + "label": "Display name", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ] }, { - "alwaysask": true, - "default_from_param": ["givenname", "sn"], - "label": "Initials", "name": "initials", + "alwaysask": true, "required": false, - "type": "str" + "label": "Initials", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ] }, { + "type": "str", + "required": false, "cli_name": "homedir", - "label": "Home directory", "name": "homedirectory", - "required": false, - "type": "str" + "label": "Home directory" }, { - "alwaysask": true, - "default_from_param": ["givenname", "sn"], - "label": "GECOS", "name": "gecos", + "alwaysask": true, "required": false, - "type": "str" + "label": "GECOS", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ] }, { + "type": "str", + "required": false, "cli_name": "shell", - "label": "Login shell", "name": "loginshell", - "required": false, - "type": "str" + "label": "Login shell" }, { - "alwaysask": true, "cli_name": "principal", - "default_from_param": ["uid"], - "label": "Principal alias", - "multivalue": true, "name": "krbprincipalname", - "no_convert": true, + "alwaysask": true, "required": false, - "type": "Principal" + "label": "Principal alias", + "multivalue": true, + "type": "Principal", + "default_from_param": [ + "uid" + ], + "no_convert": true }, { + "type": "datetime", + "required": false, "cli_name": "principal_expiration", - "label": "Kerberos principal expiration", "name": "krbprincipalexpiration", + "label": "Kerberos principal expiration" + }, + { + "type": "datetime", "required": false, - "type": "datetime" + "cli_name": "password_expiration", + "name": "krbpasswordexpiration", + "label": "User password expiration" }, { "cli_name": "email", - "label": "Email address", - "multivalue": true, "name": "mail", "required": false, + "label": "Email address", + "multivalue": true, "type": "str" }, { "cli_name": "password", - "doc": "Prompt to set the user password", - "exclude": ["webui"], - "label": "Password", "name": "userpassword", + "doc": "Prompt to set the user password", "required": false, + "label": "Password", "sensitive": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "uid", - "doc": "User ID Number (system will assign one if not provided)", - "label": "UID", "name": "uidnumber", + "doc": "User ID Number (system will assign one if not provided)", "required": false, + "label": "UID", "type": "int" }, { "doc": "Group ID Number", - "label": "GID", - "name": "gidnumber", "required": false, - "type": "int" + "type": "int", + "name": "gidnumber", + "label": "GID" }, { + "type": "str", + "required": false, "cli_name": "street", - "label": "Street address", "name": "street", - "required": false, - "type": "str" + "label": "Street address" }, { + "type": "str", + "required": false, "cli_name": "city", - "label": "City", "name": "l", - "required": false, - "type": "str" + "label": "City" }, { + "type": "str", + "required": false, "cli_name": "state", - "label": "State/Province", "name": "st", - "required": false, - "type": "str" + "label": "State/Province" }, { - "label": "ZIP", - "name": "postalcode", "required": false, - "type": "str" + "type": "str", + "name": "postalcode", + "label": "ZIP" }, { "cli_name": "phone", - "label": "Telephone Number", - "multivalue": true, "name": "telephonenumber", "required": false, + "label": "Telephone Number", + "multivalue": true, "type": "str" }, { - "label": "Mobile Telephone Number", + "type": "str", + "required": false, "multivalue": true, "name": "mobile", - "required": false, - "type": "str" + "label": "Mobile Telephone Number" }, { - "label": "Pager Number", + "type": "str", + "required": false, "multivalue": true, "name": "pager", - "required": false, - "type": "str" + "label": "Pager Number" }, { "cli_name": "fax", - "label": "Fax Number", - "multivalue": true, "name": "facsimiletelephonenumber", "required": false, + "label": "Fax Number", + "multivalue": true, "type": "str" }, { + "type": "str", + "required": false, "cli_name": "orgunit", - "label": "Org. Unit", "name": "ou", - "required": false, - "type": "str" + "label": "Org. Unit" }, { - "label": "Job Title", - "name": "title", "required": false, - "type": "str" + "type": "str", + "name": "title", + "label": "Job Title" }, { - "label": "Manager", - "name": "manager", "required": false, - "type": "str" + "type": "str", + "name": "manager", + "label": "Manager" }, { - "label": "Car License", + "type": "str", + "required": false, "multivalue": true, "name": "carlicense", - "required": false, - "type": "str" + "label": "Car License" }, { - "cli_metavar": "['password', 'radius', 'otp']", "cli_name": "user_auth_type", + "name": "ipauserauthtype", + "cli_metavar": "['password', 'radius', 'otp']", "doc": "Types of supported user authentication", + "required": false, "label": "User authentication types", "multivalue": true, - "name": "ipauserauthtype", - "required": false, "type": "str" }, { "cli_name": "class", - "doc": - "User category (semantics placed on this attribute are for local interpretation)", - "label": "Class", - "multivalue": true, "name": "userclass", + "doc": "User category (semantics placed on this attribute are for local interpretation)", "required": false, + "label": "Class", + "multivalue": true, "type": "str" }, { + "type": "str", + "required": false, "cli_name": "radius", - "label": "RADIUS proxy configuration", "name": "ipatokenradiusconfiglink", - "required": false, - "type": "str" + "label": "RADIUS proxy configuration" }, { + "type": "str", + "required": false, "cli_name": "radius_username", - "label": "RADIUS proxy username", "name": "ipatokenradiususername", - "required": false, - "type": "str" + "label": "RADIUS proxy username" }, { - "label": "Department Number", + "type": "str", + "required": false, "multivalue": true, "name": "departmentnumber", - "required": false, - "type": "str" + "label": "Department Number" }, { - "label": "Employee Number", - "name": "employeenumber", "required": false, - "type": "str" + "type": "str", + "name": "employeenumber", + "label": "Employee Number" }, { - "label": "Employee Type", - "name": "employeetype", "required": false, - "type": "str" + "type": "str", + "name": "employeetype", + "label": "Employee Type" }, { - "label": "Preferred Language", - "name": "preferredlanguage", "required": false, - "type": "str" + "type": "str", + "name": "preferredlanguage", + "label": "Preferred Language" }, { "cli_name": "certificate", + "name": "usercertificate", "doc": "Base-64 encoded user certificate", + "required": false, "label": "Certificate", "multivalue": true, - "name": "usercertificate", + "type": "Certificate" + }, + { + "cli_name": "disabled", + "name": "nsaccountlock", + "alwaysask": true, + "default": [ + "False" + ], "required": false, - "type": "bytes" + "label": "Account disabled", + "type": "bool" + }, + { + "name": "preserved", + "alwaysask": true, + "default": [ + "False" + ], + "required": false, + "label": "Preserved user", + "type": "bool" }, { "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", "required": false, - "type": "int" + "type": "int", + "name": "timelimit", + "label": "Time Limit" }, { "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", "required": false, - "type": "int" + "type": "int", + "name": "sizelimit", + "label": "Size Limit" + }, + { + "name": "whoami", + "default": [ + "False" + ], + "doc": "Display user record for current Kerberos principal", + "label": "Self", + "positional": false, + "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["True"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui", "cli"], "name": "no_members", + "default": [ + "True" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui", + "cli" + ], "type": "bool" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"login\")", - "label": "Primary key only", "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"login\")", "required": false, + "label": "Primary key only", "type": "bool" }, { "cli_name": "in_groups", - "doc": "Search for stage users with these member of groups.", - "label": "group", - "multivalue": true, "name": "in_group", - "no_convert": true, + "doc": "Search for users with these member of groups.", "required": false, - "type": "str" + "label": "group", + "multivalue": true, + "type": "str", + "no_convert": true }, { "cli_name": "not_in_groups", - "doc": "Search for stage users without these member of groups.", - "label": "group", - "multivalue": true, "name": "not_in_group", - "no_convert": true, + "doc": "Search for users without these member of groups.", "required": false, - "type": "str" + "label": "group", + "multivalue": true, + "type": "str", + "no_convert": true }, { "cli_name": "in_netgroups", - "doc": "Search for stage users with these member of netgroups.", - "label": "netgroup", - "multivalue": true, "name": "in_netgroup", - "no_convert": true, + "doc": "Search for users with these member of netgroups.", "required": false, - "type": "str" + "label": "netgroup", + "multivalue": true, + "type": "str", + "no_convert": true }, { "cli_name": "not_in_netgroups", - "doc": - "Search for stage users without these member of netgroups.", - "label": "netgroup", - "multivalue": true, "name": "not_in_netgroup", - "no_convert": true, + "doc": "Search for users without these member of netgroups.", "required": false, - "type": "str" + "label": "netgroup", + "multivalue": true, + "type": "str", + "no_convert": true }, { "cli_name": "in_roles", - "doc": "Search for stage users with these member of roles.", - "label": "role", - "multivalue": true, "name": "in_role", + "doc": "Search for users with these member of roles.", "required": false, + "label": "role", + "multivalue": true, "type": "str" }, { "cli_name": "not_in_roles", - "doc": "Search for stage users without these member of roles.", - "label": "role", - "multivalue": true, "name": "not_in_role", + "doc": "Search for users without these member of roles.", "required": false, + "label": "role", + "multivalue": true, "type": "str" }, { "cli_name": "in_hbacrules", - "doc": "Search for stage users with these member of HBAC rules.", - "label": "HBAC rule", - "multivalue": true, "name": "in_hbacrule", + "doc": "Search for users with these member of HBAC rules.", "required": false, + "label": "HBAC rule", + "multivalue": true, "type": "str" }, { "cli_name": "not_in_hbacrules", - "doc": - "Search for stage users without these member of HBAC rules.", - "label": "HBAC rule", - "multivalue": true, "name": "not_in_hbacrule", + "doc": "Search for users without these member of HBAC rules.", "required": false, + "label": "HBAC rule", + "multivalue": true, "type": "str" }, { "cli_name": "in_sudorules", - "doc": "Search for stage users with these member of sudo rules.", - "label": "sudo rule", - "multivalue": true, "name": "in_sudorule", + "doc": "Search for users with these member of sudo rules.", "required": false, + "label": "sudo rule", + "multivalue": true, "type": "str" }, { "cli_name": "not_in_sudorules", - "doc": - "Search for stage users without these member of sudo rules.", - "label": "sudo rule", - "multivalue": true, "name": "not_in_sudorule", + "doc": "Search for users without these member of sudo rules.", "required": false, + "label": "sudo rule", + "multivalue": true, "type": "str" } ], - "topic_topic": "stageuser/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify a stage user.", - "full_name": "stageuser_mod/1", - "name": "stageuser_mod", - "obj_class": "stageuser/1", + "full_name": "user_find/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "multivalue": true, + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "Number of entries returned", + "type": "int", + "name": "count" + }, + { + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], + "obj_class": "user/1", + "topic_topic": "user/1" + }, + { + "name": "user_mod", + "doc": "Modify a user.", + "attr_name": "mod", + "version": "1", "params": [ { - "alwaysask": true, "cli_name": "login", - "default_from_param": ["givenname", "sn"], - "label": "User login", "name": "uid", - "no_convert": true, - "type": "str" + "alwaysask": true, + "label": "User login", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true }, { + "type": "str", + "required": false, "cli_name": "first", - "label": "First name", "name": "givenname", - "required": false, - "type": "str" + "label": "First name" }, { + "type": "str", + "required": false, "cli_name": "last", - "label": "Last name", "name": "sn", - "required": false, - "type": "str" + "label": "Last name" }, { - "alwaysask": true, - "default_from_param": ["givenname", "sn"], - "label": "Full name", "name": "cn", + "alwaysask": true, "required": false, - "type": "str" + "label": "Full name", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ] }, { - "alwaysask": true, - "default_from_param": ["givenname", "sn"], - "label": "Display name", "name": "displayname", + "alwaysask": true, "required": false, - "type": "str" + "label": "Display name", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ] }, { - "alwaysask": true, - "default_from_param": ["givenname", "sn"], - "label": "Initials", "name": "initials", + "alwaysask": true, "required": false, - "type": "str" + "label": "Initials", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ] }, { + "type": "str", + "required": false, "cli_name": "homedir", - "label": "Home directory", "name": "homedirectory", - "required": false, - "type": "str" + "label": "Home directory" }, { - "alwaysask": true, - "default_from_param": ["givenname", "sn"], - "label": "GECOS", "name": "gecos", + "alwaysask": true, "required": false, - "type": "str" + "label": "GECOS", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ] }, { + "type": "str", + "required": false, "cli_name": "shell", - "label": "Login shell", "name": "loginshell", - "required": false, - "type": "str" + "label": "Login shell" }, { - "alwaysask": true, "cli_name": "principal", - "default_from_param": ["uid"], - "label": "Principal alias", - "multivalue": true, "name": "krbprincipalname", - "no_convert": true, + "alwaysask": true, "required": false, - "type": "Principal" + "label": "Principal alias", + "multivalue": true, + "type": "Principal", + "default_from_param": [ + "uid" + ], + "no_convert": true }, { + "type": "datetime", + "required": false, "cli_name": "principal_expiration", - "label": "Kerberos principal expiration", "name": "krbprincipalexpiration", + "label": "Kerberos principal expiration" + }, + { + "type": "datetime", "required": false, - "type": "datetime" + "cli_name": "password_expiration", + "name": "krbpasswordexpiration", + "label": "User password expiration" }, { "cli_name": "email", - "label": "Email address", - "multivalue": true, "name": "mail", "required": false, + "label": "Email address", + "multivalue": true, "type": "str" }, { "cli_name": "password", - "doc": "Prompt to set the user password", - "exclude": ["webui"], - "label": "Password", "name": "userpassword", + "doc": "Prompt to set the user password", "required": false, + "label": "Password", "sensitive": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "default": ["False"], + "default": [ + "False" + ], "doc": "Generate a random user password", - "name": "random", "required": false, - "type": "bool" + "type": "bool", + "name": "random" }, { "cli_name": "uid", - "doc": "User ID Number (system will assign one if not provided)", - "label": "UID", "name": "uidnumber", + "doc": "User ID Number (system will assign one if not provided)", "required": false, + "label": "UID", "type": "int" }, { "doc": "Group ID Number", - "label": "GID", - "name": "gidnumber", "required": false, - "type": "int" + "type": "int", + "name": "gidnumber", + "label": "GID" }, { + "type": "str", + "required": false, "cli_name": "street", - "label": "Street address", "name": "street", - "required": false, - "type": "str" + "label": "Street address" }, { + "type": "str", + "required": false, "cli_name": "city", - "label": "City", "name": "l", - "required": false, - "type": "str" + "label": "City" }, { + "type": "str", + "required": false, "cli_name": "state", - "label": "State/Province", "name": "st", - "required": false, - "type": "str" + "label": "State/Province" }, { - "label": "ZIP", - "name": "postalcode", "required": false, - "type": "str" + "type": "str", + "name": "postalcode", + "label": "ZIP" }, { "cli_name": "phone", - "label": "Telephone Number", - "multivalue": true, "name": "telephonenumber", "required": false, + "label": "Telephone Number", + "multivalue": true, "type": "str" }, { - "label": "Mobile Telephone Number", + "type": "str", + "required": false, "multivalue": true, "name": "mobile", - "required": false, - "type": "str" + "label": "Mobile Telephone Number" }, { - "label": "Pager Number", + "type": "str", + "required": false, "multivalue": true, "name": "pager", - "required": false, - "type": "str" + "label": "Pager Number" }, { "cli_name": "fax", - "label": "Fax Number", - "multivalue": true, "name": "facsimiletelephonenumber", "required": false, + "label": "Fax Number", + "multivalue": true, "type": "str" }, { + "type": "str", + "required": false, "cli_name": "orgunit", - "label": "Org. Unit", "name": "ou", - "required": false, - "type": "str" + "label": "Org. Unit" }, { - "label": "Job Title", - "name": "title", "required": false, - "type": "str" + "type": "str", + "name": "title", + "label": "Job Title" }, { - "label": "Manager", - "name": "manager", "required": false, - "type": "str" + "type": "str", + "name": "manager", + "label": "Manager" }, { - "label": "Car License", + "type": "str", + "required": false, "multivalue": true, "name": "carlicense", - "required": false, - "type": "str" + "label": "Car License" }, { "cli_name": "sshpubkey", - "label": "SSH public key", - "multivalue": true, "name": "ipasshpubkey", - "no_convert": true, "required": false, - "type": "str" + "label": "SSH public key", + "multivalue": true, + "type": "str", + "no_convert": true }, { - "cli_metavar": "['password', 'radius', 'otp']", "cli_name": "user_auth_type", + "name": "ipauserauthtype", + "cli_metavar": "['password', 'radius', 'otp']", "doc": "Types of supported user authentication", + "required": false, "label": "User authentication types", "multivalue": true, - "name": "ipauserauthtype", - "required": false, "type": "str" }, { "cli_name": "class", - "doc": - "User category (semantics placed on this attribute are for local interpretation)", - "label": "Class", - "multivalue": true, "name": "userclass", + "doc": "User category (semantics placed on this attribute are for local interpretation)", "required": false, + "label": "Class", + "multivalue": true, "type": "str" }, { + "type": "str", + "required": false, "cli_name": "radius", - "label": "RADIUS proxy configuration", "name": "ipatokenradiusconfiglink", - "required": false, - "type": "str" + "label": "RADIUS proxy configuration" }, { + "type": "str", + "required": false, "cli_name": "radius_username", - "label": "RADIUS proxy username", "name": "ipatokenradiususername", - "required": false, - "type": "str" + "label": "RADIUS proxy username" }, { - "label": "Department Number", + "type": "str", + "required": false, "multivalue": true, "name": "departmentnumber", - "required": false, - "type": "str" + "label": "Department Number" }, { - "label": "Employee Number", - "name": "employeenumber", "required": false, - "type": "str" + "type": "str", + "name": "employeenumber", + "label": "Employee Number" }, { - "label": "Employee Type", - "name": "employeetype", "required": false, - "type": "str" + "type": "str", + "name": "employeetype", + "label": "Employee Type" }, { - "label": "Preferred Language", - "name": "preferredlanguage", "required": false, - "type": "str" + "type": "str", + "name": "preferredlanguage", + "label": "Preferred Language" }, { "cli_name": "certificate", + "name": "usercertificate", "doc": "Base-64 encoded user certificate", + "required": false, "label": "Certificate", "multivalue": true, - "name": "usercertificate", + "type": "Certificate" + }, + { + "cli_name": "disabled", + "name": "nsaccountlock", + "alwaysask": true, + "default": [ + "False" + ], "required": false, - "type": "bytes" + "label": "Account disabled", + "exclude": [ + "cli", + "webui" + ], + "type": "bool" }, { "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "alwaysask": true, "cli_name": "rename", - "default_from_param": ["givenname", "sn"], - "doc": "Rename the stage user object", - "label": "Rename", "name": "rename", - "no_convert": true, + "alwaysask": true, + "doc": "Rename the user object", "required": false, - "type": "str" + "label": "Rename", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true + } + ], + "full_name": "user_mod/1", + "output": [ + { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" + }, + { + "type": "dict", + "name": "result" + }, + { + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "topic_topic": "stageuser/1", - "version": "1" + "obj_class": "user/1", + "topic_topic": "user/1" }, { - "attr_name": "remove_manager", - "doc": "Remove a manager to the stage user entry", - "full_name": "stageuser_remove_manager/1", - "name": "stageuser_remove_manager", - "obj_class": "stageuser/1", + "name": "user_remove_cert", + "doc": "Remove one or more certificates to the user entry", + "attr_name": "remove_cert", + "version": "1", + "params": [ + { + "cli_name": "login", + "name": "uid", + "alwaysask": true, + "label": "User login", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true + }, + { + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "certificate", + "name": "usercertificate", + "alwaysask": true, + "doc": "Base-64 encoded user certificate", + "label": "Certificate", + "positional": false, + "multivalue": true, + "type": "Certificate" + } + ], + "full_name": "user_remove_cert/1", "output": [ { - "name": "result", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" + }, + { + "type": "dict", + "name": "result" + }, + { + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" + } + ], + "obj_class": "user/1", + "topic_topic": "user/1" + }, + { + "name": "user_remove_certmapdata", + "doc": "Remove one or more certificate mappings from the user entry.", + "attr_name": "remove_certmapdata", + "version": "1", + "params": [ + { + "cli_name": "login", + "name": "uid", + "alwaysask": true, + "label": "User login", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true + }, + { + "cli_name": "certmapdata", + "name": "ipacertmapdata", + "alwaysask": false, + "doc": "Certificate mapping data", + "required": false, + "label": "Certificate mapping data", + "positional": true, + "multivalue": true, + "type": "str" + }, + { + "cli_name": "issuer", + "name": "issuer", + "doc": "Issuer of the certificate", + "required": false, + "label": "Issuer", + "type": "DN" + }, + { + "cli_name": "subject", + "name": "subject", + "doc": "Subject of the certificate", + "required": false, + "label": "Subject", + "type": "DN" + }, + { + "cli_name": "certificate", + "name": "certificate", + "doc": "Base-64 encoded user certificate", + "required": false, + "label": "Certificate", + "multivalue": true, + "type": "Certificate" + }, + { + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + }, + { + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" + } + ], + "full_name": "user_remove_certmapdata/1", + "output": [ + { + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": "Number of members removed", - "name": "completed", - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "user/1", + "topic_topic": "user/1" + }, + { + "name": "user_remove_manager", + "doc": "Remove a manager to the user entry", + "attr_name": "remove_manager", + "version": "1", "params": [ { - "alwaysask": true, "cli_name": "login", - "default_from_param": ["givenname", "sn"], - "label": "User login", "name": "uid", - "no_convert": true, - "type": "str" + "alwaysask": true, + "label": "User login", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "alwaysask": true, "cli_name": "users", + "name": "user", + "alwaysask": true, "doc": "users to remove", + "required": false, "label": "member user", "multivalue": true, - "name": "user", - "required": false, "type": "str" } ], - "topic_topic": "stageuser/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display information about a stage user.", - "full_name": "stageuser_show/1", - "name": "stageuser_show", - "obj_class": "stageuser/1", + "full_name": "user_remove_manager/1", "output": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "name": "result", - "type": "dict" + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "Number of members removed", + "type": "int", + "name": "completed" } ], + "obj_class": "user/1", + "topic_topic": "user/1" + }, + { + "name": "user_remove_principal", + "doc": "Remove principal alias from the user entry", + "attr_name": "remove_principal", + "version": "1", "params": [ { - "alwaysask": true, "cli_name": "login", - "default_from_param": ["givenname", "sn"], - "label": "User login", "name": "uid", - "no_convert": true, - "type": "str" + "alwaysask": true, + "label": "User login", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "cli_name": "principal", + "name": "krbprincipalname", + "alwaysask": true, + "label": "Principal alias", + "multivalue": true, + "type": "Principal", + "default_from_param": [ + "uid" + ], + "no_convert": true }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "stageuser/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Create new Sudo Command.", - "full_name": "sudocmd_add/1", - "name": "sudocmd_add", - "obj_class": "sudocmd/1", + "full_name": "user_remove_principal/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "user/1", + "topic_topic": "user/1" + }, + { + "name": "user_show", + "doc": "Display information about a user.", + "attr_name": "show", + "version": "1", "params": [ { - "cli_name": "command", - "label": "Sudo Command", - "name": "sudocmd", - "type": "str" - }, - { - "cli_name": "desc", - "doc": "A description of this command", - "label": "Description", - "name": "description", - "required": false, - "type": "str" + "cli_name": "login", + "name": "uid", + "alwaysask": true, + "label": "User login", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", - "required": false, - "type": "str" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", + "doc": "file to store certificate in", "required": false, - "type": "str" + "type": "str", + "name": "out" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "sudocmd/1", - "version": "1" - }, - { - "attr_name": "del", - "doc": "Delete Sudo Command.", - "full_name": "sudocmd_del/1", - "name": "sudocmd_del", - "obj_class": "sudocmd/1", + "full_name": "user_show/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "multivalue": true, - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "user/1", + "topic_topic": "user/1" + }, + { + "name": "user_stage", + "doc": "Move deleted user into staged area", + "attr_name": "stage", + "version": "1", "params": [ { - "cli_name": "command", - "label": "Sudo Command", + "cli_name": "login", + "name": "uid", + "alwaysask": true, + "label": "User login", "multivalue": true, - "name": "sudocmd", - "type": "str" + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true }, { "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", "positional": false, "type": "bool" } ], - "topic_topic": "sudocmd/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for Sudo Commands.", - "full_name": "sudocmd_find/1", - "name": "sudocmd_find", - "obj_class": "sudocmd/1", + "full_name": "user_stage/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" - }, - { - "multivalue": true, - "name": "result", - "type": "dict" + "type": "str", + "name": "summary" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" + "type": "str", + "multivalue": true, + "name": "value" } ], + "obj_class": "user/1", + "topic_topic": "user/1" + }, + { + "name": "user_status", + "doc": "\n Lockout status of a user account\n\n An account may become locked if the password is entered incorrectly too\n many times within a specific time period as controlled by password\n policy. A locked account is a temporary condition and may be unlocked by\n an administrator.\n\n This connects to each IPA master and displays the lockout status on\n each one.\n\n To determine whether an account is locked on a given server you need\n to compare the number of failed logins and the time of the last failure.\n For an account to be locked it must exceed the maxfail failures within\n the failinterval duration as specified in the password policy associated\n with the user.\n\n The failed login counter is modified only when a user attempts a log in\n so it is possible that an account may appear locked but the last failed\n login attempt is older than the lockouttime of the password policy. This\n means that the user may attempt a login again. ", + "attr_name": "find", + "version": "1", "params": [ { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, - "required": false, - "type": "str" - }, - { - "cli_name": "command", - "label": "Sudo Command", - "name": "sudocmd", - "required": false, - "type": "str" - }, - { - "cli_name": "desc", - "doc": "A description of this command", - "label": "Description", - "name": "description", - "required": false, - "type": "str" - }, - { - "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", - "required": false, - "type": "int" - }, - { - "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", - "required": false, - "type": "int" + "cli_name": "login", + "name": "useruid", + "alwaysask": true, + "label": "User login", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, - "type": "bool" - }, - { - "default": ["True"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui", "cli"], - "name": "no_members", - "positional": false, - "type": "bool" - }, - { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"command\")", - "label": "Primary key only", - "name": "pkey_only", - "required": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "sudocmd/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify Sudo Command.", - "full_name": "sudocmd_mod/1", - "name": "sudocmd_mod", - "obj_class": "sudocmd/1", + "full_name": "user_status/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" - }, - { - "name": "result", - "type": "dict" - }, - { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "command", - "label": "Sudo Command", - "name": "sudocmd", - "type": "str" - }, - { - "cli_name": "desc", - "doc": "A description of this command", - "label": "Description", - "name": "description", - "required": false, - "type": "str" - }, - { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", - "required": false, - "type": "str" - }, - { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], + "type": "dict", "multivalue": true, - "name": "delattr", - "required": false, - "type": "str" - }, - { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" - }, - { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "name": "result" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "doc": "Number of entries returned", + "type": "int", + "name": "count" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], - "topic_topic": "sudocmd/1", - "version": "1" + "obj_class": "userstatus/1", + "topic_topic": "user/1" }, { - "attr_name": "show", - "doc": "Display Sudo Command.", - "full_name": "sudocmd_show/1", - "name": "sudocmd_show", - "obj_class": "sudocmd/1", + "name": "user_undel", + "doc": "Undelete a delete user account.", + "attr_name": "undel", + "version": "1", + "params": [ + { + "cli_name": "login", + "name": "uid", + "alwaysask": true, + "label": "User login", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true + } + ], + "full_name": "user_undel/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "doc": "True means the operation was successful", + "type": "bool", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "user/1", + "topic_topic": "user/1" + }, + { + "name": "user_unlock", + "doc": "\n Unlock a user account\n\n An account may become locked if the password is entered incorrectly too\n many times within a specific time period as controlled by password\n policy. A locked account is a temporary condition and may be unlocked by\n an administrator.", + "attr_name": "unlock", + "version": "1", "params": [ { - "cli_name": "command", - "label": "Sudo Command", - "name": "sudocmd", - "type": "str" - }, - { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" - }, - { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" - }, - { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - }, - { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "cli_name": "login", + "name": "uid", + "alwaysask": true, + "label": "User login", + "type": "str", + "default_from_param": [ + "givenname", + "sn" + ], + "no_convert": true } ], - "topic_topic": "sudocmd/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Create new Sudo Command Group.", - "full_name": "sudocmdgroup_add/1", - "name": "sudocmdgroup_add", - "obj_class": "sudocmdgroup/1", + "full_name": "user_unlock/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "doc": "True means the operation was successful", + "type": "bool", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "user/1", + "topic_topic": "user/1" + }, + { + "version": "1", + "attr_name": "add_internal", + "obj_class": "vault/1", "params": [ { - "cli_name": "sudocmdgroup_name", - "label": "Sudo Command Group", + "type": "str", + "cli_name": "name", "name": "cn", - "no_convert": true, - "type": "str" + "label": "Vault name" }, { "cli_name": "desc", - "doc": "Group description", - "label": "Description", "name": "description", + "doc": "Vault description", "required": false, + "label": "Description", + "type": "str" + }, + { + "cli_name": "type", + "name": "ipavaulttype", + "cli_metavar": "['standard', 'symmetric', 'asymmetric']", + "default": [ + "symmetric" + ], + "doc": "Vault type", + "required": false, + "label": "Type", "type": "str" }, + { + "cli_name": "salt", + "name": "ipavaultsalt", + "doc": "Vault salt", + "required": false, + "label": "Salt", + "type": "bytes" + }, + { + "cli_name": "public_key", + "name": "ipavaultpublickey", + "doc": "Vault public key", + "required": false, + "label": "Public key", + "type": "bytes" + }, { "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" + }, + { + "doc": "Service name of the service vault", + "required": false, + "type": "Principal", + "name": "service", + "no_convert": true + }, + { + "default": [ + "False" + ], + "doc": "Shared vault", + "required": false, + "type": "bool", + "name": "shared" + }, + { + "doc": "Username of the user vault", "required": false, + "cli_name": "user", + "name": "username", "type": "str" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "sudocmdgroup/1", - "version": "1" - }, - { - "attr_name": "add_member", - "doc": "Add members to Sudo Command Group.", - "full_name": "sudocmdgroup_add_member/1", - "name": "sudocmdgroup_add_member", - "obj_class": "sudocmdgroup/1", + "full_name": "vault_add_internal/1", + "exclude": [ + "cli" + ], "output": [ { - "name": "result", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": "Number of members added", - "name": "completed", - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "topic_topic": "vault/1", + "name": "vault_add_internal" + }, + { + "name": "vault_add_member", + "doc": "Add members to a vault.", + "attr_name": "add_member", + "version": "1", "params": [ { - "cli_name": "sudocmdgroup_name", - "label": "Sudo Command Group", + "type": "str", + "cli_name": "name", "name": "cn", - "no_convert": true, + "label": "Vault name" + }, + { + "doc": "Service name of the service vault", + "required": false, + "type": "Principal", + "name": "service", + "no_convert": true + }, + { + "default": [ + "False" + ], + "doc": "Shared vault", + "required": false, + "type": "bool", + "name": "shared" + }, + { + "doc": "Username of the user vault", + "required": false, + "cli_name": "user", + "name": "username", "type": "str" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { + "cli_name": "users", + "name": "user", "alwaysask": true, - "cli_name": "sudocmds", - "doc": "sudo commands to add", - "label": "member sudo command", - "multivalue": true, - "name": "sudocmd", - "required": false, - "type": "str" - } - ], - "topic_topic": "sudocmdgroup/1", - "version": "1" - }, - { - "attr_name": "del", - "doc": "Delete Sudo Command Group.", - "full_name": "sudocmdgroup_del/1", - "name": "sudocmdgroup_del", - "obj_class": "sudocmdgroup/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", + "doc": "users to add", "required": false, + "label": "member user", + "multivalue": true, "type": "str" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" - }, - { + "cli_name": "groups", + "name": "group", + "alwaysask": true, + "doc": "groups to add", + "required": false, + "label": "member group", "multivalue": true, - "name": "value", "type": "str" - } - ], - "params": [ + }, { - "cli_name": "sudocmdgroup_name", - "label": "Sudo Command Group", + "cli_name": "services", + "name": "services", + "alwaysask": true, + "doc": "services to add", + "required": false, + "label": "member service", "multivalue": true, - "name": "cn", - "no_convert": true, "type": "str" - }, - { - "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", - "name": "continue", - "positional": false, - "type": "bool" } ], - "topic_topic": "sudocmdgroup/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for Sudo Command Groups.", - "full_name": "sudocmdgroup_find/1", - "name": "sudocmdgroup_find", - "obj_class": "sudocmdgroup/1", + "full_name": "vault_add_member/1", "output": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" - }, - { - "multivalue": true, - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "doc": "Members that could not be added", + "type": "dict", + "name": "failed" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" + "doc": "Number of members added", + "type": "int", + "name": "completed" } ], + "obj_class": "vault/1", + "topic_topic": "vault/1" + }, + { + "name": "vault_add_owner", + "doc": "Add owners to a vault.", + "attr_name": "add_owner", + "version": "1", "params": [ { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, - "required": false, - "type": "str" - }, - { - "cli_name": "sudocmdgroup_name", - "label": "Sudo Command Group", + "type": "str", + "cli_name": "name", "name": "cn", - "no_convert": true, - "required": false, - "type": "str" + "label": "Vault name" }, { - "cli_name": "desc", - "doc": "Group description", - "label": "Description", - "name": "description", + "doc": "Service name of the service vault", "required": false, - "type": "str" + "type": "Principal", + "name": "service", + "no_convert": true }, { - "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", + "default": [ + "False" + ], + "doc": "Shared vault", "required": false, - "type": "int" + "type": "bool", + "name": "shared" }, { - "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", + "doc": "Username of the user vault", "required": false, - "type": "int" + "cli_name": "user", + "name": "username", + "type": "str" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["True"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui", "cli"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"sudocmdgroup-name\")", - "label": "Primary key only", - "name": "pkey_only", + "cli_name": "users", + "name": "user", + "alwaysask": true, + "doc": "users to add", "required": false, - "type": "bool" + "label": "owner user", + "multivalue": true, + "type": "str" + }, + { + "cli_name": "groups", + "name": "group", + "alwaysask": true, + "doc": "groups to add", + "required": false, + "label": "owner group", + "multivalue": true, + "type": "str" + }, + { + "cli_name": "services", + "name": "services", + "alwaysask": true, + "doc": "services to add", + "required": false, + "label": "owner service", + "multivalue": true, + "type": "str" } ], - "topic_topic": "sudocmdgroup/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify Sudo Command Group.", - "full_name": "sudocmdgroup_mod/1", - "name": "sudocmdgroup_mod", - "obj_class": "sudocmdgroup/1", + "full_name": "vault_add_owner/1", "output": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "name": "result", - "type": "dict" + "doc": "Owners that could not be added", + "type": "dict", + "name": "failed" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "Number of owners added", + "type": "int", + "name": "completed" } ], + "obj_class": "vault/1", + "topic_topic": "vault/1" + }, + { + "version": "1", + "attr_name": "archive_internal", + "obj_class": "vault/1", "params": [ { - "cli_name": "sudocmdgroup_name", - "label": "Sudo Command Group", + "type": "str", + "cli_name": "name", "name": "cn", - "no_convert": true, - "type": "str" + "label": "Vault name" }, { - "cli_name": "desc", - "doc": "Group description", - "label": "Description", - "name": "description", + "doc": "Service name of the service vault", "required": false, - "type": "str" + "type": "Principal", + "name": "service", + "no_convert": true }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", + "default": [ + "False" + ], + "doc": "Shared vault", "required": false, - "type": "str" + "type": "bool", + "name": "shared" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", + "doc": "Username of the user vault", "required": false, + "cli_name": "user", + "name": "username", "type": "str" }, { - "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, - "name": "delattr", - "required": false, - "type": "str" + "positional": false, + "doc": "Session key wrapped with transport certificate", + "type": "bytes", + "name": "session_key" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", "positional": false, - "type": "bool" + "doc": "Vault data encrypted with session key", + "type": "bytes", + "name": "vault_data" + }, + { + "positional": false, + "doc": "Nonce", + "type": "bytes", + "name": "nonce" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, - "type": "bool" - }, - { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "sudocmdgroup/1", - "version": "1" - }, - { - "attr_name": "remove_member", - "doc": "Remove members from Sudo Command Group.", - "full_name": "sudocmdgroup_remove_member/1", - "name": "sudocmdgroup_remove_member", - "obj_class": "sudocmdgroup/1", + "full_name": "vault_archive_internal/1", + "exclude": [ + "cli" + ], "output": [ { - "name": "result", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": "Number of members removed", - "name": "completed", - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "topic_topic": "vault/1", + "name": "vault_archive_internal" + }, + { + "name": "vault_del", + "doc": "Delete a vault.", + "attr_name": "del", + "version": "1", "params": [ { - "cli_name": "sudocmdgroup_name", - "label": "Sudo Command Group", + "cli_name": "name", + "label": "Vault name", + "multivalue": true, "name": "cn", - "no_convert": true, "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", "positional": false, "type": "bool" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "doc": "Service name of the service vault", + "required": false, + "type": "Principal", + "name": "service", + "no_convert": true }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "default": [ + "False" + ], + "doc": "Shared vault", + "required": false, + "type": "bool", + "name": "shared" }, { - "alwaysask": true, - "cli_name": "sudocmds", - "doc": "sudo commands to remove", - "label": "member sudo command", - "multivalue": true, - "name": "sudocmd", + "doc": "Username of the user vault", "required": false, + "cli_name": "user", + "name": "username", "type": "str" } ], - "topic_topic": "sudocmdgroup/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display Sudo Command Group.", - "full_name": "sudocmdgroup_show/1", - "name": "sudocmdgroup_show", - "obj_class": "sudocmdgroup/1", + "full_name": "vault_del/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "type": "str", + "multivalue": true, + "name": "value" } ], + "obj_class": "vault/1", + "topic_topic": "vault/1" + }, + { + "name": "vault_find", + "doc": "Search for vaults.", + "attr_name": "find", + "version": "1", "params": [ { - "cli_name": "sudocmdgroup_name", - "label": "Sudo Command Group", + "positional": true, + "doc": "A string searched in all relevant object attributes", + "required": false, + "type": "str", + "name": "criteria" + }, + { + "type": "str", + "required": false, + "cli_name": "name", "name": "cn", - "no_convert": true, + "label": "Vault name" + }, + { + "cli_name": "desc", + "name": "description", + "doc": "Vault description", + "required": false, + "label": "Description", "type": "str" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "cli_name": "type", + "name": "ipavaulttype", + "cli_metavar": "['standard', 'symmetric', 'asymmetric']", + "alwaysask": true, + "default": [ + "symmetric" + ], + "doc": "Vault type", + "required": false, + "label": "Type", + "type": "str" + }, + { + "doc": "Time limit of search in seconds (0 is unlimited)", + "required": false, + "type": "int", + "name": "timelimit", + "label": "Time Limit" + }, + { + "doc": "Maximum number of entries returned (0 is unlimited)", + "required": false, + "type": "int", + "name": "sizelimit", + "label": "Size Limit" + }, + { + "doc": "Service name of the service vault", + "required": false, + "type": "Principal", + "name": "service", + "no_convert": true + }, + { + "default": [ + "False" + ], + "doc": "Shared vault", + "required": false, + "type": "bool", + "name": "shared" + }, + { + "doc": "Username of the user vault", + "required": false, + "cli_name": "user", + "name": "username", + "type": "str" + }, + { + "default": [ + "False" + ], + "doc": "List all service vaults", + "required": false, + "type": "bool", + "name": "services" + }, + { + "default": [ + "False" + ], + "doc": "List all user vaults", + "required": false, + "type": "bool", + "name": "users" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "True" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui", + "cli" + ], + "type": "bool" + }, + { + "name": "pkey_only", + "default": [ + "False" + ], + "doc": "Results should contain primary key attribute only (\"name\")", + "required": false, + "label": "Primary key only", "type": "bool" } ], - "topic_topic": "sudocmdgroup/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Create new Sudo Rule.", - "full_name": "sudorule_add/1", - "name": "sudorule_add", - "obj_class": "sudorule/1", + "full_name": "vault_find/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "name": "result", - "type": "dict" + "type": "dict", + "multivalue": true, + "name": "result" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "Number of entries returned", + "type": "int", + "name": "count" + }, + { + "doc": "True if not all results were returned", + "type": "bool", + "name": "truncated" } ], + "obj_class": "vault/1", + "topic_topic": "vault/1" + }, + { + "version": "1", + "attr_name": "mod_internal", + "obj_class": "vault/1", "params": [ { - "cli_name": "sudorule_name", - "label": "Rule name", + "type": "str", + "cli_name": "name", "name": "cn", - "type": "str" + "label": "Vault name" }, { "cli_name": "desc", - "label": "Description", "name": "description", + "doc": "Vault description", "required": false, + "label": "Description", "type": "str" }, { - "exclude": ["cli", "webui"], - "label": "Enabled", - "name": "ipaenabledflag", - "required": false, - "type": "bool" - }, - { - "cli_metavar": "['all']", - "cli_name": "usercat", - "doc": "User category the rule applies to", - "label": "User category", - "name": "usercategory", - "required": false, - "type": "str" - }, - { - "cli_metavar": "['all']", - "cli_name": "hostcat", - "doc": "Host category the rule applies to", - "label": "Host category", - "name": "hostcategory", - "required": false, - "type": "str" - }, - { - "cli_metavar": "['all']", - "cli_name": "cmdcat", - "doc": "Command category the rule applies to", - "label": "Command category", - "name": "cmdcategory", - "required": false, - "type": "str" - }, - { - "cli_metavar": "['all']", - "cli_name": "runasusercat", - "doc": "RunAs User category the rule applies to", - "label": "RunAs User category", - "name": "ipasudorunasusercategory", - "required": false, - "type": "str" - }, - { - "cli_metavar": "['all']", - "cli_name": "runasgroupcat", - "doc": "RunAs Group category the rule applies to", - "label": "RunAs Group category", - "name": "ipasudorunasgroupcategory", - "required": false, - "type": "str" - }, - { + "cli_name": "type", + "name": "ipavaulttype", + "cli_metavar": "['standard', 'symmetric', 'asymmetric']", "alwaysask": true, - "cli_name": "order", - "default": ["0"], - "doc": "integer to order the Sudo rules", - "label": "Sudo order", - "name": "sudoorder", - "required": false, - "type": "int" - }, - { - "cli_name": "externaluser", - "doc": "External User the rule applies to (sudorule-find only)", - "label": "External User", - "name": "externaluser", - "required": false, - "type": "str" - }, - { - "exclude": ["cli", "webui"], - "label": "External host", - "multivalue": true, - "name": "externalhost", + "default": [ + "symmetric" + ], + "doc": "Vault type", "required": false, + "label": "Type", "type": "str" }, { - "cli_name": "runasexternaluser", - "doc": - "External User the commands can run as (sudorule-find only)", - "label": "RunAs External User", - "name": "ipasudorunasextuser", + "cli_name": "salt", + "name": "ipavaultsalt", + "doc": "Vault salt", "required": false, - "type": "str" + "label": "Salt", + "type": "bytes" }, { - "cli_name": "runasexternalgroup", - "doc": - "External Group the commands can run as (sudorule-find only)", - "label": "RunAs External Group", - "name": "ipasudorunasextgroup", + "cli_name": "public_key", + "name": "ipavaultpublickey", + "doc": "Vault public key", "required": false, - "type": "str" + "label": "Public key", + "type": "bytes" }, { "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, "name": "setattr", + "doc": "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, "name": "addattr", + "doc": "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "cli_name": "delattr", + "name": "delattr", + "doc": "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", + "required": false, + "multivalue": true, + "exclude": [ + "webui" + ], + "type": "str" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", "positional": false, "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "sudorule/1", - "version": "1" - }, - { - "attr_name": "add_allow_command", - "doc": "Add commands and sudo command groups affected by Sudo Rule.", - "full_name": "sudorule_add_allow_command/1", - "name": "sudorule_add_allow_command", - "obj_class": "sudorule/1", - "output": [ - { - "name": "result", - "type": "dict" + "doc": "Service name of the service vault", + "required": false, + "type": "Principal", + "name": "service", + "no_convert": true }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "default": [ + "False" + ], + "doc": "Shared vault", + "required": false, + "type": "bool", + "name": "shared" }, { - "doc": "Number of members added", - "name": "completed", - "type": "int" - } - ], - "params": [ - { - "cli_name": "sudorule_name", - "label": "Rule name", - "name": "cn", + "doc": "Username of the user vault", + "required": false, + "cli_name": "user", + "name": "username", "type": "str" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - }, + } + ], + "full_name": "vault_mod_internal/1", + "exclude": [ + "cli" + ], + "output": [ { - "alwaysask": true, - "cli_name": "sudocmds", - "doc": "sudo commands to add", - "label": "member sudo command", - "multivalue": true, - "name": "sudocmd", + "doc": "User-friendly description of action performed", "required": false, - "type": "str" + "type": "str", + "name": "summary" }, { - "alwaysask": true, - "cli_name": "sudocmdgroups", - "doc": "sudo command groups to add", - "label": "member sudo command group", - "multivalue": true, - "name": "sudocmdgroup", - "required": false, - "type": "str" + "type": "dict", + "name": "result" + }, + { + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], - "topic_topic": "sudorule/1", - "version": "1" + "topic_topic": "vault/1", + "name": "vault_mod_internal" }, { - "attr_name": "add_deny_command", - "doc": "Add commands and sudo command groups affected by Sudo Rule.", - "full_name": "sudorule_add_deny_command/1", - "name": "sudorule_add_deny_command", - "obj_class": "sudorule/1", - "output": [ + "name": "vault_remove_member", + "doc": "Remove members from a vault.", + "attr_name": "remove_member", + "version": "1", + "params": [ { - "name": "result", - "type": "dict" + "type": "str", + "cli_name": "name", + "name": "cn", + "label": "Vault name" }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "doc": "Service name of the service vault", + "required": false, + "type": "Principal", + "name": "service", + "no_convert": true }, { - "doc": "Number of members added", - "name": "completed", - "type": "int" - } - ], - "params": [ + "default": [ + "False" + ], + "doc": "Shared vault", + "required": false, + "type": "bool", + "name": "shared" + }, { - "cli_name": "sudorule_name", - "label": "Rule name", - "name": "cn", + "doc": "Username of the user vault", + "required": false, + "cli_name": "user", + "name": "username", "type": "str" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { + "cli_name": "users", + "name": "user", "alwaysask": true, - "cli_name": "sudocmds", - "doc": "sudo commands to add", - "label": "member sudo command", - "multivalue": true, - "name": "sudocmd", + "doc": "users to remove", "required": false, + "label": "member user", + "multivalue": true, "type": "str" }, { + "cli_name": "groups", + "name": "group", "alwaysask": true, - "cli_name": "sudocmdgroups", - "doc": "sudo command groups to add", - "label": "member sudo command group", + "doc": "groups to remove", + "required": false, + "label": "member group", "multivalue": true, - "name": "sudocmdgroup", + "type": "str" + }, + { + "cli_name": "services", + "name": "services", + "alwaysask": true, + "doc": "services to remove", "required": false, + "label": "member service", + "multivalue": true, "type": "str" } ], - "topic_topic": "sudorule/1", - "version": "1" - }, - { - "attr_name": "add_host", - "doc": "Add hosts and hostgroups affected by Sudo Rule.", - "full_name": "sudorule_add_host/1", - "name": "sudorule_add_host", - "obj_class": "sudorule/1", + "full_name": "vault_remove_member/1", "output": [ { - "name": "result", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "doc": "Members that could not be removed", + "type": "dict", + "name": "failed" }, { - "doc": "Number of members added", - "name": "completed", - "type": "int" + "doc": "Number of members removed", + "type": "int", + "name": "completed" } ], + "obj_class": "vault/1", + "topic_topic": "vault/1" + }, + { + "name": "vault_remove_owner", + "doc": "Remove owners from a vault.", + "attr_name": "remove_owner", + "version": "1", "params": [ { - "cli_name": "sudorule_name", - "label": "Rule name", + "type": "str", + "cli_name": "name", "name": "cn", + "label": "Vault name" + }, + { + "doc": "Service name of the service vault", + "required": false, + "type": "Principal", + "name": "service", + "no_convert": true + }, + { + "default": [ + "False" + ], + "doc": "Shared vault", + "required": false, + "type": "bool", + "name": "shared" + }, + { + "doc": "Username of the user vault", + "required": false, + "cli_name": "user", + "name": "username", "type": "str" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { + "cli_name": "users", + "name": "user", "alwaysask": true, - "cli_name": "hosts", - "doc": "hosts to add", - "label": "member host", - "multivalue": true, - "name": "host", + "doc": "users to remove", "required": false, + "label": "owner user", + "multivalue": true, "type": "str" }, { + "cli_name": "groups", + "name": "group", "alwaysask": true, - "cli_name": "hostgroups", - "doc": "host groups to add", - "label": "member host group", - "multivalue": true, - "name": "hostgroup", + "doc": "groups to remove", "required": false, + "label": "owner group", + "multivalue": true, "type": "str" }, { - "label": "host masks of allowed hosts", - "multivalue": true, - "name": "hostmask", + "cli_name": "services", + "name": "services", + "alwaysask": true, + "doc": "services to remove", "required": false, + "label": "owner service", + "multivalue": true, "type": "str" } ], - "topic_topic": "sudorule/1", - "version": "1" - }, - { - "attr_name": "add_option", - "doc": "Add an option to the Sudo Rule.", - "full_name": "sudorule_add_option/1", - "name": "sudorule_add_option", - "obj_class": "sudorule/1", + "full_name": "vault_remove_owner/1", "output": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "name": "result", - "type": "dict" + "doc": "Owners that could not be removed", + "type": "dict", + "name": "failed" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "Number of owners removed", + "type": "int", + "name": "completed" } ], + "obj_class": "vault/1", + "topic_topic": "vault/1" + }, + { + "version": "1", + "attr_name": "retrieve_internal", + "obj_class": "vault/1", "params": [ { - "cli_name": "sudorule_name", - "label": "Rule name", + "type": "str", + "cli_name": "name", "name": "cn", + "label": "Vault name" + }, + { + "doc": "Service name of the service vault", + "required": false, + "type": "Principal", + "name": "service", + "no_convert": true + }, + { + "default": [ + "False" + ], + "doc": "Shared vault", + "required": false, + "type": "bool", + "name": "shared" + }, + { + "doc": "Username of the user vault", + "required": false, + "cli_name": "user", + "name": "username", "type": "str" }, { - "cli_name": "sudooption", - "label": "Sudo Option", - "name": "ipasudoopt", "positional": false, - "type": "str" + "doc": "Session key wrapped with transport certificate", + "type": "bytes", + "name": "session_key" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, - "type": "bool" - }, - { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, + "exclude": [ + "webui" + ], "type": "bool" } ], - "topic_topic": "sudorule/1", - "version": "1" - }, - { - "attr_name": "add_runasgroup", - "doc": "Add group for Sudo to execute as.", - "full_name": "sudorule_add_runasgroup/1", - "name": "sudorule_add_runasgroup", - "obj_class": "sudorule/1", + "full_name": "vault_retrieve_internal/1", + "exclude": [ + "cli" + ], "output": [ { - "name": "result", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": "Number of members added", - "name": "completed", - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "topic_topic": "vault/1", + "name": "vault_retrieve_internal" + }, + { + "name": "vault_show", + "doc": "Display information about a vault.", + "attr_name": "show", + "version": "1", "params": [ { - "cli_name": "sudorule_name", - "label": "Rule name", + "type": "str", + "cli_name": "name", "name": "cn", + "label": "Vault name" + }, + { + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" + }, + { + "doc": "Service name of the service vault", + "required": false, + "type": "Principal", + "name": "service", + "no_convert": true + }, + { + "default": [ + "False" + ], + "doc": "Shared vault", + "required": false, + "type": "bool", + "name": "shared" + }, + { + "doc": "Username of the user vault", + "required": false, + "cli_name": "user", + "name": "username", "type": "str" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - }, - { - "alwaysask": true, - "cli_name": "groups", - "doc": "groups to add", - "label": "member group", - "multivalue": true, - "name": "group", - "required": false, - "type": "str" } ], - "topic_topic": "sudorule/1", - "version": "1" - }, - { - "attr_name": "add_runasuser", - "doc": "Add users and groups for Sudo to execute as.", - "full_name": "sudorule_add_runasuser/1", - "name": "sudorule_add_runasuser", - "obj_class": "sudorule/1", + "full_name": "vault_show/1", "output": [ { - "name": "result", - "type": "dict" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "type": "dict", + "name": "result" }, { - "doc": "Number of members added", - "name": "completed", - "type": "int" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "str", + "name": "value" } ], + "obj_class": "vault/1", + "topic_topic": "vault/1" + }, + { + "name": "vaultconfig_show", + "doc": "Show vault configuration.", + "attr_name": "show", + "version": "1", "params": [ { - "cli_name": "sudorule_name", - "label": "Rule name", - "name": "cn", - "type": "str" + "doc": "Output file to store the transport certificate", + "required": false, + "type": "str", + "name": "transport_out" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - }, + } + ], + "full_name": "vaultconfig_show/1", + "output": [ { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "doc": "User-friendly description of action performed", + "required": false, + "type": "str", + "name": "summary" }, { - "alwaysask": true, - "cli_name": "users", - "doc": "users to add", - "label": "member user", - "multivalue": true, - "name": "user", - "required": false, - "type": "str" + "type": "dict", + "name": "result" }, { - "alwaysask": true, - "cli_name": "groups", - "doc": "groups to add", - "label": "member group", - "multivalue": true, - "name": "group", - "required": false, - "type": "str" + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "NoneType", + "name": "value" } ], - "topic_topic": "sudorule/1", - "version": "1" + "obj_class": "vaultconfig/1", + "topic_topic": "vault/1" }, { - "attr_name": "add_user", - "doc": "Add users and groups affected by Sudo Rule.", - "full_name": "sudorule_add_user/1", - "name": "sudorule_add_user", - "obj_class": "sudorule/1", - "output": [ + "name": "vaultcontainer_add_owner", + "doc": "Add owners to a vault container.", + "attr_name": "add_owner", + "version": "1", + "params": [ { - "name": "result", - "type": "dict" + "doc": "Service name of the service vault", + "required": false, + "type": "Principal", + "name": "service", + "no_convert": true }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "default": [ + "False" + ], + "doc": "Shared vault", + "required": false, + "type": "bool", + "name": "shared" }, { - "doc": "Number of members added", - "name": "completed", - "type": "int" - } - ], - "params": [ - { - "cli_name": "sudorule_name", - "label": "Rule name", - "name": "cn", + "doc": "Username of the user vault", + "required": false, + "cli_name": "user", + "name": "username", "type": "str" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "alwaysask": true, "cli_name": "users", - "doc": "users to add", - "label": "member user", - "multivalue": true, "name": "user", + "alwaysask": true, + "doc": "users to add", "required": false, + "label": "owner user", + "multivalue": true, "type": "str" }, { - "alwaysask": true, "cli_name": "groups", - "doc": "groups to add", - "label": "member group", - "multivalue": true, "name": "group", + "alwaysask": true, + "doc": "groups to add", "required": false, - "type": "str" - } - ], - "topic_topic": "sudorule/1", - "version": "1" - }, - { - "attr_name": "del", - "doc": "Delete Sudo Rule.", - "full_name": "sudorule_del/1", - "name": "sudorule_del", - "obj_class": "sudorule/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" - }, - { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" - }, - { + "label": "owner group", "multivalue": true, - "name": "value", "type": "str" - } - ], - "params": [ + }, { - "cli_name": "sudorule_name", - "label": "Rule name", + "cli_name": "services", + "name": "services", + "alwaysask": true, + "doc": "services to add", + "required": false, + "label": "owner service", "multivalue": true, - "name": "cn", "type": "str" - }, - { - "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", - "name": "continue", - "positional": false, - "type": "bool" } ], - "topic_topic": "sudorule/1", - "version": "1" - }, - { - "attr_name": "disable", - "doc": "Disable a Sudo Rule.", - "full_name": "sudorule_disable/1", - "name": "sudorule_disable", - "obj_class": "sudorule/1", + "full_name": "vaultcontainer_add_owner/1", "output": [ { + "type": "dict", "name": "result" - } - ], - "params": [ + }, { - "cli_name": "sudorule_name", - "label": "Rule name", - "name": "cn", - "type": "str" + "doc": "Owners that could not be added", + "type": "dict", + "name": "failed" + }, + { + "doc": "Number of owners added", + "type": "int", + "name": "completed" } ], - "topic_topic": "sudorule/1", - "version": "1" + "obj_class": "vaultcontainer/1", + "topic_topic": "vault/1" }, { - "attr_name": "enable", - "doc": "Enable a Sudo Rule.", - "full_name": "sudorule_enable/1", - "name": "sudorule_enable", - "obj_class": "sudorule/1", - "output": [ - { - "name": "result" - } - ], + "name": "vaultcontainer_del", + "doc": "Delete a vault container.", + "attr_name": "del", + "version": "1", "params": [ { - "cli_name": "sudorule_name", - "label": "Rule name", - "name": "cn", + "cli_name": "continue", + "name": "continue", + "default": [ + "False" + ], + "doc": "Continuous mode: Don't stop on errors.", + "positional": false, + "type": "bool" + }, + { + "doc": "Service name of the service vault", + "required": false, + "type": "Principal", + "name": "service", + "no_convert": true + }, + { + "default": [ + "False" + ], + "doc": "Shared vault", + "required": false, + "type": "bool", + "name": "shared" + }, + { + "doc": "Username of the user vault", + "required": false, + "cli_name": "user", + "name": "username", "type": "str" } ], - "topic_topic": "sudorule/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for Sudo Rule.", - "full_name": "sudorule_find/1", - "name": "sudorule_find", - "obj_class": "sudorule/1", + "full_name": "vaultcontainer_del/1", "output": [ { "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" - }, - { - "multivalue": true, - "name": "result", - "type": "dict" + "type": "str", + "name": "summary" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "doc": "List of deletions that failed", + "type": "dict", + "name": "result" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" + "type": "NoneType", + "multivalue": true, + "name": "value" } ], + "obj_class": "vaultcontainer/1", + "topic_topic": "vault/1" + }, + { + "name": "vaultcontainer_remove_owner", + "doc": "Remove owners from a vault container.", + "attr_name": "remove_owner", + "version": "1", "params": [ { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, + "doc": "Service name of the service vault", "required": false, - "type": "str" + "type": "Principal", + "name": "service", + "no_convert": true }, { - "cli_name": "sudorule_name", - "label": "Rule name", - "name": "cn", + "default": [ + "False" + ], + "doc": "Shared vault", "required": false, - "type": "str" + "type": "bool", + "name": "shared" }, { - "cli_name": "desc", - "label": "Description", - "name": "description", + "doc": "Username of the user vault", "required": false, + "cli_name": "user", + "name": "username", "type": "str" }, { - "exclude": ["cli", "webui"], - "label": "Enabled", - "name": "ipaenabledflag", - "required": false, + "cli_name": "all", + "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", + "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "cli_metavar": "['all']", - "cli_name": "usercat", - "doc": "User category the rule applies to", - "label": "User category", - "name": "usercategory", - "required": false, - "type": "str" + "cli_name": "raw", + "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_metavar": "['all']", - "cli_name": "hostcat", - "doc": "Host category the rule applies to", - "label": "Host category", - "name": "hostcategory", - "required": false, - "type": "str" + "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", + "positional": false, + "exclude": [ + "webui" + ], + "type": "bool" }, { - "cli_metavar": "['all']", - "cli_name": "cmdcat", - "doc": "Command category the rule applies to", - "label": "Command category", - "name": "cmdcategory", + "cli_name": "users", + "name": "user", + "alwaysask": true, + "doc": "users to remove", "required": false, + "label": "owner user", + "multivalue": true, "type": "str" }, { - "cli_metavar": "['all']", - "cli_name": "runasusercat", - "doc": "RunAs User category the rule applies to", - "label": "RunAs User category", - "name": "ipasudorunasusercategory", + "cli_name": "groups", + "name": "group", + "alwaysask": true, + "doc": "groups to remove", "required": false, + "label": "owner group", + "multivalue": true, "type": "str" }, { - "cli_metavar": "['all']", - "cli_name": "runasgroupcat", - "doc": "RunAs Group category the rule applies to", - "label": "RunAs Group category", - "name": "ipasudorunasgroupcategory", + "cli_name": "services", + "name": "services", + "alwaysask": true, + "doc": "services to remove", "required": false, + "label": "owner service", + "multivalue": true, "type": "str" - }, + } + ], + "full_name": "vaultcontainer_remove_owner/1", + "output": [ { - "alwaysask": true, - "cli_name": "order", - "default": ["0"], - "doc": "integer to order the Sudo rules", - "label": "Sudo order", - "name": "sudoorder", - "required": false, - "type": "int" + "type": "dict", + "name": "result" }, { - "cli_name": "externaluser", - "doc": "External User the rule applies to (sudorule-find only)", - "label": "External User", - "name": "externaluser", - "required": false, - "type": "str" + "doc": "Owners that could not be removed", + "type": "dict", + "name": "failed" }, { - "exclude": ["cli", "webui"], - "label": "External host", - "multivalue": true, - "name": "externalhost", - "required": false, - "type": "str" - }, + "doc": "Number of owners removed", + "type": "int", + "name": "completed" + } + ], + "obj_class": "vaultcontainer/1", + "topic_topic": "vault/1" + }, + { + "name": "vaultcontainer_show", + "doc": "Display information about a vault container.", + "attr_name": "show", + "version": "1", + "params": [ { - "cli_name": "runasexternaluser", - "doc": - "External User the commands can run as (sudorule-find only)", - "label": "RunAs External User", - "name": "ipasudorunasextuser", - "required": false, - "type": "str" + "name": "rights", + "default": [ + "False" + ], + "doc": "Display the access rights of this entry (requires --all). See ipa man page for details.", + "label": "Rights", + "positional": false, + "type": "bool" }, { - "cli_name": "runasexternalgroup", - "doc": - "External Group the commands can run as (sudorule-find only)", - "label": "RunAs External Group", - "name": "ipasudorunasextgroup", + "doc": "Service name of the service vault", "required": false, - "type": "str" + "type": "Principal", + "name": "service", + "no_convert": true }, { - "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", + "default": [ + "False" + ], + "doc": "Shared vault", "required": false, - "type": "int" + "type": "bool", + "name": "shared" }, { - "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", + "doc": "Username of the user vault", "required": false, - "type": "int" + "cli_name": "user", + "name": "username", + "type": "str" }, { "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], "name": "all", + "default": [ + "False" + ], + "doc": "Retrieve and print all attributes from the server. Affects command output.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], "name": "raw", + "default": [ + "False" + ], + "doc": "Print entries as stored on the server. Only affects output format.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" }, { - "default": ["True"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui", "cli"], "name": "no_members", + "default": [ + "False" + ], + "doc": "Suppress processing of membership attributes.", "positional": false, + "exclude": [ + "webui" + ], "type": "bool" - }, + } + ], + "full_name": "vaultcontainer_show/1", + "output": [ { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"sudorule-name\")", - "label": "Primary key only", - "name": "pkey_only", + "doc": "User-friendly description of action performed", "required": false, - "type": "bool" + "type": "str", + "name": "summary" + }, + { + "type": "dict", + "name": "result" + }, + { + "doc": "The primary_key value of the entry, e.g. 'jdoe' for a user", + "type": "NoneType", + "name": "value" } ], - "topic_topic": "sudorule/1", - "version": "1" + "obj_class": "vaultcontainer/1", + "topic_topic": "vault/1" }, { - "attr_name": "mod", - "doc": "Modify Sudo Rule.", - "full_name": "sudorule_mod/1", - "name": "sudorule_mod", - "obj_class": "sudorule/1", + "name": "whoami", + "doc": "Describe currently authenticated identity.", + "version": "1", + "params": [], + "full_name": "whoami/1", + "exclude": [ + "cli" + ], "output": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "doc": "Object class name", + "type": "str", + "name": "object" }, { - "name": "result", - "type": "dict" + "doc": "Function to get details", + "type": "str", + "name": "command" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "Arguments to details function", + "multivalue": true, + "name": "arguments" } ], + "topic_topic": "whoami/1" + } + ], + "version": "2.231", + "topics": [ + { + "doc": "Directory Server Access Control Instructions (ACIs)\n\nACIs are used to allow or deny access to information. This module is\ncurrently designed to allow, not deny, access.\n\nThe aci commands are designed to grant permissions that allow updating\nexisting entries or adding or deleting new ones. The goal of the ACIs\nthat ship with IPA is to provide a set of low-level permissions that\ngrant access to special groups called taskgroups. These low-level\npermissions can be combined into roles that grant broader access. These\nroles are another type of group, roles.\n\nFor example, if you have taskgroups that allow adding and modifying users you\ncould create a role, useradmin. You would assign users to the useradmin\nrole to allow them to do the operations defined by the taskgroups.\n\nYou can create ACIs that delegate permission so users in group A can write\nattributes on group B.\n\nThe type option is a map that applies to all entries in the users, groups or\nhost location. It is primarily designed to be used when granting add\npermissions (to write new entries).\n\nAn ACI consists of three parts:\n1. target\n2. permissions\n3. bind rules\n\nThe target is a set of rules that define which LDAP objects are being\ntargeted. This can include a list of attributes, an area of that LDAP\ntree or an LDAP filter.\n\nThe targets include:\n- attrs: list of attributes affected\n- type: an object type (user, group, host, service, etc)\n- memberof: members of a group\n- targetgroup: grant access to modify a specific group. This is primarily\n designed to enable users to add or remove members of a specific group.\n- filter: A legal LDAP filter used to narrow the scope of the target.\n- subtree: Used to apply a rule across an entire set of objects. For example,\n to allow adding users you need to grant \"add\" permission to the subtree\n ldap://uid=*,cn=users,cn=accounts,dc=example,dc=com. The subtree option\n is a fail-safe for objects that may not be covered by the type option.\n\nThe permissions define what the ACI is allowed to do, and are one or\nmore of:\n1. write - write one or more attributes\n2. read - read one or more attributes\n3. add - add a new entry to the tree\n4. delete - delete an existing entry\n5. all - all permissions are granted\n\nNote the distinction between attributes and entries. The permissions are\nindependent, so being able to add a user does not mean that the user will\nbe editable.\n\nThe bind rule defines who this ACI grants permissions to. The LDAP server\nallows this to be any valid LDAP entry but we encourage the use of\ntaskgroups so that the rights can be easily shared through roles.\n\nFor a more thorough description of access controls see\nhttp://www.redhat.com/docs/manuals/dir-server/ag/8.0/Managing_Access_Control.html\n\nEXAMPLES:\n\nNOTE: ACIs are now added via the permission plugin. These examples are to\ndemonstrate how the various options work but this is done via the permission\ncommand-line now (see last example).\n\n Add an ACI so that the group \"secretaries\" can update the address on any user:\n ipa group-add --desc=\"Office secretaries\" secretaries\n ipa aci-add --attrs=streetAddress --memberof=ipausers --group=secretaries --permissions=write --prefix=none \"Secretaries write addresses\"\n\n Show the new ACI:\n ipa aci-show --prefix=none \"Secretaries write addresses\"\n\n Add an ACI that allows members of the \"addusers\" permission to add new users:\n ipa aci-add --type=user --permission=addusers --permissions=add --prefix=none \"Add new users\"\n\n Add an ACI that allows members of the editors manage members of the admins group:\n ipa aci-add --permissions=write --attrs=member --targetgroup=admins --group=editors --prefix=none \"Editors manage admins\"\n\n Add an ACI that allows members of the admins group to manage the street and zip code of those in the editors group:\n ipa aci-add --permissions=write --memberof=editors --group=admins --attrs=street --attrs=postalcode --prefix=none \"admins edit the address of editors\"\n\n Add an ACI that allows the admins group manage the street and zipcode of those who work for the boss:\n ipa aci-add --permissions=write --group=admins --attrs=street --attrs=postalcode --filter=\"(manager=uid=boss,cn=users,cn=accounts,dc=example,dc=com)\" --prefix=none \"Edit the address of those who work for the boss\"\n\n Add an entirely new kind of record to IPA that isn't covered by any of the --type options, creating a permission:\n ipa permission-add --permissions=add --subtree=\"cn=*,cn=orange,cn=accounts,dc=example,dc=com\" --desc=\"Add Orange Entries\" add_orange\n\n\nThe show command shows the raw 389-ds ACI.\n\nIMPORTANT: When modifying the target attributes of an existing ACI you\nmust include all existing attributes as well. When doing an aci-mod the\ntargetattr REPLACES the current attributes, it does not add to them.", + "version": "1", + "name": "aci", + "full_name": "aci/1" + }, + { + "doc": "Cross-realm trusts\n\nManage trust relationship between IPA and Active Directory domains.\n\nIn order to allow users from a remote domain to access resources in IPA domain,\ntrust relationship needs to be established. Currently IPA supports only trusts\nbetween IPA and Active Directory domains under control of Windows Server 2008\nor later, with functional level 2008 or later.\n\nPlease note that DNS on both IPA and Active Directory domain sides should be\nconfigured properly to discover each other. Trust relationship relies on\nability to discover special resources in the other domain via DNS records.\n\nExamples:\n\n1. Establish cross-realm trust with Active Directory using AD administrator\n credentials:\n\n ipa trust-add --type=ad --admin --password\n\n2. List all existing trust relationships:\n\n ipa trust-find\n\n3. Show details of the specific trust relationship:\n\n ipa trust-show \n\n4. Delete existing trust relationship:\n\n ipa trust-del \n\nOnce trust relationship is established, remote users will need to be mapped\nto local POSIX groups in order to actually use IPA resources. The mapping\nshould be done via use of external membership of non-POSIX group and then\nthis group should be included into one of local POSIX groups.\n\nExample:\n\n1. Create group for the trusted domain admins' mapping and their local POSIX\ngroup:\n\n ipa group-add --desc=' admins external map' ad_admins_external --external\n ipa group-add --desc=' admins' ad_admins\n\n2. Add security identifier of Domain Admins of the to the\n ad_admins_external group:\n\n ipa group-add-member ad_admins_external --external 'AD\\Domain Admins'\n\n3. Allow members of ad_admins_external group to be associated with\n ad_admins POSIX group:\n\n ipa group-add-member ad_admins --groups ad_admins_external\n\n4. List members of external members of ad_admins_external group to see\n their SIDs:\n\n ipa group-show ad_admins_external\n\n\nGLOBAL TRUST CONFIGURATION\n\nWhen IPA AD trust subpackage is installed and ipa-adtrust-install is run, a\nlocal domain configuration (SID, GUID, NetBIOS name) is generated. These\nidentifiers are then used when communicating with a trusted domain of the\nparticular type.\n\n1. Show global trust configuration for Active Directory type of trusts:\n\n ipa trustconfig-show --type ad\n\n2. Modify global configuration for all trusts of Active Directory type and set\n a different fallback primary group (fallback primary group GID is used as a\n primary user GID if user authenticating to IPA domain does not have any\n other primary GID already set):\n\n ipa trustconfig-mod --type ad --fallback-primary-group \"another AD group\"\n\n3. Change primary fallback group back to default hidden group (any group with\n posixGroup object class is allowed):\n\n ipa trustconfig-mod --type ad --fallback-primary-group \"Default SMB Group\"", + "version": "1", + "name": "trust", + "full_name": "trust/1" + }, + { + "doc": "Auto Membership Rule.\n\nBring clarity to the membership of hosts and users by configuring inclusive\nor exclusive regex patterns, you can automatically assign a new entries into\na group or hostgroup based upon attribute information.\n\nA rule is directly associated with a group by name, so you cannot create\na rule without an accompanying group or hostgroup.\n\nA condition is a regular expression used by 389-ds to match a new incoming\nentry with an automember rule. If it matches an inclusive rule then the\nentry is added to the appropriate group or hostgroup.\n\nA default group or hostgroup could be specified for entries that do not\nmatch any rule. In case of user entries this group will be a fallback group\nbecause all users are by default members of group specified in IPA config.\n\nThe automember-rebuild command can be used to retroactively run automember rules\nagainst existing entries, thus rebuilding their membership.\n\nEXAMPLES:\n\n Add the initial group or hostgroup:\n ipa hostgroup-add --desc=\"Web Servers\" webservers\n ipa group-add --desc=\"Developers\" devel\n\n Add the initial rule:\n ipa automember-add --type=hostgroup webservers\n ipa automember-add --type=group devel\n\n Add a condition to the rule:\n ipa automember-add-condition --key=fqdn --type=hostgroup --inclusive-regex=^web[1-9]+\\.example\\.com webservers\n ipa automember-add-condition --key=manager --type=group --inclusive-regex=^uid=mscott devel\n\n Add an exclusive condition to the rule to prevent auto assignment:\n ipa automember-add-condition --key=fqdn --type=hostgroup --exclusive-regex=^web5\\.example\\.com webservers\n\n Add a host:\n ipa host-add web1.example.com\n\n Add a user:\n ipa user-add --first=Tim --last=User --password tuser1 --manager=mscott\n\n Verify automembership:\n ipa hostgroup-show webservers\n Host-group: webservers\n Description: Web Servers\n Member hosts: web1.example.com\n\n ipa group-show devel\n Group name: devel\n Description: Developers\n GID: 1004200000\n Member users: tuser\n\n Remove a condition from the rule:\n ipa automember-remove-condition --key=fqdn --type=hostgroup --inclusive-regex=^web[1-9]+\\.example\\.com webservers\n\n Modify the automember rule:\n ipa automember-mod\n\n Set the default (fallback) target group:\n ipa automember-default-group-set --default-group=webservers --type=hostgroup\n ipa automember-default-group-set --default-group=ipausers --type=group\n\n Remove the default (fallback) target group:\n ipa automember-default-group-remove --type=hostgroup\n ipa automember-default-group-remove --type=group\n\n Show the default (fallback) target group:\n ipa automember-default-group-show --type=hostgroup\n ipa automember-default-group-show --type=group\n\n Find all of the automember rules:\n ipa automember-find\n\n Find all of the orphan automember rules:\n ipa automember-find-orphans --type=hostgroup\n Find all of the orphan automember rules and remove them:\n ipa automember-find-orphans --type=hostgroup --remove\n\n Display a automember rule:\n ipa automember-show --type=hostgroup webservers\n ipa automember-show --type=group devel\n\n Delete an automember rule:\n ipa automember-del --type=hostgroup webservers\n ipa automember-del --type=group devel\n\n Rebuild membership for all users:\n ipa automember-rebuild --type=group\n\n Rebuild membership for all hosts:\n ipa automember-rebuild --type=hostgroup\n\n Rebuild membership for specified users:\n ipa automember-rebuild --users=tuser1 --users=tuser2\n\n Rebuild membership for specified hosts:\n ipa automember-rebuild --hosts=web1.example.com --hosts=web2.example.com", + "version": "1", + "name": "automember", + "full_name": "automember/1" + }, + { + "doc": "Automount\n\nStores automount(8) configuration for autofs(8) in IPA.\n\nThe base of an automount configuration is the configuration file auto.master.\nThis is also the base location in IPA. Multiple auto.master configurations\ncan be stored in separate locations. A location is implementation-specific\nwith the default being a location named 'default'. For example, you can have\nlocations by geographic region, by floor, by type, etc.\n\nAutomount has three basic object types: locations, maps and keys.\n\nA location defines a set of maps anchored in auto.master. This allows you\nto store multiple automount configurations. A location in itself isn't\nvery interesting, it is just a point to start a new automount map.\n\nA map is roughly equivalent to a discrete automount file and provides\nstorage for keys.\n\nA key is a mount point associated with a map.\n\nWhen a new location is created, two maps are automatically created for\nit: auto.master and auto.direct. auto.master is the root map for all\nautomount maps for the location. auto.direct is the default map for\ndirect mounts and is mounted on /-.\n\nAn automount map may contain a submount key. This key defines a mount\nlocation within the map that references another map. This can be done\neither using automountmap-add-indirect --parentmap or manually\nwith automountkey-add and setting info to \"-type=autofs :\".\n\nEXAMPLES:\n\nLocations:\n\n Create a named location, \"Baltimore\":\n ipa automountlocation-add baltimore\n\n Display the new location:\n ipa automountlocation-show baltimore\n\n Find available locations:\n ipa automountlocation-find\n\n Remove a named automount location:\n ipa automountlocation-del baltimore\n\n Show what the automount maps would look like if they were in the filesystem:\n ipa automountlocation-tofiles baltimore\n\n Import an existing configuration into a location:\n ipa automountlocation-import baltimore /etc/auto.master\n\n The import will fail if any duplicate entries are found. For\n continuous operation where errors are ignored, use the --continue\n option.\n\nMaps:\n\n Create a new map, \"auto.share\":\n ipa automountmap-add baltimore auto.share\n\n Display the new map:\n ipa automountmap-show baltimore auto.share\n\n Find maps in the location baltimore:\n ipa automountmap-find baltimore\n\n Create an indirect map with auto.share as a submount:\n ipa automountmap-add-indirect baltimore --parentmap=auto.share --mount=sub auto.man\n\n This is equivalent to:\n\n ipa automountmap-add-indirect baltimore --mount=/man auto.man\n ipa automountkey-add baltimore auto.man --key=sub --info=\"-fstype=autofs ldap:auto.share\"\n\n Remove the auto.share map:\n ipa automountmap-del baltimore auto.share\n\nKeys:\n\n Create a new key for the auto.share map in location baltimore. This ties\n the map we previously created to auto.master:\n ipa automountkey-add baltimore auto.master --key=/share --info=auto.share\n\n Create a new key for our auto.share map, an NFS mount for man pages:\n ipa automountkey-add baltimore auto.share --key=man --info=\"-ro,soft,rsize=8192,wsize=8192 ipa.example.com:/shared/man\"\n\n Find all keys for the auto.share map:\n ipa automountkey-find baltimore auto.share\n\n Find all direct automount keys:\n ipa automountkey-find baltimore --key=/-\n\n Remove the man key from the auto.share map:\n ipa automountkey-del baltimore auto.share --key=man", + "version": "1", + "name": "automount", + "full_name": "automount/1" + }, + { + "doc": "Plugin to make multiple ipa calls via one remote procedure call\n\nTo run this code in the lite-server\n\ncurl -H \"Content-Type:application/json\" -H \"Accept:application/json\" -H \"Accept-Language:en\" --negotiate -u : --cacert /etc/ipa/ca.crt -d @batch_request.json -X POST http://localhost:8888/ipa/json\n\nwhere the contents of the file batch_request.json follow the below example\n\n{\"method\":\"batch\",\"params\":[[\n {\"method\":\"group_find\",\"params\":[[],{}]},\n {\"method\":\"user_find\",\"params\":[[],{\"whoami\":\"true\",\"all\":\"true\"}]},\n {\"method\":\"user_show\",\"params\":[[\"admin\"],{\"all\":true}]}\n ],{}],\"id\":1}\n\nThe format of the response is nested the same way. At the top you will see\n \"error\": null,\n \"id\": 1,\n \"result\": {\n \"count\": 3,\n \"results\": [\n\n\nAnd then a nested response for each IPA command method sent in the request", + "version": "1", + "name": "batch", + "full_name": "batch/1" + }, + { + "doc": "Manage Certificate Authorities\n\nSubordinate Certificate Authorities (Sub-CAs) can be added for scoped issuance\nof X.509 certificates.\n\nCAs are enabled on creation, but their use is subject to CA ACLs unless the\noperator has permission to bypass CA ACLs.\n\nAll CAs except the 'IPA' CA can be disabled or re-enabled. Disabling a CA\nprevents it from issuing certificates but does not affect the validity of its\ncertificate.\n\nCAs (all except the 'IPA' CA) can be deleted. Deleting a CA causes its signing\ncertificate to be revoked and its private key deleted.\n\nEXAMPLES:\n\n Create new CA, subordinate to the IPA CA.\n\n ipa ca-add puppet --desc \"Puppet\" \\\n --subject \"CN=Puppet CA,O=EXAMPLE.COM\"\n\n Disable a CA.\n\n ipa ca-disable puppet\n\n Re-enable a CA.\n\n ipa ca-enable puppet\n\n Delete a CA.\n\n ipa ca-del puppet", + "version": "1", + "name": "ca", + "full_name": "ca/1" + }, + { + "doc": "IPA certificate operations\n\nImplements a set of commands for managing server SSL certificates.\n\nCertificate requests exist in the form of a Certificate Signing Request (CSR)\nin PEM format.\n\nThe dogtag CA uses just the CN value of the CSR and forces the rest of the\nsubject to values configured in the server.\n\nA certificate is stored with a service principal and a service principal\nneeds a host.\n\nIn order to request a certificate:\n\n* The host must exist\n* The service must exist (or you use the --add option to automatically add it)\n\nSEARCHING:\n\nCertificates may be searched on by certificate subject, serial number,\nrevocation reason, validity dates and the issued date.\n\nWhen searching on dates the _from date does a >= search and the _to date\ndoes a <= search. When combined these are done as an AND.\n\nDates are treated as GMT to match the dates in the certificates.\n\nThe date format is YYYY-mm-dd.\n\nEXAMPLES:\n\n Request a new certificate and add the principal:\n ipa cert-request --add --principal=HTTP/lion.example.com example.csr\n\n Retrieve an existing certificate:\n ipa cert-show 1032\n\n Revoke a certificate (see RFC 5280 for reason details):\n ipa cert-revoke --revocation-reason=6 1032\n\n Remove a certificate from revocation hold status:\n ipa cert-remove-hold 1032\n\n Check the status of a signing request:\n ipa cert-status 10\n\n Search for certificates by hostname:\n ipa cert-find --subject=ipaserver.example.com\n\n Search for revoked certificates by reason:\n ipa cert-find --revocation-reason=5\n\n Search for certificates based on issuance date\n ipa cert-find --issuedon-from=2013-02-01 --issuedon-to=2013-02-07\n\n Search for certificates owned by a specific user:\n ipa cert-find --user=user\n\n Examine a certificate:\n ipa cert-find --file=cert.pem --all\n\n Verify that a certificate is owned by a specific user:\n ipa cert-find --file=cert.pem --user=user\n\nIPA currently immediately issues (or declines) all certificate requests so\nthe status of a request is not normally useful. This is for future use\nor the case where a CA does not immediately issue a certificate.\n\nThe following revocation reasons are supported:\n\n * 0 - unspecified\n * 1 - keyCompromise\n * 2 - cACompromise\n * 3 - affiliationChanged\n * 4 - superseded\n * 5 - cessationOfOperation\n * 6 - certificateHold\n * 8 - removeFromCRL\n * 9 - privilegeWithdrawn\n * 10 - aACompromise\n\nNote that reason code 7 is not used. See RFC 5280 for more details:\n\nhttp://www.ietf.org/rfc/rfc5280.txt", + "version": "1", + "name": "cert", + "full_name": "cert/1" + }, + { + "doc": "Manage CA ACL rules.\n\nThis plugin is used to define rules governing which CAs and profiles\nmay be used to issue certificates to particular principals or groups\nof principals.\n\nSUBJECT PRINCIPAL SCOPE:\n\nFor a certificate request to be allowed, the principal(s) that are\nthe subject of a certificate request (not necessarily the principal\nactually requesting the certificate) must be included in the scope\nof a CA ACL that also includes the target CA and profile.\n\nUsers can be included by name, group or the \"all users\" category.\nHosts can be included by name, hostgroup or the \"all hosts\"\ncategory. Services can be included by service name or the \"all\nservices\" category. CA ACLs may be associated with a single type of\nprincipal, or multiple types.\n\nCERTIFICATE AUTHORITY SCOPE:\n\nA CA ACL can be associated with one or more CAs by name, or by the\n\"all CAs\" category. For compatibility reasons, a CA ACL with no CA\nassociation implies an association with the 'ipa' CA (and only this\nCA).\n\nPROFILE SCOPE:\n\nA CA ACL can be associated with one or more profiles by Profile ID.\nThe Profile ID is a string without spaces or punctuation starting\nwith a letter and followed by a sequence of letters, digits or\nunderscore (\"_\").\n\nEXAMPLES:\n\n Create a CA ACL \"test\" that grants all users access to the\n \"UserCert\" profile on all CAs:\n ipa caacl-add test --usercat=all --cacat=all\n ipa caacl-add-profile test --certprofiles UserCert\n\n Display the properties of a named CA ACL:\n ipa caacl-show test\n\n Create a CA ACL to let user \"alice\" use the \"DNP3\" profile on \"DNP3-CA\":\n ipa caacl-add alice_dnp3\n ipa caacl-add-ca alice_dnp3 --cas DNP3-CA\n ipa caacl-add-profile alice_dnp3 --certprofiles DNP3\n ipa caacl-add-user alice_dnp3 --user=alice\n\n Disable a CA ACL:\n ipa caacl-disable test\n\n Remove a CA ACL:\n ipa caacl-del test", + "version": "1", + "name": "caacl", + "full_name": "caacl/1" + }, + { + "doc": "Certificate Identity Mapping\n\nManage Certificate Identity Mapping configuration and rules.\n\nIPA supports the use of certificates for authentication. Certificates can\neither be stored in the user entry (full certificate in the usercertificate\nattribute), or simply linked to the user entry through a mapping.\nThis code enables the management of the rules allowing to link a\ncertificate to a user entry.\n\nEXAMPLES:\n\n Display the Certificate Identity Mapping global configuration:\n ipa certmapconfig-show\n\n Modify Certificate Identity Mapping global configuration:\n ipa certmapconfig-mod --promptusername=TRUE\n\n Create a new Certificate Identity Mapping Rule:\n ipa certmaprule-add rule1 --desc=\"Link certificate with subject and issuer\"\n\n Modify a Certificate Identity Mapping Rule:\n ipa certmaprule-mod rule1 --maprule=\"\"\n\n Disable a Certificate Identity Mapping Rule:\n ipa certmaprule-disable rule1\n\n Enable a Certificate Identity Mapping Rule:\n ipa certmaprule-enable rule1\n\n Display information about a Certificate Identity Mapping Rule:\n ipa certmaprule-show rule1\n\n Find all Certificate Identity Mapping Rules with the specified domain:\n ipa certmaprule-find --domain example.com\n\n Delete a Certificate Identity Mapping Rule:\n ipa certmaprule-del rule1", + "version": "1", + "name": "certmap", + "full_name": "certmap/1" + }, + { + "doc": "Manage Certificate Profiles\n\nCertificate Profiles are used by Certificate Authority (CA) in the signing of\ncertificates to determine if a Certificate Signing Request (CSR) is acceptable,\nand if so what features and extensions will be present on the certificate.\n\nThe Certificate Profile format is the property-list format understood by the\nDogtag or Red Hat Certificate System CA.\n\nPROFILE ID SYNTAX:\n\nA Profile ID is a string without spaces or punctuation starting with a letter\nand followed by a sequence of letters, digits or underscore (\"_\").\n\nEXAMPLES:\n\n Import a profile that will not store issued certificates:\n ipa certprofile-import ShortLivedUserCert \\\n --file UserCert.profile --desc \"User Certificates\" \\\n --store=false\n\n Delete a certificate profile:\n ipa certprofile-del ShortLivedUserCert\n\n Show information about a profile:\n ipa certprofile-show ShortLivedUserCert\n\n Save profile configuration to a file:\n ipa certprofile-show caIPAserviceCert --out caIPAserviceCert.cfg\n\n Search for profiles that do not store certificates:\n ipa certprofile-find --store=false\n\nPROFILE CONFIGURATION FORMAT:\n\nThe profile configuration format is the raw property-list format\nused by Dogtag Certificate System. The XML format is not supported.\n\nThe following restrictions apply to profiles managed by IPA:\n\n- When importing a profile the \"profileId\" field, if present, must\n match the ID given on the command line.\n\n- The \"classId\" field must be set to \"caEnrollImpl\"\n\n- The \"auth.instance_id\" field must be set to \"raCertAuth\"\n\n- The \"certReqInputImpl\" input class and \"certOutputImpl\" output\n class must be used.", + "version": "1", + "name": "certprofile", + "full_name": "certprofile/1" + }, + { + "doc": "API Schema\n\nProvides API introspection capabilities.\n\nEXAMPLES:\n\n Show user-find details:\n ipa command-show user-find\n\n Find user-find parameters:\n ipa param-find user-find", + "version": "1", + "name": "schema", + "full_name": "schema/1" + }, + { + "doc": "Server configuration\n\nManage the default values that IPA uses and some of its tuning parameters.\n\nNOTES:\n\nThe password notification value (--pwdexpnotify) is stored here so it will\nbe replicated. It is not currently used to notify users in advance of an\nexpiring password.\n\nSome attributes are read-only, provided only for information purposes. These\ninclude:\n\nCertificate Subject base: the configured certificate subject base,\n e.g. O=EXAMPLE.COM. This is configurable only at install time.\nPassword plug-in features: currently defines additional hashes that the\n password will generate (there may be other conditions).\n\nWhen setting the order list for mapping SELinux users you may need to\nquote the value so it isn't interpreted by the shell.\n\nEXAMPLES:\n\n Show basic server configuration:\n ipa config-show\n\n Show all configuration options:\n ipa config-show --all\n\n Change maximum username length to 99 characters:\n ipa config-mod --maxusername=99\n\n Increase default time and size limits for maximum IPA server search:\n ipa config-mod --searchtimelimit=10 --searchrecordslimit=2000\n\n Set default user e-mail domain:\n ipa config-mod --emaildomain=example.com\n\n Enable migration mode to make \"ipa migrate-ds\" command operational:\n ipa config-mod --enable-migration=TRUE\n\n Define SELinux user map order:\n ipa config-mod --ipaselinuxusermaporder='guest_u:s0$xguest_u:s0$user_u:s0-s0:c0.c1023$staff_u:s0-s0:c0.c1023$unconfined_u:s0-s0:c0.c1023'", + "version": "1", + "name": "config", + "full_name": "config/1" + }, + { + "doc": "Password policy\n\nA password policy sets limitations on IPA passwords, including maximum\nlifetime, minimum lifetime, the number of passwords to save in\nhistory, the number of character classes required (for stronger passwords)\nand the minimum password length.\n\nBy default there is a single, global policy for all users. You can also\ncreate a password policy to apply to a group. Each user is only subject\nto one password policy, either the group policy or the global policy. A\ngroup policy stands alone; it is not a super-set of the global policy plus\ncustom settings.\n\nEach group password policy requires a unique priority setting. If a user\nis in multiple groups that have password policies, this priority determines\nwhich password policy is applied. A lower value indicates a higher priority\npolicy.\n\nGroup password policies are automatically removed when the groups they\nare associated with are removed.\n\nEXAMPLES:\n\n Modify the global policy:\n ipa pwpolicy-mod --minlength=10\n\n Add a new group password policy:\n ipa pwpolicy-add --maxlife=90 --minlife=1 --history=10 --minclasses=3 --minlength=8 --priority=10 localadmins\n\n Display the global password policy:\n ipa pwpolicy-show\n\n Display a group password policy:\n ipa pwpolicy-show localadmins\n\n Display the policy that would be applied to a given user:\n ipa pwpolicy-show --user=tuser1\n\n Modify a group password policy:\n ipa pwpolicy-mod --minclasses=2 localadmins", + "version": "1", + "name": "pwpolicy", + "full_name": "pwpolicy/1" + }, + { + "doc": "Group to Group Delegation\n\nA permission enables fine-grained delegation of permissions. Access Control\nRules, or instructions (ACIs), grant permission to permissions to perform\ngiven tasks such as adding a user, modifying a group, etc.\n\nGroup to Group Delegations grants the members of one group to update a set\nof attributes of members of another group.\n\nEXAMPLES:\n\n Add a delegation rule to allow managers to edit employee's addresses:\n ipa delegation-add --attrs=street --group=managers --membergroup=employees \"managers edit employees' street\"\n\n When managing the list of attributes you need to include all attributes\n in the list, including existing ones. Add postalCode to the list:\n ipa delegation-mod --attrs=street --attrs=postalCode --group=managers --membergroup=employees \"managers edit employees' street\"\n\n Display our updated rule:\n ipa delegation-show \"managers edit employees' street\"\n\n Delete a rule:\n ipa delegation-del \"managers edit employees' street\"", + "version": "1", + "name": "delegation", + "full_name": "delegation/1" + }, + { + "doc": "Domain Name System (DNS)\n\nManage DNS zone and resource records.\n\nSUPPORTED ZONE TYPES\n\n * Master zone (dnszone-*), contains authoritative data.\n * Forward zone (dnsforwardzone-*), forwards queries to configured forwarders\n (a set of DNS servers).\n\nUSING STRUCTURED PER-TYPE OPTIONS\n\nThere are many structured DNS RR types where DNS data stored in LDAP server\nis not just a scalar value, for example an IP address or a domain name, but\na data structure which may be often complex. A good example is a LOC record\n[RFC1876] which consists of many mandatory and optional parts (degrees,\nminutes, seconds of latitude and longitude, altitude or precision).\n\nIt may be difficult to manipulate such DNS records without making a mistake\nand entering an invalid value. DNS module provides an abstraction over these\nraw records and allows to manipulate each RR type with specific options. For\neach supported RR type, DNS module provides a standard option to manipulate\na raw records with format ---rec, e.g. --mx-rec, and special options\nfor every part of the RR structure with format ---, e.g.\n--mx-preference and --mx-exchanger.\n\nWhen adding a record, either RR specific options or standard option for a raw\nvalue can be used, they just should not be combined in one add operation. When\nmodifying an existing entry, new RR specific options can be used to change\none part of a DNS record, where the standard option for raw value is used\nto specify the modified value. The following example demonstrates\na modification of MX record preference from 0 to 1 in a record without\nmodifying the exchanger:\nipa dnsrecord-mod --mx-rec=\"0 mx.example.com.\" --mx-preference=1\n\n\nEXAMPLES:\n\n Add new zone:\n ipa dnszone-add example.com --admin-email=admin@example.com\n\n Add system permission that can be used for per-zone privilege delegation:\n ipa dnszone-add-permission example.com\n\n Modify the zone to allow dynamic updates for hosts own records in realm EXAMPLE.COM:\n ipa dnszone-mod example.com --dynamic-update=TRUE\n\n This is the equivalent of:\n ipa dnszone-mod example.com --dynamic-update=TRUE \\\n --update-policy=\"grant EXAMPLE.COM krb5-self * A; grant EXAMPLE.COM krb5-self * AAAA; grant EXAMPLE.COM krb5-self * SSHFP;\"\n\n Modify the zone to allow zone transfers for local network only:\n ipa dnszone-mod example.com --allow-transfer=192.0.2.0/24\n\n Add new reverse zone specified by network IP address:\n ipa dnszone-add --name-from-ip=192.0.2.0/24\n\n Add second nameserver for example.com:\n ipa dnsrecord-add example.com @ --ns-rec=nameserver2.example.com\n\n Add a mail server for example.com:\n ipa dnsrecord-add example.com @ --mx-rec=\"10 mail1\"\n\n Add another record using MX record specific options:\n ipa dnsrecord-add example.com @ --mx-preference=20 --mx-exchanger=mail2\n\n Add another record using interactive mode (started when dnsrecord-add, dnsrecord-mod,\n or dnsrecord-del are executed with no options):\n ipa dnsrecord-add example.com @\n Please choose a type of DNS resource record to be added\n The most common types for this type of zone are: NS, MX, LOC\n\n DNS resource record type: MX\n MX Preference: 30\n MX Exchanger: mail3\n Record name: example.com\n MX record: 10 mail1, 20 mail2, 30 mail3\n NS record: nameserver.example.com., nameserver2.example.com.\n\n Delete previously added nameserver from example.com:\n ipa dnsrecord-del example.com @ --ns-rec=nameserver2.example.com.\n\n Add LOC record for example.com:\n ipa dnsrecord-add example.com @ --loc-rec=\"49 11 42.4 N 16 36 29.6 E 227.64m\"\n\n Add new A record for www.example.com. Create a reverse record in appropriate\n reverse zone as well. In this case a PTR record \"2\" pointing to www.example.com\n will be created in zone 2.0.192.in-addr.arpa.\n ipa dnsrecord-add example.com www --a-rec=192.0.2.2 --a-create-reverse\n\n Add new PTR record for www.example.com\n ipa dnsrecord-add 2.0.192.in-addr.arpa. 2 --ptr-rec=www.example.com.\n\n Add new SRV records for LDAP servers. Three quarters of the requests\n should go to fast.example.com, one quarter to slow.example.com. If neither\n is available, switch to backup.example.com.\n ipa dnsrecord-add example.com _ldap._tcp --srv-rec=\"0 3 389 fast.example.com\"\n ipa dnsrecord-add example.com _ldap._tcp --srv-rec=\"0 1 389 slow.example.com\"\n ipa dnsrecord-add example.com _ldap._tcp --srv-rec=\"1 1 389 backup.example.com\"\n\n The interactive mode can be used for easy modification:\n ipa dnsrecord-mod example.com _ldap._tcp\n No option to modify specific record provided.\n Current DNS record contents:\n\n SRV record: 0 3 389 fast.example.com, 0 1 389 slow.example.com, 1 1 389 backup.example.com\n\n Modify SRV record '0 3 389 fast.example.com'? Yes/No (default No):\n Modify SRV record '0 1 389 slow.example.com'? Yes/No (default No): y\n SRV Priority [0]: (keep the default value)\n SRV Weight [1]: 2 (modified value)\n SRV Port [389]: (keep the default value)\n SRV Target [slow.example.com]: (keep the default value)\n 1 SRV record skipped. Only one value per DNS record type can be modified at one time.\n Record name: _ldap._tcp\n SRV record: 0 3 389 fast.example.com, 1 1 389 backup.example.com, 0 2 389 slow.example.com\n\n After this modification, three fifths of the requests should go to\n fast.example.com and two fifths to slow.example.com.\n\n An example of the interactive mode for dnsrecord-del command:\n ipa dnsrecord-del example.com www\n No option to delete specific record provided.\n Delete all? Yes/No (default No): (do not delete all records)\n Current DNS record contents:\n\n A record: 192.0.2.2, 192.0.2.3\n\n Delete A record '192.0.2.2'? Yes/No (default No):\n Delete A record '192.0.2.3'? Yes/No (default No): y\n Record name: www\n A record: 192.0.2.2 (A record 192.0.2.3 has been deleted)\n\n Show zone example.com:\n ipa dnszone-show example.com\n\n Find zone with \"example\" in its domain name:\n ipa dnszone-find example\n\n Find records for resources with \"www\" in their name in zone example.com:\n ipa dnsrecord-find example.com www\n\n Find A records with value 192.0.2.2 in zone example.com\n ipa dnsrecord-find example.com --a-rec=192.0.2.2\n\n Show records for resource www in zone example.com\n ipa dnsrecord-show example.com www\n\n Delegate zone sub.example to another nameserver:\n ipa dnsrecord-add example.com ns.sub --a-rec=203.0.113.1\n ipa dnsrecord-add example.com sub --ns-rec=ns.sub.example.com.\n\n Delete zone example.com with all resource records:\n ipa dnszone-del example.com\n\n If a global forwarder is configured, all queries for which this server is not\n authoritative (e.g. sub.example.com) will be routed to the global forwarder.\n Global forwarding configuration can be overridden per-zone.\n\n Semantics of forwarding in IPA matches BIND semantics and depends on the type\n of zone:\n * Master zone: local BIND replies authoritatively to queries for data in\n the given zone (including authoritative NXDOMAIN answers) and forwarding\n affects only queries for names below zone cuts (NS records) of locally\n served zones.\n\n * Forward zone: forward zone contains no authoritative data. BIND forwards\n queries, which cannot be answered from its local cache, to configured\n forwarders.\n\n Semantics of the --forward-policy option:\n * none - disable forwarding for the given zone.\n * first - forward all queries to configured forwarders. If they fail,\n do resolution using DNS root servers.\n * only - forward all queries to configured forwarders and if they fail,\n return failure.\n\n Disable global forwarding for given sub-tree:\n ipa dnszone-mod example.com --forward-policy=none\n\n This configuration forwards all queries for names outside the example.com\n sub-tree to global forwarders. Normal recursive resolution process is used\n for names inside the example.com sub-tree (i.e. NS records are followed etc.).\n\n Forward all requests for the zone external.example.com to another forwarder\n using a \"first\" policy (it will send the queries to the selected forwarder\n and if not answered it will use global root servers):\n ipa dnsforwardzone-add external.example.com --forward-policy=first \\\n --forwarder=203.0.113.1\n\n Change forward-policy for external.example.com:\n ipa dnsforwardzone-mod external.example.com --forward-policy=only\n\n Show forward zone external.example.com:\n ipa dnsforwardzone-show external.example.com\n\n List all forward zones:\n ipa dnsforwardzone-find\n\n Delete forward zone external.example.com:\n ipa dnsforwardzone-del external.example.com\n\n Resolve a host name to see if it exists (will add default IPA domain\n if one is not included):\n ipa dns-resolve www.example.com\n ipa dns-resolve www\n\n\nGLOBAL DNS CONFIGURATION\n\nDNS configuration passed to command line install script is stored in a local\nconfiguration file on each IPA server where DNS service is configured. These\nlocal settings can be overridden with a common configuration stored in LDAP\nserver:\n\n Show global DNS configuration:\n ipa dnsconfig-show\n\n Modify global DNS configuration and set a list of global forwarders:\n ipa dnsconfig-mod --forwarder=203.0.113.113", + "version": "1", + "name": "dns", + "full_name": "dns/1" + }, + { + "doc": "Raise the IPA Domain Level.", + "version": "1", + "name": "domainlevel", + "full_name": "domainlevel/1" + }, + { + "doc": "Misc plug-ins", + "version": "1", + "name": "misc", + "full_name": "misc/1" + }, + { + "doc": "Groups of users\n\nManage groups of users. By default, new groups are POSIX groups. You\ncan add the --nonposix option to the group-add command to mark a new group\nas non-POSIX. You can use the --posix argument with the group-mod command\nto convert a non-POSIX group into a POSIX group. POSIX groups cannot be\nconverted to non-POSIX groups.\n\nEvery group must have a description.\n\nPOSIX groups must have a Group ID (GID) number. Changing a GID is\nsupported but can have an impact on your file permissions. It is not necessary\nto supply a GID when creating a group. IPA will generate one automatically\nif it is not provided.\n\nEXAMPLES:\n\n Add a new group:\n ipa group-add --desc='local administrators' localadmins\n\n Add a new non-POSIX group:\n ipa group-add --nonposix --desc='remote administrators' remoteadmins\n\n Convert a non-POSIX group to posix:\n ipa group-mod --posix remoteadmins\n\n Add a new POSIX group with a specific Group ID number:\n ipa group-add --gid=500 --desc='unix admins' unixadmins\n\n Add a new POSIX group and let IPA assign a Group ID number:\n ipa group-add --desc='printer admins' printeradmins\n\n Remove a group:\n ipa group-del unixadmins\n\n To add the \"remoteadmins\" group to the \"localadmins\" group:\n ipa group-add-member --groups=remoteadmins localadmins\n\n Add multiple users to the \"localadmins\" group:\n ipa group-add-member --users=test1 --users=test2 localadmins\n\n Remove a user from the \"localadmins\" group:\n ipa group-remove-member --users=test2 localadmins\n\n Display information about a named group.\n ipa group-show localadmins\n\nExternal group membership is designed to allow users from trusted domains\nto be mapped to local POSIX groups in order to actually use IPA resources.\nExternal members should be added to groups that specifically created as\nexternal and non-POSIX. Such group later should be included into one of POSIX\ngroups.\n\nAn external group member is currently a Security Identifier (SID) as defined by\nthe trusted domain. When adding external group members, it is possible to\nspecify them in either SID, or DOM\\name, or name@domain format. IPA will attempt\nto resolve passed name to SID with the use of Global Catalog of the trusted domain.\n\nExample:\n\n1. Create group for the trusted domain admins' mapping and their local POSIX group:\n\n ipa group-add --desc=' admins external map' ad_admins_external --external\n ipa group-add --desc=' admins' ad_admins\n\n2. Add security identifier of Domain Admins of the to the ad_admins_external\n group:\n\n ipa group-add-member ad_admins_external --external 'AD\\Domain Admins'\n\n3. Allow members of ad_admins_external group to be associated with ad_admins POSIX group:\n\n ipa group-add-member ad_admins --groups ad_admins_external\n\n4. List members of external members of ad_admins_external group to see their SIDs:\n\n ipa group-show ad_admins_external", + "version": "1", + "name": "group", + "full_name": "group/1" + }, + { + "doc": "Host-based access control\n\nControl who can access what services on what hosts. You\ncan use HBAC to control which users or groups can\naccess a service, or group of services, on a target host.\n\nYou can also specify a category of users and target hosts.\nThis is currently limited to \"all\", but might be expanded in the\nfuture.\n\nTarget hosts in HBAC rules must be hosts managed by IPA.\n\nThe available services and groups of services are controlled by the\nhbacsvc and hbacsvcgroup plug-ins respectively.\n\nEXAMPLES:\n\n Create a rule, \"test1\", that grants all users access to the host \"server\" from\n anywhere:\n ipa hbacrule-add --usercat=all test1\n ipa hbacrule-add-host --hosts=server.example.com test1\n\n Display the properties of a named HBAC rule:\n ipa hbacrule-show test1\n\n Create a rule for a specific service. This lets the user john access\n the sshd service on any machine from any machine:\n ipa hbacrule-add --hostcat=all john_sshd\n ipa hbacrule-add-user --users=john john_sshd\n ipa hbacrule-add-service --hbacsvcs=sshd john_sshd\n\n Create a rule for a new service group. This lets the user john access\n the FTP service on any machine from any machine:\n ipa hbacsvcgroup-add ftpers\n ipa hbacsvc-add sftp\n ipa hbacsvcgroup-add-member --hbacsvcs=ftp --hbacsvcs=sftp ftpers\n ipa hbacrule-add --hostcat=all john_ftp\n ipa hbacrule-add-user --users=john john_ftp\n ipa hbacrule-add-service --hbacsvcgroups=ftpers john_ftp\n\n Disable a named HBAC rule:\n ipa hbacrule-disable test1\n\n Remove a named HBAC rule:\n ipa hbacrule-del allow_server", + "version": "1", + "name": "hbacrule", + "full_name": "hbacrule/1", + "topic_topic": "hbac/1" + }, + { + "doc": "Host-based access control commands", + "version": "1", + "name": "hbac", + "full_name": "hbac/1" + }, + { + "doc": "HBAC Services\n\nThe PAM services that HBAC can control access to. The name used here\nmust match the service name that PAM is evaluating.\n\nEXAMPLES:\n\n Add a new HBAC service:\n ipa hbacsvc-add tftp\n\n Modify an existing HBAC service:\n ipa hbacsvc-mod --desc=\"TFTP service\" tftp\n\n Search for HBAC services. This example will return two results, the FTP\n service and the newly-added tftp service:\n ipa hbacsvc-find ftp\n\n Delete an HBAC service:\n ipa hbacsvc-del tftp", + "version": "1", + "name": "hbacsvc", + "full_name": "hbacsvc/1", + "topic_topic": "hbac/1" + }, + { + "doc": "HBAC Service Groups\n\nHBAC service groups can contain any number of individual services,\nor \"members\". Every group must have a description.\n\nEXAMPLES:\n\n Add a new HBAC service group:\n ipa hbacsvcgroup-add --desc=\"login services\" login\n\n Add members to an HBAC service group:\n ipa hbacsvcgroup-add-member --hbacsvcs=sshd --hbacsvcs=login login\n\n Display information about a named group:\n ipa hbacsvcgroup-show login\n\n Delete an HBAC service group:\n ipa hbacsvcgroup-del login", + "version": "1", + "name": "hbacsvcgroup", + "full_name": "hbacsvcgroup/1", + "topic_topic": "hbac/1" + }, + { + "doc": "Simulate use of Host-based access controls\n\nHBAC rules control who can access what services on what hosts.\nYou can use HBAC to control which users or groups can access a service,\nor group of services, on a target host.\n\nSince applying HBAC rules implies use of a production environment,\nthis plugin aims to provide simulation of HBAC rules evaluation without\nhaving access to the production environment.\n\n Test user coming to a service on a named host against\n existing enabled rules.\n\n ipa hbactest --user= --host= --service=\n [--rules=rules-list] [--nodetail] [--enabled] [--disabled]\n [--sizelimit= ]\n\n --user, --host, and --service are mandatory, others are optional.\n\n If --rules is specified simulate enabling of the specified rules and test\n the login of the user using only these rules.\n\n If --enabled is specified, all enabled HBAC rules will be added to simulation\n\n If --disabled is specified, all disabled HBAC rules will be added to simulation\n\n If --nodetail is specified, do not return information about rules matched/not matched.\n\n If both --rules and --enabled are specified, apply simulation to --rules _and_\n all IPA enabled rules.\n\n If no --rules specified, simulation is run against all IPA enabled rules.\n By default there is a IPA-wide limit to number of entries fetched, you can change it\n with --sizelimit option.\n\nEXAMPLES:\n\n 1. Use all enabled HBAC rules in IPA database to simulate:\n $ ipa hbactest --user=a1a --host=bar --service=sshd\n --------------------\n Access granted: True\n --------------------\n Not matched rules: my-second-rule\n Not matched rules: my-third-rule\n Not matched rules: myrule\n Matched rules: allow_all\n\n 2. Disable detailed summary of how rules were applied:\n $ ipa hbactest --user=a1a --host=bar --service=sshd --nodetail\n --------------------\n Access granted: True\n --------------------\n\n 3. Test explicitly specified HBAC rules:\n $ ipa hbactest --user=a1a --host=bar --service=sshd \\\n --rules=myrule --rules=my-second-rule\n ---------------------\n Access granted: False\n ---------------------\n Not matched rules: my-second-rule\n Not matched rules: myrule\n\n 4. Use all enabled HBAC rules in IPA database + explicitly specified rules:\n $ ipa hbactest --user=a1a --host=bar --service=sshd \\\n --rules=myrule --rules=my-second-rule --enabled\n --------------------\n Access granted: True\n --------------------\n Not matched rules: my-second-rule\n Not matched rules: my-third-rule\n Not matched rules: myrule\n Matched rules: allow_all\n\n 5. Test all disabled HBAC rules in IPA database:\n $ ipa hbactest --user=a1a --host=bar --service=sshd --disabled\n ---------------------\n Access granted: False\n ---------------------\n Not matched rules: new-rule\n\n 6. Test all disabled HBAC rules in IPA database + explicitly specified rules:\n $ ipa hbactest --user=a1a --host=bar --service=sshd \\\n --rules=myrule --rules=my-second-rule --disabled\n ---------------------\n Access granted: False\n ---------------------\n Not matched rules: my-second-rule\n Not matched rules: my-third-rule\n Not matched rules: myrule\n\n 7. Test all (enabled and disabled) HBAC rules in IPA database:\n $ ipa hbactest --user=a1a --host=bar --service=sshd \\\n --enabled --disabled\n --------------------\n Access granted: True\n --------------------\n Not matched rules: my-second-rule\n Not matched rules: my-third-rule\n Not matched rules: myrule\n Not matched rules: new-rule\n Matched rules: allow_all\n\n\nHBACTEST AND TRUSTED DOMAINS\n\nWhen an external trusted domain is configured in IPA, HBAC rules are also applied\non users accessing IPA resources from the trusted domain. Trusted domain users and\ngroups (and their SIDs) can be then assigned to external groups which can be\nmembers of POSIX groups in IPA which can be used in HBAC rules and thus allowing\naccess to resources protected by the HBAC system.\n\nhbactest plugin is capable of testing access for both local IPA users and users\nfrom the trusted domains, either by a fully qualified user name or by user SID.\nSuch user names need to have a trusted domain specified as a short name\n(DOMAIN\\Administrator) or with a user principal name (UPN), Administrator@ad.test.\n\nPlease note that hbactest executed with a trusted domain user as --user parameter\ncan be only run by members of \"trust admins\" group.\n\nEXAMPLES:\n\n 1. Test if a user from a trusted domain specified by its shortname matches any\n rule:\n\n $ ipa hbactest --user 'DOMAIN\\Administrator' --host `hostname` --service sshd\n --------------------\n Access granted: True\n --------------------\n Matched rules: allow_all\n Matched rules: can_login\n\n 2. Test if a user from a trusted domain specified by its domain name matches\n any rule:\n\n $ ipa hbactest --user 'Administrator@domain.com' --host `hostname` --service sshd\n --------------------\n Access granted: True\n --------------------\n Matched rules: allow_all\n Matched rules: can_login\n\n 3. Test if a user from a trusted domain specified by its SID matches any rule:\n\n $ ipa hbactest --user S-1-5-21-3035198329-144811719-1378114514-500 \\\n --host `hostname` --service sshd\n --------------------\n Access granted: True\n --------------------\n Matched rules: allow_all\n Matched rules: can_login\n\n 4. Test if other user from a trusted domain specified by its SID matches any rule:\n\n $ ipa hbactest --user S-1-5-21-3035198329-144811719-1378114514-1203 \\\n --host `hostname` --service sshd\n --------------------\n Access granted: True\n --------------------\n Matched rules: allow_all\n Not matched rules: can_login\n\n 5. Test if other user from a trusted domain specified by its shortname matches\n any rule:\n\n $ ipa hbactest --user 'DOMAIN\\Otheruser' --host `hostname` --service sshd\n --------------------\n Access granted: True\n --------------------\n Matched rules: allow_all\n Not matched rules: can_login", + "version": "1", + "name": "hbactest", + "full_name": "hbactest/1" + }, + { + "doc": "Hosts/Machines\n\nA host represents a machine. It can be used in a number of contexts:\n- service entries are associated with a host\n- a host stores the host/ service principal\n- a host can be used in Host-based Access Control (HBAC) rules\n- every enrolled client generates a host entry\n\nENROLLMENT:\n\nThere are three enrollment scenarios when enrolling a new client:\n\n1. You are enrolling as a full administrator. The host entry may exist\n or not. A full administrator is a member of the hostadmin role\n or the admins group.\n2. You are enrolling as a limited administrator. The host must already\n exist. A limited administrator is a member a role with the\n Host Enrollment privilege.\n3. The host has been created with a one-time password.\n\nRE-ENROLLMENT:\n\nHost that has been enrolled at some point, and lost its configuration (e.g. VM\ndestroyed) can be re-enrolled.\n\nFor more information, consult the manual pages for ipa-client-install.\n\nA host can optionally store information such as where it is located,\nthe OS that it runs, etc.\n\nEXAMPLES:\n\n Add a new host:\n ipa host-add --location=\"3rd floor lab\" --locality=Dallas test.example.com\n\n Delete a host:\n ipa host-del test.example.com\n\n Add a new host with a one-time password:\n ipa host-add --os='Fedora 12' --password=Secret123 test.example.com\n\n Add a new host with a random one-time password:\n ipa host-add --os='Fedora 12' --random test.example.com\n\n Modify information about a host:\n ipa host-mod --os='Fedora 12' test.example.com\n\n Remove SSH public keys of a host and update DNS to reflect this change:\n ipa host-mod --sshpubkey= --updatedns test.example.com\n\n Disable the host Kerberos key, SSL certificate and all of its services:\n ipa host-disable test.example.com\n\n Add a host that can manage this host's keytab and certificate:\n ipa host-add-managedby --hosts=test2 test\n\n Allow user to create a keytab:\n ipa host-allow-create-keytab test2 --users=tuser1", + "version": "1", + "name": "host", + "full_name": "host/1" + }, + { + "doc": "Groups of hosts.\n\nManage groups of hosts. This is useful for applying access control to a\nnumber of hosts by using Host-based Access Control.\n\nEXAMPLES:\n\n Add a new host group:\n ipa hostgroup-add --desc=\"Baltimore hosts\" baltimore\n\n Add another new host group:\n ipa hostgroup-add --desc=\"Maryland hosts\" maryland\n\n Add members to the hostgroup (using Bash brace expansion):\n ipa hostgroup-add-member --hosts={box1,box2,box3} baltimore\n\n Add a hostgroup as a member of another hostgroup:\n ipa hostgroup-add-member --hostgroups=baltimore maryland\n\n Remove a host from the hostgroup:\n ipa hostgroup-remove-member --hosts=box2 baltimore\n\n Display a host group:\n ipa hostgroup-show baltimore\n\n Delete a hostgroup:\n ipa hostgroup-del baltimore", + "version": "1", + "name": "hostgroup", + "full_name": "hostgroup/1" + }, + { + "doc": "Plugins not accessible directly through the CLI, commands used internally", + "version": "1", + "name": "internal", + "full_name": "internal/1" + }, + { + "doc": "ID Views\n\nManage ID Views\n\nIPA allows to override certain properties of users and groups per each host.\nThis functionality is primarily used to allow migration from older systems or\nother Identity Management solutions.", + "version": "1", + "name": "idviews", + "full_name": "idviews/1" + }, + { + "doc": "ID ranges\n\nManage ID ranges used to map Posix IDs to SIDs and back.\n\nThere are two type of ID ranges which are both handled by this utility:\n\n - the ID ranges of the local domain\n - the ID ranges of trusted remote domains\n\nBoth types have the following attributes in common:\n\n - base-id: the first ID of the Posix ID range\n - range-size: the size of the range\n\nWith those two attributes a range object can reserve the Posix IDs starting\nwith base-id up to but not including base-id+range-size exclusively.\n\nAdditionally an ID range of the local domain may set\n - rid-base: the first RID(*) of the corresponding RID range\n - secondary-rid-base: first RID of the secondary RID range\n\nand an ID range of a trusted domain must set\n - rid-base: the first RID of the corresponding RID range\n - sid: domain SID of the trusted domain\n\n\n\nEXAMPLE: Add a new ID range for a trusted domain\n\nSince there might be more than one trusted domain the domain SID must be given\nwhile creating the ID range.\n\n ipa idrange-add --base-id=1200000 --range-size=200000 --rid-base=0 \\\n --dom-sid=S-1-5-21-123-456-789 trusted_dom_range\n\nThis ID range is then used by the IPA server and the SSSD IPA provider to\nassign Posix UIDs to users from the trusted domain.\n\nIf e.g. a range for a trusted domain is configured with the following values:\n base-id = 1200000\n range-size = 200000\n rid-base = 0\nthe RIDs 0 to 199999 are mapped to the Posix ID from 1200000 to 13999999. So\nRID 1000 <-> Posix ID 1201000\n\n\n\nEXAMPLE: Add a new ID range for the local domain\n\nTo create an ID range for the local domain it is not necessary to specify a\ndomain SID. But since it is possible that a user and a group can have the same\nvalue as Posix ID a second RID interval is needed to handle conflicts.\n\n ipa idrange-add --base-id=1200000 --range-size=200000 --rid-base=1000 \\\n --secondary-rid-base=1000000 local_range\n\nThe data from the ID ranges of the local domain are used by the IPA server\ninternally to assign SIDs to IPA users and groups. The SID will then be stored\nin the user or group objects.\n\nIf e.g. the ID range for the local domain is configured with the values from\nthe example above then a new user with the UID 1200007 will get the RID 1007.\nIf this RID is already used by a group the RID will be 1000007. This can only\nhappen if a user or a group object was created with a fixed ID because the\nautomatic assignment will not assign the same ID twice. Since there are only\nusers and groups sharing the same ID namespace it is sufficient to have only\none fallback range to handle conflicts.\n\nTo find the Posix ID for a given RID from the local domain it has to be\nchecked first if the RID falls in the primary or secondary RID range and\nthe rid-base or the secondary-rid-base has to be subtracted, respectively,\nand the base-id has to be added to get the Posix ID.\n\nTypically the creation of ID ranges happens behind the scenes and this CLI\nmust not be used at all. The ID range for the local domain will be created\nduring installation or upgrade from an older version. The ID range for a\ntrusted domain will be created together with the trust by 'ipa trust-add ...'.\n\nUSE CASES:\n\n Add an ID range from a transitively trusted domain\n\n If the trusted domain (A) trusts another domain (B) as well and this trust\n is transitive 'ipa trust-add domain-A' will only create a range for\n domain A. The ID range for domain B must be added manually.\n\n Add an additional ID range for the local domain\n\n If the ID range of the local domain is exhausted, i.e. no new IDs can be\n assigned to Posix users or groups by the DNA plugin, a new range has to be\n created to allow new users and groups to be added. (Currently there is no\n connection between this range CLI and the DNA plugin, but a future version\n might be able to modify the configuration of the DNS plugin as well)\n\nIn general it is not necessary to modify or delete ID ranges. If there is no\nother way to achieve a certain configuration than to modify or delete an ID\nrange it should be done with great care. Because UIDs are stored in the file\nsystem and are used for access control it might be possible that users are\nallowed to access files of other users if an ID range got deleted and reused\nfor a different domain.\n\n(*) The RID is typically the last integer of a user or group SID which follows\nthe domain SID. E.g. if the domain SID is S-1-5-21-123-456-789 and a user from\nthis domain has the SID S-1-5-21-123-456-789-1010 then 1010 id the RID of the\nuser. RIDs are unique in a domain, 32bit values and are used for users and\ngroups.\n\n=======\nWARNING:\n\nDNA plugin in 389-ds will allocate IDs based on the ranges configured for the\nlocal domain. Currently the DNA plugin *cannot* be reconfigured itself based\non the local ranges set via this family of commands.\n\nManual configuration change has to be done in the DNA plugin configuration for\nthe new local range. Specifically, The dnaNextRange attribute of 'cn=Posix\nIDs,cn=Distributed Numeric Assignment Plugin,cn=plugins,cn=config' has to be\nmodified to match the new range.\n=======", + "version": "1", + "name": "idrange", + "full_name": "idrange/1" + }, + { + "doc": "Joining an IPA domain", + "version": "1", + "name": "join", + "full_name": "join/1" + }, + { + "doc": "Vaults\n\nManage vaults.\n\nVault is a secure place to store a secret. One vault can only\nstore one secret. When archiving a secret in a vault, the\nexisting secret (if any) is overwritten.\n\nBased on the ownership there are three vault categories:\n* user/private vault\n* service vault\n* shared vault\n\nUser vaults are vaults owned used by a particular user. Private\nvaults are vaults owned the current user. Service vaults are\nvaults owned by a service. Shared vaults are owned by the admin\nbut they can be used by other users or services.\n\nBased on the security mechanism there are three types of\nvaults:\n* standard vault\n* symmetric vault\n* asymmetric vault\n\nStandard vault uses a secure mechanism to transport and\nstore the secret. The secret can only be retrieved by users\nthat have access to the vault.\n\nSymmetric vault is similar to the standard vault, but it\npre-encrypts the secret using a password before transport.\nThe secret can only be retrieved using the same password.\n\nAsymmetric vault is similar to the standard vault, but it\npre-encrypts the secret using a public key before transport.\nThe secret can only be retrieved using the private key.\n\nEXAMPLES:\n\n List vaults:\n ipa vault-find\n [--user |--service |--shared]\n\n Add a standard vault:\n ipa vault-add \n [--user |--service |--shared]\n --type standard\n\n Add a symmetric vault:\n ipa vault-add \n [--user |--service |--shared]\n --type symmetric --password-file password.txt\n\n Add an asymmetric vault:\n ipa vault-add \n [--user |--service |--shared]\n --type asymmetric --public-key-file public.pem\n\n Show a vault:\n ipa vault-show \n [--user |--service |--shared]\n\n Modify vault description:\n ipa vault-mod \n [--user |--service |--shared]\n --desc \n\n Modify vault type:\n ipa vault-mod \n [--user |--service |--shared]\n --type \n [old password/private key]\n [new password/public key]\n\n Modify symmetric vault password:\n ipa vault-mod \n [--user |--service |--shared]\n --change-password\n ipa vault-mod \n [--user |--service |--shared]\n --old-password \n --new-password \n ipa vault-mod \n [--user |--service |--shared]\n --old-password-file \n --new-password-file \n\n Modify asymmetric vault keys:\n ipa vault-mod \n [--user |--service |--shared]\n --private-key-file \n --public-key-file \n\n Delete a vault:\n ipa vault-del \n [--user |--service |--shared]\n\n Display vault configuration:\n ipa vaultconfig-show\n\n Archive data into standard vault:\n ipa vault-archive \n [--user |--service |--shared]\n --in \n\n Archive data into symmetric vault:\n ipa vault-archive \n [--user |--service |--shared]\n --in \n --password-file password.txt\n\n Archive data into asymmetric vault:\n ipa vault-archive \n [--user |--service |--shared]\n --in \n\n Retrieve data from standard vault:\n ipa vault-retrieve \n [--user |--service |--shared]\n --out \n\n Retrieve data from symmetric vault:\n ipa vault-retrieve \n [--user |--service |--shared]\n --out \n --password-file password.txt\n\n Retrieve data from asymmetric vault:\n ipa vault-retrieve \n [--user |--service |--shared]\n --out --private-key-file private.pem\n\n Add vault owners:\n ipa vault-add-owner \n [--user |--service |--shared]\n [--users ] [--groups ] [--services ]\n\n Delete vault owners:\n ipa vault-remove-owner \n [--user |--service |--shared]\n [--users ] [--groups ] [--services ]\n\n Add vault members:\n ipa vault-add-member \n [--user |--service |--shared]\n [--users ] [--groups ] [--services ]\n\n Delete vault members:\n ipa vault-remove-member \n [--user |--service |--shared]\n [--users ] [--groups ] [--services ]", + "version": "1", + "name": "vault", + "full_name": "vault/1" + }, + { + "doc": "Kerberos ticket policy\n\nThere is a single Kerberos ticket policy. This policy defines the\nmaximum ticket lifetime and the maximum renewal age, the period during\nwhich the ticket is renewable.\n\nYou can also create a per-user ticket policy by specifying the user login.\n\nFor changes to the global policy to take effect, restarting the KDC service\nis required, which can be achieved using:\n\nservice krb5kdc restart\n\nChanges to per-user policies take effect immediately for newly requested\ntickets (e.g. when the user next runs kinit).\n\nEXAMPLES:\n\n Display the current Kerberos ticket policy:\n ipa krbtpolicy-show\n\n Reset the policy to the default:\n ipa krbtpolicy-reset\n\n Modify the policy to 8 hours max life, 1-day max renewal:\n ipa krbtpolicy-mod --maxlife=28800 --maxrenew=86400\n\n Display effective Kerberos ticket policy for user 'admin':\n ipa krbtpolicy-show admin\n\n Reset per-user policy for user 'admin':\n ipa krbtpolicy-reset admin\n\n Modify per-user policy for user 'admin':\n ipa krbtpolicy-mod admin --maxlife=3600", + "version": "1", + "name": "krbtpolicy", + "full_name": "krbtpolicy/1" + }, + { + "doc": "IPA locations\n\nManipulate DNS locations\n\nEXAMPLES:\n\n Find all locations:\n ipa location-find\n\n Show specific location:\n ipa location-show location\n\n Add location:\n ipa location-add location --description 'My location'\n\n Delete location:\n ipa location-del location", + "version": "1", + "name": "location", + "full_name": "location/1" + }, + { + "doc": "Migration to IPA\n\nMigrate users and groups from an LDAP server to IPA.\n\nThis performs an LDAP query against the remote server searching for\nusers and groups in a container. In order to migrate passwords you need\nto bind as a user that can read the userPassword attribute on the remote\nserver. This is generally restricted to high-level admins such as\ncn=Directory Manager in 389-ds (this is the default bind user).\n\nThe default user container is ou=People.\n\nThe default group container is ou=Groups.\n\nUsers and groups that already exist on the IPA server are skipped.\n\nTwo LDAP schemas define how group members are stored: RFC2307 and\nRFC2307bis. RFC2307bis uses member and uniquemember to specify group\nmembers, RFC2307 uses memberUid. The default schema is RFC2307bis.\n\nThe schema compat feature allows IPA to reformat data for systems that\ndo not support RFC2307bis. It is recommended that this feature is disabled\nduring migration to reduce system overhead. It can be re-enabled after\nmigration. To migrate with it enabled use the \"--with-compat\" option.\n\nMigrated users do not have Kerberos credentials, they have only their\nLDAP password. To complete the migration process, users need to go\nto http://ipa.example.com/ipa/migration and authenticate using their\nLDAP password in order to generate their Kerberos credentials.\n\nMigration is disabled by default. Use the command ipa config-mod to\nenable it:\n\n ipa config-mod --enable-migration=TRUE\n\nIf a base DN is not provided with --basedn then IPA will use either\nthe value of defaultNamingContext if it is set or the first value\nin namingContexts set in the root of the remote LDAP server.\n\nUsers are added as members to the default user group. This can be a\ntime-intensive task so during migration this is done in a batch\nmode for every 100 users. As a result there will be a window in which\nusers will be added to IPA but will not be members of the default\nuser group.\n\nEXAMPLES:\n\n The simplest migration, accepting all defaults:\n ipa migrate-ds ldap://ds.example.com:389\n\n Specify the user and group container. This can be used to migrate user\n and group data from an IPA v1 server:\n ipa migrate-ds --user-container='cn=users,cn=accounts' \\\n --group-container='cn=groups,cn=accounts' \\\n ldap://ds.example.com:389\n\n Since IPA v2 server already contain predefined groups that may collide with\n groups in migrated (IPA v1) server (for example admins, ipausers), users\n having colliding group as their primary group may happen to belong to\n an unknown group on new IPA v2 server.\n Use --group-overwrite-gid option to overwrite GID of already existing groups\n to prevent this issue:\n ipa migrate-ds --group-overwrite-gid \\\n --user-container='cn=users,cn=accounts' \\\n --group-container='cn=groups,cn=accounts' \\\n ldap://ds.example.com:389\n\n Migrated users or groups may have object class and accompanied attributes\n unknown to the IPA v2 server. These object classes and attributes may be\n left out of the migration process:\n ipa migrate-ds --user-container='cn=users,cn=accounts' \\\n --group-container='cn=groups,cn=accounts' \\\n --user-ignore-objectclass=radiusprofile \\\n --user-ignore-attribute=radiusgroupname \\\n ldap://ds.example.com:389\n\nLOGGING\n\nMigration will log warnings and errors to the Apache error log. This\nfile should be evaluated post-migration to correct or investigate any\nissues that were discovered.\n\nFor every 100 users migrated an info-level message will be displayed to\ngive the current progress and duration to make it possible to track\nthe progress of migration.\n\nIf the log level is debug, either by setting debug = True in\n/etc/ipa/default.conf or /etc/ipa/server.conf, then an entry will be printed\nfor each user added plus a summary when the default user group is\nupdated.", + "version": "1", + "name": "migration", + "full_name": "migration/1" + }, + { + "doc": "Netgroups\n\nA netgroup is a group used for permission checking. It can contain both\nuser and host values.\n\nEXAMPLES:\n\n Add a new netgroup:\n ipa netgroup-add --desc=\"NFS admins\" admins\n\n Add members to the netgroup:\n ipa netgroup-add-member --users=tuser1 --users=tuser2 admins\n\n Remove a member from the netgroup:\n ipa netgroup-remove-member --users=tuser2 admins\n\n Display information about a netgroup:\n ipa netgroup-show admins\n\n Delete a netgroup:\n ipa netgroup-del admins", + "version": "1", + "name": "netgroup", + "full_name": "netgroup/1" + }, + { + "doc": "OTP configuration\n\nManage the default values that IPA uses for OTP tokens.\n\nEXAMPLES:\n\n Show basic OTP configuration:\n ipa otpconfig-show\n\n Show all OTP configuration options:\n ipa otpconfig-show --all\n\n Change maximum TOTP authentication window to 10 minutes:\n ipa otpconfig-mod --totp-auth-window=600\n\n Change maximum TOTP synchronization window to 12 hours:\n ipa otpconfig-mod --totp-sync-window=43200\n\n Change maximum HOTP authentication window to 5:\n ipa hotpconfig-mod --hotp-auth-window=5\n\n Change maximum HOTP synchronization window to 50:\n ipa hotpconfig-mod --hotp-sync-window=50", + "version": "1", + "name": "otpconfig", + "full_name": "otpconfig/1", + "topic_topic": "otp/1" + }, + { + "doc": "One time password commands", + "version": "1", + "name": "otp", + "full_name": "otp/1" + }, + { + "doc": "OTP Tokens\n\nManage OTP tokens.\n\nIPA supports the use of OTP tokens for multi-factor authentication. This\ncode enables the management of OTP tokens.\n\nEXAMPLES:\n\n Add a new token:\n ipa otptoken-add --type=totp --owner=jdoe --desc=\"My soft token\"\n\n Examine the token:\n ipa otptoken-show a93db710-a31a-4639-8647-f15b2c70b78a\n\n Change the vendor:\n ipa otptoken-mod a93db710-a31a-4639-8647-f15b2c70b78a --vendor=\"Red Hat\"\n\n Delete a token:\n ipa otptoken-del a93db710-a31a-4639-8647-f15b2c70b78a", + "version": "1", + "name": "otptoken", + "full_name": "otptoken/1", + "topic_topic": "otp/1" + }, + { + "doc": "Set a user's password\n\nIf someone other than a user changes that user's password (e.g., Helpdesk\nresets it) then the password will need to be changed the first time it\nis used. This is so the end-user is the only one who knows the password.\n\nThe IPA password policy controls how often a password may be changed,\nwhat strength requirements exist, and the length of the password history.\n\nEXAMPLES:\n\n To reset your own password:\n ipa passwd\n\n To change another user's password:\n ipa passwd tuser1", + "version": "1", + "name": "passwd", + "full_name": "passwd/1" + }, + { + "doc": "Permissions\n\nA permission enables fine-grained delegation of rights. A permission is\na human-readable wrapper around a 389-ds Access Control Rule,\nor instruction (ACI).\nA permission grants the right to perform a specific task such as adding a\nuser, modifying a group, etc.\n\nA permission may not contain other permissions.\n\n* A permission grants access to read, write, add, delete, read, search,\n or compare.\n* A privilege combines similar permissions (for example all the permissions\n needed to add a user).\n* A role grants a set of privileges to users, groups, hosts or hostgroups.\n\nA permission is made up of a number of different parts:\n\n1. The name of the permission.\n2. The target of the permission.\n3. The rights granted by the permission.\n\nRights define what operations are allowed, and may be one or more\nof the following:\n1. write - write one or more attributes\n2. read - read one or more attributes\n3. search - search on one or more attributes\n4. compare - compare one or more attributes\n5. add - add a new entry to the tree\n6. delete - delete an existing entry\n7. all - all permissions are granted\n\nNote the distinction between attributes and entries. The permissions are\nindependent, so being able to add a user does not mean that the user will\nbe editable.\n\nThere are a number of allowed targets:\n1. subtree: a DN; the permission applies to the subtree under this DN\n2. target filter: an LDAP filter\n3. target: DN with possible wildcards, specifies entries permission applies to\n\nAdditionally, there are the following convenience options.\nSetting one of these options will set the corresponding attribute(s).\n1. type: a type of object (user, group, etc); sets subtree and target filter.\n2. memberof: apply to members of a group; sets target filter\n3. targetgroup: grant access to modify a specific group (such as granting\n the rights to manage group membership); sets target.\n\nManaged permissions\n\nPermissions that come with IPA by default can be so-called \"managed\"\npermissions. These have a default set of attributes they apply to,\nbut the administrator can add/remove individual attributes to/from the set.\n\nDeleting or renaming a managed permission, as well as changing its target,\nis not allowed.\n\nEXAMPLES:\n\n Add a permission that grants the creation of users:\n ipa permission-add --type=user --permissions=add \"Add Users\"\n\n Add a permission that grants the ability to manage group membership:\n ipa permission-add --attrs=member --permissions=write --type=group \"Manage Group Members\"", + "version": "1", + "name": "permission", + "full_name": "permission/1" + }, + { + "doc": "Ping the remote IPA server to ensure it is running.\n\nThe ping command sends an echo request to an IPA server. The server\nreturns its version information. This is used by an IPA client\nto confirm that the server is available and accepting requests.\n\nThe server from xmlrpc_uri in /etc/ipa/default.conf is contacted first.\nIf it does not respond then the client will contact any servers defined\nby ldap SRV records in DNS.\n\nEXAMPLES:\n\n Ping an IPA server:\n ipa ping\n ------------------------------------------\n IPA server version 2.1.9. API version 2.20\n ------------------------------------------\n\n Ping an IPA server verbosely:\n ipa -v ping\n ipa: INFO: trying https://ipa.example.com/ipa/xml\n ipa: INFO: Forwarding 'ping' to server 'https://ipa.example.com/ipa/xml'\n -----------------------------------------------------\n IPA server version 2.1.9. API version 2.20\n -----------------------------------------------------", + "version": "1", + "name": "ping", + "full_name": "ping/1" + }, + { + "doc": "Kerberos PKINIT feature status reporting tools.\n\nReport IPA masters on which Kerberos PKINIT is enabled or disabled\n\nEXAMPLES:\n List PKINIT status on all masters:\n ipa pkinit-status\n\n Check PKINIT status on `ipa.example.com`:\n ipa pkinit-status --server ipa.example.com\n\n List all IPA masters with disabled PKINIT:\n ipa pkinit-status --status='disabled'\n\nFor more info about PKINIT support see:\n\nhttps://www.freeipa.org/page/V4/Kerberos_PKINIT", + "version": "1", + "name": "pkinit", + "full_name": "pkinit/1" + }, + { + "doc": "Privileges\n\nA privilege combines permissions into a logical task. A permission provides\nthe rights to do a single task. There are some IPA operations that require\nmultiple permissions to succeed. A privilege is where permissions are\ncombined in order to perform a specific task.\n\nFor example, adding a user requires the following permissions:\n * Creating a new user entry\n * Resetting a user password\n * Adding the new user to the default IPA users group\n\nCombining these three low-level tasks into a higher level task in the\nform of a privilege named \"Add User\" makes it easier to manage Roles.\n\nA privilege may not contain other privileges.\n\nSee role and permission for additional information.", + "version": "1", + "name": "privilege", + "full_name": "privilege/1" + }, + { + "doc": "RADIUS Proxy Servers\n\nManage RADIUS Proxy Servers.\n\nIPA supports the use of an external RADIUS proxy server for krb5 OTP\nauthentications. This permits a great deal of flexibility when\nintegrating with third-party authentication services.\n\nEXAMPLES:\n\n Add a new server:\n ipa radiusproxy-add MyRADIUS --server=radius.example.com:1812\n\n Find all servers whose entries include the string \"example.com\":\n ipa radiusproxy-find example.com\n\n Examine the configuration:\n ipa radiusproxy-show MyRADIUS\n\n Change the secret:\n ipa radiusproxy-mod MyRADIUS --secret\n\n Delete a configuration:\n ipa radiusproxy-del MyRADIUS", + "version": "1", + "name": "radiusproxy", + "full_name": "radiusproxy/1" + }, + { + "doc": "Realm domains\n\nManage the list of domains associated with IPA realm.\n\nEXAMPLES:\n\n Display the current list of realm domains:\n ipa realmdomains-show\n\n Replace the list of realm domains:\n ipa realmdomains-mod --domain=example.com\n ipa realmdomains-mod --domain={example1.com,example2.com,example3.com}\n\n Add a domain to the list of realm domains:\n ipa realmdomains-mod --add-domain=newdomain.com\n\n Delete a domain from the list of realm domains:\n ipa realmdomains-mod --del-domain=olddomain.com", + "version": "1", + "name": "realmdomains", + "full_name": "realmdomains/1" + }, + { + "doc": "Roles\n\nA role is used for fine-grained delegation. A permission grants the ability\nto perform given low-level tasks (add a user, modify a group, etc.). A\nprivilege combines one or more permissions into a higher-level abstraction\nsuch as useradmin. A useradmin would be able to add, delete and modify users.\n\nPrivileges are assigned to Roles.\n\nUsers, groups, hosts and hostgroups may be members of a Role.\n\nRoles can not contain other roles.\n\nEXAMPLES:\n\n Add a new role:\n ipa role-add --desc=\"Junior-level admin\" junioradmin\n\n Add some privileges to this role:\n ipa role-add-privilege --privileges=addusers junioradmin\n ipa role-add-privilege --privileges=change_password junioradmin\n ipa role-add-privilege --privileges=add_user_to_default_group junioradmin\n\n Add a group of users to this role:\n ipa group-add --desc=\"User admins\" useradmins\n ipa role-add-member --groups=useradmins junioradmin\n\n Display information about a role:\n ipa role-show junioradmin\n\n The result of this is that any users in the group 'junioradmin' can\n add users, reset passwords or add a user to the default IPA user group.", + "version": "1", + "name": "role", + "full_name": "role/1" + }, + { + "doc": "Self-service Permissions\n\nA permission enables fine-grained delegation of permissions. Access Control\nRules, or instructions (ACIs), grant permission to permissions to perform\ngiven tasks such as adding a user, modifying a group, etc.\n\nA Self-service permission defines what an object can change in its own entry.\n\n\nEXAMPLES:\n\n Add a self-service rule to allow users to manage their address (using Bash\n brace expansion):\n ipa selfservice-add --permissions=write --attrs={street,postalCode,l,c,st} \"Users manage their own address\"\n\n When managing the list of attributes you need to include all attributes\n in the list, including existing ones.\n Add telephoneNumber to the list (using Bash brace expansion):\n ipa selfservice-mod --attrs={street,postalCode,l,c,st,telephoneNumber} \"Users manage their own address\"\n\n Display our updated rule:\n ipa selfservice-show \"Users manage their own address\"\n\n Delete a rule:\n ipa selfservice-del \"Users manage their own address\"", + "version": "1", + "name": "selfservice", + "full_name": "selfservice/1" + }, + { + "doc": "SELinux User Mapping\n\nMap IPA users to SELinux users by host.\n\nHosts, hostgroups, users and groups can be either defined within\nthe rule or it may point to an existing HBAC rule. When using\n--hbacrule option to selinuxusermap-find an exact match is made on the\nHBAC rule name, so only one or zero entries will be returned.\n\nEXAMPLES:\n\n Create a rule, \"test1\", that sets all users to xguest_u:s0 on the host \"server\":\n ipa selinuxusermap-add --usercat=all --selinuxuser=xguest_u:s0 test1\n ipa selinuxusermap-add-host --hosts=server.example.com test1\n\n Create a rule, \"test2\", that sets all users to guest_u:s0 and uses an existing HBAC rule for users and hosts:\n ipa selinuxusermap-add --usercat=all --hbacrule=webserver --selinuxuser=guest_u:s0 test2\n\n Display the properties of a rule:\n ipa selinuxusermap-show test2\n\n Create a rule for a specific user. This sets the SELinux context for\n user john to unconfined_u:s0-s0:c0.c1023 on any machine:\n ipa selinuxusermap-add --hostcat=all --selinuxuser=unconfined_u:s0-s0:c0.c1023 john_unconfined\n ipa selinuxusermap-add-user --users=john john_unconfined\n\n Disable a rule:\n ipa selinuxusermap-disable test1\n\n Enable a rule:\n ipa selinuxusermap-enable test1\n\n Find a rule referencing a specific HBAC rule:\n ipa selinuxusermap-find --hbacrule=allow_some\n\n Remove a rule:\n ipa selinuxusermap-del john_unconfined\n\nSEEALSO:\n\n The list controlling the order in which the SELinux user map is applied\n and the default SELinux user are available in the config-show command.", + "version": "1", + "name": "selinuxusermap", + "full_name": "selinuxusermap/1" + }, + { + "doc": "IPA servers\n\nGet information about installed IPA servers.\n\nEXAMPLES:\n\n Find all servers:\n ipa server-find\n\n Show specific server:\n ipa server-show ipa.example.com", + "version": "1", + "name": "server", + "full_name": "server/1" + }, + { + "doc": "IPA server roles\n\nGet status of roles (DNS server, CA, etc.) provided by IPA masters.\n\nThe status of a role is either enabled, configured, or absent.\n\nEXAMPLES:\n\n Show status of 'DNS server' role on a server:\n ipa server-role-show ipa.example.com \"DNS server\"\n\n Show status of all roles containing 'AD' on a server:\n ipa server-role-find --server ipa.example.com --role=\"AD trust controller\"\n\n Show status of all configured roles on a server:\n ipa server-role-find ipa.example.com\n\n Show implicit IPA master role:\n ipa server-role-find --include-master", + "version": "1", + "name": "serverrole", + "full_name": "serverrole/1" + }, + { + "doc": "Services\n\nA IPA service represents a service that runs on a host. The IPA service\nrecord can store a Kerberos principal, an SSL certificate, or both.\n\nAn IPA service can be managed directly from a machine, provided that\nmachine has been given the correct permission. This is true even for\nmachines other than the one the service is associated with. For example,\nrequesting an SSL certificate using the host service principal credentials\nof the host. To manage a service using host credentials you need to\nkinit as the host:\n\n # kinit -kt /etc/krb5.keytab host/ipa.example.com@EXAMPLE.COM\n\nAdding an IPA service allows the associated service to request an SSL\ncertificate or keytab, but this is performed as a separate step; they\nare not produced as a result of adding the service.\n\nOnly the public aspect of a certificate is stored in a service record;\nthe private key is not stored.\n\nEXAMPLES:\n\n Add a new IPA service:\n ipa service-add HTTP/web.example.com\n\n Allow a host to manage an IPA service certificate:\n ipa service-add-host --hosts=web.example.com HTTP/web.example.com\n ipa role-add-member --hosts=web.example.com certadmin\n\n Override a default list of supported PAC types for the service:\n ipa service-mod HTTP/web.example.com --pac-type=MS-PAC\n\n A typical use case where overriding the PAC type is needed is NFS.\n Currently the related code in the Linux kernel can only handle Kerberos\n tickets up to a maximal size. Since the PAC data can become quite large it\n is recommended to set --pac-type=NONE for NFS services.\n\n Delete an IPA service:\n ipa service-del HTTP/web.example.com\n\n Find all IPA services associated with a host:\n ipa service-find web.example.com\n\n Find all HTTP services:\n ipa service-find HTTP\n\n Disable the service Kerberos key and SSL certificate:\n ipa service-disable HTTP/web.example.com\n\n Request a certificate for an IPA service:\n ipa cert-request --principal=HTTP/web.example.com example.csr\n\n Allow user to create a keytab:\n ipa service-allow-create-keytab HTTP/web.example.com --users=tuser1\n\n Generate and retrieve a keytab for an IPA service:\n ipa-getkeytab -s ipa.example.com -p HTTP/web.example.com -k /etc/httpd/httpd.keytab", + "version": "1", + "name": "service", + "full_name": "service/1" + }, + { + "doc": "Service Constrained Delegation\n\nManage rules to allow constrained delegation of credentials so\nthat a service can impersonate a user when communicating with another\nservice without requiring the user to actually forward their TGT.\nThis makes for a much better method of delegating credentials as it\nprevents exposure of the short term secret of the user.\n\nThe naming convention is to append the word \"target\" or \"targets\" to\na matching rule name. This is not mandatory but helps conceptually\nto associate rules and targets.\n\nA rule consists of two things:\n - A list of targets the rule applies to\n - A list of memberPrincipals that are allowed to delegate for\n those targets\n\nA target consists of a list of principals that can be delegated.\n\nIn English, a rule says that this principal can delegate as this\nlist of principals, as defined by these targets.\n\nEXAMPLES:\n\n Add a new constrained delegation rule:\n ipa servicedelegationrule-add ftp-delegation\n\n Add a new constrained delegation target:\n ipa servicedelegationtarget-add ftp-delegation-target\n\n Add a principal to the rule:\n ipa servicedelegationrule-add-member --principals=ftp/ipa.example.com ftp-delegation\n\n Add our target to the rule:\n ipa servicedelegationrule-add-target --servicedelegationtargets=ftp-delegation-target ftp-delegation\n\n Add a principal to the target:\n ipa servicedelegationtarget-add-member --principals=ldap/ipa.example.com ftp-delegation-target\n\n Display information about a named delegation rule and target:\n ipa servicedelegationrule_show ftp-delegation\n ipa servicedelegationtarget_show ftp-delegation-target\n\n Remove a constrained delegation:\n ipa servicedelegationrule-del ftp-delegation-target\n ipa servicedelegationtarget-del ftp-delegation\n\nIn this example the ftp service can get a TGT for the ldap service on\nthe bound user's behalf.\n\nIt is strongly discouraged to modify the delegations that ship with\nIPA, ipa-http-delegation and its targets ipa-cifs-delegation-targets and\nipa-ldap-delegation-targets. Incorrect changes can remove the ability\nto delegate, causing the framework to stop functioning.", + "version": "1", + "name": "servicedelegation", + "full_name": "servicedelegation/1" + }, + { + "version": "1", + "name": "session", + "full_name": "session/1" + }, + { + "doc": "Stageusers\n\nManage stage user entries.\n\nStage user entries are directly under the container: \"cn=stage users,\ncn=accounts, cn=provisioning, SUFFIX\".\nUsers can not authenticate with those entries (even if the entries\ncontain credentials). Those entries are only candidate to become Active entries.\n\nActive user entries are Posix users directly under the container: \"cn=accounts, SUFFIX\".\nUsers can authenticate with Active entries, at the condition they have\ncredentials.\n\nDeleted user entries are Posix users directly under the container: \"cn=deleted users,\ncn=accounts, cn=provisioning, SUFFIX\".\nUsers can not authenticate with those entries, even if the entries contain credentials.\n\nThe stage user container contains entries:\n - created by 'stageuser-add' commands that are Posix users,\n - created by external provisioning system.\n\nA valid stage user entry MUST have:\n - entry RDN is 'uid',\n - ipaUniqueID is 'autogenerate'.\n\nIPA supports a wide range of username formats, but you need to be aware of any\nrestrictions that may apply to your particular environment. For example,\nusernames that start with a digit or usernames that exceed a certain length\nmay cause problems for some UNIX systems.\nUse 'ipa config-mod' to change the username format allowed by IPA tools.\n\n\nEXAMPLES:\n\n Add a new stageuser:\n ipa stageuser-add --first=Tim --last=User --password tuser1\n\n Add a stageuser from the deleted users container:\n ipa stageuser-add --first=Tim --last=User --from-delete tuser1", + "version": "1", + "name": "stageuser", + "full_name": "stageuser/1" + }, + { + "doc": "Sudo Commands\n\nCommands used as building blocks for sudo\n\nEXAMPLES:\n\n Create a new command\n ipa sudocmd-add --desc='For reading log files' /usr/bin/less\n\n Remove a command\n ipa sudocmd-del /usr/bin/less", + "version": "1", + "name": "sudocmd", + "full_name": "sudocmd/1", + "topic_topic": "sudo/1" + }, + { + "doc": "commands for controlling sudo configuration", + "version": "1", + "name": "sudo", + "full_name": "sudo/1" + }, + { + "doc": "Groups of Sudo Commands\n\nManage groups of Sudo Commands.\n\nEXAMPLES:\n\n Add a new Sudo Command Group:\n ipa sudocmdgroup-add --desc='administrators commands' admincmds\n\n Remove a Sudo Command Group:\n ipa sudocmdgroup-del admincmds\n\n Manage Sudo Command Group membership, commands:\n ipa sudocmdgroup-add-member --sudocmds=/usr/bin/less --sudocmds=/usr/bin/vim admincmds\n\n Manage Sudo Command Group membership, commands:\n ipa sudocmdgroup-remove-member --sudocmds=/usr/bin/less admincmds\n\n Show a Sudo Command Group:\n ipa sudocmdgroup-show admincmds", + "version": "1", + "name": "sudocmdgroup", + "full_name": "sudocmdgroup/1", + "topic_topic": "sudo/1" + }, + { + "doc": "Sudo Rules\n\nSudo (su \"do\") allows a system administrator to delegate authority to\ngive certain users (or groups of users) the ability to run some (or all)\ncommands as root or another user while providing an audit trail of the\ncommands and their arguments.\n\nIPA provides a means to configure the various aspects of Sudo:\n Users: The user(s)/group(s) allowed to invoke Sudo.\n Hosts: The host(s)/hostgroup(s) which the user is allowed to to invoke Sudo.\n Allow Command: The specific command(s) permitted to be run via Sudo.\n Deny Command: The specific command(s) prohibited to be run via Sudo.\n RunAsUser: The user(s) or group(s) of users whose rights Sudo will be invoked with.\n RunAsGroup: The group(s) whose gid rights Sudo will be invoked with.\n Options: The various Sudoers Options that can modify Sudo's behavior.\n\nAn order can be added to a sudorule to control the order in which they\nare evaluated (if the client supports it). This order is an integer and\nmust be unique.\n\nIPA provides a designated binddn to use with Sudo located at:\nuid=sudo,cn=sysaccounts,cn=etc,dc=example,dc=com\n\nTo enable the binddn run the following command to set the password:\nLDAPTLS_CACERT=/etc/ipa/ca.crt /usr/bin/ldappasswd -S -W -h ipa.example.com -ZZ -D \"cn=Directory Manager\" uid=sudo,cn=sysaccounts,cn=etc,dc=example,dc=com\n\nEXAMPLES:\n\n Create a new rule:\n ipa sudorule-add readfiles\n\n Add sudo command object and add it as allowed command in the rule:\n ipa sudocmd-add /usr/bin/less\n ipa sudorule-add-allow-command readfiles --sudocmds /usr/bin/less\n\n Add a host to the rule:\n ipa sudorule-add-host readfiles --hosts server.example.com\n\n Add a user to the rule:\n ipa sudorule-add-user readfiles --users jsmith\n\n Add a special Sudo rule for default Sudo server configuration:\n ipa sudorule-add defaults\n\n Set a default Sudo option:\n ipa sudorule-add-option defaults --sudooption '!authenticate'\n\n Set SELinux type and role transitions on a rule:\n ipa sudorule-add-option sysadmin_sudo --sudooption type=unconfined_t\n ipa sudorule-add-option sysadmin_sudo --sudooption role=unconfined_r", + "version": "1", + "name": "sudorule", + "full_name": "sudorule/1", + "topic_topic": "sudo/1" + }, + { + "doc": "Topology\n\nManagement of a replication topology at domain level 1.\n\nIPA server's data is stored in LDAP server in two suffixes:\n* domain suffix, e.g., 'dc=example,dc=com', contains all domain related data\n* ca suffix, 'o=ipaca', is present only on server with CA installed. It\n contains data for Certificate Server component\n\nData stored on IPA servers is replicated to other IPA servers. The way it is\nreplicated is defined by replication agreements. Replication agreements needs\nto be set for both suffixes separately. On domain level 0 they are managed\nusing ipa-replica-manage and ipa-csreplica-manage tools. With domain level 1\nthey are managed centrally using `ipa topology*` commands.\n\nAgreements are represented by topology segments. By default topology segment\nrepresents 2 replication agreements - one for each direction, e.g., A to B and\nB to A. Creation of unidirectional segments is not allowed.\n\nTo verify that no server is disconnected in the topology of the given suffix,\nuse:\n ipa topologysuffix-verify $suffix\n\n\nExamples:\n Find all IPA servers:\n ipa server-find\n\n Find all suffixes:\n ipa topologysuffix-find\n\n Add topology segment to 'domain' suffix:\n ipa topologysegment-add domain --left IPA_SERVER_A --right IPA_SERVER_B\n\n Add topology segment to 'ca' suffix:\n ipa topologysegment-add ca --left IPA_SERVER_A --right IPA_SERVER_B\n\n List all topology segments in 'domain' suffix:\n ipa topologysegment-find domain\n\n List all topology segments in 'ca' suffix:\n ipa topologysegment-find ca\n\n Delete topology segment in 'domain' suffix:\n ipa topologysegment-del domain segment_name\n\n Delete topology segment in 'ca' suffix:\n ipa topologysegment-del ca segment_name\n\n Verify topology of 'domain' suffix:\n ipa topologysuffix-verify domain\n\n Verify topology of 'ca' suffix:\n ipa topologysuffix-verify ca", + "version": "1", + "name": "topology", + "full_name": "topology/1" + }, + { + "doc": "Users\n\nManage user entries. All users are POSIX users.\n\nIPA supports a wide range of username formats, but you need to be aware of any\nrestrictions that may apply to your particular environment. For example,\nusernames that start with a digit or usernames that exceed a certain length\nmay cause problems for some UNIX systems.\nUse 'ipa config-mod' to change the username format allowed by IPA tools.\n\nDisabling a user account prevents that user from obtaining new Kerberos\ncredentials. It does not invalidate any credentials that have already\nbeen issued.\n\nPassword management is not a part of this module. For more information\nabout this topic please see: ipa help passwd\n\nAccount lockout on password failure happens per IPA master. The user-status\ncommand can be used to identify which master the user is locked out on.\nIt is on that master the administrator must unlock the user.\n\nEXAMPLES:\n\n Add a new user:\n ipa user-add --first=Tim --last=User --password tuser1\n\n Find all users whose entries include the string \"Tim\":\n ipa user-find Tim\n\n Find all users with \"Tim\" as the first name:\n ipa user-find --first=Tim\n\n Disable a user account:\n ipa user-disable tuser1\n\n Enable a user account:\n ipa user-enable tuser1\n\n Delete a user:\n ipa user-del tuser1", + "version": "1", + "name": "user", + "full_name": "user/1" + }, + { + "doc": "Return information about currently authenticated identity\n\nWho am I command returns information on how to get\nmore details about the identity authenticated for this\nrequest. The information includes:\n\n * type of object\n * command to retrieve details of the object\n * arguments and options to pass to the command\n\nThe information is returned as a dictionary. Examples below use\n'key: value' output for illustrative purposes.\n\nEXAMPLES:\n\n Look up as IPA user:\n kinit admin\n ipa console\n >> api.Command.whoami()\n ------------------------------------------\n object: user\n command: user_show/1\n arguments: admin\n ------------------------------------------\n\n Look up as a user from a trusted domain:\n kinit user@AD.DOMAIN\n ipa console\n >> api.Command.whoami()\n ------------------------------------------\n object: idoverrideuser\n command: idoverrideuser_show/1\n arguments: ('default trust view', 'user@ad.domain')\n ------------------------------------------\n\n Look up as a host:\n kinit -k\n ipa console\n >> api.Command.whoami()\n ------------------------------------------\n object: host\n command: host_show/1\n arguments: ipa.example.com\n ------------------------------------------\n\n Look up as a Kerberos service:\n kinit -k -t /path/to/keytab HTTP/ipa.example.com\n ipa console\n >> api.Command.whoami()\n ------------------------------------------\n object: service\n command: service_show/1\n arguments: HTTP/ipa.example.com\n ------------------------------------------", + "version": "1", + "name": "whoami", + "full_name": "whoami/1" + } + ], + "fingerprint": "79e69edd", + "classes": [ + { + "version": "1", "params": [ { - "cli_name": "sudorule_name", - "label": "Rule name", - "name": "cn", - "type": "str" + "type": "str", + "name": "aciname", + "label": "ACI name" }, { - "cli_name": "desc", - "label": "Description", - "name": "description", + "doc": "Permission ACI grants access to", "required": false, - "type": "str" + "type": "str", + "name": "permission", + "label": "Permission" }, { - "exclude": ["cli", "webui"], - "label": "Enabled", - "name": "ipaenabledflag", + "doc": "User group ACI grants access to", "required": false, - "type": "bool" + "type": "str", + "name": "group", + "label": "User group" }, { - "cli_metavar": "['all']", - "cli_name": "usercat", - "doc": "User category the rule applies to", - "label": "User category", - "name": "usercategory", + "type": "str", + "doc": "Permissions to grant(read, write, add, delete, all)", + "multivalue": true, + "name": "permissions", + "label": "Permissions" + }, + { + "name": "attrs", + "doc": "Attributes", + "required": false, + "label": "Attributes to which the permission applies", + "multivalue": true, + "type": "str" + }, + { + "doc": "type of IPA object (user, group, host, hostgroup, service, netgroup)", "required": false, - "type": "str" + "type": "str", + "name": "type", + "label": "Type" }, { - "cli_metavar": "['all']", - "cli_name": "hostcat", - "doc": "Host category the rule applies to", - "label": "Host category", - "name": "hostcategory", + "doc": "Member of a group", "required": false, - "type": "str" + "type": "str", + "name": "memberof", + "label": "Member of" }, { - "cli_metavar": "['all']", - "cli_name": "cmdcat", - "doc": "Command category the rule applies to", - "label": "Command category", - "name": "cmdcategory", + "doc": "Legal LDAP filter (e.g. ou=Engineering)", "required": false, - "type": "str" + "type": "str", + "name": "filter", + "label": "Filter" }, { - "cli_metavar": "['all']", - "cli_name": "runasusercat", - "doc": "RunAs User category the rule applies to", - "label": "RunAs User category", - "name": "ipasudorunasusercategory", + "doc": "Subtree to apply ACI to", "required": false, - "type": "str" + "type": "str", + "name": "subtree", + "label": "Subtree" }, { - "cli_metavar": "['all']", - "cli_name": "runasgroupcat", - "doc": "RunAs Group category the rule applies to", - "label": "RunAs Group category", - "name": "ipasudorunasgroupcategory", + "doc": "Group to apply ACI to", "required": false, - "type": "str" + "type": "str", + "name": "targetgroup", + "label": "Target group" }, { - "alwaysask": true, - "cli_name": "order", - "default": ["0"], - "doc": "integer to order the Sudo rules", - "label": "Sudo order", - "name": "sudoorder", + "doc": "Apply ACI to your own entry (self)", "required": false, - "type": "int" + "type": "bool", + "name": "selfaci", + "label": "Target your own entry (self)" }, { - "cli_name": "externaluser", - "doc": "External User the rule applies to (sudorule-find only)", - "label": "External User", - "name": "externaluser", + "doc": "Prefix used to distinguish ACI types (permission, delegation, selfservice, none)", + "type": "str", + "name": "aciprefix", + "label": "ACI prefix" + }, + { + "type": "str", + "name": "aci", + "label": "ACI" + } + ], + "name": "aci", + "full_name": "aci/1" + }, + { + "version": "1", + "params": [ + { + "doc": "Automember Rule", + "type": "str", + "name": "cn", + "label": "Automember Rule" + }, + { + "doc": "A description of this auto member rule", "required": false, - "type": "str" + "type": "str", + "name": "description", + "label": "Description" }, { - "exclude": ["cli", "webui"], - "label": "External host", - "multivalue": true, - "name": "externalhost", + "doc": "Default group for entries to land", "required": false, - "type": "str" + "type": "str", + "name": "automemberdefaultgroup", + "label": "Default (fallback) Group" }, { - "cli_name": "runasexternaluser", - "doc": - "External User the commands can run as (sudorule-find only)", - "label": "RunAs External User", - "name": "ipasudorunasextuser", + "name": "automemberinclusiveregex", + "doc": "Inclusive Regex", "required": false, + "label": "Inclusive Regex", + "multivalue": true, "type": "str" }, { - "cli_name": "runasexternalgroup", - "doc": - "External Group the commands can run as (sudorule-find only)", - "label": "RunAs External Group", - "name": "ipasudorunasextgroup", + "name": "automemberexclusiveregex", + "doc": "Exclusive Regex", "required": false, + "label": "Exclusive Regex", + "multivalue": true, "type": "str" + } + ], + "name": "automember", + "full_name": "automember/1" + }, + { + "version": "1", + "params": [ + { + "doc": "A description of this auto member rule", + "required": false, + "type": "str", + "name": "description", + "label": "Description" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", + "doc": "Default group for entries to land", "required": false, - "type": "str" + "type": "str", + "name": "automemberdefaultgroup", + "label": "Default (fallback) Group" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", + "name": "automemberinclusiveregex", + "doc": "Inclusive Regex", "required": false, + "label": "Inclusive Regex", + "multivalue": true, "type": "str" }, { - "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, - "name": "delattr", + "name": "automemberexclusiveregex", + "doc": "Exclusive Regex", "required": false, + "label": "Exclusive Regex", + "multivalue": true, "type": "str" - }, + } + ], + "name": "automember_default_group", + "full_name": "automember_default_group/1" + }, + { + "version": "1", + "params": [ { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" - }, + "doc": "DN of the started task", + "type": "DN", + "name": "dn", + "label": "Task DN" + } + ], + "name": "automember_task", + "full_name": "automember_task/1" + }, + { + "version": "1", + "params": [ { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "doc": "Automount key name.", + "type": "str", + "name": "automountkey", + "label": "Key" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "type": "str", + "name": "automountinformation", + "label": "Mount information" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "exclude": [ + "webui", + "cli" + ], + "required": false, + "type": "str", + "name": "description", + "label": "description" } ], - "topic_topic": "sudorule/1", - "version": "1" + "name": "automountkey", + "full_name": "automountkey/1" }, { - "attr_name": "remove_allow_command", - "doc": - "Remove commands and sudo command groups affected by Sudo Rule.", - "full_name": "sudorule_remove_allow_command/1", - "name": "sudorule_remove_allow_command", - "obj_class": "sudorule/1", - "output": [ + "version": "1", + "params": [ { - "name": "result", - "type": "dict" - }, + "doc": "Automount location name.", + "type": "str", + "name": "cn", + "label": "Location" + } + ], + "name": "automountlocation", + "full_name": "automountlocation/1" + }, + { + "version": "1", + "params": [ { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" + "doc": "Automount map name.", + "type": "str", + "name": "automountmapname", + "label": "Map" }, { - "doc": "Number of members removed", - "name": "completed", - "type": "int" + "required": false, + "type": "str", + "name": "description", + "label": "Description" } ], + "name": "automountmap", + "full_name": "automountmap/1" + }, + { + "version": "1", "params": [ { - "cli_name": "sudorule_name", - "label": "Rule name", + "doc": "Name for referencing the CA", + "type": "str", "name": "cn", - "type": "str" + "label": "Name" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "doc": "Description of the purpose of the CA", + "required": false, + "type": "str", + "name": "description", + "label": "Description" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "doc": "Dogtag Authority ID", + "type": "str", + "name": "ipacaid", + "label": "Authority ID" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "doc": "Subject Distinguished Name", + "type": "DN", + "name": "ipacasubjectdn", + "label": "Subject DN" }, { - "alwaysask": true, - "cli_name": "sudocmds", - "doc": "sudo commands to remove", - "label": "member sudo command", - "multivalue": true, - "name": "sudocmd", - "required": false, - "type": "str" + "doc": "Issuer Distinguished Name", + "type": "DN", + "name": "ipacaissuerdn", + "label": "Issuer DN" }, { - "alwaysask": true, - "cli_name": "sudocmdgroups", - "doc": "sudo command groups to remove", - "label": "member sudo command group", - "multivalue": true, - "name": "sudocmdgroup", + "doc": "Base-64 encoded certificate.", + "type": "bytes", + "name": "certificate", + "label": "Certificate" + }, + { + "name": "certificate_chain", + "doc": "X.509 certificate chain", "required": false, - "type": "str" + "label": "Certificate chain", + "multivalue": true, + "type": "bytes" } ], - "topic_topic": "sudorule/1", - "version": "1" + "name": "ca", + "full_name": "ca/1" }, { - "attr_name": "remove_deny_command", - "doc": - "Remove commands and sudo command groups affected by Sudo Rule.", - "full_name": "sudorule_remove_deny_command/1", - "name": "sudorule_remove_deny_command", - "obj_class": "sudorule/1", - "output": [ + "version": "1", + "params": [ { - "name": "result", - "type": "dict" + "type": "str", + "name": "cn", + "label": "ACL name" }, { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" + "required": false, + "type": "str", + "name": "description", + "label": "Description" }, { - "doc": "Number of members removed", - "name": "completed", - "type": "int" - } - ], - "params": [ + "required": false, + "type": "bool", + "name": "ipaenabledflag", + "label": "Enabled" + }, { - "cli_name": "sudorule_name", - "label": "Rule name", - "name": "cn", - "type": "str" + "doc": "CA category the ACL applies to", + "required": false, + "type": "str", + "name": "ipacacategory", + "label": "CA category" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "doc": "Profile category the ACL applies to", + "required": false, + "type": "str", + "name": "ipacertprofilecategory", + "label": "Profile category" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "doc": "User category the ACL applies to", + "required": false, + "type": "str", + "name": "usercategory", + "label": "User category" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "doc": "Host category the ACL applies to", + "required": false, + "type": "str", + "name": "hostcategory", + "label": "Host category" }, { - "alwaysask": true, - "cli_name": "sudocmds", - "doc": "sudo commands to remove", - "label": "member sudo command", - "multivalue": true, - "name": "sudocmd", + "doc": "Service category the ACL applies to", "required": false, - "type": "str" + "type": "str", + "name": "servicecategory", + "label": "Service category" }, { - "alwaysask": true, - "cli_name": "sudocmdgroups", - "doc": "sudo command groups to remove", - "label": "member sudo command group", - "multivalue": true, - "name": "sudocmdgroup", "required": false, - "type": "str" - } - ], - "topic_topic": "sudorule/1", - "version": "1" - }, - { - "attr_name": "remove_host", - "doc": "Remove hosts and hostgroups affected by Sudo Rule.", - "full_name": "sudorule_remove_host/1", - "name": "sudorule_remove_host", - "obj_class": "sudorule/1", - "output": [ + "type": "str", + "name": "ipamemberca_ca", + "label": "CAs" + }, { - "name": "result", - "type": "dict" + "required": false, + "type": "str", + "name": "ipamembercertprofile_certprofile", + "label": "Profiles" }, { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" + "required": false, + "type": "str", + "name": "memberuser_user", + "label": "Users" }, { - "doc": "Number of members removed", - "name": "completed", - "type": "int" + "required": false, + "type": "str", + "name": "memberuser_group", + "label": "User Groups" + }, + { + "required": false, + "type": "str", + "name": "memberhost_host", + "label": "Hosts" + }, + { + "required": false, + "type": "str", + "name": "memberhost_hostgroup", + "label": "Host Groups" + }, + { + "required": false, + "type": "str", + "name": "memberservice_service", + "label": "Services" } ], + "name": "caacl", + "full_name": "caacl/1" + }, + { + "version": "1", "params": [ { - "cli_name": "sudorule_name", - "label": "Rule name", - "name": "cn", - "type": "str" + "doc": "Name of issuing CA", + "required": false, + "type": "str", + "name": "cacn", + "label": "Issuing CA" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "doc": "Base-64 encoded certificate.", + "type": "Certificate", + "name": "certificate", + "label": "Certificate" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "name": "certificate_chain", + "doc": "X.509 certificate chain", + "required": false, + "label": "Certificate chain", + "multivalue": true, + "type": "bytes" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "type": "DN", + "name": "subject", + "label": "Subject" }, { - "alwaysask": true, - "cli_name": "hosts", - "doc": "hosts to remove", - "label": "member host", + "type": "str", + "required": false, "multivalue": true, - "name": "host", + "name": "san_rfc822name", + "label": "Subject email address" + }, + { + "type": "DNSName", "required": false, - "type": "str" + "multivalue": true, + "name": "san_dnsname", + "label": "Subject DNS name" }, { - "alwaysask": true, - "cli_name": "hostgroups", - "doc": "host groups to remove", - "label": "member host group", + "type": "str", + "required": false, "multivalue": true, - "name": "hostgroup", + "name": "san_x400address", + "label": "Subject X.400 address" + }, + { + "type": "DN", "required": false, - "type": "str" + "multivalue": true, + "name": "san_directoryname", + "label": "Subject directory name" }, { - "label": "host masks of allowed hosts", + "type": "str", + "required": false, "multivalue": true, - "name": "hostmask", + "name": "san_edipartyname", + "label": "Subject EDI Party name" + }, + { + "type": "str", "required": false, - "type": "str" - } - ], - "topic_topic": "sudorule/1", - "version": "1" - }, - { - "attr_name": "remove_option", - "doc": "Remove an option from Sudo Rule.", - "full_name": "sudorule_remove_option/1", - "name": "sudorule_remove_option", - "obj_class": "sudorule/1", - "output": [ + "multivalue": true, + "name": "san_uri", + "label": "Subject URI" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "type": "str", "required": false, - "type": "str" + "multivalue": true, + "name": "san_ipaddress", + "label": "Subject IP Address" }, { - "name": "result", - "type": "dict" + "type": "str", + "required": false, + "multivalue": true, + "name": "san_oid", + "label": "Subject OID" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ + "type": "Principal", + "required": false, + "multivalue": true, + "name": "san_other_upn", + "label": "Subject UPN" + }, { - "cli_name": "sudorule_name", - "label": "Rule name", - "name": "cn", - "type": "str" + "type": "Principal", + "required": false, + "multivalue": true, + "name": "san_other_kpn", + "label": "Subject Kerberos principal name" }, { - "cli_name": "sudooption", - "label": "Sudo Option", - "name": "ipasudoopt", - "positional": false, - "type": "str" + "type": "str", + "required": false, + "multivalue": true, + "name": "san_other", + "label": "Subject Other Name" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "doc": "Issuer DN", + "type": "DN", + "name": "issuer", + "label": "Issuer" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "type": "datetime", + "name": "valid_not_before", + "label": "Not Before" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "sudorule/1", - "version": "1" - }, - { - "attr_name": "remove_runasgroup", - "doc": "Remove group for Sudo to execute as.", - "full_name": "sudorule_remove_runasgroup/1", - "name": "sudorule_remove_runasgroup", - "obj_class": "sudorule/1", - "output": [ + "type": "datetime", + "name": "valid_not_after", + "label": "Not After" + }, { - "name": "result", - "type": "dict" + "type": "str", + "name": "sha1_fingerprint", + "label": "Fingerprint (SHA1)" }, { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" + "type": "str", + "name": "sha256_fingerprint", + "label": "Fingerprint (SHA256)" }, { - "doc": "Number of members removed", - "name": "completed", - "type": "int" - } - ], - "params": [ + "doc": "Serial number in decimal or if prefixed with 0x in hexadecimal", + "type": "int", + "name": "serial_number", + "label": "Serial number" + }, { - "cli_name": "sudorule_name", - "label": "Rule name", - "name": "cn", - "type": "str" + "type": "str", + "name": "serial_number_hex", + "label": "Serial number (hex)" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "type": "str", + "name": "status", + "label": "Status" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "type": "bool", + "name": "revoked", + "label": "Revoked" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "doc": "Reason for revoking the certificate (0-10). Type \"ipa help cert\" for revocation reason details. ", + "type": "int", + "name": "revocation_reason", + "label": "Revocation reason" }, { - "alwaysask": true, - "cli_name": "groups", - "doc": "groups to remove", - "label": "member group", + "type": "str", + "required": false, "multivalue": true, - "name": "group", + "name": "owner_user", + "label": "Owner user" + }, + { + "type": "str", "required": false, - "type": "str" + "multivalue": true, + "name": "owner_host", + "label": "Owner host" + }, + { + "name": "owner_service", + "doc": "Service principal alias", + "required": false, + "label": "Owner service", + "multivalue": true, + "type": "Principal" } ], - "topic_topic": "sudorule/1", - "version": "1" + "name": "cert", + "full_name": "cert/1" }, { - "attr_name": "remove_runasuser", - "doc": "Remove users and groups for Sudo to execute as.", - "full_name": "sudorule_remove_runasuser/1", - "name": "sudorule_remove_runasuser", - "obj_class": "sudorule/1", - "output": [ + "version": "1", + "params": [ { - "name": "result", - "type": "dict" + "type": "DNSName", + "name": "domain", + "label": "Domain" }, { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" - }, + "type": "str", + "required": false, + "multivalue": true, + "name": "uid", + "label": "User logins" + } + ], + "name": "certmap", + "full_name": "certmap/1" + }, + { + "version": "1", + "params": [ { - "doc": "Number of members removed", - "name": "completed", - "type": "int" + "doc": "Prompt for the username when multiple identities are mapped to a certificate", + "type": "bool", + "name": "ipacertmappromptusername", + "label": "Prompt for the username" } ], + "name": "certmapconfig", + "full_name": "certmapconfig/1" + }, + { + "version": "1", "params": [ { - "cli_name": "sudorule_name", - "label": "Rule name", + "doc": "Certificate Identity Mapping Rule name", + "type": "str", "name": "cn", - "type": "str" + "label": "Rule name" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "doc": "Certificate Identity Mapping Rule description", + "required": false, + "type": "str", + "name": "description", + "label": "Description" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "doc": "Rule used to map the certificate with a user entry", + "required": false, + "type": "str", + "name": "ipacertmapmaprule", + "label": "Mapping rule" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "doc": "Rule used to check if a certificate can be used for authentication", + "required": false, + "type": "str", + "name": "ipacertmapmatchrule", + "label": "Matching rule" }, { - "alwaysask": true, - "cli_name": "users", - "doc": "users to remove", - "label": "member user", + "name": "associateddomain", + "doc": "Domain where the user entry will be searched", + "required": false, + "label": "Domain name", "multivalue": true, - "name": "user", + "type": "DNSName" + }, + { + "doc": "Priority of the rule (higher number means lower priority", "required": false, - "type": "str" + "type": "int", + "name": "ipacertmappriority", + "label": "Priority" }, { - "alwaysask": true, - "cli_name": "groups", - "doc": "groups to remove", - "label": "member group", - "multivalue": true, - "name": "group", "required": false, - "type": "str" + "type": "bool", + "name": "ipaenabledflag", + "label": "Enabled" } ], - "topic_topic": "sudorule/1", - "version": "1" + "name": "certmaprule", + "full_name": "certmaprule/1" }, { - "attr_name": "remove_user", - "doc": "Remove users and groups affected by Sudo Rule.", - "full_name": "sudorule_remove_user/1", - "name": "sudorule_remove_user", - "obj_class": "sudorule/1", - "output": [ + "version": "1", + "params": [ { - "name": "result", - "type": "dict" + "doc": "Profile ID for referring to this profile", + "type": "str", + "name": "cn", + "label": "Profile ID" }, { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" + "type": "str", + "name": "config", + "label": "Profile configuration" }, { - "doc": "Number of members removed", - "name": "completed", - "type": "int" + "doc": "Brief description of this profile", + "type": "str", + "name": "description", + "label": "Profile description" + }, + { + "doc": "Whether to store certs issued using this profile", + "type": "bool", + "name": "ipacertprofilestoreissued", + "label": "Store issued certificates" } ], + "name": "certprofile", + "full_name": "certprofile/1" + }, + { + "version": "1", "params": [ { - "cli_name": "sudorule_name", - "label": "Rule name", - "name": "cn", - "type": "str" + "doc": "Name of issuing CA", + "required": false, + "type": "str", + "name": "cacn", + "label": "Issuing CA" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "doc": "Base-64 encoded certificate.", + "type": "Certificate", + "name": "certificate", + "label": "Certificate" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "name": "certificate_chain", + "doc": "X.509 certificate chain", + "required": false, + "label": "Certificate chain", + "multivalue": true, + "type": "bytes" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "type": "DN", + "name": "subject", + "label": "Subject" }, { - "alwaysask": true, - "cli_name": "users", - "doc": "users to remove", - "label": "member user", + "type": "str", + "required": false, "multivalue": true, - "name": "user", + "name": "san_rfc822name", + "label": "Subject email address" + }, + { + "type": "DNSName", "required": false, - "type": "str" + "multivalue": true, + "name": "san_dnsname", + "label": "Subject DNS name" }, { - "alwaysask": true, - "cli_name": "groups", - "doc": "groups to remove", - "label": "member group", + "type": "str", + "required": false, "multivalue": true, - "name": "group", + "name": "san_x400address", + "label": "Subject X.400 address" + }, + { + "type": "DN", "required": false, - "type": "str" - } - ], - "topic_topic": "sudorule/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display Sudo Rule.", - "full_name": "sudorule_show/1", - "name": "sudorule_show", - "obj_class": "sudorule/1", - "output": [ + "multivalue": true, + "name": "san_directoryname", + "label": "Subject directory name" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "type": "str", "required": false, - "type": "str" + "multivalue": true, + "name": "san_edipartyname", + "label": "Subject EDI Party name" }, { - "name": "result", - "type": "dict" + "type": "str", + "required": false, + "multivalue": true, + "name": "san_uri", + "label": "Subject URI" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ + "type": "str", + "required": false, + "multivalue": true, + "name": "san_ipaddress", + "label": "Subject IP Address" + }, { - "cli_name": "sudorule_name", - "label": "Rule name", - "name": "cn", - "type": "str" + "type": "str", + "required": false, + "multivalue": true, + "name": "san_oid", + "label": "Subject OID" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "type": "Principal", + "required": false, + "multivalue": true, + "name": "san_other_upn", + "label": "Subject UPN" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "type": "Principal", + "required": false, + "multivalue": true, + "name": "san_other_kpn", + "label": "Subject Kerberos principal name" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "type": "str", + "required": false, + "multivalue": true, + "name": "san_other", + "label": "Subject Other Name" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "sudorule/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for help topics.", - "full_name": "topic_find/1", - "name": "topic_find", - "obj_class": "topic/1", - "output": [ + "doc": "Issuer DN", + "type": "DN", + "name": "issuer", + "label": "Issuer" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "datetime", + "name": "valid_not_before", + "label": "Not Before" }, { - "multivalue": true, - "name": "result", - "type": "dict" + "type": "datetime", + "name": "valid_not_after", + "label": "Not After" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "type": "str", + "name": "sha1_fingerprint", + "label": "Fingerprint (SHA1)" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" - } - ], - "params": [ + "type": "str", + "name": "sha256_fingerprint", + "label": "Fingerprint (SHA256)" + }, { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, - "required": false, - "type": "str" + "doc": "Serial number in decimal or if prefixed with 0x in hexadecimal", + "type": "int", + "name": "serial_number", + "label": "Serial number" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "type": "str", + "name": "serial_number_hex", + "label": "Serial number (hex)" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "type": "str", + "name": "request_type" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"name\")", - "label": "Primary key only", - "name": "pkey_only", + "doc": "Certificate Profile to use", "required": false, - "type": "bool" + "type": "str", + "name": "profile_id", + "label": "Profile ID" + }, + { + "type": "str", + "name": "cert_request_status", + "label": "Request status" + }, + { + "exclude": [ + "cli", + "webui" + ], + "type": "int", + "name": "request_id", + "label": "Request id" } ], - "topic_topic": "schema/1", - "version": "1" + "name": "certreq", + "full_name": "certreq/1" }, { - "attr_name": "show", - "doc": "Display information about a help topic.", - "full_name": "topic_show/1", - "name": "topic_show", - "obj_class": "topic/1", - "output": [ + "version": "1", + "params": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "str", + "name": "name", + "label": "Name" }, { - "name": "result", - "type": "dict" + "type": "str", + "name": "version", + "label": "Version" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ - { - "label": "Full name", + "type": "str", "name": "full_name", - "no_convert": true, - "type": "str" + "label": "Full name" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "doc", + "label": "Documentation" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "schema/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Add a new segment.", - "full_name": "topologysegment_add/1", - "name": "topologysegment_add", - "obj_class": "topologysegment/1", - "output": [ + "type": "str", + "required": false, + "multivalue": true, + "name": "exclude", + "label": "Exclude from" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "type": "str", "required": false, - "type": "str" + "multivalue": true, + "name": "include", + "label": "Include in" }, { - "name": "result", - "type": "dict" + "required": false, + "type": "str", + "name": "topic_topic", + "label": "Help topic" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "type": "str", + "required": false, + "multivalue": true, + "name": "params_param", + "label": "Parameters" } ], + "name": "class", + "full_name": "class/1" + }, + { + "version": "1", "params": [ { - "cli_name": "topologysuffix", - "label": "Suffix name", - "name": "topologysuffixcn", - "type": "str" + "type": "str", + "name": "name", + "label": "Name" }, { - "alwaysask": true, - "cli_name": "name", - "default_from_param": [ - "iparepltoposegmentleftnode", - "iparepltoposegmentrightnode" - ], - "doc": "Arbitrary string identifying the segment", - "label": "Segment name", - "name": "cn", - "no_convert": true, - "type": "str" + "type": "str", + "name": "version", + "label": "Version" }, { - "cli_name": "leftnode", - "doc": "Left replication node - an IPA server", - "label": "Left node", - "name": "iparepltoposegmentleftnode", - "no_convert": true, - "positional": false, - "type": "str" + "type": "str", + "name": "full_name", + "label": "Full name" }, { - "cli_name": "rightnode", - "doc": "Right replication node - an IPA server", - "label": "Right node", - "name": "iparepltoposegmentrightnode", - "no_convert": true, - "positional": false, - "type": "str" + "required": false, + "type": "str", + "name": "doc", + "label": "Documentation" }, { - "cli_metavar": "['both', 'left-right', 'right-left']", - "cli_name": "direction", - "default": ["both"], - "doc": - "Direction of replication between left and right replication node", - "exclude": ["cli", "webui"], - "label": "Connectivity", - "name": "iparepltoposegmentdirection", - "positional": false, - "type": "str" + "type": "str", + "required": false, + "multivalue": true, + "name": "exclude", + "label": "Exclude from" }, { - "cli_name": "stripattrs", - "doc": - "A space separated list of attributes which are removed from replication updates.", - "label": "Attributes to strip", - "name": "nsds5replicastripattrs", - "no_convert": true, + "type": "str", "required": false, - "type": "str" + "multivalue": true, + "name": "include", + "label": "Include in" }, { - "cli_name": "replattrs", - "doc": - "Attributes that are not replicated to a consumer server during a fractional update. E.g., `(objectclass=*) $ EXCLUDE accountlockout memberof", - "label": "Attributes to replicate", - "name": "nsds5replicatedattributelist", "required": false, - "type": "str" + "type": "str", + "name": "topic_topic", + "label": "Help topic" }, { - "cli_name": "replattrstotal", - "doc": - "Attributes that are not replicated to a consumer server during a total update. E.g. (objectclass=*) $ EXCLUDE accountlockout", - "label": "Attributes for total update", - "name": "nsds5replicatedattributelisttotal", + "type": "str", "required": false, - "type": "str" + "multivalue": true, + "name": "params_param", + "label": "Parameters" }, { - "cli_name": "timeout", - "doc": - "Number of seconds outbound LDAP operations waits for a response from the remote replica before timing out and failing", - "label": "Session timeout", - "name": "nsds5replicatimeout", "required": false, - "type": "int" + "type": "str", + "name": "obj_class", + "label": "Method of" }, { - "cli_metavar": "['on', 'off']", - "cli_name": "enabled", - "doc": - "Whether a replication agreement is active, meaning whether replication is occurring per that agreement", - "exclude": ["cli", "webui"], - "label": "Replication agreement enabled", - "name": "nsds5replicaenabled", "required": false, - "type": "str" + "type": "str", + "name": "attr_name", + "label": "Method name" + } + ], + "name": "command", + "full_name": "command/1" + }, + { + "version": "1", + "params": [ + { + "type": "int", + "name": "ipamaxusernamelength", + "label": "Maximum username length" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", + "doc": "Default location of home directories", + "type": "str", + "name": "ipahomesrootdir", + "label": "Home directory base" + }, + { + "doc": "Default shell for new users", + "type": "str", + "name": "ipadefaultloginshell", + "label": "Default shell" + }, + { + "doc": "Default group for new users", + "type": "str", + "name": "ipadefaultprimarygroup", + "label": "Default users group" + }, + { + "doc": "Default e-mail domain", "required": false, - "type": "str" + "type": "str", + "name": "ipadefaultemaildomain", + "label": "Default e-mail domain" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], + "doc": "Maximum amount of time (seconds) for a search (-1 or 0 is unlimited)", + "type": "int", + "name": "ipasearchtimelimit", + "label": "Search time limit" + }, + { + "doc": "Maximum number of records to search (-1 or 0 is unlimited)", + "type": "int", + "name": "ipasearchrecordslimit", + "label": "Search size limit" + }, + { + "doc": "A comma-separated list of fields to search in when searching for users", + "type": "str", + "name": "ipausersearchfields", + "label": "User search fields" + }, + { + "doc": "A comma-separated list of fields to search in when searching for groups", + "type": "str", + "name": "ipagroupsearchfields", + "label": "Group search fields" + }, + { + "doc": "Enable migration mode", + "type": "bool", + "name": "ipamigrationenabled", + "label": "Enable migration mode" + }, + { + "doc": "Base for certificate subjects (OU=Test,O=Example)", + "type": "DN", + "name": "ipacertificatesubjectbase", + "label": "Certificate Subject base" + }, + { + "type": "str", + "doc": "Default group objectclasses (comma-separated list)", "multivalue": true, - "name": "addattr", - "required": false, - "type": "str" + "name": "ipagroupobjectclasses", + "label": "Default group objectclasses" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "type": "str", + "doc": "Default user objectclasses (comma-separated list)", + "multivalue": true, + "name": "ipauserobjectclasses", + "label": "Default user objectclasses" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "topology/1", - "version": "1" - }, - { - "attr_name": "del", - "doc": "Delete a segment.", - "full_name": "topologysegment_del/1", - "name": "topologysegment_del", - "obj_class": "topologysegment/1", - "output": [ + "doc": "Number of days's notice of impending password expiration", + "type": "int", + "name": "ipapwdexpadvnotify", + "label": "Password Expiration Notification (days)" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "name": "ipaconfigstring", + "doc": "Extra hashes to generate in password plug-in", "required": false, + "label": "Password plugin features", + "multivalue": true, "type": "str" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "doc": "Order in increasing priority of SELinux users, delimited by $", + "type": "str", + "name": "ipaselinuxusermaporder", + "label": "SELinux user map order" }, { - "multivalue": true, - "name": "value", - "type": "str" - } - ], - "params": [ + "doc": "Default SELinux user when no match is found in SELinux map rule", + "required": false, + "type": "str", + "name": "ipaselinuxusermapdefault", + "label": "Default SELinux user" + }, { - "cli_name": "topologysuffix", - "label": "Suffix name", - "name": "topologysuffixcn", + "name": "ipakrbauthzdata", + "doc": "Default types of PAC supported for services", + "required": false, + "label": "Default PAC types", + "multivalue": true, "type": "str" }, { - "alwaysask": true, - "cli_name": "name", - "default_from_param": [ - "iparepltoposegmentleftnode", - "iparepltoposegmentrightnode" - ], - "doc": "Arbitrary string identifying the segment", - "label": "Segment name", + "name": "ipauserauthtype", + "doc": "Default types of supported user authentication", + "required": false, + "label": "Default user authentication types", "multivalue": true, - "name": "cn", - "no_convert": true, "type": "str" }, { - "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", - "name": "continue", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "topology/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for topology segments.", - "full_name": "topologysegment_find/1", - "name": "topologysegment_find", - "obj_class": "topologysegment/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", + "name": "ipa_master_server", + "doc": "List of all IPA masters", "required": false, + "label": "IPA masters", + "multivalue": true, "type": "str" }, { + "name": "ipa_master_hidden_server", + "doc": "List of all hidden IPA masters", + "required": false, + "label": "Hidden IPA masters", "multivalue": true, - "name": "result", - "type": "dict" + "type": "str" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "name": "pkinit_server_server", + "doc": "IPA master which can process PKINIT requests", + "required": false, + "label": "IPA master capable of PKINIT", + "multivalue": true, + "type": "str" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" - } - ], - "params": [ - { - "cli_name": "topologysuffix", - "label": "Suffix name", - "name": "topologysuffixcn", + "name": "ca_server_server", + "doc": "IPA servers configured as certificate authority", + "required": false, + "label": "IPA CA servers", + "multivalue": true, "type": "str" }, { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, + "name": "ntp_server_server", + "doc": "IPA servers with enabled NTP", "required": false, + "label": "IPA NTP servers", + "multivalue": true, "type": "str" }, { - "alwaysask": true, - "cli_name": "name", - "default_from_param": [ - "iparepltoposegmentleftnode", - "iparepltoposegmentrightnode" - ], - "doc": "Arbitrary string identifying the segment", - "label": "Segment name", - "name": "cn", - "no_convert": true, + "name": "ca_server_hidden_server", + "doc": "Hidden IPA servers configured as certificate authority", "required": false, + "label": "Hidden IPA CA servers", + "multivalue": true, "type": "str" }, { - "cli_name": "leftnode", - "doc": "Left replication node - an IPA server", - "label": "Left node", - "name": "iparepltoposegmentleftnode", - "no_convert": true, + "doc": "Renewal master for IPA certificate authority", "required": false, - "type": "str" + "type": "str", + "name": "ca_renewal_master_server", + "label": "IPA CA renewal master" }, { - "cli_name": "rightnode", - "doc": "Right replication node - an IPA server", - "label": "Right node", - "name": "iparepltoposegmentrightnode", - "no_convert": true, + "name": "kra_server_server", + "doc": "IPA servers configured as key recovery agent", "required": false, + "label": "IPA KRA servers", + "multivalue": true, "type": "str" }, { - "alwaysask": true, - "cli_metavar": "['both', 'left-right', 'right-left']", - "cli_name": "direction", - "default": ["both"], - "doc": - "Direction of replication between left and right replication node", - "exclude": ["cli", "webui"], - "label": "Connectivity", - "name": "iparepltoposegmentdirection", + "name": "kra_server_hidden_server", + "doc": "Hidden IPA servers configured as key recovery agent", "required": false, + "label": "Hidden IPA KRA servers", + "multivalue": true, "type": "str" }, { - "cli_name": "stripattrs", - "doc": - "A space separated list of attributes which are removed from replication updates.", - "label": "Attributes to strip", - "name": "nsds5replicastripattrs", - "no_convert": true, + "doc": "colon-separated list of domains used for short name qualification", "required": false, - "type": "str" + "type": "str", + "name": "ipadomainresolutionorder", + "label": "Domain resolution order" }, { - "cli_name": "replattrs", - "doc": - "Attributes that are not replicated to a consumer server during a fractional update. E.g., `(objectclass=*) $ EXCLUDE accountlockout memberof", - "label": "Attributes to replicate", - "name": "nsds5replicatedattributelist", + "name": "dns_server_server", + "doc": "IPA servers configured as domain name server", "required": false, + "label": "IPA DNS servers", + "multivalue": true, "type": "str" }, { - "cli_name": "replattrstotal", - "doc": - "Attributes that are not replicated to a consumer server during a total update. E.g. (objectclass=*) $ EXCLUDE accountlockout", - "label": "Attributes for total update", - "name": "nsds5replicatedattributelisttotal", + "name": "dns_server_hidden_server", + "doc": "Hidden IPA servers configured as domain name server", "required": false, + "label": "Hidden IPA DNS servers", + "multivalue": true, "type": "str" }, { - "cli_name": "timeout", - "doc": - "Number of seconds outbound LDAP operations waits for a response from the remote replica before timing out and failing", - "label": "Session timeout", - "name": "nsds5replicatimeout", + "doc": "DNSec key master", "required": false, - "type": "int" + "type": "str", + "name": "dnssec_key_master_server", + "label": "IPA DNSSec key master" + } + ], + "name": "config", + "full_name": "config/1" + }, + { + "version": "1", + "params": [ + { + "type": "str", + "name": "cn" }, { - "cli_metavar": "['on', 'off']", - "cli_name": "enabled", - "doc": - "Whether a replication agreement is active, meaning whether replication is occurring per that agreement", - "exclude": ["cli", "webui"], - "label": "Replication agreement enabled", - "name": "nsds5replicaenabled", + "type": "DN", + "name": "krbpwdpolicyreference" + }, + { + "type": "int", + "name": "cospriority" + } + ], + "name": "cosentry", + "full_name": "cosentry/1" + }, + { + "version": "1", + "params": [ + { + "doc": "Delegation name", + "type": "str", + "name": "aciname", + "label": "Delegation name" + }, + { + "name": "permissions", + "doc": "Permissions to grant (read, write). Default is write.", "required": false, + "label": "Permissions", + "multivalue": true, "type": "str" }, { - "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", - "required": false, - "type": "int" + "type": "str", + "doc": "Attributes to which the delegation applies", + "multivalue": true, + "name": "attrs", + "label": "Attributes" }, { - "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", - "required": false, - "type": "int" + "doc": "User group to apply delegation to", + "type": "str", + "name": "memberof", + "label": "Member user group" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "doc": "User group ACI grants access to", + "type": "str", + "name": "group", + "label": "User group" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "type": "str", + "name": "aci", + "label": "ACI" + } + ], + "name": "delegation", + "full_name": "delegation/1" + }, + { + "version": "1", + "params": [ + { + "type": "str", + "required": false, + "multivalue": true, + "name": "ipa_records", + "label": "IPA DNS records" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"name\")", - "label": "Primary key only", - "name": "pkey_only", + "type": "str", "required": false, - "type": "bool" + "multivalue": true, + "name": "location_records", + "label": "IPA location records" } ], - "topic_topic": "topology/1", - "version": "1" + "name": "dns_system_records", + "full_name": "dns_system_records/1" }, { - "attr_name": "mod", - "doc": "Modify a segment.", - "full_name": "topologysegment_mod/1", - "name": "topologysegment_mod", - "obj_class": "topologysegment/1", - "output": [ + "version": "1", + "params": [ + { + "type": "str", + "name": "data", + "label": "Record data" + } + ], + "name": "dnsa6record", + "full_name": "dnsa6record/1" + }, + { + "version": "1", + "params": [ + { + "type": "str", + "name": "ip_address", + "label": "IP Address" + } + ], + "name": "dnsaaaarecord", + "full_name": "dnsaaaarecord/1" + }, + { + "version": "1", + "params": [ { - "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "int", + "name": "subtype", + "label": "Subtype" }, { - "name": "result", - "type": "dict" - }, + "type": "DNSName", + "name": "hostname", + "label": "Hostname" + } + ], + "name": "dnsafsdbrecord", + "full_name": "dnsafsdbrecord/1" + }, + { + "version": "1", + "params": [], + "name": "dnsaplrecord", + "full_name": "dnsaplrecord/1" + }, + { + "version": "1", + "params": [ { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "type": "str", + "name": "ip_address", + "label": "IP Address" } ], + "name": "dnsarecord", + "full_name": "dnsarecord/1" + }, + { + "version": "1", "params": [ { - "cli_name": "topologysuffix", - "label": "Suffix name", - "name": "topologysuffixcn", - "type": "str" + "type": "int", + "name": "type", + "label": "Certificate Type" }, { - "alwaysask": true, - "cli_name": "name", - "default_from_param": [ - "iparepltoposegmentleftnode", - "iparepltoposegmentrightnode" - ], - "doc": "Arbitrary string identifying the segment", - "label": "Segment name", - "name": "cn", - "no_convert": true, - "type": "str" + "type": "int", + "name": "key_tag", + "label": "Key Tag" }, { - "cli_name": "stripattrs", - "doc": - "A space separated list of attributes which are removed from replication updates.", - "label": "Attributes to strip", - "name": "nsds5replicastripattrs", - "no_convert": true, - "required": false, - "type": "str" + "type": "int", + "name": "algorithm", + "label": "Algorithm" }, { - "cli_name": "replattrs", - "doc": - "Attributes that are not replicated to a consumer server during a fractional update. E.g., `(objectclass=*) $ EXCLUDE accountlockout memberof", - "label": "Attributes to replicate", - "name": "nsds5replicatedattributelist", + "type": "str", + "name": "certificate_or_crl", + "label": "Certificate/CRL" + } + ], + "name": "dnscertrecord", + "full_name": "dnscertrecord/1" + }, + { + "version": "1", + "params": [ + { + "doc": "A hostname which this alias hostname points to", + "type": "DNSName", + "name": "hostname", + "label": "Hostname" + } + ], + "name": "dnscnamerecord", + "full_name": "dnscnamerecord/1" + }, + { + "version": "1", + "params": [ + { + "name": "idnsforwarders", + "doc": "Global forwarders. A custom port can be specified for each forwarder using a standard format \"IP_ADDRESS port PORT\"", "required": false, + "label": "Global forwarders", + "multivalue": true, "type": "str" }, { - "cli_name": "replattrstotal", - "doc": - "Attributes that are not replicated to a consumer server during a total update. E.g. (objectclass=*) $ EXCLUDE accountlockout", - "label": "Attributes for total update", - "name": "nsds5replicatedattributelisttotal", + "doc": "Global forwarding policy. Set to \"none\" to disable any configured global forwarders.", "required": false, - "type": "str" + "type": "str", + "name": "idnsforwardpolicy", + "label": "Forward policy" }, { - "cli_name": "timeout", - "doc": - "Number of seconds outbound LDAP operations waits for a response from the remote replica before timing out and failing", - "label": "Session timeout", - "name": "nsds5replicatimeout", + "doc": "Allow synchronization of forward (A, AAAA) and reverse (PTR) records", "required": false, - "type": "int" + "type": "bool", + "name": "idnsallowsyncptr", + "label": "Allow PTR sync" }, { - "cli_metavar": "['on', 'off']", - "cli_name": "enabled", - "doc": - "Whether a replication agreement is active, meaning whether replication is occurring per that agreement", - "exclude": ["cli", "webui"], - "label": "Replication agreement enabled", - "name": "nsds5replicaenabled", + "doc": "An interval between regular polls of the name server for new DNS zones", "required": false, - "type": "str" + "type": "int", + "name": "idnszonerefresh", + "label": "Zone refresh interval" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", "required": false, - "type": "str" + "type": "int", + "name": "ipadnsversion", + "label": "IPA DNS version" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", + "name": "dns_server_server", + "doc": "List of IPA masters configured as DNS servers", "required": false, + "label": "IPA DNS servers", + "multivalue": true, "type": "str" }, { - "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, - "name": "delattr", + "doc": "IPA server configured as DNSSec key master", "required": false, - "type": "str" + "type": "str", + "name": "dnssec_key_master_server", + "label": "IPA DNSSec key master" + } + ], + "name": "dnsconfig", + "full_name": "dnsconfig/1" + }, + { + "version": "1", + "params": [], + "name": "dnsdhcidrecord", + "full_name": "dnsdhcidrecord/1" + }, + { + "version": "1", + "params": [ + { + "type": "int", + "name": "key_tag", + "label": "Key Tag" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "type": "int", + "name": "algorithm", + "label": "Algorithm" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "type": "int", + "name": "digest_type", + "label": "Digest Type" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "type": "str", + "name": "digest", + "label": "Digest" } ], - "topic_topic": "topology/1", - "version": "1" + "name": "dnsdlvrecord", + "full_name": "dnsdlvrecord/1" }, { - "attr_name": "reinitialize", - "doc": - "Request a full re-initialization of the node retrieving data from the other node.", - "full_name": "topologysegment_reinitialize/1", - "name": "topologysegment_reinitialize", - "obj_class": "topologysegment/1", - "output": [ + "version": "1", + "params": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "DNSName", + "name": "target", + "label": "Target" + } + ], + "name": "dnsdnamerecord", + "full_name": "dnsdnamerecord/1" + }, + { + "version": "1", + "params": [ + { + "type": "int", + "name": "key_tag", + "label": "Key Tag" }, { - "doc": "True means the operation was successful", - "name": "result", - "type": "bool" + "type": "int", + "name": "algorithm", + "label": "Algorithm" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "type": "int", + "name": "digest_type", + "label": "Digest Type" + }, + { + "type": "str", + "name": "digest", + "label": "Digest" } ], + "name": "dnsdsrecord", + "full_name": "dnsdsrecord/1" + }, + { + "version": "1", "params": [ { - "cli_name": "topologysuffix", - "label": "Suffix name", - "name": "topologysuffixcn", - "type": "str" + "doc": "Zone name (FQDN)", + "type": "DNSName", + "name": "idnsname", + "label": "Zone name" }, { - "alwaysask": true, - "cli_name": "name", - "default_from_param": [ - "iparepltoposegmentleftnode", - "iparepltoposegmentrightnode" - ], - "doc": "Arbitrary string identifying the segment", - "label": "Segment name", - "name": "cn", - "no_convert": true, - "type": "str" + "doc": "IP network to create reverse zone name from", + "required": false, + "type": "str", + "name": "name_from_ip", + "label": "Reverse zone IP network" }, { - "default": ["False"], - "doc": "Initialize left node", - "name": "left", + "doc": "Is zone active?", "required": false, - "type": "bool" + "type": "bool", + "name": "idnszoneactive", + "label": "Active zone" }, { - "default": ["False"], - "doc": "Initialize right node", - "name": "right", + "name": "idnsforwarders", + "doc": "Per-zone forwarders. A custom port can be specified for each forwarder using a standard format \"IP_ADDRESS port PORT\"", "required": false, - "type": "bool" + "label": "Zone forwarders", + "multivalue": true, + "type": "str" }, { - "default": ["False"], - "doc": "Stop already started refresh of chosen node(s)", - "name": "stop", + "doc": "Per-zone conditional forwarding policy. Set to \"none\" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded.", "required": false, - "type": "bool" + "type": "str", + "name": "idnsforwardpolicy", + "label": "Forward policy" + }, + { + "type": "str", + "name": "managedby", + "label": "Managedby permission" } ], - "topic_topic": "topology/1", - "version": "1" + "name": "dnsforwardzone", + "full_name": "dnsforwardzone/1" }, { - "attr_name": "show", - "doc": "Display a segment.", - "full_name": "topologysegment_show/1", - "name": "topologysegment_show", - "obj_class": "topologysegment/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" - }, + "version": "1", + "params": [], + "name": "dnshiprecord", + "full_name": "dnshiprecord/1" + }, + { + "version": "1", + "params": [], + "name": "dnsipseckeyrecord", + "full_name": "dnsipseckeyrecord/1" + }, + { + "version": "1", + "params": [], + "name": "dnskeyrecord", + "full_name": "dnskeyrecord/1" + }, + { + "version": "1", + "params": [ { - "name": "result", - "type": "dict" + "doc": "Preference given to this exchanger. Lower values are more preferred", + "type": "int", + "name": "preference", + "label": "Preference" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "A host willing to act as a key exchanger", + "type": "DNSName", + "name": "exchanger", + "label": "Exchanger" } ], + "name": "dnskxrecord", + "full_name": "dnskxrecord/1" + }, + { + "version": "1", "params": [ { - "cli_name": "topologysuffix", - "label": "Suffix name", - "name": "topologysuffixcn", - "type": "str" + "type": "int", + "name": "lat_deg", + "label": "Degrees Latitude" }, { - "alwaysask": true, - "cli_name": "name", - "default_from_param": [ - "iparepltoposegmentleftnode", - "iparepltoposegmentrightnode" - ], - "doc": "Arbitrary string identifying the segment", - "label": "Segment name", - "name": "cn", - "no_convert": true, - "type": "str" + "required": false, + "type": "int", + "name": "lat_min", + "label": "Minutes Latitude" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "required": false, + "type": "Decimal", + "name": "lat_sec", + "label": "Seconds Latitude" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "type": "str", + "name": "lat_dir", + "label": "Direction Latitude" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "topology/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Add a new topology suffix to be managed.", - "exclude": ["cli"], - "full_name": "topologysuffix_add/1", - "name": "topologysuffix_add", - "obj_class": "topologysuffix/1", - "output": [ + "type": "int", + "name": "lon_deg", + "label": "Degrees Longitude" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "int", + "name": "lon_min", + "label": "Minutes Longitude" }, { - "name": "result", - "type": "dict" + "required": false, + "type": "Decimal", + "name": "lon_sec", + "label": "Seconds Longitude" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "name", - "label": "Suffix name", - "name": "cn", - "type": "str" + "type": "str", + "name": "lon_dir", + "label": "Direction Longitude" }, { - "cli_name": "suffix_dn", - "label": "Managed LDAP suffix DN", - "name": "iparepltopoconfroot", - "positional": false, - "type": "DN" + "type": "Decimal", + "name": "altitude", + "label": "Altitude" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", "required": false, - "type": "str" + "type": "Decimal", + "name": "size", + "label": "Size" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", "required": false, - "type": "str" + "type": "Decimal", + "name": "h_precision", + "label": "Horizontal Precision" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "required": false, + "type": "Decimal", + "name": "v_precision", + "label": "Vertical Precision" + } + ], + "name": "dnslocrecord", + "full_name": "dnslocrecord/1" + }, + { + "version": "1", + "params": [ + { + "doc": "Preference given to this exchanger. Lower values are more preferred", + "type": "int", + "name": "preference", + "label": "Preference" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "doc": "A host willing to act as a mail exchanger", + "type": "DNSName", + "name": "exchanger", + "label": "Exchanger" } ], - "topic_topic": "topology/1", - "version": "1" + "name": "dnsmxrecord", + "full_name": "dnsmxrecord/1" }, { - "attr_name": "del", - "doc": "Delete a topology suffix.", - "exclude": ["cli"], - "full_name": "topologysuffix_del/1", - "name": "topologysuffix_del", - "obj_class": "topologysuffix/1", - "output": [ + "version": "1", + "params": [ + { + "type": "int", + "name": "order", + "label": "Order" + }, + { + "type": "int", + "name": "preference", + "label": "Preference" + }, + { + "type": "str", + "name": "flags", + "label": "Flags" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "str", + "name": "service", + "label": "Service" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "type": "str", + "name": "regexp", + "label": "Regular Expression" }, { - "multivalue": true, - "name": "value", - "type": "str" + "type": "str", + "name": "replacement", + "label": "Replacement" } ], + "name": "dnsnaptrrecord", + "full_name": "dnsnaptrrecord/1" + }, + { + "version": "1", + "params": [], + "name": "dnsnsecrecord", + "full_name": "dnsnsecrecord/1" + }, + { + "version": "1", "params": [ { - "cli_name": "name", - "label": "Suffix name", - "multivalue": true, - "name": "cn", - "type": "str" - }, + "type": "DNSName", + "name": "hostname", + "label": "Hostname" + } + ], + "name": "dnsnsrecord", + "full_name": "dnsnsrecord/1" + }, + { + "version": "1", + "params": [ { - "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", - "name": "continue", - "positional": false, - "type": "bool" + "doc": "The hostname this reverse record points to", + "type": "DNSName", + "name": "hostname", + "label": "Hostname" } ], - "topic_topic": "topology/1", - "version": "1" + "name": "dnsptrrecord", + "full_name": "dnsptrrecord/1" }, { - "attr_name": "find", - "doc": "Search for topology suffixes.", - "full_name": "topologysuffix_find/1", - "name": "topologysuffix_find", - "obj_class": "topologysuffix/1", - "output": [ + "version": "1", + "params": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "doc": "Record name", + "type": "DNSName", + "name": "idnsname", + "label": "Record name" }, { - "multivalue": true, - "name": "result", - "type": "dict" + "doc": "Time to live", + "required": false, + "type": "int", + "name": "dnsttl", + "label": "Time to live" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "required": false, + "type": "str", + "name": "dnsclass" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" - } - ], - "params": [ + "required": false, + "type": "object", + "name": "dnsrecords", + "label": "Records" + }, { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, "required": false, - "type": "str" + "type": "str", + "name": "dnstype", + "label": "Record type" }, { - "cli_name": "name", - "label": "Suffix name", - "name": "cn", "required": false, - "type": "str" + "type": "str", + "name": "dnsdata", + "label": "Record data" }, { - "cli_name": "suffix_dn", - "label": "Managed LDAP suffix DN", - "name": "iparepltopoconfroot", + "name": "arecord", + "doc": "Raw A records", "required": false, - "type": "DN" + "label": "A record", + "multivalue": true, + "type": "str" }, { - "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", "required": false, - "type": "int" + "type": "str", + "name": "a_part_ip_address", + "label": "A IP Address" }, { - "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", + "doc": "Create reverse record for this IP Address", "required": false, - "type": "int" + "type": "bool", + "name": "a_extra_create_reverse", + "label": "A Create reverse" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "name": "aaaarecord", + "doc": "Raw AAAA records", + "required": false, + "label": "AAAA record", + "multivalue": true, + "type": "str" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "aaaa_part_ip_address", + "label": "AAAA IP Address" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"name\")", - "label": "Primary key only", - "name": "pkey_only", + "doc": "Create reverse record for this IP Address", "required": false, - "type": "bool" - } - ], - "topic_topic": "topology/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify a topology suffix.", - "exclude": ["cli"], - "full_name": "topologysuffix_mod/1", - "name": "topologysuffix_mod", - "obj_class": "topologysuffix/1", - "output": [ + "type": "bool", + "name": "aaaa_extra_create_reverse", + "label": "AAAA Create reverse" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "name": "a6record", + "doc": "Raw A6 records", "required": false, + "label": "A6 record", + "multivalue": true, "type": "str" }, { - "name": "result", - "type": "dict" + "required": false, + "type": "str", + "name": "a6_part_data", + "label": "A6 Record data" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", + "name": "afsdbrecord", + "doc": "Raw AFSDB records", + "required": false, + "label": "AFSDB record", + "multivalue": true, "type": "str" - } - ], - "params": [ + }, { - "cli_name": "name", - "label": "Suffix name", - "name": "cn", - "type": "str" + "required": false, + "type": "int", + "name": "afsdb_part_subtype", + "label": "AFSDB Subtype" }, { - "cli_name": "suffix_dn", - "label": "Managed LDAP suffix DN", - "name": "iparepltopoconfroot", "required": false, - "type": "DN" + "type": "DNSName", + "name": "afsdb_part_hostname", + "label": "AFSDB Hostname" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", + "name": "aplrecord", + "doc": "Raw APL records", "required": false, + "label": "APL record", + "multivalue": true, "type": "str" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", + "name": "certrecord", + "doc": "Raw CERT records", "required": false, + "label": "CERT record", + "multivalue": true, "type": "str" }, { - "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, - "name": "delattr", "required": false, - "type": "str" + "type": "int", + "name": "cert_part_type", + "label": "CERT Certificate Type" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "required": false, + "type": "int", + "name": "cert_part_key_tag", + "label": "CERT Key Tag" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "required": false, + "type": "int", + "name": "cert_part_algorithm", + "label": "CERT Algorithm" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "topology/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Show managed suffix.", - "full_name": "topologysuffix_show/1", - "name": "topologysuffix_show", - "obj_class": "topologysuffix/1", - "output": [ + "required": false, + "type": "str", + "name": "cert_part_certificate_or_crl", + "label": "CERT Certificate/CRL" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "name": "cnamerecord", + "doc": "Raw CNAME records", "required": false, + "label": "CNAME record", + "multivalue": true, "type": "str" }, { - "name": "result", - "type": "dict" + "doc": "A hostname which this alias hostname points to", + "required": false, + "type": "DNSName", + "name": "cname_part_hostname", + "label": "CNAME Hostname" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", + "name": "dhcidrecord", + "doc": "Raw DHCID records", + "required": false, + "label": "DHCID record", + "multivalue": true, "type": "str" - } - ], - "params": [ + }, { - "cli_name": "name", - "label": "Suffix name", - "name": "cn", + "name": "dlvrecord", + "doc": "Raw DLV records", + "required": false, + "label": "DLV record", + "multivalue": true, "type": "str" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "required": false, + "type": "int", + "name": "dlv_part_key_tag", + "label": "DLV Key Tag" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "required": false, + "type": "int", + "name": "dlv_part_algorithm", + "label": "DLV Algorithm" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "topology/1", - "version": "1" - }, - { - "attr_name": "verify", - "doc": - "\nVerify replication topology for suffix.\n\nChecks done:\n 1. check if a topology is not disconnected. In other words if there are\n replication paths between all servers.\n 2. check if servers don't have more than the recommended number of\n replication agreements\n", - "full_name": "topologysuffix_verify/1", - "name": "topologysuffix_verify", - "obj_class": "topologysuffix/1", - "output": [ + "required": false, + "type": "int", + "name": "dlv_part_digest_type", + "label": "DLV Digest Type" + }, { - "name": "result" - } - ], - "params": [ + "required": false, + "type": "str", + "name": "dlv_part_digest", + "label": "DLV Digest" + }, { - "cli_name": "name", - "label": "Suffix name", - "name": "cn", + "name": "dnamerecord", + "doc": "Raw DNAME records", + "required": false, + "label": "DNAME record", + "multivalue": true, "type": "str" - } - ], - "topic_topic": "topology/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": - "\nAdd new trust to use.\n\nThis command establishes trust relationship to another domain\nwhich becomes 'trusted'. As result, users of the trusted domain\nmay access resources of this domain.\n\nOnly trusts to Active Directory domains are supported right now.\n\nThe command can be safely run multiple times against the same domain,\nthis will cause change to trust relationship credentials on both\nsides.\n ", - "full_name": "trust_add/1", - "name": "trust_add", - "obj_class": "trust/1", - "output": [ + }, { - "doc": "User-friendly description of action performed", - "name": "summary", "required": false, + "type": "DNSName", + "name": "dname_part_target", + "label": "DNAME Target" + }, + { + "name": "dsrecord", + "doc": "Raw DS records", + "required": false, + "label": "DS record", + "multivalue": true, "type": "str" }, { - "name": "result", - "type": "dict" + "required": false, + "type": "int", + "name": "ds_part_key_tag", + "label": "DS Key Tag" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ + "required": false, + "type": "int", + "name": "ds_part_algorithm", + "label": "DS Algorithm" + }, { - "cli_name": "realm", - "label": "Realm name", - "name": "cn", - "type": "str" + "required": false, + "type": "int", + "name": "ds_part_digest_type", + "label": "DS Digest Type" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", "required": false, - "type": "str" + "type": "str", + "name": "ds_part_digest", + "label": "DS Digest" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", + "name": "hiprecord", + "doc": "Raw HIP records", "required": false, + "label": "HIP record", + "multivalue": true, "type": "str" }, { - "cli_metavar": "['ad']", - "cli_name": "type", - "default": ["ad"], - "label": "Trust type (ad for Active Directory, default)", - "name": "trust_type", - "positional": false, + "name": "ipseckeyrecord", + "doc": "Raw IPSECKEY records", + "required": false, + "label": "IPSECKEY record", + "multivalue": true, "type": "str" }, { - "cli_name": "admin", - "label": "Active Directory domain administrator", - "name": "realm_admin", + "name": "keyrecord", + "doc": "Raw KEY records", "required": false, + "label": "KEY record", + "multivalue": true, "type": "str" }, { - "cli_name": "password", - "confirm": false, - "label": "Active Directory domain administrator's password", - "name": "realm_passwd", + "name": "kxrecord", + "doc": "Raw KX records", "required": false, - "sensitive": true, + "label": "KX record", + "multivalue": true, "type": "str" }, { - "cli_name": "server", - "label": - "Domain controller for the Active Directory domain (optional)", - "name": "realm_server", + "doc": "Preference given to this exchanger. Lower values are more preferred", "required": false, - "type": "str" + "type": "int", + "name": "kx_part_preference", + "label": "KX Preference" }, { - "cli_name": "trust_secret", - "confirm": false, - "label": "Shared secret for the trust", - "name": "trust_secret", + "doc": "A host willing to act as a key exchanger", "required": false, - "sensitive": true, + "type": "DNSName", + "name": "kx_part_exchanger", + "label": "KX Exchanger" + }, + { + "name": "locrecord", + "doc": "Raw LOC records", + "required": false, + "label": "LOC record", + "multivalue": true, "type": "str" }, { - "cli_name": "base_id", - "label": - "First Posix ID of the range reserved for the trusted domain", - "name": "base_id", "required": false, - "type": "int" + "type": "int", + "name": "loc_part_lat_deg", + "label": "LOC Degrees Latitude" }, { - "cli_name": "range_size", - "label": "Size of the ID range reserved for the trusted domain", - "name": "range_size", "required": false, - "type": "int" + "type": "int", + "name": "loc_part_lat_min", + "label": "LOC Minutes Latitude" }, { - "cli_metavar": "['ipa-ad-trust-posix', 'ipa-ad-trust']", - "cli_name": "range_type", - "doc": - "Type of trusted domain ID range, one of ipa-ad-trust-posix, ipa-ad-trust", - "label": "Range type", - "name": "range_type", "required": false, - "type": "str" + "type": "Decimal", + "name": "loc_part_lat_sec", + "label": "LOC Seconds Latitude" }, { - "alwaysask": true, - "cli_name": "two_way", - "default": ["False"], - "doc": - "Establish bi-directional trust. By default trust is inbound one-way only.", - "label": "Two-way trust", - "name": "bidirectional", "required": false, - "type": "bool" + "type": "str", + "name": "loc_part_lat_dir", + "label": "LOC Direction Latitude" }, { - "alwaysask": true, - "cli_name": "external", - "default": ["False"], - "doc": - "Establish external trust to a domain in another forest. The trust is not transitive beyond the domain.", - "label": "External trust", - "name": "external", "required": false, - "type": "bool" + "type": "int", + "name": "loc_part_lon_deg", + "label": "LOC Degrees Longitude" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "required": false, + "type": "int", + "name": "loc_part_lon_min", + "label": "LOC Minutes Longitude" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "trust/1", - "version": "1" - }, - { - "attr_name": "del", - "doc": "Delete a trust.", - "full_name": "trust_del/1", - "name": "trust_del", - "obj_class": "trust/1", - "output": [ + "required": false, + "type": "Decimal", + "name": "loc_part_lon_sec", + "label": "LOC Seconds Longitude" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "loc_part_lon_dir", + "label": "LOC Direction Longitude" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "required": false, + "type": "Decimal", + "name": "loc_part_altitude", + "label": "LOC Altitude" }, { - "multivalue": true, - "name": "value", - "type": "str" - } - ], - "params": [ + "required": false, + "type": "Decimal", + "name": "loc_part_size", + "label": "LOC Size" + }, { - "cli_name": "realm", - "label": "Realm name", + "required": false, + "type": "Decimal", + "name": "loc_part_h_precision", + "label": "LOC Horizontal Precision" + }, + { + "required": false, + "type": "Decimal", + "name": "loc_part_v_precision", + "label": "LOC Vertical Precision" + }, + { + "name": "mxrecord", + "doc": "Raw MX records", + "required": false, + "label": "MX record", "multivalue": true, - "name": "cn", "type": "str" }, { - "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", - "name": "continue", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "trust/1", - "version": "1" - }, - { - "attr_name": "fetch_domains", - "doc": "Refresh list of the domains associated with the trust", - "full_name": "trust_fetch_domains/1", - "name": "trust_fetch_domains", - "obj_class": "trust/1", - "output": [ + "doc": "Preference given to this exchanger. Lower values are more preferred", + "required": false, + "type": "int", + "name": "mx_part_preference", + "label": "MX Preference" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "doc": "A host willing to act as a mail exchanger", "required": false, - "type": "str" + "type": "DNSName", + "name": "mx_part_exchanger", + "label": "MX Exchanger" }, { + "name": "naptrrecord", + "doc": "Raw NAPTR records", + "required": false, + "label": "NAPTR record", "multivalue": true, - "name": "result", - "type": "dict" + "type": "str" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "required": false, + "type": "int", + "name": "naptr_part_order", + "label": "NAPTR Order" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" - } - ], - "params": [ - { - "cli_name": "realm", - "label": "Realm name", - "name": "cn", - "type": "str" + "required": false, + "type": "int", + "name": "naptr_part_preference", + "label": "NAPTR Preference" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "naptr_part_flags", + "label": "NAPTR Flags" }, { - "cli_name": "server", - "label": - "Domain controller for the Active Directory domain (optional)", - "name": "realm_server", "required": false, - "type": "str" + "type": "str", + "name": "naptr_part_service", + "label": "NAPTR Service" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "naptr_part_regexp", + "label": "NAPTR Regular Expression" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "trust/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for trusts.", - "full_name": "trust_find/1", - "name": "trust_find", - "obj_class": "trust/1", - "output": [ + "required": false, + "type": "str", + "name": "naptr_part_replacement", + "label": "NAPTR Replacement" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "name": "nsrecord", + "doc": "Raw NS records", "required": false, + "label": "NS record", + "multivalue": true, "type": "str" }, { + "required": false, + "type": "DNSName", + "name": "ns_part_hostname", + "label": "NS Hostname" + }, + { + "name": "nsecrecord", + "doc": "Raw NSEC records", + "required": false, + "label": "NSEC record", "multivalue": true, - "name": "result", - "type": "dict" + "type": "str" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "name": "ptrrecord", + "doc": "Raw PTR records", + "required": false, + "label": "PTR record", + "multivalue": true, + "type": "str" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" - } - ], - "params": [ + "doc": "The hostname this reverse record points to", + "required": false, + "type": "DNSName", + "name": "ptr_part_hostname", + "label": "PTR Hostname" + }, { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, + "name": "rrsigrecord", + "doc": "Raw RRSIG records", "required": false, + "label": "RRSIG record", + "multivalue": true, "type": "str" }, { - "cli_name": "realm", - "label": "Realm name", - "name": "cn", + "name": "rprecord", + "doc": "Raw RP records", "required": false, + "label": "RP record", + "multivalue": true, "type": "str" }, { - "cli_name": "flat_name", - "label": "Domain NetBIOS name", - "name": "ipantflatname", + "name": "sigrecord", + "doc": "Raw SIG records", "required": false, + "label": "SIG record", + "multivalue": true, "type": "str" }, { - "cli_name": "sid", - "label": "Domain Security Identifier", - "name": "ipanttrusteddomainsid", + "name": "spfrecord", + "doc": "Raw SPF records", "required": false, + "label": "SPF record", + "multivalue": true, "type": "str" }, { - "cli_name": "sid_blacklist_incoming", - "label": "SID blacklist incoming", - "multivalue": true, - "name": "ipantsidblacklistincoming", + "name": "srvrecord", + "doc": "Raw SRV records", "required": false, + "label": "SRV record", + "multivalue": true, "type": "str" }, { - "cli_name": "sid_blacklist_outgoing", - "label": "SID blacklist outgoing", - "multivalue": true, - "name": "ipantsidblacklistoutgoing", + "doc": "Lower number means higher priority. Clients will attempt to contact the server with the lowest-numbered priority they can reach.", "required": false, - "type": "str" + "type": "int", + "name": "srv_part_priority", + "label": "SRV Priority (order)" }, { - "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", + "doc": "Relative weight for entries with the same priority.", "required": false, - "type": "int" + "type": "int", + "name": "srv_part_weight", + "label": "SRV Weight" }, { - "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", "required": false, - "type": "int" + "type": "int", + "name": "srv_part_port", + "label": "SRV Port" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "doc": "The domain name of the target host or '.' if the service is decidedly not available at this domain", + "required": false, + "type": "DNSName", + "name": "srv_part_target", + "label": "SRV Target" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "name": "sshfprecord", + "doc": "Raw SSHFP records", + "required": false, + "label": "SSHFP record", + "multivalue": true, + "type": "str" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"realm\")", - "label": "Primary key only", - "name": "pkey_only", "required": false, - "type": "bool" - } - ], - "topic_topic": "trust/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": - "\n Modify a trust (for future use).\n\n Currently only the default option to modify the LDAP attributes is\n available. More specific options will be added in coming releases.\n ", - "full_name": "trust_mod/1", - "name": "trust_mod", - "obj_class": "trust/1", - "output": [ + "type": "int", + "name": "sshfp_part_algorithm", + "label": "SSHFP Algorithm" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "int", + "name": "sshfp_part_fp_type", + "label": "SSHFP Fingerprint Type" }, { - "name": "result", - "type": "dict" + "required": false, + "type": "str", + "name": "sshfp_part_fingerprint", + "label": "SSHFP Fingerprint" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", + "name": "tlsarecord", + "doc": "Raw TLSA records", + "required": false, + "label": "TLSA record", + "multivalue": true, "type": "str" - } - ], - "params": [ + }, { - "cli_name": "realm", - "label": "Realm name", - "name": "cn", - "type": "str" + "required": false, + "type": "int", + "name": "tlsa_part_cert_usage", + "label": "TLSA Certificate Usage" }, { - "cli_name": "sid_blacklist_incoming", - "label": "SID blacklist incoming", - "multivalue": true, - "name": "ipantsidblacklistincoming", "required": false, - "type": "str" + "type": "int", + "name": "tlsa_part_selector", + "label": "TLSA Selector" }, { - "cli_name": "sid_blacklist_outgoing", - "label": "SID blacklist outgoing", - "multivalue": true, - "name": "ipantsidblacklistoutgoing", "required": false, - "type": "str" + "type": "int", + "name": "tlsa_part_matching_type", + "label": "TLSA Matching Type" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", "required": false, - "type": "str" + "type": "str", + "name": "tlsa_part_cert_association_data", + "label": "TLSA Certificate Association Data" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", + "name": "txtrecord", + "doc": "Raw TXT records", "required": false, + "label": "TXT record", + "multivalue": true, "type": "str" }, { - "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, - "name": "delattr", "required": false, + "type": "str", + "name": "txt_part_data", + "label": "TXT Text Data" + }, + { + "name": "urirecord", + "doc": "Raw URI records", + "required": false, + "label": "URI record", + "multivalue": true, "type": "str" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "doc": "Lower number means higher priority. Clients will attempt to contact the URI with the lowest-numbered priority they can reach.", + "required": false, + "type": "int", + "name": "uri_part_priority", + "label": "URI Priority (order)" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "doc": "Relative weight for entries with the same priority.", + "required": false, + "type": "int", + "name": "uri_part_weight", + "label": "URI Weight" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "doc": "Target Uniform Resource Identifier according to RFC 3986", + "required": false, + "type": "str", + "name": "uri_part_target", + "label": "URI Target Uniform Resource Identifier" } ], - "topic_topic": "trust/1", - "version": "1" + "name": "dnsrecord", + "full_name": "dnsrecord/1" }, { - "doc": - "Resolve security identifiers of users and groups in trusted domains", - "exclude": ["cli"], - "full_name": "trust_resolve/1", - "name": "trust_resolve", - "output": [ + "version": "1", + "params": [], + "name": "dnsrprecord", + "full_name": "dnsrprecord/1" + }, + { + "version": "1", + "params": [], + "name": "dnsrrsigrecord", + "full_name": "dnsrrsigrecord/1" + }, + { + "version": "1", + "params": [ { + "doc": "DNS Server name", + "type": "str", + "name": "idnsserverid", + "label": "Server name" + }, + { + "doc": "SOA mname (authoritative server) override", + "required": false, + "type": "DNSName", + "name": "idnssoamname", + "label": "SOA mname override" + }, + { + "name": "idnsforwarders", + "doc": "Per-server forwarders. A custom port can be specified for each forwarder using a standard format \"IP_ADDRESS port PORT\"", + "required": false, + "label": "Forwarders", "multivalue": true, - "name": "result", - "type": "dict" + "type": "str" + }, + { + "doc": "Per-server conditional forwarding policy. Set to \"none\" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded.", + "required": false, + "type": "str", + "name": "idnsforwardpolicy", + "label": "Forward policy" } ], + "name": "dnsserver", + "full_name": "dnsserver/1" + }, + { + "version": "1", + "params": [], + "name": "dnssigrecord", + "full_name": "dnssigrecord/1" + }, + { + "version": "1", + "params": [], + "name": "dnsspfrecord", + "full_name": "dnsspfrecord/1" + }, + { + "version": "1", "params": [ { - "label": "Security Identifiers (SIDs)", - "multivalue": true, - "name": "sids", - "positional": false, - "type": "str" + "doc": "Lower number means higher priority. Clients will attempt to contact the server with the lowest-numbered priority they can reach.", + "type": "int", + "name": "priority", + "label": "Priority (order)" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "doc": "Relative weight for entries with the same priority.", + "type": "int", + "name": "weight", + "label": "Weight" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "type": "int", + "name": "port", + "label": "Port" + }, + { + "doc": "The domain name of the target host or '.' if the service is decidedly not available at this domain", + "type": "DNSName", + "name": "target", + "label": "Target" } ], - "topic_topic": "trust/1", - "version": "1" + "name": "dnssrvrecord", + "full_name": "dnssrvrecord/1" }, { - "attr_name": "show", - "doc": "Display information about a trust.", - "full_name": "trust_show/1", - "name": "trust_show", - "obj_class": "trust/1", - "output": [ + "version": "1", + "params": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "int", + "name": "algorithm", + "label": "Algorithm" }, { - "name": "result", - "type": "dict" + "type": "int", + "name": "fp_type", + "label": "Fingerprint Type" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "type": "str", + "name": "fingerprint", + "label": "Fingerprint" } ], + "name": "dnssshfprecord", + "full_name": "dnssshfprecord/1" + }, + { + "version": "1", "params": [ { - "cli_name": "realm", - "label": "Realm name", - "name": "cn", - "type": "str" + "type": "int", + "name": "cert_usage", + "label": "Certificate Usage" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "type": "int", + "name": "selector", + "label": "Selector" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "type": "int", + "name": "matching_type", + "label": "Matching Type" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "type": "str", + "name": "cert_association_data", + "label": "Certificate Association Data" } ], - "topic_topic": "trust/1", - "version": "1" + "name": "dnstlsarecord", + "full_name": "dnstlsarecord/1" }, { - "attr_name": "mod", - "doc": "Modify global trust configuration.", - "full_name": "trustconfig_mod/1", - "name": "trustconfig_mod", - "obj_class": "trustconfig/1", - "output": [ + "version": "1", + "params": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "str", + "name": "data", + "label": "Text Data" + } + ], + "name": "dnstxtrecord", + "full_name": "dnstxtrecord/1" + }, + { + "version": "1", + "params": [ + { + "doc": "Lower number means higher priority. Clients will attempt to contact the URI with the lowest-numbered priority they can reach.", + "type": "int", + "name": "priority", + "label": "Priority (order)" }, { - "name": "result", - "type": "dict" + "doc": "Relative weight for entries with the same priority.", + "type": "int", + "name": "weight", + "label": "Weight" }, { - "name": "value", - "type": "str" + "doc": "Target Uniform Resource Identifier according to RFC 3986", + "type": "str", + "name": "target", + "label": "Target Uniform Resource Identifier" } ], + "name": "dnsurirecord", + "full_name": "dnsurirecord/1" + }, + { + "version": "1", "params": [ { - "cli_name": "fallback_primary_group", - "label": "Fallback primary group", - "name": "ipantfallbackprimarygroup", + "doc": "Zone name (FQDN)", + "type": "DNSName", + "name": "idnsname", + "label": "Zone name" + }, + { + "doc": "IP network to create reverse zone name from", "required": false, - "type": "str" + "type": "str", + "name": "name_from_ip", + "label": "Reverse zone IP network" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", + "doc": "Is zone active?", "required": false, - "type": "str" + "type": "bool", + "name": "idnszoneactive", + "label": "Active zone" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", + "name": "idnsforwarders", + "doc": "Per-zone forwarders. A custom port can be specified for each forwarder using a standard format \"IP_ADDRESS port PORT\"", "required": false, + "label": "Zone forwarders", + "multivalue": true, "type": "str" }, { - "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, - "name": "delattr", + "doc": "Per-zone conditional forwarding policy. Set to \"none\" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded.", "required": false, - "type": "str" + "type": "str", + "name": "idnsforwardpolicy", + "label": "Forward policy" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "type": "str", + "name": "managedby", + "label": "Managedby permission" }, { - "cli_metavar": "['ad']", - "cli_name": "type", - "default": ["ad"], - "label": "Trust type (ad for Active Directory, default)", - "name": "trust_type", - "positional": false, - "type": "str" + "doc": "Authoritative nameserver domain name", + "required": false, + "type": "DNSName", + "name": "idnssoamname", + "label": "Authoritative nameserver" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "doc": "Administrator e-mail address", + "type": "DNSName", + "name": "idnssoarname", + "label": "Administrator e-mail address" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "trust/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Show global trust configuration.", - "full_name": "trustconfig_show/1", - "name": "trustconfig_show", - "obj_class": "trustconfig/1", - "output": [ + "doc": "SOA record serial number", + "type": "int", + "name": "idnssoaserial", + "label": "SOA serial" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "doc": "SOA record refresh time", + "type": "int", + "name": "idnssoarefresh", + "label": "SOA refresh" + }, + { + "doc": "SOA record retry time", + "type": "int", + "name": "idnssoaretry", + "label": "SOA retry" + }, + { + "doc": "SOA record expire time", + "type": "int", + "name": "idnssoaexpire", + "label": "SOA expire" + }, + { + "doc": "How long should negative responses be cached", + "type": "int", + "name": "idnssoaminimum", + "label": "SOA minimum" + }, + { + "doc": "Time to live for records at zone apex", "required": false, - "type": "str" + "type": "int", + "name": "dnsttl", + "label": "Time to live" }, { - "name": "result", - "type": "dict" + "doc": "Time to live for records without explicit TTL definition", + "required": false, + "type": "int", + "name": "dnsdefaultttl", + "label": "Default time to live" }, { - "name": "value", - "type": "str" - } - ], - "params": [ + "required": false, + "type": "str", + "name": "dnsclass" + }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "doc": "BIND update policy", + "required": false, + "type": "str", + "name": "idnsupdatepolicy", + "label": "BIND update policy" }, { - "cli_metavar": "['ad']", - "cli_name": "type", - "default": ["ad"], - "label": "Trust type (ad for Active Directory, default)", - "name": "trust_type", - "positional": false, - "type": "str" + "doc": "Allow dynamic updates.", + "required": false, + "type": "bool", + "name": "idnsallowdynupdate", + "label": "Dynamic update" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "doc": "Semicolon separated list of IP addresses or networks which are allowed to issue queries", + "required": false, + "type": "str", + "name": "idnsallowquery", + "label": "Allow query" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "trust/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Allow access from the trusted domain", - "exclude": ["cli"], - "full_name": "trustdomain_add/1", - "name": "trustdomain_add", - "obj_class": "trustdomain/1", - "output": [ + "doc": "Semicolon separated list of IP addresses or networks which are allowed to transfer the zone", + "required": false, + "type": "str", + "name": "idnsallowtransfer", + "label": "Allow transfer" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "doc": "Allow synchronization of forward (A, AAAA) and reverse (PTR) records in the zone", "required": false, - "type": "str" + "type": "bool", + "name": "idnsallowsyncptr", + "label": "Allow PTR sync" }, { - "name": "result", - "type": "dict" + "doc": "Allow inline DNSSEC signing of records in the zone", + "required": false, + "type": "bool", + "name": "idnssecinlinesigning", + "label": "Allow in-line DNSSEC signing" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "NSEC3PARAM record for zone in format: hash_algorithm flags iterations salt", + "required": false, + "type": "str", + "name": "nsec3paramrecord", + "label": "NSEC3PARAM record" } ], + "name": "dnszone", + "full_name": "dnszone/1" + }, + { + "version": "1", "params": [ { - "cli_name": "trust", - "label": "Realm name", - "name": "trustcn", - "type": "str" - }, - { - "cli_name": "domain", - "label": "Domain name", + "type": "str", "name": "cn", - "type": "str" + "label": "Group name" }, { - "cli_name": "flat_name", - "label": "Domain NetBIOS name", - "name": "ipantflatname", + "doc": "Group description", "required": false, - "type": "str" + "type": "str", + "name": "description", + "label": "Description" }, { - "cli_name": "sid", - "label": "Domain Security Identifier", - "name": "ipanttrusteddomainsid", + "doc": "GID (use this option to set it manually)", "required": false, - "type": "str" + "type": "int", + "name": "gidnumber", + "label": "GID" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", + "name": "ipaexternalmember", + "doc": "Members of a trusted domain in DOM\\name or name@domain form", "required": false, + "label": "External member", + "multivalue": true, "type": "str" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", "required": false, - "type": "str" + "type": "str", + "name": "member_user", + "label": "Member users" }, { - "cli_metavar": "['ad']", - "cli_name": "type", - "default": ["ad"], - "label": "Trust type (ad for Active Directory, default)", - "name": "trust_type", - "positional": false, - "type": "str" + "required": false, + "type": "str", + "name": "member_group", + "label": "Member groups" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "memberof_group", + "label": "Member of groups" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "trust/1", - "version": "1" - }, - { - "attr_name": "del", - "doc": - "Remove information about the domain associated with the trust.", - "full_name": "trustdomain_del/1", - "name": "trustdomain_del", - "obj_class": "trustdomain/1", - "output": [ + "required": false, + "type": "str", + "name": "memberof_role", + "label": "Roles" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "memberof_netgroup", + "label": "Member of netgroups" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "required": false, + "type": "str", + "name": "memberof_sudorule", + "label": "Member of Sudo rule" }, { - "multivalue": true, - "name": "value", - "type": "str" - } - ], - "params": [ - { - "cli_name": "trust", - "label": "Realm name", - "name": "trustcn", - "type": "str" + "required": false, + "type": "str", + "name": "memberof_hbacrule", + "label": "Member of HBAC rule" }, { - "cli_name": "domain", - "label": "Domain name", - "multivalue": true, - "name": "cn", - "type": "str" + "required": false, + "type": "str", + "name": "memberindirect_user", + "label": "Indirect Member users" }, { - "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", - "name": "continue", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "trust/1", - "version": "1" - }, - { - "attr_name": "disable", - "doc": "Disable use of IPA resources by the domain of the trust", - "full_name": "trustdomain_disable/1", - "name": "trustdomain_disable", - "obj_class": "trustdomain/1", - "output": [ + "required": false, + "type": "str", + "name": "memberindirect_group", + "label": "Indirect Member groups" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "memberofindirect_group", + "label": "Indirect Member of group" }, { - "doc": "True means the operation was successful", - "name": "result", - "type": "bool" + "required": false, + "type": "str", + "name": "memberofindirect_netgroup", + "label": "Indirect Member of netgroup" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ + "required": false, + "type": "str", + "name": "memberofindirect_role", + "label": "Indirect Member of role" + }, { - "cli_name": "trust", - "label": "Realm name", - "name": "trustcn", - "type": "str" + "required": false, + "type": "str", + "name": "memberofindirect_sudorule", + "label": "Indirect Member of Sudo rule" }, { - "cli_name": "domain", - "label": "Domain name", - "name": "cn", - "type": "str" + "required": false, + "type": "str", + "name": "memberofindirect_hbacrule", + "label": "Indirect Member of HBAC rule" } ], - "topic_topic": "trust/1", - "version": "1" + "name": "group", + "full_name": "group/1" }, { - "attr_name": "enable", - "doc": "Allow use of IPA resources by the domain of the trust", - "full_name": "trustdomain_enable/1", - "name": "trustdomain_enable", - "obj_class": "trustdomain/1", - "output": [ + "version": "1", + "params": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "str", + "name": "cn", + "label": "Rule name" }, { - "doc": "True means the operation was successful", - "name": "result", - "type": "bool" + "exclude": [ + "webui", + "cli" + ], + "label": "Rule type", + "type": "str", + "name": "accessruletype", + "doc": "Rule type (allow)" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ + "doc": "User category the rule applies to", + "required": false, + "type": "str", + "name": "usercategory", + "label": "User category" + }, { - "cli_name": "trust", - "label": "Realm name", - "name": "trustcn", - "type": "str" + "doc": "Host category the rule applies to", + "required": false, + "type": "str", + "name": "hostcategory", + "label": "Host category" }, { - "cli_name": "domain", - "label": "Domain name", - "name": "cn", - "type": "str" - } - ], - "topic_topic": "trust/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search domains of the trust", - "full_name": "trustdomain_find/1", - "name": "trustdomain_find", - "obj_class": "trustdomain/1", - "output": [ + "doc": "Source host category the rule applies to", + "required": false, + "type": "str", + "name": "sourcehostcategory", + "label": "Source host category" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "doc": "Service category the rule applies to", "required": false, - "type": "str" + "type": "str", + "name": "servicecategory", + "label": "Service category" }, { - "multivalue": true, - "name": "result", - "type": "dict" + "required": false, + "type": "str", + "name": "description", + "label": "Description" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "required": false, + "type": "bool", + "name": "ipaenabledflag", + "label": "Enabled" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" - } - ], - "params": [ + "required": false, + "type": "str", + "name": "memberuser_user", + "label": "Users" + }, { - "cli_name": "trust", - "label": "Realm name", - "name": "trustcn", - "type": "str" + "required": false, + "type": "str", + "name": "memberuser_group", + "label": "User Groups" }, { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, "required": false, - "type": "str" + "type": "str", + "name": "memberhost_host", + "label": "Hosts" }, { - "cli_name": "domain", - "label": "Domain name", - "name": "cn", "required": false, - "type": "str" + "type": "str", + "name": "memberhost_hostgroup", + "label": "Host Groups" }, { - "cli_name": "flat_name", - "label": "Domain NetBIOS name", - "name": "ipantflatname", "required": false, - "type": "str" + "type": "str", + "name": "sourcehost_host", + "label": "Source Hosts" }, { - "cli_name": "sid", - "label": "Domain Security Identifier", - "name": "ipanttrusteddomainsid", "required": false, - "type": "str" + "type": "str", + "name": "sourcehost_hostgroup", + "label": "Source Host Groups" }, { - "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", "required": false, - "type": "int" + "type": "str", + "name": "memberservice_hbacsvc", + "label": "Services" }, { - "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", "required": false, - "type": "int" + "type": "str", + "name": "memberservice_hbacsvcgroup", + "label": "Service Groups" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "type": "str", + "required": false, + "multivalue": true, + "name": "externalhost", + "label": "External host" + } + ], + "name": "hbacrule", + "full_name": "hbacrule/1" + }, + { + "version": "1", + "params": [ + { + "doc": "HBAC service", + "type": "str", + "name": "cn", + "label": "Service name" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "doc": "HBAC service description", + "required": false, + "type": "str", + "name": "description", + "label": "Description" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"domain\")", - "label": "Primary key only", - "name": "pkey_only", "required": false, - "type": "bool" + "type": "str", + "name": "memberof_hbacsvcgroup", + "label": "Member of HBAC service groups" } ], - "topic_topic": "trust/1", - "version": "1" + "name": "hbacsvc", + "full_name": "hbacsvc/1" }, { - "attr_name": "mod", - "doc": "Modify trustdomain of the trust", - "exclude": ["cli"], - "full_name": "trustdomain_mod/1", - "name": "trustdomain_mod", - "obj_class": "trustdomain/1", - "output": [ + "version": "1", + "params": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "str", + "name": "cn", + "label": "Service group name" }, { - "name": "result", - "type": "dict" + "doc": "HBAC service group description", + "required": false, + "type": "str", + "name": "description", + "label": "Description" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "required": false, + "type": "str", + "name": "member_hbacsvc", + "label": "Member HBAC service" } ], + "name": "hbacsvcgroup", + "full_name": "hbacsvcgroup/1" + }, + { + "version": "1", "params": [ { - "cli_name": "trust", - "label": "Realm name", - "name": "trustcn", - "type": "str" + "type": "str", + "name": "fqdn", + "label": "Host name" }, { - "cli_name": "domain", - "label": "Domain name", - "name": "cn", - "type": "str" + "doc": "A description of this host", + "required": false, + "type": "str", + "name": "description", + "label": "Description" }, { - "cli_name": "flat_name", - "label": "Domain NetBIOS name", - "name": "ipantflatname", + "doc": "Host locality (e.g. \"Baltimore, MD\")", "required": false, - "type": "str" + "type": "str", + "name": "l", + "label": "Locality" }, { - "cli_name": "sid", - "label": "Domain Security Identifier", - "name": "ipanttrusteddomainsid", + "doc": "Host location (e.g. \"Lab 2\")", "required": false, - "type": "str" + "type": "str", + "name": "nshostlocation", + "label": "Location" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", + "doc": "Host hardware platform (e.g. \"Lenovo T61\")", "required": false, - "type": "str" + "type": "str", + "name": "nshardwareplatform", + "label": "Platform" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", + "doc": "Host operating system and version (e.g. \"Fedora 9\")", "required": false, - "type": "str" + "type": "str", + "name": "nsosversion", + "label": "Operating system" }, { - "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, - "name": "delattr", + "doc": "Password used in bulk enrollment", "required": false, - "type": "str" + "type": "str", + "name": "userpassword", + "label": "User password" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "doc": "Generate a random password to be used in bulk enrollment", + "required": false, + "type": "bool", + "name": "random" }, { - "cli_metavar": "['ad']", - "cli_name": "type", - "default": ["ad"], - "label": "Trust type (ad for Active Directory, default)", - "name": "trust_type", - "positional": false, - "type": "str" + "required": false, + "type": "str", + "name": "randompassword", + "label": "Random password" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "name": "usercertificate", + "doc": "Base-64 encoded host certificate", + "required": false, + "label": "Certificate", + "multivalue": true, + "type": "Certificate" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "trust/1", - "version": "1" - }, - { - "attr_name": "add", - "doc": "Add a new user.", - "full_name": "user_add/1", - "name": "user_add", - "obj_class": "user/1", - "output": [ + "type": "str", + "name": "subject", + "label": "Subject" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "str", + "name": "serial_number", + "label": "Serial Number" }, { - "name": "result", - "type": "dict" + "type": "str", + "name": "serial_number_hex", + "label": "Serial Number (hex)" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ + "type": "str", + "name": "issuer", + "label": "Issuer" + }, { - "alwaysask": true, - "cli_name": "login", - "default_from_param": ["givenname", "sn"], - "label": "User login", - "name": "uid", - "no_convert": true, - "type": "str" + "type": "str", + "name": "valid_not_before", + "label": "Not Before" }, { - "cli_name": "first", - "label": "First name", - "name": "givenname", - "positional": false, - "type": "str" + "type": "str", + "name": "valid_not_after", + "label": "Not After" }, { - "cli_name": "last", - "label": "Last name", - "name": "sn", - "positional": false, - "type": "str" + "type": "str", + "name": "sha1_fingerprint", + "label": "Fingerprint (SHA1)" }, { - "default_from_param": ["givenname", "sn"], - "label": "Full name", - "name": "cn", - "positional": false, - "type": "str" + "type": "str", + "name": "sha256_fingerprint", + "label": "Fingerprint (SHA256)" }, { - "default_from_param": ["givenname", "sn"], - "label": "Display name", - "name": "displayname", "required": false, - "type": "str" + "type": "str", + "name": "revocation_reason", + "label": "Revocation reason" }, { - "default_from_param": ["givenname", "sn"], - "label": "Initials", - "name": "initials", "required": false, - "type": "str" + "type": "Principal", + "name": "krbcanonicalname", + "label": "Principal name" }, { - "cli_name": "homedir", - "label": "Home directory", - "name": "homedirectory", + "type": "Principal", "required": false, - "type": "str" + "multivalue": true, + "name": "krbprincipalname", + "label": "Principal alias" }, { - "default_from_param": ["givenname", "sn"], - "label": "GECOS", - "name": "gecos", + "name": "macaddress", + "doc": "Hardware MAC address(es) on this host", "required": false, + "label": "MAC address", + "multivalue": true, "type": "str" }, { - "cli_name": "shell", - "label": "Login shell", - "name": "loginshell", + "type": "str", "required": false, - "type": "str" + "multivalue": true, + "name": "ipasshpubkey", + "label": "SSH public key" }, { - "cli_name": "principal", - "default_from_param": ["uid"], - "label": "Principal alias", - "multivalue": true, - "name": "krbprincipalname", - "no_convert": true, + "type": "str", "required": false, - "type": "Principal" + "multivalue": true, + "name": "sshpubkeyfp", + "label": "SSH public key fingerprint" }, { - "cli_name": "principal_expiration", - "label": "Kerberos principal expiration", - "name": "krbprincipalexpiration", + "name": "userclass", + "doc": "Host category (semantics placed on this attribute are for local interpretation)", "required": false, - "type": "datetime" + "label": "Class", + "multivalue": true, + "type": "str" }, { - "cli_name": "email", - "label": "Email address", - "multivalue": true, - "name": "mail", "required": false, - "type": "str" + "type": "str", + "name": "ipaassignedidview", + "label": "Assigned ID View" }, { - "cli_name": "password", - "doc": "Prompt to set the user password", - "exclude": ["webui"], - "label": "Password", - "name": "userpassword", + "name": "krbprincipalauthind", + "doc": "Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations.", "required": false, - "sensitive": true, + "label": "Authentication Indicators", + "multivalue": true, "type": "str" }, { - "default": ["False"], - "doc": "Generate a random user password", - "name": "random", + "doc": "Pre-authentication is required for the service", "required": false, - "type": "bool" + "type": "bool", + "name": "ipakrbrequirespreauth", + "label": "Requires pre-authentication" }, { - "cli_name": "uid", - "doc": "User ID Number (system will assign one if not provided)", - "label": "UID", - "name": "uidnumber", + "doc": "Client credentials may be delegated to the service", "required": false, - "type": "int" + "type": "bool", + "name": "ipakrbokasdelegate", + "label": "Trusted for delegation" }, { - "doc": "Group ID Number", - "label": "GID", - "name": "gidnumber", + "doc": "The service is allowed to authenticate on behalf of a client", "required": false, - "type": "int" + "type": "bool", + "name": "ipakrboktoauthasdelegate", + "label": "Trusted to authenticate as user" }, { - "cli_name": "street", - "label": "Street address", - "name": "street", - "required": false, - "type": "str" + "type": "bool", + "name": "has_password", + "label": "Password" }, { - "cli_name": "city", - "label": "City", - "name": "l", "required": false, - "type": "str" + "type": "str", + "name": "memberof_hostgroup", + "label": "Member of host-groups" }, { - "cli_name": "state", - "label": "State/Province", - "name": "st", "required": false, - "type": "str" + "type": "str", + "name": "memberof_role", + "label": "Roles" }, { - "label": "ZIP", - "name": "postalcode", "required": false, - "type": "str" + "type": "str", + "name": "memberof_netgroup", + "label": "Member of netgroups" }, { - "cli_name": "phone", - "label": "Telephone Number", - "multivalue": true, - "name": "telephonenumber", "required": false, - "type": "str" + "type": "str", + "name": "memberof_sudorule", + "label": "Member of Sudo rule" }, { - "label": "Mobile Telephone Number", - "multivalue": true, - "name": "mobile", "required": false, - "type": "str" + "type": "str", + "name": "memberof_hbacrule", + "label": "Member of HBAC rule" }, { - "label": "Pager Number", - "multivalue": true, - "name": "pager", "required": false, - "type": "str" + "type": "str", + "name": "memberofindirect_netgroup", + "label": "Indirect Member of netgroup" }, { - "cli_name": "fax", - "label": "Fax Number", - "multivalue": true, - "name": "facsimiletelephonenumber", "required": false, - "type": "str" + "type": "str", + "name": "memberofindirect_hostgroup", + "label": "Indirect Member of host-group" }, { - "cli_name": "orgunit", - "label": "Org. Unit", - "name": "ou", "required": false, - "type": "str" + "type": "str", + "name": "memberofindirect_role", + "label": "Indirect Member of role" }, { - "label": "Job Title", - "name": "title", "required": false, - "type": "str" + "type": "str", + "name": "memberofindirect_sudorule", + "label": "Indirect Member of Sudo rule" }, { - "label": "Manager", - "name": "manager", "required": false, - "type": "str" + "type": "str", + "name": "memberofindirect_hbacrule", + "label": "Indirect Member of HBAC rule" }, { - "label": "Car License", - "multivalue": true, - "name": "carlicense", - "required": false, - "type": "str" + "type": "bool", + "name": "has_keytab", + "label": "Keytab" }, { - "cli_name": "sshpubkey", - "label": "SSH public key", - "multivalue": true, - "name": "ipasshpubkey", - "no_convert": true, - "required": false, - "type": "str" + "type": "str", + "name": "managedby_host", + "label": "Managed by" }, { - "cli_metavar": "['password', 'radius', 'otp']", - "cli_name": "user_auth_type", - "doc": "Types of supported user authentication", - "label": "User authentication types", - "multivalue": true, - "name": "ipauserauthtype", - "required": false, - "type": "str" + "type": "str", + "name": "managing_host", + "label": "Managing" }, { - "cli_name": "class", - "doc": - "User category (semantics placed on this attribute are for local interpretation)", - "label": "Class", - "multivalue": true, - "name": "userclass", - "required": false, - "type": "str" + "type": "str", + "name": "ipaallowedtoperform_read_keys_user", + "label": "Users allowed to retrieve keytab" }, { - "cli_name": "radius", - "label": "RADIUS proxy configuration", - "name": "ipatokenradiusconfiglink", - "required": false, - "type": "str" + "type": "str", + "name": "ipaallowedtoperform_read_keys_group", + "label": "Groups allowed to retrieve keytab" }, { - "cli_name": "radius_username", - "label": "RADIUS proxy username", - "name": "ipatokenradiususername", - "required": false, - "type": "str" + "type": "str", + "name": "ipaallowedtoperform_read_keys_host", + "label": "Hosts allowed to retrieve keytab" }, { - "label": "Department Number", - "multivalue": true, - "name": "departmentnumber", + "type": "str", + "name": "ipaallowedtoperform_read_keys_hostgroup", + "label": "Host Groups allowed to retrieve keytab" + }, + { + "type": "str", + "name": "ipaallowedtoperform_write_keys_user", + "label": "Users allowed to create keytab" + }, + { + "type": "str", + "name": "ipaallowedtoperform_write_keys_group", + "label": "Groups allowed to create keytab" + }, + { + "type": "str", + "name": "ipaallowedtoperform_write_keys_host", + "label": "Hosts allowed to create keytab" + }, + { + "type": "str", + "name": "ipaallowedtoperform_write_keys_hostgroup", + "label": "Host Groups allowed to create keytab" + } + ], + "name": "host", + "full_name": "host/1" + }, + { + "version": "1", + "params": [ + { + "doc": "Name of host-group", + "type": "str", + "name": "cn", + "label": "Host-group" + }, + { + "doc": "A description of this host-group", "required": false, - "type": "str" + "type": "str", + "name": "description", + "label": "Description" }, { - "label": "Employee Number", - "name": "employeenumber", "required": false, - "type": "str" + "type": "str", + "name": "member_host", + "label": "Member hosts" }, { - "label": "Employee Type", - "name": "employeetype", "required": false, - "type": "str" + "type": "str", + "name": "member_hostgroup", + "label": "Member host-groups" }, { - "label": "Preferred Language", - "name": "preferredlanguage", "required": false, - "type": "str" + "type": "str", + "name": "memberof_hostgroup", + "label": "Member of host-groups" }, { - "cli_name": "certificate", - "doc": "Base-64 encoded user certificate", - "label": "Certificate", - "multivalue": true, - "name": "usercertificate", "required": false, - "type": "bytes" + "type": "str", + "name": "memberof_netgroup", + "label": "Member of netgroups" }, { - "exclude": ["cli", "webui"], - "label": "Account disabled", - "name": "nsaccountlock", "required": false, - "type": "bool" + "type": "str", + "name": "memberof_sudorule", + "label": "Member of Sudo rule" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", "required": false, - "type": "str" + "type": "str", + "name": "memberof_hbacrule", + "label": "Member of HBAC rule" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", "required": false, - "type": "str" + "type": "str", + "name": "memberindirect_host", + "label": "Indirect Member hosts" }, { - "cli_name": "noprivate", - "default": ["False"], - "doc": "Don't create user private group", - "name": "noprivate", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "memberindirect_hostgroup", + "label": "Indirect Member host-groups" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "memberofindirect_hostgroup", + "label": "Indirect Member of host-group" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "memberofindirect_sudorule", + "label": "Indirect Member of Sudo rule" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "memberofindirect_hbacrule", + "label": "Indirect Member of HBAC rule" } ], - "topic_topic": "user/1", - "version": "1" + "name": "hostgroup", + "full_name": "hostgroup/1" }, { - "attr_name": "add_cert", - "doc": "Add one or more certificates to the user entry", - "full_name": "user_add_cert/1", - "name": "user_add_cert", - "obj_class": "user/1", - "output": [ + "version": "1", + "params": [ + { + "type": "str", + "name": "ipaanchoruuid", + "label": "Anchor to override" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "description", + "label": "Description" }, { - "name": "result", - "type": "dict" + "required": false, + "type": "str", + "name": "cn", + "label": "Group name" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "Group ID Number", + "required": false, + "type": "int", + "name": "gidnumber", + "label": "GID" } ], + "name": "idoverridegroup", + "full_name": "idoverridegroup/1" + }, + { + "version": "1", "params": [ { - "alwaysask": true, - "cli_name": "login", - "default_from_param": ["givenname", "sn"], - "label": "User login", - "name": "uid", - "no_convert": true, - "type": "str" + "type": "str", + "name": "ipaanchoruuid", + "label": "Anchor to override" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "description", + "label": "Description" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "uid", + "label": "User login" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "doc": "User ID Number", + "required": false, + "type": "int", + "name": "uidnumber", + "label": "UID" }, { - "alwaysask": true, - "cli_name": "certificate", - "doc": "Base-64 encoded user certificate", - "label": "Certificate", - "multivalue": true, - "name": "usercertificate", - "positional": false, - "type": "bytes" - } - ], - "topic_topic": "user/1", - "version": "1" - }, - { - "attr_name": "add_manager", - "doc": "Add a manager to the user entry", - "full_name": "user_add_manager/1", - "name": "user_add_manager", - "obj_class": "user/1", - "output": [ - { - "name": "result", - "type": "dict" + "required": false, + "type": "str", + "name": "gecos", + "label": "GECOS" }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "doc": "Group ID Number", + "required": false, + "type": "int", + "name": "gidnumber", + "label": "GID" }, { - "doc": "Number of members added", - "name": "completed", - "type": "int" - } - ], - "params": [ - { - "alwaysask": true, - "cli_name": "login", - "default_from_param": ["givenname", "sn"], - "label": "User login", - "name": "uid", - "no_convert": true, - "type": "str" + "required": false, + "type": "str", + "name": "homedirectory", + "label": "Home directory" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "loginshell", + "label": "Login shell" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "exclude": [ + "cli", + "webui" + ], + "required": false, + "type": "str", + "name": "ipaoriginaluid" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "type": "str", + "required": false, + "multivalue": true, + "name": "ipasshpubkey", + "label": "SSH public key" }, { - "alwaysask": true, - "cli_name": "users", - "doc": "users to add", - "label": "member user", - "multivalue": true, - "name": "user", + "name": "usercertificate", + "doc": "Base-64 encoded user certificate", "required": false, - "type": "str" + "label": "Certificate", + "multivalue": true, + "type": "Certificate" } ], - "topic_topic": "user/1", - "version": "1" + "name": "idoverrideuser", + "full_name": "idoverrideuser/1" }, { - "attr_name": "add_principal", - "doc": "Add new principal alias to the user entry", - "full_name": "user_add_principal/1", - "name": "user_add_principal", - "obj_class": "user/1", - "output": [ + "version": "1", + "params": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "str", + "name": "cn", + "label": "Range name" }, { - "name": "result", - "type": "dict" + "type": "int", + "name": "ipabaseid", + "label": "First Posix ID of the range" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ + "type": "int", + "name": "ipaidrangesize", + "label": "Number of IDs in the range" + }, { - "alwaysask": true, - "cli_name": "login", - "default_from_param": ["givenname", "sn"], - "label": "User login", - "name": "uid", - "no_convert": true, - "type": "str" + "required": false, + "type": "int", + "name": "ipabaserid", + "label": "First RID of the corresponding RID range" }, { - "alwaysask": true, - "cli_name": "principal", - "default_from_param": ["uid"], - "label": "Principal alias", - "multivalue": true, - "name": "krbprincipalname", - "no_convert": true, - "type": "Principal" + "required": false, + "type": "int", + "name": "ipasecondarybaserid", + "label": "First RID of the secondary RID range" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "ipanttrusteddomainsid", + "label": "Domain SID of the trusted domain" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "ipanttrusteddomainname", + "label": "Name of the trusted domain" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "doc": "ID range type, one of ipa-ad-trust, ipa-ad-trust-posix, ipa-local", + "required": false, + "type": "str", + "name": "iparangetype", + "label": "Range type" } ], - "topic_topic": "user/1", - "version": "1" + "name": "idrange", + "full_name": "idrange/1" }, { - "attr_name": "del", - "doc": "Delete a user.", - "full_name": "user_del/1", - "name": "user_del", - "obj_class": "user/1", - "output": [ + "version": "1", + "params": [ + { + "type": "str", + "name": "cn", + "label": "ID View Name" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "description", + "label": "Description" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "type": "str", + "name": "useroverrides", + "label": "User object overrides" }, { - "multivalue": true, - "name": "value", - "type": "str" + "type": "str", + "name": "groupoverrides", + "label": "Group object overrides" + }, + { + "type": "str", + "name": "appliedtohosts", + "label": "Hosts the view applies to" + }, + { + "doc": "colon-separated list of domains used for short name qualification", + "required": false, + "type": "str", + "name": "ipadomainresolutionorder", + "label": "Domain resolution order" } ], + "name": "idview", + "full_name": "idview/1" + }, + { + "version": "1", "params": [ { - "alwaysask": true, - "cli_name": "login", - "default_from_param": ["givenname", "sn"], - "label": "User login", - "multivalue": true, + "doc": "Manage ticket policy for specific user", + "required": false, + "type": "str", "name": "uid", - "no_convert": true, - "type": "str" + "label": "User name" }, { - "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", - "name": "continue", - "positional": false, - "type": "bool" + "doc": "Maximum ticket life (seconds)", + "required": false, + "type": "int", + "name": "krbmaxticketlife", + "label": "Max life" }, { - "exclude": ["cli"], - "name": "preserve", + "doc": "Maximum renewable age (seconds)", "required": false, - "type": "bool" + "type": "int", + "name": "krbmaxrenewableage", + "label": "Max renew" } ], - "topic_topic": "user/1", - "version": "1" + "name": "krbtpolicy", + "full_name": "krbtpolicy/1" }, { - "attr_name": "disable", - "doc": "Disable a user account.", - "full_name": "user_disable/1", - "name": "user_disable", - "obj_class": "user/1", - "output": [ + "version": "1", + "params": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "doc": "IPA location name", + "type": "DNSName", + "name": "idnsname", + "label": "Location name" }, { - "doc": "True means the operation was successful", - "name": "result", - "type": "bool" + "doc": "IPA Location description", + "required": false, + "type": "str", + "name": "description", + "label": "Description" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", + "name": "servers_server", + "doc": "Servers that belongs to the IPA location", + "required": false, + "label": "Servers", + "multivalue": true, "type": "str" - } - ], - "params": [ + }, { - "alwaysask": true, - "cli_name": "login", - "default_from_param": ["givenname", "sn"], - "label": "User login", - "name": "uid", - "no_convert": true, + "name": "dns_server", + "doc": "List of servers which advertise the given location", + "required": false, + "label": "Advertised by servers", + "multivalue": true, "type": "str" } ], - "topic_topic": "user/1", - "version": "1" + "name": "location", + "full_name": "location/1" }, { - "attr_name": "enable", - "doc": "Enable a user account.", - "full_name": "user_enable/1", - "name": "user_enable", - "obj_class": "user/1", - "output": [ + "version": "1", + "params": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "str", + "name": "name", + "label": "Name" }, { - "doc": "True means the operation was successful", - "name": "result", - "type": "bool" + "type": "str", + "name": "version", + "label": "Version" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ + "type": "str", + "name": "full_name", + "label": "Full name" + }, { - "alwaysask": true, - "cli_name": "login", - "default_from_param": ["givenname", "sn"], - "label": "User login", - "name": "uid", - "no_convert": true, - "type": "str" - } - ], - "topic_topic": "user/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": "Search for users.", - "full_name": "user_find/1", - "name": "user_find", - "obj_class": "user/1", - "output": [ + "required": false, + "type": "str", + "name": "doc", + "label": "Documentation" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "type": "str", "required": false, - "type": "str" + "multivalue": true, + "name": "exclude", + "label": "Exclude from" }, { + "type": "str", + "required": false, "multivalue": true, - "name": "result", - "type": "dict" + "name": "include", + "label": "Include in" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "required": false, + "type": "str", + "name": "topic_topic", + "label": "Help topic" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" + "type": "str", + "required": false, + "multivalue": true, + "name": "params_param", + "label": "Parameters" } ], + "name": "metaobject", + "full_name": "metaobject/1" + }, + { + "version": "1", "params": [ { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, + "type": "str", + "name": "cn", + "label": "Netgroup name" + }, + { + "doc": "Netgroup description", "required": false, - "type": "str" + "type": "str", + "name": "description", + "label": "Description" }, { - "alwaysask": true, - "cli_name": "login", - "default_from_param": ["givenname", "sn"], - "label": "User login", - "name": "uid", - "no_convert": true, "required": false, - "type": "str" + "type": "str", + "name": "nisdomainname", + "label": "NIS domain name" }, { - "cli_name": "first", - "label": "First name", - "name": "givenname", + "doc": "IPA unique ID", "required": false, - "type": "str" + "type": "str", + "name": "ipauniqueid", + "label": "IPA unique ID" }, { - "cli_name": "last", - "label": "Last name", - "name": "sn", + "doc": "User category the rule applies to", "required": false, - "type": "str" + "type": "str", + "name": "usercategory", + "label": "User category" }, { - "alwaysask": true, - "default_from_param": ["givenname", "sn"], - "label": "Full name", - "name": "cn", + "doc": "Host category the rule applies to", "required": false, - "type": "str" + "type": "str", + "name": "hostcategory", + "label": "Host category" }, { - "alwaysask": true, - "default_from_param": ["givenname", "sn"], - "label": "Display name", - "name": "displayname", + "type": "str", "required": false, - "type": "str" + "multivalue": true, + "name": "externalhost", + "label": "External host" }, { - "alwaysask": true, - "default_from_param": ["givenname", "sn"], - "label": "Initials", - "name": "initials", "required": false, - "type": "str" + "type": "str", + "name": "member_netgroup", + "label": "Member netgroups" }, { - "cli_name": "homedir", - "label": "Home directory", - "name": "homedirectory", "required": false, - "type": "str" + "type": "str", + "name": "memberof_netgroup", + "label": "Member of netgroups" }, { - "alwaysask": true, - "default_from_param": ["givenname", "sn"], - "label": "GECOS", - "name": "gecos", "required": false, - "type": "str" + "type": "str", + "name": "memberindirect_netgroup", + "label": "Indirect Member netgroups" }, { - "cli_name": "shell", - "label": "Login shell", - "name": "loginshell", "required": false, - "type": "str" + "type": "str", + "name": "memberuser_user", + "label": "Member User" }, { - "alwaysask": true, - "cli_name": "principal", - "default_from_param": ["uid"], - "label": "Principal alias", - "multivalue": true, - "name": "krbprincipalname", - "no_convert": true, "required": false, - "type": "Principal" + "type": "str", + "name": "memberuser_group", + "label": "Member Group" }, { - "cli_name": "principal_expiration", - "label": "Kerberos principal expiration", - "name": "krbprincipalexpiration", "required": false, - "type": "datetime" + "type": "str", + "name": "memberhost_host", + "label": "Member Host" }, { - "cli_name": "email", - "label": "Email address", - "multivalue": true, - "name": "mail", "required": false, - "type": "str" + "type": "str", + "name": "memberhost_hostgroup", + "label": "Member Hostgroup" + } + ], + "name": "netgroup", + "full_name": "netgroup/1" + }, + { + "version": "1", + "params": [ + { + "doc": "TOTP authentication time variance (seconds)", + "type": "int", + "name": "ipatokentotpauthwindow", + "label": "TOTP authentication Window" }, { - "cli_name": "password", - "doc": "Prompt to set the user password", - "exclude": ["webui"], - "label": "Password", - "name": "userpassword", + "doc": "TOTP synchronization time variance (seconds)", + "type": "int", + "name": "ipatokentotpsyncwindow", + "label": "TOTP Synchronization Window" + }, + { + "doc": "HOTP authentication skip-ahead", + "type": "int", + "name": "ipatokenhotpauthwindow", + "label": "HOTP Authentication Window" + }, + { + "doc": "HOTP synchronization skip-ahead", + "type": "int", + "name": "ipatokenhotpsyncwindow", + "label": "HOTP Synchronization Window" + } + ], + "name": "otpconfig", + "full_name": "otpconfig/1" + }, + { + "version": "1", + "params": [ + { + "type": "str", + "name": "ipatokenuniqueid", + "label": "Unique ID" + }, + { + "doc": "Type of the token", "required": false, - "sensitive": true, - "type": "str" + "type": "str", + "name": "type", + "label": "Type" }, { - "cli_name": "uid", - "doc": "User ID Number (system will assign one if not provided)", - "label": "UID", - "name": "uidnumber", + "doc": "Token description (informational only)", "required": false, - "type": "int" + "type": "str", + "name": "description", + "label": "Description" }, { - "doc": "Group ID Number", - "label": "GID", - "name": "gidnumber", + "doc": "Assigned user of the token (default: self)", "required": false, - "type": "int" + "type": "str", + "name": "ipatokenowner", + "label": "Owner" }, { - "cli_name": "street", - "label": "Street address", - "name": "street", + "doc": "Assigned manager of the token (default: self)", "required": false, - "type": "str" + "type": "str", + "name": "managedby_user", + "label": "Manager" }, { - "cli_name": "city", - "label": "City", - "name": "l", + "doc": "Mark the token as disabled (default: false)", "required": false, - "type": "str" + "type": "bool", + "name": "ipatokendisabled", + "label": "Disabled" }, { - "cli_name": "state", - "label": "State/Province", - "name": "st", + "doc": "First date/time the token can be used", "required": false, - "type": "str" + "type": "datetime", + "name": "ipatokennotbefore", + "label": "Validity start" }, { - "label": "ZIP", - "name": "postalcode", + "doc": "Last date/time the token can be used", "required": false, - "type": "str" + "type": "datetime", + "name": "ipatokennotafter", + "label": "Validity end" }, { - "cli_name": "phone", - "label": "Telephone Number", - "multivalue": true, - "name": "telephonenumber", + "doc": "Token vendor name (informational only)", "required": false, - "type": "str" + "type": "str", + "name": "ipatokenvendor", + "label": "Vendor" }, { - "label": "Mobile Telephone Number", - "multivalue": true, - "name": "mobile", + "doc": "Token model (informational only)", "required": false, - "type": "str" + "type": "str", + "name": "ipatokenmodel", + "label": "Model" }, { - "label": "Pager Number", - "multivalue": true, - "name": "pager", + "doc": "Token serial (informational only)", "required": false, - "type": "str" + "type": "str", + "name": "ipatokenserial", + "label": "Serial" }, { - "cli_name": "fax", - "label": "Fax Number", - "multivalue": true, - "name": "facsimiletelephonenumber", + "name": "ipatokenotpkey", + "doc": "Token secret (Base32; default: random)", "required": false, - "type": "str" + "label": "Key", + "sensitive": true, + "type": "bytes" }, { - "cli_name": "orgunit", - "label": "Org. Unit", - "name": "ou", + "doc": "Token hash algorithm", "required": false, - "type": "str" + "type": "str", + "name": "ipatokenotpalgorithm", + "label": "Algorithm" }, { - "label": "Job Title", - "name": "title", + "doc": "Number of digits each token code will have", "required": false, - "type": "str" + "type": "int", + "name": "ipatokenotpdigits", + "label": "Digits" }, { - "label": "Manager", - "name": "manager", + "doc": "TOTP token / FreeIPA server time difference", "required": false, - "type": "str" + "type": "int", + "name": "ipatokentotpclockoffset", + "label": "Clock offset" }, { - "label": "Car License", - "multivalue": true, - "name": "carlicense", + "doc": "Length of TOTP token code validity", "required": false, - "type": "str" + "type": "int", + "name": "ipatokentotptimestep", + "label": "Clock interval" }, { - "cli_metavar": "['password', 'radius', 'otp']", - "cli_name": "user_auth_type", - "doc": "Types of supported user authentication", - "label": "User authentication types", - "multivalue": true, - "name": "ipauserauthtype", + "doc": "Initial counter for the HOTP token", "required": false, - "type": "str" + "type": "int", + "name": "ipatokenhotpcounter", + "label": "Counter" }, { - "cli_name": "class", - "doc": - "User category (semantics placed on this attribute are for local interpretation)", - "label": "Class", - "multivalue": true, - "name": "userclass", "required": false, - "type": "str" + "type": "str", + "name": "uri", + "label": "URI" + } + ], + "name": "otptoken", + "full_name": "otptoken/1" + }, + { + "version": "1", + "params": [ + { + "type": "str", + "name": "name", + "label": "Name" }, { - "cli_name": "radius", - "label": "RADIUS proxy configuration", - "name": "ipatokenradiusconfiglink", "required": false, - "type": "str" + "type": "str", + "name": "doc", + "label": "Documentation" }, { - "cli_name": "radius_username", - "label": "RADIUS proxy username", - "name": "ipatokenradiususername", + "type": "str", "required": false, - "type": "str" + "multivalue": true, + "name": "exclude", + "label": "Exclude from" }, { - "label": "Department Number", + "type": "str", + "required": false, "multivalue": true, - "name": "departmentnumber", + "name": "include", + "label": "Include in" + }, + { "required": false, - "type": "str" + "type": "str", + "name": "type", + "label": "Type" }, { - "label": "Employee Number", - "name": "employeenumber", "required": false, - "type": "str" + "type": "bool", + "name": "required", + "label": "Required" }, { - "label": "Employee Type", - "name": "employeetype", "required": false, - "type": "str" + "type": "bool", + "name": "multivalue", + "label": "Multi-value" + } + ], + "name": "output", + "full_name": "output/1" + }, + { + "version": "1", + "params": [ + { + "type": "str", + "name": "name", + "label": "Name" }, { - "label": "Preferred Language", - "name": "preferredlanguage", "required": false, - "type": "str" + "type": "str", + "name": "doc", + "label": "Documentation" }, { - "cli_name": "certificate", - "doc": "Base-64 encoded user certificate", - "label": "Certificate", - "multivalue": true, - "name": "usercertificate", + "type": "str", "required": false, - "type": "bytes" + "multivalue": true, + "name": "exclude", + "label": "Exclude from" }, { - "exclude": ["cli", "webui"], - "label": "Account disabled", - "name": "nsaccountlock", + "type": "str", "required": false, - "type": "bool" + "multivalue": true, + "name": "include", + "label": "Include in" }, { - "alwaysask": true, - "default": ["False"], - "label": "Preserved user", - "name": "preserved", "required": false, - "type": "bool" + "type": "str", + "name": "type", + "label": "Type" }, { - "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", "required": false, - "type": "int" + "type": "bool", + "name": "required", + "label": "Required" }, { - "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", "required": false, - "type": "int" + "type": "bool", + "name": "multivalue", + "label": "Multi-value" }, { - "default": ["False"], - "doc": "Display user record for current Kerberos principal", - "label": "Self", - "name": "whoami", - "positional": false, - "type": "bool" + "required": false, + "type": "bool", + "name": "alwaysask", + "label": "Always ask" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "cli_metavar", + "label": "CLI metavar" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "cli_name", + "label": "CLI name" }, { - "default": ["True"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui", "cli"], - "name": "no_members", - "positional": false, - "type": "bool" + "type": "bool", + "name": "confirm", + "label": "Confirm (password)" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"login\")", - "label": "Primary key only", - "name": "pkey_only", + "type": "str", "required": false, - "type": "bool" + "multivalue": true, + "name": "default", + "label": "Default" }, { - "cli_name": "in_groups", - "doc": "Search for users with these member of groups.", - "label": "group", - "multivalue": true, - "name": "in_group", - "no_convert": true, + "type": "str", "required": false, - "type": "str" + "multivalue": true, + "name": "default_from_param", + "label": "Default from" }, { - "cli_name": "not_in_groups", - "doc": "Search for users without these member of groups.", - "label": "group", - "multivalue": true, - "name": "not_in_group", - "no_convert": true, "required": false, - "type": "str" + "type": "str", + "name": "label", + "label": "Label" }, { - "cli_name": "in_netgroups", - "doc": "Search for users with these member of netgroups.", - "label": "netgroup", - "multivalue": true, - "name": "in_netgroup", - "no_convert": true, "required": false, - "type": "str" + "type": "bool", + "name": "no_convert", + "label": "Convert on server" }, { - "cli_name": "not_in_netgroups", - "doc": "Search for users without these member of netgroups.", - "label": "netgroup", - "multivalue": true, - "name": "not_in_netgroup", - "no_convert": true, "required": false, - "type": "str" + "type": "str", + "name": "option_group", + "label": "Option group" }, { - "cli_name": "in_roles", - "doc": "Search for users with these member of roles.", - "label": "role", - "multivalue": true, - "name": "in_role", "required": false, - "type": "str" + "type": "bool", + "name": "sensitive", + "label": "Sensitive" }, { - "cli_name": "not_in_roles", - "doc": "Search for users without these member of roles.", - "label": "role", - "multivalue": true, - "name": "not_in_role", "required": false, - "type": "str" + "type": "bool", + "name": "positional", + "label": "Positional argument" + } + ], + "name": "param", + "full_name": "param/1" + }, + { + "version": "1", + "params": [ + { + "type": "str", + "name": "cn", + "label": "Permission name" }, { - "cli_name": "in_hbacrules", - "doc": "Search for users with these member of HBAC rules.", - "label": "HBAC rule", - "multivalue": true, - "name": "in_hbacrule", + "name": "ipapermright", + "doc": "Rights to grant (read, search, compare, write, add, delete, all)", "required": false, + "label": "Granted rights", + "multivalue": true, "type": "str" }, { - "cli_name": "not_in_hbacrules", - "doc": "Search for users without these member of HBAC rules.", - "label": "HBAC rule", - "multivalue": true, - "name": "not_in_hbacrule", + "name": "attrs", + "doc": "All attributes to which the permission applies", "required": false, + "label": "Effective attributes", + "multivalue": true, "type": "str" }, { - "cli_name": "in_sudorules", - "doc": "Search for users with these member of sudo rules.", - "label": "sudo rule", - "multivalue": true, - "name": "in_sudorule", + "name": "ipapermincludedattr", + "doc": "User-specified attributes to which the permission applies", "required": false, + "label": "Included attributes", + "multivalue": true, "type": "str" }, { - "cli_name": "not_in_sudorules", - "doc": "Search for users without these member of sudo rules.", - "label": "sudo rule", - "multivalue": true, - "name": "not_in_sudorule", + "name": "ipapermexcludedattr", + "doc": "User-specified attributes to which the permission explicitly does not apply", "required": false, + "label": "Excluded attributes", + "multivalue": true, "type": "str" - } - ], - "topic_topic": "user/1", - "version": "1" - }, - { - "attr_name": "mod", - "doc": "Modify a user.", - "full_name": "user_mod/1", - "name": "user_mod", - "obj_class": "user/1", - "output": [ + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "name": "ipapermdefaultattr", + "doc": "Attributes to which the permission applies by default", "required": false, + "label": "Default attributes", + "multivalue": true, "type": "str" }, { - "name": "result", - "type": "dict" + "doc": "Bind rule type", + "type": "str", + "name": "ipapermbindruletype", + "label": "Bind rule type" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ - { - "alwaysask": true, - "cli_name": "login", - "default_from_param": ["givenname", "sn"], - "label": "User login", - "name": "uid", - "no_convert": true, - "type": "str" + "doc": "Subtree to apply permissions to", + "required": false, + "type": "DN", + "name": "ipapermlocation", + "label": "Subtree" }, { - "cli_name": "first", - "label": "First name", - "name": "givenname", + "name": "extratargetfilter", + "doc": "Extra target filter", "required": false, + "label": "Extra target filter", + "multivalue": true, "type": "str" }, { - "cli_name": "last", - "label": "Last name", - "name": "sn", + "name": "ipapermtargetfilter", + "doc": "All target filters, including those implied by type and memberof", "required": false, + "label": "Raw target filter", + "multivalue": true, "type": "str" }, { - "alwaysask": true, - "default_from_param": ["givenname", "sn"], - "label": "Full name", - "name": "cn", + "doc": "Optional DN to apply the permission to (must be in the subtree, but may not yet exist)", "required": false, - "type": "str" + "type": "DN", + "name": "ipapermtarget", + "label": "Target DN" }, { - "alwaysask": true, - "default_from_param": ["givenname", "sn"], - "label": "Display name", - "name": "displayname", + "doc": "Optional DN subtree where an entry can be moved to (must be in the subtree, but may not yet exist)", "required": false, - "type": "str" + "type": "DN", + "name": "ipapermtargetto", + "label": "Target DN subtree" }, { - "alwaysask": true, - "default_from_param": ["givenname", "sn"], - "label": "Initials", - "name": "initials", + "doc": "Optional DN subtree from where an entry can be moved (must be in the subtree, but may not yet exist)", "required": false, - "type": "str" + "type": "DN", + "name": "ipapermtargetfrom", + "label": "Origin DN subtree" }, { - "cli_name": "homedir", - "label": "Home directory", - "name": "homedirectory", + "name": "memberof", + "doc": "Target members of a group (sets memberOf targetfilter)", "required": false, + "label": "Member of group", + "multivalue": true, "type": "str" }, { - "alwaysask": true, - "default_from_param": ["givenname", "sn"], - "label": "GECOS", - "name": "gecos", + "doc": "User group to apply permissions to (sets target)", "required": false, - "type": "str" + "type": "str", + "name": "targetgroup", + "label": "Target group" }, { - "cli_name": "shell", - "label": "Login shell", - "name": "loginshell", + "doc": "Type of IPA object (sets subtree and objectClass targetfilter)", "required": false, - "type": "str" + "type": "str", + "name": "type", + "label": "Type" }, { - "alwaysask": true, - "cli_name": "principal", - "default_from_param": ["uid"], - "label": "Principal alias", + "type": "str", + "required": false, "multivalue": true, - "name": "krbprincipalname", - "no_convert": true, + "name": "filter", + "doc": "Deprecated; use extratargetfilter" + }, + { + "type": "str", "required": false, - "type": "Principal" + "multivalue": true, + "name": "subtree", + "doc": "Deprecated; use ipapermlocation" }, { - "cli_name": "principal_expiration", - "label": "Kerberos principal expiration", - "name": "krbprincipalexpiration", + "type": "str", "required": false, - "type": "datetime" + "multivalue": true, + "name": "permissions", + "doc": "Deprecated; use ipapermright" }, { - "cli_name": "email", - "label": "Email address", + "type": "str", "multivalue": true, - "name": "mail", - "required": false, - "type": "str" + "name": "ipapermissiontype", + "label": "Permission flags" }, { - "cli_name": "password", - "doc": "Prompt to set the user password", - "exclude": ["webui"], - "label": "Password", - "name": "userpassword", - "required": false, - "sensitive": true, - "type": "str" + "type": "str", + "name": "aci", + "label": "ACI" }, { - "default": ["False"], - "doc": "Generate a random user password", - "name": "random", "required": false, - "type": "bool" + "type": "str", + "name": "member_privilege", + "label": "Granted to Privilege" }, { - "cli_name": "uid", - "doc": "User ID Number (system will assign one if not provided)", - "label": "UID", - "name": "uidnumber", "required": false, - "type": "int" + "type": "str", + "name": "memberindirect_role", + "label": "Indirect Member of roles" + } + ], + "name": "permission", + "full_name": "permission/1" + }, + { + "version": "1", + "params": [ + { + "doc": "IPA server hostname", + "required": false, + "type": "str", + "name": "server_server", + "label": "Server name" }, { - "doc": "Group ID Number", - "label": "GID", - "name": "gidnumber", + "doc": "Whether PKINIT is enabled or disabled", "required": false, - "type": "int" + "type": "str", + "name": "status", + "label": "PKINIT status" + } + ], + "name": "pkinit", + "full_name": "pkinit/1" + }, + { + "version": "1", + "params": [ + { + "type": "str", + "name": "cn", + "label": "Privilege name" }, { - "cli_name": "street", - "label": "Street address", - "name": "street", + "doc": "Privilege description", "required": false, - "type": "str" + "type": "str", + "name": "description", + "label": "Description" }, { - "cli_name": "city", - "label": "City", - "name": "l", "required": false, - "type": "str" + "type": "str", + "name": "memberof_permission", + "label": "Permissions" }, { - "cli_name": "state", - "label": "State/Province", - "name": "st", "required": false, - "type": "str" + "type": "str", + "name": "member_role", + "label": "Granting privilege to roles" + } + ], + "name": "privilege", + "full_name": "privilege/1" + }, + { + "version": "1", + "params": [ + { + "doc": "Manage password policy for specific group", + "required": false, + "type": "str", + "name": "cn", + "label": "Group" }, { - "label": "ZIP", - "name": "postalcode", + "doc": "Maximum password lifetime (in days)", "required": false, - "type": "str" + "type": "int", + "name": "krbmaxpwdlife", + "label": "Max lifetime (days)" }, { - "cli_name": "phone", - "label": "Telephone Number", - "multivalue": true, - "name": "telephonenumber", + "doc": "Minimum password lifetime (in hours)", "required": false, - "type": "str" + "type": "int", + "name": "krbminpwdlife", + "label": "Min lifetime (hours)" }, { - "label": "Mobile Telephone Number", - "multivalue": true, - "name": "mobile", + "doc": "Password history size", "required": false, - "type": "str" + "type": "int", + "name": "krbpwdhistorylength", + "label": "History size" }, { - "label": "Pager Number", - "multivalue": true, - "name": "pager", + "doc": "Minimum number of character classes", "required": false, - "type": "str" + "type": "int", + "name": "krbpwdmindiffchars", + "label": "Character classes" }, { - "cli_name": "fax", - "label": "Fax Number", - "multivalue": true, - "name": "facsimiletelephonenumber", + "doc": "Minimum length of password", "required": false, - "type": "str" + "type": "int", + "name": "krbpwdminlength", + "label": "Min length" }, { - "cli_name": "orgunit", - "label": "Org. Unit", - "name": "ou", + "doc": "Priority of the policy (higher number means lower priority", + "type": "int", + "name": "cospriority", + "label": "Priority" + }, + { + "doc": "Consecutive failures before lockout", "required": false, - "type": "str" + "type": "int", + "name": "krbpwdmaxfailure", + "label": "Max failures" }, { - "label": "Job Title", - "name": "title", + "doc": "Period after which failure count will be reset (seconds)", "required": false, - "type": "str" + "type": "int", + "name": "krbpwdfailurecountinterval", + "label": "Failure reset interval" }, { - "label": "Manager", - "name": "manager", + "doc": "Period for which lockout is enforced (seconds)", "required": false, - "type": "str" + "type": "int", + "name": "krbpwdlockoutduration", + "label": "Lockout duration" + } + ], + "name": "pwpolicy", + "full_name": "pwpolicy/1" + }, + { + "version": "1", + "params": [ + { + "type": "str", + "name": "cn", + "label": "RADIUS proxy server name" }, { - "label": "Car License", - "multivalue": true, - "name": "carlicense", + "doc": "A description of this RADIUS proxy server", "required": false, - "type": "str" + "type": "str", + "name": "description", + "label": "Description" }, { - "cli_name": "sshpubkey", - "label": "SSH public key", - "multivalue": true, - "name": "ipasshpubkey", - "no_convert": true, + "doc": "The hostname or IP (with or without port)", + "type": "str", + "name": "ipatokenradiusserver", + "label": "Server" + }, + { + "sensitive": true, + "doc": "The secret used to encrypt data", + "type": "str", + "name": "ipatokenradiussecret", + "label": "Secret" + }, + { + "doc": "The total timeout across all retries (in seconds)", "required": false, - "type": "str" + "type": "int", + "name": "ipatokenradiustimeout", + "label": "Timeout" }, { - "cli_metavar": "['password', 'radius', 'otp']", - "cli_name": "user_auth_type", - "doc": "Types of supported user authentication", - "label": "User authentication types", - "multivalue": true, - "name": "ipauserauthtype", + "doc": "The number of times to retry authentication", "required": false, - "type": "str" + "type": "int", + "name": "ipatokenradiusretries", + "label": "Retries" }, { - "cli_name": "class", - "doc": - "User category (semantics placed on this attribute are for local interpretation)", - "label": "Class", - "multivalue": true, - "name": "userclass", + "doc": "The username attribute on the user object", "required": false, - "type": "str" + "type": "str", + "name": "ipatokenusermapattribute", + "label": "User attribute" + } + ], + "name": "radiusproxy", + "full_name": "radiusproxy/1" + }, + { + "version": "1", + "params": [ + { + "type": "str", + "multivalue": true, + "name": "associateddomain", + "label": "Domain" }, { - "cli_name": "radius", - "label": "RADIUS proxy configuration", - "name": "ipatokenradiusconfiglink", "required": false, - "type": "str" + "type": "str", + "name": "add_domain", + "label": "Add domain" }, { - "cli_name": "radius_username", - "label": "RADIUS proxy username", - "name": "ipatokenradiususername", "required": false, - "type": "str" + "type": "str", + "name": "del_domain", + "label": "Delete domain" + } + ], + "name": "realmdomains", + "full_name": "realmdomains/1" + }, + { + "version": "1", + "params": [ + { + "type": "str", + "name": "cn", + "label": "Role name" }, { - "label": "Department Number", - "multivalue": true, - "name": "departmentnumber", + "doc": "A description of this role-group", "required": false, - "type": "str" + "type": "str", + "name": "description", + "label": "Description" }, { - "label": "Employee Number", - "name": "employeenumber", "required": false, - "type": "str" + "type": "str", + "name": "member_user", + "label": "Member users" }, { - "label": "Employee Type", - "name": "employeetype", "required": false, - "type": "str" + "type": "str", + "name": "member_group", + "label": "Member groups" }, { - "label": "Preferred Language", - "name": "preferredlanguage", "required": false, - "type": "str" + "type": "str", + "name": "member_host", + "label": "Member hosts" }, { - "cli_name": "certificate", - "doc": "Base-64 encoded user certificate", - "label": "Certificate", - "multivalue": true, - "name": "usercertificate", "required": false, - "type": "bytes" + "type": "str", + "name": "member_hostgroup", + "label": "Member host-groups" }, { - "exclude": ["cli", "webui"], - "label": "Account disabled", - "name": "nsaccountlock", "required": false, - "type": "bool" + "type": "str", + "name": "memberof_privilege", + "label": "Privileges" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", "required": false, - "type": "str" + "type": "str", + "name": "member_service", + "label": "Member services" + } + ], + "name": "role", + "full_name": "role/1" + }, + { + "version": "1", + "params": [ + { + "doc": "Self-service name", + "type": "str", + "name": "aciname", + "label": "Self-service name" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", + "name": "permissions", + "doc": "Permissions to grant (read, write). Default is write.", "required": false, + "label": "Permissions", + "multivalue": true, "type": "str" }, { - "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], + "type": "str", + "doc": "Attributes to which the permission applies.", "multivalue": true, - "name": "delattr", - "required": false, - "type": "str" + "name": "attrs", + "label": "Attributes" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" - }, + "type": "str", + "name": "aci", + "label": "ACI" + } + ], + "name": "selfservice", + "full_name": "selfservice/1" + }, + { + "version": "1", + "params": [ { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "type": "str", + "name": "cn", + "label": "Rule name" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "type": "str", + "name": "ipaselinuxuser", + "label": "SELinux User" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "doc": "HBAC Rule that defines the users, groups and hostgroups", + "required": false, + "type": "str", + "name": "seealso", + "label": "HBAC Rule" }, { - "alwaysask": true, - "cli_name": "rename", - "default_from_param": ["givenname", "sn"], - "doc": "Rename the user object", - "label": "Rename", - "name": "rename", - "no_convert": true, + "doc": "User category the rule applies to", "required": false, - "type": "str" - } - ], - "topic_topic": "user/1", - "version": "1" - }, - { - "attr_name": "remove_cert", - "doc": "Remove one or more certificates to the user entry", - "full_name": "user_remove_cert/1", - "name": "user_remove_cert", - "obj_class": "user/1", - "output": [ + "type": "str", + "name": "usercategory", + "label": "User category" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "doc": "Host category the rule applies to", "required": false, - "type": "str" + "type": "str", + "name": "hostcategory", + "label": "Host category" }, { - "name": "result", - "type": "dict" + "required": false, + "type": "str", + "name": "description", + "label": "Description" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ - { - "alwaysask": true, - "cli_name": "login", - "default_from_param": ["givenname", "sn"], - "label": "User login", - "name": "uid", - "no_convert": true, - "type": "str" + "required": false, + "type": "bool", + "name": "ipaenabledflag", + "label": "Enabled" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "memberuser_user", + "label": "Users" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "memberuser_group", + "label": "User Groups" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "memberhost_host", + "label": "Hosts" }, { - "alwaysask": true, - "cli_name": "certificate", - "doc": "Base-64 encoded user certificate", - "label": "Certificate", - "multivalue": true, - "name": "usercertificate", - "positional": false, - "type": "bytes" + "required": false, + "type": "str", + "name": "memberhost_hostgroup", + "label": "Host Groups" } ], - "topic_topic": "user/1", - "version": "1" + "name": "selinuxusermap", + "full_name": "selinuxusermap/1" }, { - "attr_name": "remove_manager", - "doc": "Remove a manager to the user entry", - "full_name": "user_remove_manager/1", - "name": "user_remove_manager", - "obj_class": "user/1", - "output": [ + "version": "1", + "params": [ { - "name": "result", - "type": "dict" + "doc": "IPA server hostname", + "type": "str", + "name": "cn", + "label": "Server name" }, { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" + "type": "str", + "required": false, + "multivalue": true, + "name": "iparepltopomanagedsuffix" }, { - "doc": "Number of members removed", - "name": "completed", - "type": "int" - } - ], - "params": [ + "type": "str", + "required": false, + "multivalue": true, + "name": "iparepltopomanagedsuffix_topologysuffix", + "label": "Managed suffixes" + }, { - "alwaysask": true, - "cli_name": "login", - "default_from_param": ["givenname", "sn"], - "label": "User login", - "name": "uid", - "no_convert": true, - "type": "str" + "doc": "Minimum domain level", + "type": "int", + "name": "ipamindomainlevel", + "label": "Min domain level" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "doc": "Maximum domain level", + "type": "int", + "name": "ipamaxdomainlevel", + "label": "Max domain level" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "doc": "Server location", + "required": false, + "type": "DNSName", + "name": "ipalocation_location", + "label": "Location" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "doc": "Weight for server services", + "required": false, + "type": "int", + "name": "ipaserviceweight", + "label": "Service weight" }, { - "alwaysask": true, - "cli_name": "users", - "doc": "users to remove", - "label": "member user", - "multivalue": true, - "name": "user", + "doc": "Relative weight for server services (counts per location)", + "type": "str", + "name": "service_relative_weight", + "label": "Service relative weight" + }, + { + "name": "enabled_role_servrole", + "doc": "List of enabled roles", "required": false, + "label": "Enabled server roles", + "multivalue": true, "type": "str" } ], - "topic_topic": "user/1", - "version": "1" + "name": "server", + "full_name": "server/1" }, { - "attr_name": "remove_principal", - "doc": "Remove principal alias from the user entry", - "full_name": "user_remove_principal/1", - "name": "user_remove_principal", - "obj_class": "user/1", - "output": [ + "version": "1", + "params": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "doc": "IPA server hostname", + "type": "str", + "name": "server_server", + "label": "Server name" }, { - "name": "result", - "type": "dict" + "doc": "IPA server role name", + "type": "str", + "name": "role_servrole", + "label": "Role name" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "doc": "Status of the role", + "required": false, + "type": "str", + "name": "status", + "label": "Role status" } ], + "name": "server_role", + "full_name": "server_role/1" + }, + { + "version": "1", "params": [ { - "alwaysask": true, - "cli_name": "login", - "default_from_param": ["givenname", "sn"], - "label": "User login", - "name": "uid", - "no_convert": true, - "type": "str" + "doc": "Service principal", + "type": "Principal", + "name": "krbcanonicalname", + "label": "Principal name" }, { - "alwaysask": true, - "cli_name": "principal", - "default_from_param": ["uid"], + "name": "krbprincipalname", + "doc": "Service principal alias", + "required": false, "label": "Principal alias", "multivalue": true, - "name": "krbprincipalname", - "no_convert": true, "type": "Principal" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "name": "usercertificate", + "doc": "Base-64 encoded service certificate", + "required": false, + "label": "Certificate", + "multivalue": true, + "type": "Certificate" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "type": "str", + "name": "subject", + "label": "Subject" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "user/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display information about a user.", - "full_name": "user_show/1", - "name": "user_show", - "obj_class": "user/1", - "output": [ + "type": "str", + "name": "serial_number", + "label": "Serial Number" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "str", + "name": "serial_number_hex", + "label": "Serial Number (hex)" }, { - "name": "result", - "type": "dict" + "type": "str", + "name": "issuer", + "label": "Issuer" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ + "type": "str", + "name": "valid_not_before", + "label": "Not Before" + }, { - "alwaysask": true, - "cli_name": "login", - "default_from_param": ["givenname", "sn"], - "label": "User login", - "name": "uid", - "no_convert": true, - "type": "str" + "type": "str", + "name": "valid_not_after", + "label": "Not After" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "type": "str", + "name": "sha1_fingerprint", + "label": "Fingerprint (SHA1)" }, { - "doc": "file to store certificate in", - "name": "out", + "type": "str", + "name": "sha256_fingerprint", + "label": "Fingerprint (SHA256)" + }, + { + "required": false, + "type": "str", + "name": "revocation_reason", + "label": "Revocation reason" + }, + { + "name": "ipakrbauthzdata", + "doc": "Override default list of supported PAC types. Use 'NONE' to disable PAC support for this service, e.g. this might be necessary for NFS services.", "required": false, + "label": "PAC type", + "multivalue": true, "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "name": "krbprincipalauthind", + "doc": "Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations.", + "required": false, + "label": "Authentication Indicators", + "multivalue": true, + "type": "str" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "doc": "Pre-authentication is required for the service", + "required": false, + "type": "bool", + "name": "ipakrbrequirespreauth", + "label": "Requires pre-authentication" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "user/1", - "version": "1" - }, - { - "attr_name": "stage", - "doc": "Move deleted user into staged area", - "full_name": "user_stage/1", - "name": "user_stage", - "obj_class": "user/1", - "output": [ + "doc": "Client credentials may be delegated to the service", + "required": false, + "type": "bool", + "name": "ipakrbokasdelegate", + "label": "Trusted for delegation" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "doc": "The service is allowed to authenticate on behalf of a client", "required": false, - "type": "str" + "type": "bool", + "name": "ipakrboktoauthasdelegate", + "label": "Trusted to authenticate as user" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "required": false, + "type": "str", + "name": "memberof_role", + "label": "Roles" }, { - "multivalue": true, - "name": "value", - "type": "str" - } - ], - "params": [ + "type": "bool", + "name": "has_keytab", + "label": "Keytab" + }, { - "alwaysask": true, - "cli_name": "login", - "default_from_param": ["givenname", "sn"], - "label": "User login", - "multivalue": true, - "name": "uid", - "no_convert": true, - "type": "str" + "type": "str", + "name": "managedby_host", + "label": "Managed by" }, { - "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", - "name": "continue", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "user/1", - "version": "1" - }, - { - "attr_name": "find", - "doc": - "\n Lockout status of a user account\n\n An account may become locked if the password is entered incorrectly too\n many times within a specific time period as controlled by password\n policy. A locked account is a temporary condition and may be unlocked by\n an administrator.\n\n This connects to each IPA master and displays the lockout status on\n each one.\n\n To determine whether an account is locked on a given server you need\n to compare the number of failed logins and the time of the last failure.\n For an account to be locked it must exceed the maxfail failures within\n the failinterval duration as specified in the password policy associated\n with the user.\n\n The failed login counter is modified only when a user attempts a log in\n so it is possible that an account may appear locked but the last failed\n login attempt is older than the lockouttime of the password policy. This\n means that the user may attempt a login again. ", - "full_name": "user_status/1", - "name": "user_status", - "obj_class": "userstatus/1", - "output": [ + "type": "str", + "name": "ipaallowedtoperform_read_keys_user", + "label": "Users allowed to retrieve keytab" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "str", + "name": "ipaallowedtoperform_read_keys_group", + "label": "Groups allowed to retrieve keytab" }, { - "multivalue": true, - "name": "result", - "type": "dict" + "type": "str", + "name": "ipaallowedtoperform_read_keys_host", + "label": "Hosts allowed to retrieve keytab" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "type": "str", + "name": "ipaallowedtoperform_read_keys_hostgroup", + "label": "Host Groups allowed to retrieve keytab" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" - } - ], - "params": [ + "type": "str", + "name": "ipaallowedtoperform_write_keys_user", + "label": "Users allowed to create keytab" + }, { - "alwaysask": true, - "cli_name": "login", - "default_from_param": ["givenname", "sn"], - "label": "User login", - "name": "useruid", - "no_convert": true, - "type": "str" + "type": "str", + "name": "ipaallowedtoperform_write_keys_group", + "label": "Groups allowed to create keytab" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "type": "str", + "name": "ipaallowedtoperform_write_keys_host", + "label": "Hosts allowed to create keytab" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "type": "str", + "name": "ipaallowedtoperform_write_keys_hostgroup", + "label": "Host Groups allowed to create keytab" } ], - "topic_topic": "user/1", - "version": "1" + "name": "service", + "full_name": "service/1" }, { - "attr_name": "undel", - "doc": "Undelete a delete user account.", - "full_name": "user_undel/1", - "name": "user_undel", - "obj_class": "user/1", - "output": [ + "version": "1", + "params": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "str", + "name": "cn", + "label": "Delegation name" }, { - "doc": "True means the operation was successful", - "name": "result", - "type": "bool" + "type": "str", + "name": "ipaallowedtarget_servicedelegationtarget", + "label": "Allowed Target" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ + "type": "str", + "name": "ipaallowedtoimpersonate", + "label": "Allowed to Impersonate" + }, { - "alwaysask": true, - "cli_name": "login", - "default_from_param": ["givenname", "sn"], - "label": "User login", - "name": "uid", - "no_convert": true, - "type": "str" + "type": "str", + "name": "memberprincipal", + "label": "Member principals" } ], - "topic_topic": "user/1", - "version": "1" + "name": "servicedelegationrule", + "full_name": "servicedelegationrule/1" }, { - "attr_name": "unlock", - "doc": - "\n Unlock a user account\n\n An account may become locked if the password is entered incorrectly too\n many times within a specific time period as controlled by password\n policy. A locked account is a temporary condition and may be unlocked by\n an administrator.", - "full_name": "user_unlock/1", - "name": "user_unlock", - "obj_class": "user/1", - "output": [ + "version": "1", + "params": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "str", + "name": "cn", + "label": "Delegation name" }, { - "doc": "True means the operation was successful", - "name": "result", - "type": "bool" + "type": "str", + "name": "ipaallowedtarget_servicedelegationtarget", + "label": "Allowed Target" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "type": "str", + "name": "ipaallowedtoimpersonate", + "label": "Allowed to Impersonate" + }, + { + "type": "str", + "name": "memberprincipal", + "label": "Member principals" } ], + "name": "servicedelegationtarget", + "full_name": "servicedelegationtarget/1" + }, + { + "version": "1", "params": [ { - "alwaysask": true, - "cli_name": "login", - "default_from_param": ["givenname", "sn"], - "label": "User login", - "name": "uid", - "no_convert": true, - "type": "str" + "doc": "IPA role name", + "type": "str", + "name": "name", + "label": "Role name" } ], - "topic_topic": "user/1", - "version": "1" + "name": "servrole", + "full_name": "servrole/1" }, { - "attr_name": "add_internal", - "exclude": ["cli"], - "full_name": "vault_add_internal/1", - "name": "vault_add_internal", - "obj_class": "vault/1", - "output": [ + "version": "1", + "params": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "str", + "name": "uid", + "label": "User login" }, { - "name": "result", - "type": "dict" + "type": "str", + "name": "givenname", + "label": "First name" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ + "type": "str", + "name": "sn", + "label": "Last name" + }, { - "cli_name": "name", - "label": "Vault name", + "type": "str", "name": "cn", - "type": "str" + "label": "Full name" }, { - "cli_name": "desc", - "doc": "Vault description", - "label": "Description", - "name": "description", "required": false, - "type": "str" + "type": "str", + "name": "displayname", + "label": "Display name" }, { - "cli_metavar": "['standard', 'symmetric', 'asymmetric']", - "cli_name": "type", - "default": ["symmetric"], - "doc": "Vault type", - "label": "Type", - "name": "ipavaulttype", "required": false, - "type": "str" + "type": "str", + "name": "initials", + "label": "Initials" }, { - "cli_name": "salt", - "doc": "Vault salt", - "label": "Salt", - "name": "ipavaultsalt", "required": false, - "type": "bytes" + "type": "str", + "name": "homedirectory", + "label": "Home directory" }, { - "cli_name": "public_key", - "doc": "Vault public key", - "label": "Public key", - "name": "ipavaultpublickey", "required": false, - "type": "bytes" + "type": "str", + "name": "gecos", + "label": "GECOS" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", "required": false, - "type": "str" + "type": "str", + "name": "loginshell", + "label": "Login shell" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", "required": false, - "type": "str" + "type": "Principal", + "name": "krbcanonicalname", + "label": "Principal name" }, { - "doc": "Service name of the service vault", - "name": "service", - "no_convert": true, + "type": "Principal", "required": false, - "type": "Principal" + "multivalue": true, + "name": "krbprincipalname", + "label": "Principal alias" }, { - "default": ["False"], - "doc": "Shared vault", - "name": "shared", "required": false, - "type": "bool" + "type": "datetime", + "name": "krbprincipalexpiration", + "label": "Kerberos principal expiration" }, { - "cli_name": "user", - "doc": "Username of the user vault", - "name": "username", "required": false, - "type": "str" + "type": "datetime", + "name": "krbpasswordexpiration", + "label": "User password expiration" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "type": "str", + "required": false, + "multivalue": true, + "name": "mail", + "label": "Email address" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "name": "userpassword", + "doc": "Prompt to set the user password", + "required": false, + "label": "Password", + "sensitive": true, + "exclude": [ + "webui" + ], + "type": "str" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "vault/1", - "version": "1" - }, - { - "attr_name": "add_member", - "doc": "Add members to a vault.", - "full_name": "vault_add_member/1", - "name": "vault_add_member", - "obj_class": "vault/1", - "output": [ + "doc": "Generate a random user password", + "required": false, + "type": "bool", + "name": "random" + }, { - "name": "result", - "type": "dict" + "required": false, + "type": "str", + "name": "randompassword", + "label": "Random password" }, { - "doc": "Members that could not be added", - "name": "failed", - "type": "dict" + "doc": "User ID Number (system will assign one if not provided)", + "required": false, + "type": "int", + "name": "uidnumber", + "label": "UID" }, { - "doc": "Number of members added", - "name": "completed", - "type": "int" - } - ], - "params": [ + "doc": "Group ID Number", + "required": false, + "type": "int", + "name": "gidnumber", + "label": "GID" + }, { - "cli_name": "name", - "label": "Vault name", - "name": "cn", - "type": "str" + "required": false, + "type": "str", + "name": "street", + "label": "Street address" }, { - "doc": "Service name of the service vault", - "name": "service", - "no_convert": true, "required": false, - "type": "Principal" + "type": "str", + "name": "l", + "label": "City" }, { - "default": ["False"], - "doc": "Shared vault", - "name": "shared", "required": false, - "type": "bool" + "type": "str", + "name": "st", + "label": "State/Province" }, { - "cli_name": "user", - "doc": "Username of the user vault", - "name": "username", "required": false, - "type": "str" + "type": "str", + "name": "postalcode", + "label": "ZIP" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "type": "str", + "required": false, + "multivalue": true, + "name": "telephonenumber", + "label": "Telephone Number" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "type": "str", + "required": false, + "multivalue": true, + "name": "mobile", + "label": "Mobile Telephone Number" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "type": "str", + "required": false, + "multivalue": true, + "name": "pager", + "label": "Pager Number" }, { - "alwaysask": true, - "cli_name": "users", - "doc": "users to add", - "label": "member user", + "type": "str", + "required": false, "multivalue": true, - "name": "user", + "name": "facsimiletelephonenumber", + "label": "Fax Number" + }, + { "required": false, - "type": "str" + "type": "str", + "name": "ou", + "label": "Org. Unit" }, { - "alwaysask": true, - "cli_name": "groups", - "doc": "groups to add", - "label": "member group", - "multivalue": true, - "name": "group", "required": false, - "type": "str" + "type": "str", + "name": "title", + "label": "Job Title" }, { - "alwaysask": true, - "cli_name": "services", - "doc": "services to add", - "label": "member service", - "multivalue": true, - "name": "services", "required": false, - "type": "str" - } - ], - "topic_topic": "vault/1", - "version": "1" - }, - { - "attr_name": "add_owner", - "doc": "Add owners to a vault.", - "full_name": "vault_add_owner/1", - "name": "vault_add_owner", - "obj_class": "vault/1", - "output": [ + "type": "str", + "name": "manager", + "label": "Manager" + }, { - "name": "result", - "type": "dict" + "type": "str", + "required": false, + "multivalue": true, + "name": "carlicense", + "label": "Car License" }, { - "doc": "Owners that could not be added", - "name": "failed", - "type": "dict" + "type": "str", + "required": false, + "multivalue": true, + "name": "ipasshpubkey", + "label": "SSH public key" }, { - "doc": "Number of owners added", - "name": "completed", - "type": "int" - } - ], - "params": [ + "type": "str", + "required": false, + "multivalue": true, + "name": "sshpubkeyfp", + "label": "SSH public key fingerprint" + }, { - "cli_name": "name", - "label": "Vault name", - "name": "cn", + "name": "ipauserauthtype", + "doc": "Types of supported user authentication", + "required": false, + "label": "User authentication types", + "multivalue": true, "type": "str" }, { - "doc": "Service name of the service vault", - "name": "service", - "no_convert": true, + "name": "userclass", + "doc": "User category (semantics placed on this attribute are for local interpretation)", "required": false, - "type": "Principal" + "label": "Class", + "multivalue": true, + "type": "str" }, { - "default": ["False"], - "doc": "Shared vault", - "name": "shared", "required": false, - "type": "bool" + "type": "str", + "name": "ipatokenradiusconfiglink", + "label": "RADIUS proxy configuration" }, { - "cli_name": "user", - "doc": "Username of the user vault", - "name": "username", "required": false, - "type": "str" + "type": "str", + "name": "ipatokenradiususername", + "label": "RADIUS proxy username" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "type": "str", + "required": false, + "multivalue": true, + "name": "departmentnumber", + "label": "Department Number" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "employeenumber", + "label": "Employee Number" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "employeetype", + "label": "Employee Type" }, { - "alwaysask": true, - "cli_name": "users", - "doc": "users to add", - "label": "owner user", - "multivalue": true, - "name": "user", "required": false, - "type": "str" + "type": "str", + "name": "preferredlanguage", + "label": "Preferred Language" }, { - "alwaysask": true, - "cli_name": "groups", - "doc": "groups to add", - "label": "owner group", - "multivalue": true, - "name": "group", + "name": "usercertificate", + "doc": "Base-64 encoded user certificate", "required": false, - "type": "str" + "label": "Certificate", + "multivalue": true, + "type": "Certificate" }, { - "alwaysask": true, - "cli_name": "services", - "doc": "services to add", - "label": "owner service", - "multivalue": true, - "name": "services", + "name": "ipacertmapdata", + "doc": "Certificate mapping data", "required": false, + "label": "Certificate mapping data", + "multivalue": true, "type": "str" - } - ], - "topic_topic": "vault/1", - "version": "1" - }, - { - "attr_name": "archive_internal", - "exclude": ["cli"], - "full_name": "vault_archive_internal/1", - "name": "vault_archive_internal", - "obj_class": "vault/1", - "output": [ + }, { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "bool", + "name": "has_password", + "label": "Password" }, { - "name": "result", - "type": "dict" + "required": false, + "type": "str", + "name": "memberof_group", + "label": "Member of groups" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ + "required": false, + "type": "str", + "name": "memberof_role", + "label": "Roles" + }, { - "cli_name": "name", - "label": "Vault name", - "name": "cn", - "type": "str" + "required": false, + "type": "str", + "name": "memberof_netgroup", + "label": "Member of netgroups" }, { - "doc": "Service name of the service vault", - "name": "service", - "no_convert": true, "required": false, - "type": "Principal" + "type": "str", + "name": "memberof_sudorule", + "label": "Member of Sudo rule" }, { - "default": ["False"], - "doc": "Shared vault", - "name": "shared", "required": false, - "type": "bool" + "type": "str", + "name": "memberof_hbacrule", + "label": "Member of HBAC rule" }, { - "cli_name": "user", - "doc": "Username of the user vault", - "name": "username", "required": false, - "type": "str" + "type": "str", + "name": "memberofindirect_group", + "label": "Indirect Member of group" }, { - "doc": "Session key wrapped with transport certificate", - "name": "session_key", - "positional": false, - "type": "bytes" + "required": false, + "type": "str", + "name": "memberofindirect_netgroup", + "label": "Indirect Member of netgroup" }, { - "doc": "Vault data encrypted with session key", - "name": "vault_data", - "positional": false, - "type": "bytes" + "required": false, + "type": "str", + "name": "memberofindirect_role", + "label": "Indirect Member of role" }, { - "doc": "Nonce", - "name": "nonce", - "positional": false, - "type": "bytes" + "required": false, + "type": "str", + "name": "memberofindirect_sudorule", + "label": "Indirect Member of Sudo rule" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "memberofindirect_hbacrule", + "label": "Indirect Member of HBAC rule" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "type": "bool", + "name": "has_keytab", + "label": "Kerberos keys available" } ], - "topic_topic": "vault/1", - "version": "1" + "name": "stageuser", + "full_name": "stageuser/1" }, { - "attr_name": "del", - "doc": "Delete a vault.", - "full_name": "vault_del/1", - "name": "vault_del", - "obj_class": "vault/1", - "output": [ + "version": "1", + "params": [ { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" + "type": "str", + "name": "sudocmd", + "label": "Sudo Command" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "doc": "A description of this command", + "required": false, + "type": "str", + "name": "description", + "label": "Description" }, { - "multivalue": true, - "name": "value", - "type": "str" + "required": false, + "type": "str", + "name": "memberof_sudocmdgroup", + "label": "Sudo Command Groups" } ], + "name": "sudocmd", + "full_name": "sudocmd/1" + }, + { + "version": "1", "params": [ { - "cli_name": "name", - "label": "Vault name", - "multivalue": true, + "type": "str", "name": "cn", - "type": "str" + "label": "Sudo Command Group" }, { - "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", - "name": "continue", - "positional": false, - "type": "bool" + "doc": "Group description", + "required": false, + "type": "str", + "name": "description", + "label": "Description" }, { - "doc": "Service name of the service vault", - "name": "service", - "no_convert": true, "required": false, - "type": "Principal" + "type": "str", + "name": "membercmd_sudocmd", + "label": "Commands" }, { - "default": ["False"], - "doc": "Shared vault", - "name": "shared", "required": false, - "type": "bool" + "type": "str", + "name": "membercmd_sudocmdgroup", + "label": "Sudo Command Groups" }, { - "cli_name": "user", - "doc": "Username of the user vault", - "name": "username", "required": false, - "type": "str" + "type": "str", + "name": "member_sudocmd", + "label": "Member Sudo commands" } ], - "topic_topic": "vault/1", - "version": "1" + "name": "sudocmdgroup", + "full_name": "sudocmdgroup/1" }, { - "attr_name": "find", - "doc": "Search for vaults.", - "full_name": "vault_find/1", - "name": "vault_find", - "obj_class": "vault/1", - "output": [ + "version": "1", + "params": [ + { + "type": "str", + "name": "cn", + "label": "Rule name" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "description", + "label": "Description" }, { - "multivalue": true, - "name": "result", - "type": "dict" + "required": false, + "type": "bool", + "name": "ipaenabledflag", + "label": "Enabled" }, { - "doc": "Number of entries returned", - "name": "count", - "type": "int" + "doc": "User category the rule applies to", + "required": false, + "type": "str", + "name": "usercategory", + "label": "User category" }, { - "doc": "True if not all results were returned", - "name": "truncated", - "type": "bool" - } - ], - "params": [ + "doc": "Host category the rule applies to", + "required": false, + "type": "str", + "name": "hostcategory", + "label": "Host category" + }, { - "doc": "A string searched in all relevant object attributes", - "name": "criteria", - "positional": true, + "doc": "Command category the rule applies to", "required": false, - "type": "str" + "type": "str", + "name": "cmdcategory", + "label": "Command category" }, { - "cli_name": "name", - "label": "Vault name", - "name": "cn", + "doc": "RunAs User category the rule applies to", "required": false, - "type": "str" + "type": "str", + "name": "ipasudorunasusercategory", + "label": "RunAs User category" }, { - "cli_name": "desc", - "doc": "Vault description", - "label": "Description", - "name": "description", + "doc": "RunAs Group category the rule applies to", "required": false, - "type": "str" + "type": "str", + "name": "ipasudorunasgroupcategory", + "label": "RunAs Group category" }, { - "alwaysask": true, - "cli_metavar": "['standard', 'symmetric', 'asymmetric']", - "cli_name": "type", - "default": ["symmetric"], - "doc": "Vault type", - "label": "Type", - "name": "ipavaulttype", + "doc": "integer to order the Sudo rules", "required": false, - "type": "str" + "type": "int", + "name": "sudoorder", + "label": "Sudo order" }, { - "doc": "Time limit of search in seconds (0 is unlimited)", - "label": "Time Limit", - "name": "timelimit", "required": false, - "type": "int" + "type": "str", + "name": "memberuser_user", + "label": "Users" }, { - "doc": "Maximum number of entries returned (0 is unlimited)", - "label": "Size Limit", - "name": "sizelimit", "required": false, - "type": "int" + "type": "str", + "name": "memberuser_group", + "label": "User Groups" }, { - "doc": "Service name of the service vault", - "name": "service", - "no_convert": true, + "doc": "External User the rule applies to (sudorule-find only)", "required": false, - "type": "Principal" + "type": "str", + "name": "externaluser", + "label": "External User" }, { - "default": ["False"], - "doc": "Shared vault", - "name": "shared", "required": false, - "type": "bool" + "type": "str", + "name": "memberhost_host", + "label": "Hosts" }, { - "cli_name": "user", - "doc": "Username of the user vault", - "name": "username", "required": false, - "type": "str" + "type": "str", + "name": "memberhost_hostgroup", + "label": "Host Groups" }, { - "default": ["False"], - "doc": "List all service vaults", - "name": "services", + "type": "str", + "multivalue": true, + "name": "hostmask", + "label": "Host Masks" + }, + { + "type": "str", "required": false, - "type": "bool" + "multivalue": true, + "name": "externalhost", + "label": "External host" }, { - "default": ["False"], - "doc": "List all user vaults", - "name": "users", "required": false, - "type": "bool" + "type": "str", + "name": "memberallowcmd_sudocmd", + "label": "Sudo Allow Commands" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "memberdenycmd_sudocmd", + "label": "Sudo Deny Commands" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "memberallowcmd_sudocmdgroup", + "label": "Sudo Allow Command Groups" + }, + { + "required": false, + "type": "str", + "name": "memberdenycmd_sudocmdgroup", + "label": "Sudo Deny Command Groups" + }, + { + "doc": "Run as a user", + "required": false, + "type": "str", + "name": "ipasudorunas_user", + "label": "RunAs Users" + }, + { + "doc": "Run as any user within a specified group", + "required": false, + "type": "str", + "name": "ipasudorunas_group", + "label": "Groups of RunAs Users" }, { - "default": ["True"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui", "cli"], - "name": "no_members", - "positional": false, - "type": "bool" + "doc": "External User the commands can run as (sudorule-find only)", + "required": false, + "type": "str", + "name": "ipasudorunasextuser", + "label": "RunAs External User" }, { - "default": ["False"], - "doc": - "Results should contain primary key attribute only (\"name\")", - "label": "Primary key only", - "name": "pkey_only", + "doc": "External Groups of users that the command can run as", "required": false, - "type": "bool" - } - ], - "topic_topic": "vault/1", - "version": "1" - }, - { - "attr_name": "mod_internal", - "exclude": ["cli"], - "full_name": "vault_mod_internal/1", - "name": "vault_mod_internal", - "obj_class": "vault/1", - "output": [ + "type": "str", + "name": "ipasudorunasextusergroup", + "label": "External Groups of RunAs Users" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "doc": "Run with the gid of a specified POSIX group", "required": false, - "type": "str" + "type": "str", + "name": "ipasudorunasgroup_group", + "label": "RunAs Groups" }, { - "name": "result", - "type": "dict" + "doc": "External Group the commands can run as (sudorule-find only)", + "required": false, + "type": "str", + "name": "ipasudorunasextgroup", + "label": "RunAs External Group" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" + "required": false, + "type": "str", + "name": "ipasudoopt", + "label": "Sudo Option" } ], + "name": "sudorule", + "full_name": "sudorule/1" + }, + { + "version": "1", "params": [ { - "cli_name": "name", - "label": "Vault name", - "name": "cn", - "type": "str" + "type": "str", + "name": "name", + "label": "Name" }, { - "cli_name": "desc", - "doc": "Vault description", - "label": "Description", - "name": "description", - "required": false, - "type": "str" + "type": "str", + "name": "version", + "label": "Version" }, { - "alwaysask": true, - "cli_metavar": "['standard', 'symmetric', 'asymmetric']", - "cli_name": "type", - "default": ["symmetric"], - "doc": "Vault type", - "label": "Type", - "name": "ipavaulttype", - "required": false, - "type": "str" + "type": "str", + "name": "full_name", + "label": "Full name" }, { - "cli_name": "salt", - "doc": "Vault salt", - "label": "Salt", - "name": "ipavaultsalt", "required": false, - "type": "bytes" + "type": "str", + "name": "doc", + "label": "Documentation" }, { - "cli_name": "public_key", - "doc": "Vault public key", - "label": "Public key", - "name": "ipavaultpublickey", + "type": "str", "required": false, - "type": "bytes" + "multivalue": true, + "name": "exclude", + "label": "Exclude from" }, { - "cli_name": "setattr", - "doc": - "Set an attribute to a name/value pair. Format is attr=value.\nFor multi-valued attributes, the command replaces the values already present.", - "exclude": ["webui"], - "multivalue": true, - "name": "setattr", + "type": "str", "required": false, - "type": "str" + "multivalue": true, + "name": "include", + "label": "Include in" }, { - "cli_name": "addattr", - "doc": - "Add an attribute/value pair. Format is attr=value. The attribute\nmust be part of the schema.", - "exclude": ["webui"], - "multivalue": true, - "name": "addattr", "required": false, - "type": "str" + "type": "str", + "name": "topic_topic", + "label": "Help topic" + } + ], + "name": "topic", + "full_name": "topic/1" + }, + { + "version": "1", + "params": [ + { + "doc": "Arbitrary string identifying the segment", + "type": "str", + "name": "cn", + "label": "Segment name" }, { - "cli_name": "delattr", - "doc": - "Delete an attribute/value pair. The option will be evaluated\nlast, after all sets and adds.", - "exclude": ["webui"], - "multivalue": true, - "name": "delattr", - "required": false, - "type": "str" + "doc": "Left replication node - an IPA server", + "type": "str", + "name": "iparepltoposegmentleftnode", + "label": "Left node" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "doc": "Right replication node - an IPA server", + "type": "str", + "name": "iparepltoposegmentrightnode", + "label": "Right node" }, { - "doc": "Service name of the service vault", - "name": "service", - "no_convert": true, - "required": false, - "type": "Principal" + "doc": "Direction of replication between left and right replication node", + "type": "str", + "name": "iparepltoposegmentdirection", + "label": "Connectivity" }, { - "default": ["False"], - "doc": "Shared vault", - "name": "shared", + "doc": "A space separated list of attributes which are removed from replication updates.", "required": false, - "type": "bool" + "type": "str", + "name": "nsds5replicastripattrs", + "label": "Attributes to strip" }, { - "cli_name": "user", - "doc": "Username of the user vault", - "name": "username", + "doc": "Attributes that are not replicated to a consumer server during a fractional update. E.g., `(objectclass=*) $ EXCLUDE accountlockout memberof", "required": false, - "type": "str" + "type": "str", + "name": "nsds5replicatedattributelist", + "label": "Attributes to replicate" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "doc": "Attributes that are not replicated to a consumer server during a total update. E.g. (objectclass=*) $ EXCLUDE accountlockout", + "required": false, + "type": "str", + "name": "nsds5replicatedattributelisttotal", + "label": "Attributes for total update" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "doc": "Number of seconds outbound LDAP operations waits for a response from the remote replica before timing out and failing", + "required": false, + "type": "int", + "name": "nsds5replicatimeout", + "label": "Session timeout" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "doc": "Whether a replication agreement is active, meaning whether replication is occurring per that agreement", + "required": false, + "type": "str", + "name": "nsds5replicaenabled", + "label": "Replication agreement enabled" } ], - "topic_topic": "vault/1", - "version": "1" + "name": "topologysegment", + "full_name": "topologysegment/1" }, { - "attr_name": "remove_member", - "doc": "Remove members from a vault.", - "full_name": "vault_remove_member/1", - "name": "vault_remove_member", - "obj_class": "vault/1", - "output": [ - { - "name": "result", - "type": "dict" - }, + "version": "1", + "params": [ { - "doc": "Members that could not be removed", - "name": "failed", - "type": "dict" + "type": "str", + "name": "cn", + "label": "Suffix name" }, { - "doc": "Number of members removed", - "name": "completed", - "type": "int" + "type": "DN", + "name": "iparepltopoconfroot", + "label": "Managed LDAP suffix DN" } ], + "name": "topologysuffix", + "full_name": "topologysuffix/1" + }, + { + "version": "1", "params": [ { - "cli_name": "name", - "label": "Vault name", + "type": "str", "name": "cn", - "type": "str" + "label": "Realm name" }, { - "doc": "Service name of the service vault", - "name": "service", - "no_convert": true, - "required": false, - "type": "Principal" + "type": "str", + "name": "ipantflatname", + "label": "Domain NetBIOS name" }, { - "default": ["False"], - "doc": "Shared vault", - "name": "shared", + "type": "str", + "name": "ipanttrusteddomainsid", + "label": "Domain Security Identifier" + }, + { + "type": "str", "required": false, - "type": "bool" + "multivalue": true, + "name": "ipantsidblacklistincoming", + "label": "SID blacklist incoming" }, { - "cli_name": "user", - "doc": "Username of the user vault", - "name": "username", + "type": "str", "required": false, - "type": "str" + "multivalue": true, + "name": "ipantsidblacklistoutgoing", + "label": "SID blacklist outgoing" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "type": "str", + "name": "trustdirection", + "label": "Trust direction" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "type": "str", + "name": "trusttype", + "label": "Trust type" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "type": "str", + "name": "truststatus", + "label": "Trust status" }, { - "alwaysask": true, - "cli_name": "users", - "doc": "users to remove", - "label": "member user", - "multivalue": true, - "name": "user", + "type": "str", "required": false, - "type": "str" + "multivalue": true, + "name": "ipantadditionalsuffixes", + "label": "UPN suffixes" + } + ], + "name": "trust", + "full_name": "trust/1" + }, + { + "version": "1", + "params": [ + { + "type": "str", + "name": "cn", + "label": "Domain" }, { - "alwaysask": true, - "cli_name": "groups", - "doc": "groups to remove", - "label": "member group", - "multivalue": true, - "name": "group", + "type": "str", + "name": "ipantsecurityidentifier", + "label": "Security Identifier" + }, + { + "type": "str", + "name": "ipantflatname", + "label": "NetBIOS name" + }, + { + "type": "str", + "name": "ipantdomainguid", + "label": "Domain GUID" + }, + { + "type": "str", + "name": "ipantfallbackprimarygroup", + "label": "Fallback primary group" + }, + { + "name": "ad_trust_agent_server", + "doc": "IPA servers configured as AD trust agents", "required": false, + "label": "IPA AD trust agents", + "multivalue": true, "type": "str" }, { - "alwaysask": true, - "cli_name": "services", - "doc": "services to remove", - "label": "member service", - "multivalue": true, - "name": "services", + "name": "ad_trust_controller_server", + "doc": "IPA servers configured as AD trust controllers", "required": false, + "label": "IPA AD trust controllers", + "multivalue": true, "type": "str" } ], - "topic_topic": "vault/1", - "version": "1" + "name": "trustconfig", + "full_name": "trustconfig/1" }, { - "attr_name": "remove_owner", - "doc": "Remove owners from a vault.", - "full_name": "vault_remove_owner/1", - "name": "vault_remove_owner", - "obj_class": "vault/1", - "output": [ + "version": "1", + "params": [ { - "name": "result", - "type": "dict" + "type": "str", + "name": "cn", + "label": "Domain name" }, { - "doc": "Owners that could not be removed", - "name": "failed", - "type": "dict" + "required": false, + "type": "str", + "name": "ipantflatname", + "label": "Domain NetBIOS name" }, { - "doc": "Number of owners removed", - "name": "completed", - "type": "int" + "required": false, + "type": "str", + "name": "ipanttrusteddomainsid", + "label": "Domain Security Identifier" + }, + { + "type": "bool", + "name": "domain_enabled", + "label": "Domain enabled" } ], + "name": "trustdomain", + "full_name": "trustdomain/1" + }, + { + "version": "1", "params": [ { - "cli_name": "name", - "label": "Vault name", + "type": "str", + "name": "uid", + "label": "User login" + }, + { + "type": "str", + "name": "givenname", + "label": "First name" + }, + { + "type": "str", + "name": "sn", + "label": "Last name" + }, + { + "type": "str", "name": "cn", - "type": "str" + "label": "Full name" }, { - "doc": "Service name of the service vault", - "name": "service", - "no_convert": true, "required": false, - "type": "Principal" + "type": "str", + "name": "displayname", + "label": "Display name" }, { - "default": ["False"], - "doc": "Shared vault", - "name": "shared", "required": false, - "type": "bool" + "type": "str", + "name": "initials", + "label": "Initials" }, { - "cli_name": "user", - "doc": "Username of the user vault", - "name": "username", "required": false, - "type": "str" + "type": "str", + "name": "homedirectory", + "label": "Home directory" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "gecos", + "label": "GECOS" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "loginshell", + "label": "Login shell" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "required": false, + "type": "Principal", + "name": "krbcanonicalname", + "label": "Principal name" }, { - "alwaysask": true, - "cli_name": "users", - "doc": "users to remove", - "label": "owner user", + "type": "Principal", + "required": false, "multivalue": true, - "name": "user", + "name": "krbprincipalname", + "label": "Principal alias" + }, + { "required": false, - "type": "str" + "type": "datetime", + "name": "krbprincipalexpiration", + "label": "Kerberos principal expiration" }, { - "alwaysask": true, - "cli_name": "groups", - "doc": "groups to remove", - "label": "owner group", - "multivalue": true, - "name": "group", "required": false, - "type": "str" + "type": "datetime", + "name": "krbpasswordexpiration", + "label": "User password expiration" }, { - "alwaysask": true, - "cli_name": "services", - "doc": "services to remove", - "label": "owner service", + "type": "str", + "required": false, "multivalue": true, - "name": "services", + "name": "mail", + "label": "Email address" + }, + { + "name": "userpassword", + "doc": "Prompt to set the user password", "required": false, + "label": "Password", + "sensitive": true, + "exclude": [ + "webui" + ], "type": "str" - } - ], - "topic_topic": "vault/1", - "version": "1" - }, - { - "attr_name": "retrieve_internal", - "exclude": ["cli"], - "full_name": "vault_retrieve_internal/1", - "name": "vault_retrieve_internal", - "obj_class": "vault/1", - "output": [ + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "doc": "Generate a random user password", "required": false, - "type": "str" + "type": "bool", + "name": "random" }, { - "name": "result", - "type": "dict" + "required": false, + "type": "str", + "name": "randompassword", + "label": "Random password" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ + "doc": "User ID Number (system will assign one if not provided)", + "required": false, + "type": "int", + "name": "uidnumber", + "label": "UID" + }, { - "cli_name": "name", - "label": "Vault name", - "name": "cn", - "type": "str" + "doc": "Group ID Number", + "required": false, + "type": "int", + "name": "gidnumber", + "label": "GID" }, { - "doc": "Service name of the service vault", - "name": "service", - "no_convert": true, "required": false, - "type": "Principal" + "type": "str", + "name": "street", + "label": "Street address" }, { - "default": ["False"], - "doc": "Shared vault", - "name": "shared", "required": false, - "type": "bool" + "type": "str", + "name": "l", + "label": "City" }, { - "cli_name": "user", - "doc": "Username of the user vault", - "name": "username", "required": false, - "type": "str" + "type": "str", + "name": "st", + "label": "State/Province" }, { - "doc": "Session key wrapped with transport certificate", - "name": "session_key", - "positional": false, - "type": "bytes" + "required": false, + "type": "str", + "name": "postalcode", + "label": "ZIP" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "type": "str", + "required": false, + "multivalue": true, + "name": "telephonenumber", + "label": "Telephone Number" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "vault/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Display information about a vault.", - "full_name": "vault_show/1", - "name": "vault_show", - "obj_class": "vault/1", - "output": [ + "type": "str", + "required": false, + "multivalue": true, + "name": "mobile", + "label": "Mobile Telephone Number" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", + "type": "str", "required": false, - "type": "str" + "multivalue": true, + "name": "pager", + "label": "Pager Number" }, { - "name": "result", - "type": "dict" + "type": "str", + "required": false, + "multivalue": true, + "name": "facsimiletelephonenumber", + "label": "Fax Number" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "str" - } - ], - "params": [ + "required": false, + "type": "str", + "name": "ou", + "label": "Org. Unit" + }, { - "cli_name": "name", - "label": "Vault name", - "name": "cn", - "type": "str" + "required": false, + "type": "str", + "name": "title", + "label": "Job Title" }, { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "manager", + "label": "Manager" }, { - "doc": "Service name of the service vault", - "name": "service", - "no_convert": true, + "type": "str", "required": false, - "type": "Principal" + "multivalue": true, + "name": "carlicense", + "label": "Car License" }, { - "default": ["False"], - "doc": "Shared vault", - "name": "shared", + "type": "str", "required": false, - "type": "bool" + "multivalue": true, + "name": "ipasshpubkey", + "label": "SSH public key" }, { - "cli_name": "user", - "doc": "Username of the user vault", - "name": "username", + "type": "str", "required": false, + "multivalue": true, + "name": "sshpubkeyfp", + "label": "SSH public key fingerprint" + }, + { + "name": "ipauserauthtype", + "doc": "Types of supported user authentication", + "required": false, + "label": "User authentication types", + "multivalue": true, "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "name": "userclass", + "doc": "User category (semantics placed on this attribute are for local interpretation)", + "required": false, + "label": "Class", + "multivalue": true, + "type": "str" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "ipatokenradiusconfiglink", + "label": "RADIUS proxy configuration" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "vault/1", - "version": "1" - }, - { - "attr_name": "show", - "doc": "Show vault configuration.", - "full_name": "vaultconfig_show/1", - "name": "vaultconfig_show", - "obj_class": "vaultconfig/1", - "output": [ + "required": false, + "type": "str", + "name": "ipatokenradiususername", + "label": "RADIUS proxy username" + }, + { + "type": "str", + "required": false, + "multivalue": true, + "name": "departmentnumber", + "label": "Department Number" + }, + { + "required": false, + "type": "str", + "name": "employeenumber", + "label": "Employee Number" + }, { - "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "str", + "name": "employeetype", + "label": "Employee Type" }, { - "name": "result", - "type": "dict" + "required": false, + "type": "str", + "name": "preferredlanguage", + "label": "Preferred Language" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "NoneType" - } - ], - "params": [ + "name": "usercertificate", + "doc": "Base-64 encoded user certificate", + "required": false, + "label": "Certificate", + "multivalue": true, + "type": "Certificate" + }, { - "doc": "Output file to store the transport certificate", - "name": "transport_out", + "name": "ipacertmapdata", + "doc": "Certificate mapping data", "required": false, + "label": "Certificate mapping data", + "multivalue": true, "type": "str" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "required": false, + "type": "bool", + "name": "nsaccountlock", + "label": "Account disabled" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" - } - ], - "topic_topic": "vault/1", - "version": "1" - }, - { - "attr_name": "add_owner", - "doc": "Add owners to a vault container.", - "full_name": "vaultcontainer_add_owner/1", - "name": "vaultcontainer_add_owner", - "obj_class": "vaultcontainer/1", - "output": [ - { - "name": "result", - "type": "dict" + "required": false, + "type": "bool", + "name": "preserved", + "label": "Preserved user" }, { - "doc": "Owners that could not be added", - "name": "failed", - "type": "dict" + "type": "bool", + "name": "has_password", + "label": "Password" }, { - "doc": "Number of owners added", - "name": "completed", - "type": "int" - } - ], - "params": [ + "required": false, + "type": "str", + "name": "memberof_group", + "label": "Member of groups" + }, { - "doc": "Service name of the service vault", - "name": "service", - "no_convert": true, "required": false, - "type": "Principal" + "type": "str", + "name": "memberof_role", + "label": "Roles" }, { - "default": ["False"], - "doc": "Shared vault", - "name": "shared", "required": false, - "type": "bool" + "type": "str", + "name": "memberof_netgroup", + "label": "Member of netgroups" }, { - "cli_name": "user", - "doc": "Username of the user vault", - "name": "username", "required": false, - "type": "str" + "type": "str", + "name": "memberof_sudorule", + "label": "Member of Sudo rule" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "memberof_hbacrule", + "label": "Member of HBAC rule" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "memberofindirect_group", + "label": "Indirect Member of group" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "memberofindirect_netgroup", + "label": "Indirect Member of netgroup" }, { - "alwaysask": true, - "cli_name": "users", - "doc": "users to add", - "label": "owner user", - "multivalue": true, - "name": "user", "required": false, - "type": "str" + "type": "str", + "name": "memberofindirect_role", + "label": "Indirect Member of role" }, { - "alwaysask": true, - "cli_name": "groups", - "doc": "groups to add", - "label": "owner group", - "multivalue": true, - "name": "group", "required": false, - "type": "str" + "type": "str", + "name": "memberofindirect_sudorule", + "label": "Indirect Member of Sudo rule" }, { - "alwaysask": true, - "cli_name": "services", - "doc": "services to add", - "label": "owner service", - "multivalue": true, - "name": "services", "required": false, - "type": "str" + "type": "str", + "name": "memberofindirect_hbacrule", + "label": "Indirect Member of HBAC rule" + }, + { + "type": "bool", + "name": "has_keytab", + "label": "Kerberos keys available" } ], - "topic_topic": "vault/1", - "version": "1" + "name": "user", + "full_name": "user/1" }, { - "attr_name": "del", - "doc": "Delete a vault container.", - "full_name": "vaultcontainer_del/1", - "name": "vaultcontainer_del", - "obj_class": "vaultcontainer/1", - "output": [ + "version": "1", + "params": [ { - "doc": "User-friendly description of action performed", - "name": "summary", "required": false, - "type": "str" + "type": "bool", + "name": "preserved", + "label": "Preserved user" }, { - "doc": "List of deletions that failed", - "name": "result", - "type": "dict" + "type": "str", + "name": "server", + "label": "Server" }, { - "multivalue": true, - "name": "value", - "type": "NoneType" + "type": "str", + "name": "krbloginfailedcount", + "label": "Failed logins" + }, + { + "type": "str", + "name": "krblastsuccessfulauth", + "label": "Last successful authentication" + }, + { + "type": "str", + "name": "krblastfailedauth", + "label": "Last failed authentication" + }, + { + "type": "str", + "name": "now", + "label": "Time now" } ], + "name": "userstatus", + "full_name": "userstatus/1" + }, + { + "version": "1", "params": [ { - "cli_name": "continue", - "default": ["False"], - "doc": "Continuous mode: Don't stop on errors.", - "name": "continue", - "positional": false, - "type": "bool" + "type": "str", + "name": "cn", + "label": "Vault name" }, { - "doc": "Service name of the service vault", - "name": "service", - "no_convert": true, + "doc": "Vault description", "required": false, - "type": "Principal" + "type": "str", + "name": "description", + "label": "Description" }, { - "default": ["False"], - "doc": "Shared vault", - "name": "shared", + "doc": "Vault type", "required": false, - "type": "bool" + "type": "str", + "name": "ipavaulttype", + "label": "Type" }, { - "cli_name": "user", - "doc": "Username of the user vault", - "name": "username", + "doc": "Vault salt", "required": false, - "type": "str" - } - ], - "topic_topic": "vault/1", - "version": "1" - }, - { - "attr_name": "remove_owner", - "doc": "Remove owners from a vault container.", - "full_name": "vaultcontainer_remove_owner/1", - "name": "vaultcontainer_remove_owner", - "obj_class": "vaultcontainer/1", - "output": [ - { - "name": "result", - "type": "dict" + "type": "bytes", + "name": "ipavaultsalt", + "label": "Salt" }, { - "doc": "Owners that could not be removed", - "name": "failed", - "type": "dict" + "doc": "Vault public key", + "required": false, + "type": "bytes", + "name": "ipavaultpublickey", + "label": "Public key" }, { - "doc": "Number of owners removed", - "name": "completed", - "type": "int" - } - ], - "params": [ + "required": false, + "type": "str", + "name": "owner_user", + "label": "Owner users" + }, { - "doc": "Service name of the service vault", - "name": "service", - "no_convert": true, "required": false, - "type": "Principal" + "type": "str", + "name": "owner_group", + "label": "Owner groups" }, { - "default": ["False"], - "doc": "Shared vault", - "name": "shared", "required": false, - "type": "bool" + "type": "str", + "name": "owner_service", + "label": "Owner services" }, { - "cli_name": "user", - "doc": "Username of the user vault", - "name": "username", "required": false, - "type": "str" + "type": "str", + "name": "owner", + "label": "Failed owners" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "service", + "label": "Vault service" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "required": false, + "type": "bool", + "name": "shared", + "label": "Shared vault" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "username", + "label": "Vault user" }, { - "alwaysask": true, - "cli_name": "users", - "doc": "users to remove", - "label": "owner user", - "multivalue": true, - "name": "user", "required": false, - "type": "str" + "type": "str", + "name": "member_user", + "label": "Member users" }, { - "alwaysask": true, - "cli_name": "groups", - "doc": "groups to remove", - "label": "owner group", - "multivalue": true, - "name": "group", "required": false, - "type": "str" + "type": "str", + "name": "member_group", + "label": "Member groups" }, { - "alwaysask": true, - "cli_name": "services", - "doc": "services to remove", - "label": "owner service", - "multivalue": true, - "name": "services", "required": false, - "type": "str" + "type": "str", + "name": "member_service", + "label": "Member services" } ], - "topic_topic": "vault/1", - "version": "1" + "name": "vault", + "full_name": "vault/1" }, { - "attr_name": "show", - "doc": "Display information about a vault container.", - "full_name": "vaultcontainer_show/1", - "name": "vaultcontainer_show", - "obj_class": "vaultcontainer/1", - "output": [ - { - "doc": "User-friendly description of action performed", - "name": "summary", - "required": false, - "type": "str" - }, + "version": "1", + "params": [ { - "name": "result", - "type": "dict" + "type": "bytes", + "name": "transport_cert", + "label": "Transport Certificate" }, { - "doc": - "The primary_key value of the entry, e.g. 'jdoe' for a user", - "name": "value", - "type": "NoneType" + "name": "kra_server_server", + "doc": "IPA servers configured as key recovery agents", + "required": false, + "label": "IPA KRA servers", + "multivalue": true, + "type": "str" } ], + "name": "vaultconfig", + "full_name": "vaultconfig/1" + }, + { + "version": "1", "params": [ { - "default": ["False"], - "doc": - "Display the access rights of this entry (requires --all). See ipa man page for details.", - "label": "Rights", - "name": "rights", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "owner_user", + "label": "Owner users" }, { - "doc": "Service name of the service vault", - "name": "service", - "no_convert": true, "required": false, - "type": "Principal" + "type": "str", + "name": "owner_group", + "label": "Owner groups" }, { - "default": ["False"], - "doc": "Shared vault", - "name": "shared", "required": false, - "type": "bool" + "type": "str", + "name": "owner_service", + "label": "Owner services" }, { - "cli_name": "user", - "doc": "Username of the user vault", - "name": "username", "required": false, - "type": "str" + "type": "str", + "name": "owner", + "label": "Failed owners" }, { - "cli_name": "all", - "default": ["False"], - "doc": - "Retrieve and print all attributes from the server. Affects command output.", - "exclude": ["webui"], - "name": "all", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "service", + "label": "Vault service" }, { - "cli_name": "raw", - "default": ["False"], - "doc": - "Print entries as stored on the server. Only affects output format.", - "exclude": ["webui"], - "name": "raw", - "positional": false, - "type": "bool" + "required": false, + "type": "bool", + "name": "shared", + "label": "Shared vault" }, { - "default": ["False"], - "doc": "Suppress processing of membership attributes.", - "exclude": ["webui"], - "name": "no_members", - "positional": false, - "type": "bool" + "required": false, + "type": "str", + "name": "username", + "label": "Vault user" } ], - "topic_topic": "vault/1", - "version": "1" - } - ], - "fingerprint": "ffa2dfd7", - "topics": [ - { - "doc": - "Directory Server Access Control Instructions (ACIs)\n\nACIs are used to allow or deny access to information. This module is\ncurrently designed to allow, not deny, access.\n\nThe aci commands are designed to grant permissions that allow updating\nexisting entries or adding or deleting new ones. The goal of the ACIs\nthat ship with IPA is to provide a set of low-level permissions that\ngrant access to special groups called taskgroups. These low-level\npermissions can be combined into roles that grant broader access. These\nroles are another type of group, roles.\n\nFor example, if you have taskgroups that allow adding and modifying users you\ncould create a role, useradmin. You would assign users to the useradmin\nrole to allow them to do the operations defined by the taskgroups.\n\nYou can create ACIs that delegate permission so users in group A can write\nattributes on group B.\n\nThe type option is a map that applies to all entries in the users, groups or\nhost location. It is primarily designed to be used when granting add\npermissions (to write new entries).\n\nAn ACI consists of three parts:\n1. target\n2. permissions\n3. bind rules\n\nThe target is a set of rules that define which LDAP objects are being\ntargeted. This can include a list of attributes, an area of that LDAP\ntree or an LDAP filter.\n\nThe targets include:\n- attrs: list of attributes affected\n- type: an object type (user, group, host, service, etc)\n- memberof: members of a group\n- targetgroup: grant access to modify a specific group. This is primarily\n designed to enable users to add or remove members of a specific group.\n- filter: A legal LDAP filter used to narrow the scope of the target.\n- subtree: Used to apply a rule across an entire set of objects. For example,\n to allow adding users you need to grant \"add\" permission to the subtree\n ldap://uid=*,cn=users,cn=accounts,dc=example,dc=com. The subtree option\n is a fail-safe for objects that may not be covered by the type option.\n\nThe permissions define what the ACI is allowed to do, and are one or\nmore of:\n1. write - write one or more attributes\n2. read - read one or more attributes\n3. add - add a new entry to the tree\n4. delete - delete an existing entry\n5. all - all permissions are granted\n\nNote the distinction between attributes and entries. The permissions are\nindependent, so being able to add a user does not mean that the user will\nbe editable.\n\nThe bind rule defines who this ACI grants permissions to. The LDAP server\nallows this to be any valid LDAP entry but we encourage the use of\ntaskgroups so that the rights can be easily shared through roles.\n\nFor a more thorough description of access controls see\nhttp://www.redhat.com/docs/manuals/dir-server/ag/8.0/Managing_Access_Control.html\n\nEXAMPLES:\n\nNOTE: ACIs are now added via the permission plugin. These examples are to\ndemonstrate how the various options work but this is done via the permission\ncommand-line now (see last example).\n\n Add an ACI so that the group \"secretaries\" can update the address on any user:\n ipa group-add --desc=\"Office secretaries\" secretaries\n ipa aci-add --attrs=streetAddress --memberof=ipausers --group=secretaries --permissions=write --prefix=none \"Secretaries write addresses\"\n\n Show the new ACI:\n ipa aci-show --prefix=none \"Secretaries write addresses\"\n\n Add an ACI that allows members of the \"addusers\" permission to add new users:\n ipa aci-add --type=user --permission=addusers --permissions=add --prefix=none \"Add new users\"\n\n Add an ACI that allows members of the editors manage members of the admins group:\n ipa aci-add --permissions=write --attrs=member --targetgroup=admins --group=editors --prefix=none \"Editors manage admins\"\n\n Add an ACI that allows members of the admins group to manage the street and zip code of those in the editors group:\n ipa aci-add --permissions=write --memberof=editors --group=admins --attrs=street --attrs=postalcode --prefix=none \"admins edit the address of editors\"\n\n Add an ACI that allows the admins group manage the street and zipcode of those who work for the boss:\n ipa aci-add --permissions=write --group=admins --attrs=street --attrs=postalcode --filter=\"(manager=uid=boss,cn=users,cn=accounts,dc=example,dc=com)\" --prefix=none \"Edit the address of those who work for the boss\"\n\n Add an entirely new kind of record to IPA that isn't covered by any of the --type options, creating a permission:\n ipa permission-add --permissions=add --subtree=\"cn=*,cn=orange,cn=accounts,dc=example,dc=com\" --desc=\"Add Orange Entries\" add_orange\n\n\nThe show command shows the raw 389-ds ACI.\n\nIMPORTANT: When modifying the target attributes of an existing ACI you\nmust include all existing attributes as well. When doing an aci-mod the\ntargetattr REPLACES the current attributes, it does not add to them.", - "full_name": "aci/1", - "name": "aci", - "version": "1" - }, - { - "doc": - "Cross-realm trusts\n\nManage trust relationship between IPA and Active Directory domains.\n\nIn order to allow users from a remote domain to access resources in IPA\ndomain, trust relationship needs to be established. Currently IPA supports\nonly trusts between IPA and Active Directory domains under control of Windows\nServer 2008 or later, with functional level 2008 or later.\n\nPlease note that DNS on both IPA and Active Directory domain sides should be\nconfigured properly to discover each other. Trust relationship relies on\nability to discover special resources in the other domain via DNS records.\n\nExamples:\n\n1. Establish cross-realm trust with Active Directory using AD administrator\n credentials:\n\n ipa trust-add --type=ad --admin --password\n\n2. List all existing trust relationships:\n\n ipa trust-find\n\n3. Show details of the specific trust relationship:\n\n ipa trust-show \n\n4. Delete existing trust relationship:\n\n ipa trust-del \n\nOnce trust relationship is established, remote users will need to be mapped\nto local POSIX groups in order to actually use IPA resources. The mapping should\nbe done via use of external membership of non-POSIX group and then this group\nshould be included into one of local POSIX groups.\n\nExample:\n\n1. Create group for the trusted domain admins' mapping and their local POSIX group:\n\n ipa group-add --desc=' admins external map' ad_admins_external --external\n ipa group-add --desc=' admins' ad_admins\n\n2. Add security identifier of Domain Admins of the to the ad_admins_external\n group:\n\n ipa group-add-member ad_admins_external --external 'AD\\Domain Admins'\n\n3. Allow members of ad_admins_external group to be associated with ad_admins POSIX group:\n\n ipa group-add-member ad_admins --groups ad_admins_external\n\n4. List members of external members of ad_admins_external group to see their SIDs:\n\n ipa group-show ad_admins_external\n\n\nGLOBAL TRUST CONFIGURATION\n\nWhen IPA AD trust subpackage is installed and ipa-adtrust-install is run,\na local domain configuration (SID, GUID, NetBIOS name) is generated. These\nidentifiers are then used when communicating with a trusted domain of the\nparticular type.\n\n1. Show global trust configuration for Active Directory type of trusts:\n\n ipa trustconfig-show --type ad\n\n2. Modify global configuration for all trusts of Active Directory type and set\n a different fallback primary group (fallback primary group GID is used as\n a primary user GID if user authenticating to IPA domain does not have any other\n primary GID already set):\n\n ipa trustconfig-mod --type ad --fallback-primary-group \"alternative AD group\"\n\n3. Change primary fallback group back to default hidden group (any group with\n posixGroup object class is allowed):\n\n ipa trustconfig-mod --type ad --fallback-primary-group \"Default SMB Group\"", - "full_name": "trust/1", - "name": "trust", - "version": "1" - }, - { - "doc": - "Auto Membership Rule.\n\nBring clarity to the membership of hosts and users by configuring inclusive\nor exclusive regex patterns, you can automatically assign a new entries into\na group or hostgroup based upon attribute information.\n\nA rule is directly associated with a group by name, so you cannot create\na rule without an accompanying group or hostgroup.\n\nA condition is a regular expression used by 389-ds to match a new incoming\nentry with an automember rule. If it matches an inclusive rule then the\nentry is added to the appropriate group or hostgroup.\n\nA default group or hostgroup could be specified for entries that do not\nmatch any rule. In case of user entries this group will be a fallback group\nbecause all users are by default members of group specified in IPA config.\n\nThe automember-rebuild command can be used to retroactively run automember rules\nagainst existing entries, thus rebuilding their membership.\n\nEXAMPLES:\n\n Add the initial group or hostgroup:\n ipa hostgroup-add --desc=\"Web Servers\" webservers\n ipa group-add --desc=\"Developers\" devel\n\n Add the initial rule:\n ipa automember-add --type=hostgroup webservers\n ipa automember-add --type=group devel\n\n Add a condition to the rule:\n ipa automember-add-condition --key=fqdn --type=hostgroup --inclusive-regex=^web[1-9]+\\.example\\.com webservers\n ipa automember-add-condition --key=manager --type=group --inclusive-regex=^uid=mscott devel\n\n Add an exclusive condition to the rule to prevent auto assignment:\n ipa automember-add-condition --key=fqdn --type=hostgroup --exclusive-regex=^web5\\.example\\.com webservers\n\n Add a host:\n ipa host-add web1.example.com\n\n Add a user:\n ipa user-add --first=Tim --last=User --password tuser1 --manager=mscott\n\n Verify automembership:\n ipa hostgroup-show webservers\n Host-group: webservers\n Description: Web Servers\n Member hosts: web1.example.com\n\n ipa group-show devel\n Group name: devel\n Description: Developers\n GID: 1004200000\n Member users: tuser\n\n Remove a condition from the rule:\n ipa automember-remove-condition --key=fqdn --type=hostgroup --inclusive-regex=^web[1-9]+\\.example\\.com webservers\n\n Modify the automember rule:\n ipa automember-mod\n\n Set the default (fallback) target group:\n ipa automember-default-group-set --default-group=webservers --type=hostgroup\n ipa automember-default-group-set --default-group=ipausers --type=group\n\n Remove the default (fallback) target group:\n ipa automember-default-group-remove --type=hostgroup\n ipa automember-default-group-remove --type=group\n\n Show the default (fallback) target group:\n ipa automember-default-group-show --type=hostgroup\n ipa automember-default-group-show --type=group\n\n Find all of the automember rules:\n ipa automember-find\n\n Display a automember rule:\n ipa automember-show --type=hostgroup webservers\n ipa automember-show --type=group devel\n\n Delete an automember rule:\n ipa automember-del --type=hostgroup webservers\n ipa automember-del --type=group devel\n\n Rebuild membership for all users:\n ipa automember-rebuild --type=group\n\n Rebuild membership for all hosts:\n ipa automember-rebuild --type=hostgroup\n\n Rebuild membership for specified users:\n ipa automember-rebuild --users=tuser1 --users=tuser2\n\n Rebuild membership for specified hosts:\n ipa automember-rebuild --hosts=web1.example.com --hosts=web2.example.com", - "full_name": "automember/1", - "name": "automember", - "version": "1" - }, - { - "doc": - "Automount\n\nStores automount(8) configuration for autofs(8) in IPA.\n\nThe base of an automount configuration is the configuration file auto.master.\nThis is also the base location in IPA. Multiple auto.master configurations\ncan be stored in separate locations. A location is implementation-specific\nwith the default being a location named 'default'. For example, you can have\nlocations by geographic region, by floor, by type, etc.\n\nAutomount has three basic object types: locations, maps and keys.\n\nA location defines a set of maps anchored in auto.master. This allows you\nto store multiple automount configurations. A location in itself isn't\nvery interesting, it is just a point to start a new automount map.\n\nA map is roughly equivalent to a discrete automount file and provides\nstorage for keys.\n\nA key is a mount point associated with a map.\n\nWhen a new location is created, two maps are automatically created for\nit: auto.master and auto.direct. auto.master is the root map for all\nautomount maps for the location. auto.direct is the default map for\ndirect mounts and is mounted on /-.\n\nAn automount map may contain a submount key. This key defines a mount\nlocation within the map that references another map. This can be done\neither using automountmap-add-indirect --parentmap or manually\nwith automountkey-add and setting info to \"-type=autofs :\".\n\nEXAMPLES:\n\nLocations:\n\n Create a named location, \"Baltimore\":\n ipa automountlocation-add baltimore\n\n Display the new location:\n ipa automountlocation-show baltimore\n\n Find available locations:\n ipa automountlocation-find\n\n Remove a named automount location:\n ipa automountlocation-del baltimore\n\n Show what the automount maps would look like if they were in the filesystem:\n ipa automountlocation-tofiles baltimore\n\n Import an existing configuration into a location:\n ipa automountlocation-import baltimore /etc/auto.master\n\n The import will fail if any duplicate entries are found. For\n continuous operation where errors are ignored, use the --continue\n option.\n\nMaps:\n\n Create a new map, \"auto.share\":\n ipa automountmap-add baltimore auto.share\n\n Display the new map:\n ipa automountmap-show baltimore auto.share\n\n Find maps in the location baltimore:\n ipa automountmap-find baltimore\n\n Create an indirect map with auto.share as a submount:\n ipa automountmap-add-indirect baltimore --parentmap=auto.share --mount=sub auto.man\n\n This is equivalent to:\n\n ipa automountmap-add-indirect baltimore --mount=/man auto.man\n ipa automountkey-add baltimore auto.man --key=sub --info=\"-fstype=autofs ldap:auto.share\"\n\n Remove the auto.share map:\n ipa automountmap-del baltimore auto.share\n\nKeys:\n\n Create a new key for the auto.share map in location baltimore. This ties\n the map we previously created to auto.master:\n ipa automountkey-add baltimore auto.master --key=/share --info=auto.share\n\n Create a new key for our auto.share map, an NFS mount for man pages:\n ipa automountkey-add baltimore auto.share --key=man --info=\"-ro,soft,rsize=8192,wsize=8192 ipa.example.com:/shared/man\"\n\n Find all keys for the auto.share map:\n ipa automountkey-find baltimore auto.share\n\n Find all direct automount keys:\n ipa automountkey-find baltimore --key=/-\n\n Remove the man key from the auto.share map:\n ipa automountkey-del baltimore auto.share --key=man", - "full_name": "automount/1", - "name": "automount", - "version": "1" - }, - { - "doc": - "Plugin to make multiple ipa calls via one remote procedure call\n\nTo run this code in the lite-server\n\ncurl -H \"Content-Type:application/json\" -H \"Accept:application/json\" -H \"Accept-Language:en\" --negotiate -u : --cacert /etc/ipa/ca.crt -d @batch_request.json -X POST http://localhost:8888/ipa/json\n\nwhere the contents of the file batch_request.json follow the below example\n\n{\"method\":\"batch\",\"params\":[[\n {\"method\":\"group_find\",\"params\":[[],{}]},\n {\"method\":\"user_find\",\"params\":[[],{\"whoami\":\"true\",\"all\":\"true\"}]},\n {\"method\":\"user_show\",\"params\":[[\"admin\"],{\"all\":true}]}\n ],{}],\"id\":1}\n\nThe format of the response is nested the same way. At the top you will see\n \"error\": null,\n \"id\": 1,\n \"result\": {\n \"count\": 3,\n \"results\": [\n\n\nAnd then a nested response for each IPA command method sent in the request", - "full_name": "batch/1", - "name": "batch", - "version": "1" - }, - { - "doc": - "Manage Certificate Authorities\n\nSubordinate Certificate Authorities (Sub-CAs) can be added for scoped issuance\nof X.509 certificates.\n\nCAs are enabled on creation, but their use is subject to CA ACLs unless the\noperator has permission to bypass CA ACLs.\n\nAll CAs except the 'IPA' CA can be disabled or re-enabled. Disabling a CA\nprevents it from issuing certificates but does not affect the validity of its\ncertificate.\n\nCAs (all except the 'IPA' CA) can be deleted. Deleting a CA causes its signing\ncertificate to be revoked and its private key deleted.\n\nEXAMPLES:\n\n Create new CA, subordinate to the IPA CA.\n\n ipa ca-add puppet --desc \"Puppet\" \\\n --subject \"CN=Puppet CA,O=EXAMPLE.COM\"\n\n Disable a CA.\n\n ipa ca-disable puppet\n\n Re-enable a CA.\n\n ipa ca-enable puppet\n\n Delete a CA.\n\n ipa ca-del puppet", - "full_name": "ca/1", - "name": "ca", - "version": "1" - }, - { - "doc": - "IPA certificate operations\n\nImplements a set of commands for managing server SSL certificates.\n\nCertificate requests exist in the form of a Certificate Signing Request (CSR)\nin PEM format.\n\nThe dogtag CA uses just the CN value of the CSR and forces the rest of the\nsubject to values configured in the server.\n\nA certificate is stored with a service principal and a service principal\nneeds a host.\n\nIn order to request a certificate:\n\n* The host must exist\n* The service must exist (or you use the --add option to automatically add it)\n\nSEARCHING:\n\nCertificates may be searched on by certificate subject, serial number,\nrevocation reason, validity dates and the issued date.\n\nWhen searching on dates the _from date does a >= search and the _to date\ndoes a <= search. When combined these are done as an AND.\n\nDates are treated as GMT to match the dates in the certificates.\n\nThe date format is YYYY-mm-dd.\n\nEXAMPLES:\n\n Request a new certificate and add the principal:\n ipa cert-request --add --principal=HTTP/lion.example.com example.csr\n\n Retrieve an existing certificate:\n ipa cert-show 1032\n\n Revoke a certificate (see RFC 5280 for reason details):\n ipa cert-revoke --revocation-reason=6 1032\n\n Remove a certificate from revocation hold status:\n ipa cert-remove-hold 1032\n\n Check the status of a signing request:\n ipa cert-status 10\n\n Search for certificates by hostname:\n ipa cert-find --subject=ipaserver.example.com\n\n Search for revoked certificates by reason:\n ipa cert-find --revocation-reason=5\n\n Search for certificates based on issuance date\n ipa cert-find --issuedon-from=2013-02-01 --issuedon-to=2013-02-07\n\n Search for certificates owned by a specific user:\n ipa cert-find --user=user\n\n Examine a certificate:\n ipa cert-find --file=cert.pem --all\n\n Verify that a certificate is owned by a specific user:\n ipa cert-find --file=cert.pem --user=user\n\nIPA currently immediately issues (or declines) all certificate requests so\nthe status of a request is not normally useful. This is for future use\nor the case where a CA does not immediately issue a certificate.\n\nThe following revocation reasons are supported:\n\n * 0 - unspecified\n * 1 - keyCompromise\n * 2 - cACompromise\n * 3 - affiliationChanged\n * 4 - superseded\n * 5 - cessationOfOperation\n * 6 - certificateHold\n * 8 - removeFromCRL\n * 9 - privilegeWithdrawn\n * 10 - aACompromise\n\nNote that reason code 7 is not used. See RFC 5280 for more details:\n\nhttp://www.ietf.org/rfc/rfc5280.txt", - "full_name": "cert/1", - "name": "cert", - "version": "1" - }, - { - "doc": - "Manage CA ACL rules.\n\nThis plugin is used to define rules governing which CAs and profiles\nmay be used to issue certificates to particular principals or groups\nof principals.\n\nSUBJECT PRINCIPAL SCOPE:\n\nFor a certificate request to be allowed, the principal(s) that are\nthe subject of a certificate request (not necessarily the principal\nactually requesting the certificate) must be included in the scope\nof a CA ACL that also includes the target CA and profile.\n\nUsers can be included by name, group or the \"all users\" category.\nHosts can be included by name, hostgroup or the \"all hosts\"\ncategory. Services can be included by service name or the \"all\nservices\" category. CA ACLs may be associated with a single type of\nprincipal, or multiple types.\n\nCERTIFICATE AUTHORITY SCOPE:\n\nA CA ACL can be associated with one or more CAs by name, or by the\n\"all CAs\" category. For compatibility reasons, a CA ACL with no CA\nassociation implies an association with the 'ipa' CA (and only this\nCA).\n\nPROFILE SCOPE:\n\nA CA ACL can be associated with one or more profiles by Profile ID.\nThe Profile ID is a string without spaces or punctuation starting\nwith a letter and followed by a sequence of letters, digits or\nunderscore (\"_\").\n\nEXAMPLES:\n\n Create a CA ACL \"test\" that grants all users access to the\n \"UserCert\" profile on all CAs:\n ipa caacl-add test --usercat=all --cacat=all\n ipa caacl-add-profile test --certprofiles UserCert\n\n Display the properties of a named CA ACL:\n ipa caacl-show test\n\n Create a CA ACL to let user \"alice\" use the \"DNP3\" profile on \"DNP3-CA\":\n ipa caacl-add alice_dnp3\n ipa caacl-add-ca alice_dnp3 --cas DNP3-CA\n ipa caacl-add-profile alice_dnp3 --certprofiles DNP3\n ipa caacl-add-user alice_dnp3 --user=alice\n\n Disable a CA ACL:\n ipa caacl-disable test\n\n Remove a CA ACL:\n ipa caacl-del test", - "full_name": "caacl/1", - "name": "caacl", - "version": "1" - }, - { - "doc": - "Manage Certificate Profiles\n\nCertificate Profiles are used by Certificate Authority (CA) in the signing of\ncertificates to determine if a Certificate Signing Request (CSR) is acceptable,\nand if so what features and extensions will be present on the certificate.\n\nThe Certificate Profile format is the property-list format understood by the\nDogtag or Red Hat Certificate System CA.\n\nPROFILE ID SYNTAX:\n\nA Profile ID is a string without spaces or punctuation starting with a letter\nand followed by a sequence of letters, digits or underscore (\"_\").\n\nEXAMPLES:\n\n Import a profile that will not store issued certificates:\n ipa certprofile-import ShortLivedUserCert \\\n --file UserCert.profile --desc \"User Certificates\" \\\n --store=false\n\n Delete a certificate profile:\n ipa certprofile-del ShortLivedUserCert\n\n Show information about a profile:\n ipa certprofile-show ShortLivedUserCert\n\n Save profile configuration to a file:\n ipa certprofile-show caIPAserviceCert --out caIPAserviceCert.cfg\n\n Search for profiles that do not store certificates:\n ipa certprofile-find --store=false\n\nPROFILE CONFIGURATION FORMAT:\n\nThe profile configuration format is the raw property-list format\nused by Dogtag Certificate System. The XML format is not supported.\n\nThe following restrictions apply to profiles managed by FreeIPA:\n\n- When importing a profile the \"profileId\" field, if present, must\n match the ID given on the command line.\n\n- The \"classId\" field must be set to \"caEnrollImpl\"\n\n- The \"auth.instance_id\" field must be set to \"raCertAuth\"\n\n- The \"certReqInputImpl\" input class and \"certOutputImpl\" output\n class must be used.", - "full_name": "certprofile/1", - "name": "certprofile", - "version": "1" - }, - { - "doc": - "API Schema\n\nProvides API introspection capabilities.\n\nEXAMPLES:\n\n Show user-find details:\n ipa command-show user-find\n\n Find user-find parameters:\n ipa param-find user-find", - "full_name": "schema/1", - "name": "schema", - "version": "1" - }, - { - "doc": - "Server configuration\n\nManage the default values that IPA uses and some of its tuning parameters.\n\nNOTES:\n\nThe password notification value (--pwdexpnotify) is stored here so it will\nbe replicated. It is not currently used to notify users in advance of an\nexpiring password.\n\nSome attributes are read-only, provided only for information purposes. These\ninclude:\n\nCertificate Subject base: the configured certificate subject base,\n e.g. O=EXAMPLE.COM. This is configurable only at install time.\nPassword plug-in features: currently defines additional hashes that the\n password will generate (there may be other conditions).\n\nWhen setting the order list for mapping SELinux users you may need to\nquote the value so it isn't interpreted by the shell.\n\nEXAMPLES:\n\n Show basic server configuration:\n ipa config-show\n\n Show all configuration options:\n ipa config-show --all\n\n Change maximum username length to 99 characters:\n ipa config-mod --maxusername=99\n\n Increase default time and size limits for maximum IPA server search:\n ipa config-mod --searchtimelimit=10 --searchrecordslimit=2000\n\n Set default user e-mail domain:\n ipa config-mod --emaildomain=example.com\n\n Enable migration mode to make \"ipa migrate-ds\" command operational:\n ipa config-mod --enable-migration=TRUE\n\n Define SELinux user map order:\n ipa config-mod --ipaselinuxusermaporder='guest_u:s0$xguest_u:s0$user_u:s0-s0:c0.c1023$staff_u:s0-s0:c0.c1023$unconfined_u:s0-s0:c0.c1023'", - "full_name": "config/1", - "name": "config", - "version": "1" - }, - { - "doc": - "Password policy\n\nA password policy sets limitations on IPA passwords, including maximum\nlifetime, minimum lifetime, the number of passwords to save in\nhistory, the number of character classes required (for stronger passwords)\nand the minimum password length.\n\nBy default there is a single, global policy for all users. You can also\ncreate a password policy to apply to a group. Each user is only subject\nto one password policy, either the group policy or the global policy. A\ngroup policy stands alone; it is not a super-set of the global policy plus\ncustom settings.\n\nEach group password policy requires a unique priority setting. If a user\nis in multiple groups that have password policies, this priority determines\nwhich password policy is applied. A lower value indicates a higher priority\npolicy.\n\nGroup password policies are automatically removed when the groups they\nare associated with are removed.\n\nEXAMPLES:\n\n Modify the global policy:\n ipa pwpolicy-mod --minlength=10\n\n Add a new group password policy:\n ipa pwpolicy-add --maxlife=90 --minlife=1 --history=10 --minclasses=3 --minlength=8 --priority=10 localadmins\n\n Display the global password policy:\n ipa pwpolicy-show\n\n Display a group password policy:\n ipa pwpolicy-show localadmins\n\n Display the policy that would be applied to a given user:\n ipa pwpolicy-show --user=tuser1\n\n Modify a group password policy:\n ipa pwpolicy-mod --minclasses=2 localadmins", - "full_name": "pwpolicy/1", - "name": "pwpolicy", - "version": "1" - }, - { - "doc": - "Group to Group Delegation\n\nA permission enables fine-grained delegation of permissions. Access Control\nRules, or instructions (ACIs), grant permission to permissions to perform\ngiven tasks such as adding a user, modifying a group, etc.\n\nGroup to Group Delegations grants the members of one group to update a set\nof attributes of members of another group.\n\nEXAMPLES:\n\n Add a delegation rule to allow managers to edit employee's addresses:\n ipa delegation-add --attrs=street --group=managers --membergroup=employees \"managers edit employees' street\"\n\n When managing the list of attributes you need to include all attributes\n in the list, including existing ones. Add postalCode to the list:\n ipa delegation-mod --attrs=street --attrs=postalCode --group=managers --membergroup=employees \"managers edit employees' street\"\n\n Display our updated rule:\n ipa delegation-show \"managers edit employees' street\"\n\n Delete a rule:\n ipa delegation-del \"managers edit employees' street\"", - "full_name": "delegation/1", - "name": "delegation", - "version": "1" - }, - { - "doc": - "Domain Name System (DNS)\n\nManage DNS zone and resource records.\n\nSUPPORTED ZONE TYPES\n\n * Master zone (dnszone-*), contains authoritative data.\n * Forward zone (dnsforwardzone-*), forwards queries to configured forwarders\n (a set of DNS servers).\n\nUSING STRUCTURED PER-TYPE OPTIONS\n\nThere are many structured DNS RR types where DNS data stored in LDAP server\nis not just a scalar value, for example an IP address or a domain name, but\na data structure which may be often complex. A good example is a LOC record\n[RFC1876] which consists of many mandatory and optional parts (degrees,\nminutes, seconds of latitude and longitude, altitude or precision).\n\nIt may be difficult to manipulate such DNS records without making a mistake\nand entering an invalid value. DNS module provides an abstraction over these\nraw records and allows to manipulate each RR type with specific options. For\neach supported RR type, DNS module provides a standard option to manipulate\na raw records with format ---rec, e.g. --mx-rec, and special options\nfor every part of the RR structure with format ---, e.g.\n--mx-preference and --mx-exchanger.\n\nWhen adding a record, either RR specific options or standard option for a raw\nvalue can be used, they just should not be combined in one add operation. When\nmodifying an existing entry, new RR specific options can be used to change\none part of a DNS record, where the standard option for raw value is used\nto specify the modified value. The following example demonstrates\na modification of MX record preference from 0 to 1 in a record without\nmodifying the exchanger:\nipa dnsrecord-mod --mx-rec=\"0 mx.example.com.\" --mx-preference=1\n\n\nEXAMPLES:\n\n Add new zone:\n ipa dnszone-add example.com --admin-email=admin@example.com\n\n Add system permission that can be used for per-zone privilege delegation:\n ipa dnszone-add-permission example.com\n\n Modify the zone to allow dynamic updates for hosts own records in realm EXAMPLE.COM:\n ipa dnszone-mod example.com --dynamic-update=TRUE\n\n This is the equivalent of:\n ipa dnszone-mod example.com --dynamic-update=TRUE \\\n --update-policy=\"grant EXAMPLE.COM krb5-self * A; grant EXAMPLE.COM krb5-self * AAAA; grant EXAMPLE.COM krb5-self * SSHFP;\"\n\n Modify the zone to allow zone transfers for local network only:\n ipa dnszone-mod example.com --allow-transfer=192.0.2.0/24\n\n Add new reverse zone specified by network IP address:\n ipa dnszone-add --name-from-ip=192.0.2.0/24\n\n Add second nameserver for example.com:\n ipa dnsrecord-add example.com @ --ns-rec=nameserver2.example.com\n\n Add a mail server for example.com:\n ipa dnsrecord-add example.com @ --mx-rec=\"10 mail1\"\n\n Add another record using MX record specific options:\n ipa dnsrecord-add example.com @ --mx-preference=20 --mx-exchanger=mail2\n\n Add another record using interactive mode (started when dnsrecord-add, dnsrecord-mod,\n or dnsrecord-del are executed with no options):\n ipa dnsrecord-add example.com @\n Please choose a type of DNS resource record to be added\n The most common types for this type of zone are: NS, MX, LOC\n\n DNS resource record type: MX\n MX Preference: 30\n MX Exchanger: mail3\n Record name: example.com\n MX record: 10 mail1, 20 mail2, 30 mail3\n NS record: nameserver.example.com., nameserver2.example.com.\n\n Delete previously added nameserver from example.com:\n ipa dnsrecord-del example.com @ --ns-rec=nameserver2.example.com.\n\n Add LOC record for example.com:\n ipa dnsrecord-add example.com @ --loc-rec=\"49 11 42.4 N 16 36 29.6 E 227.64m\"\n\n Add new A record for www.example.com. Create a reverse record in appropriate\n reverse zone as well. In this case a PTR record \"2\" pointing to www.example.com\n will be created in zone 2.0.192.in-addr.arpa.\n ipa dnsrecord-add example.com www --a-rec=192.0.2.2 --a-create-reverse\n\n Add new PTR record for www.example.com\n ipa dnsrecord-add 2.0.192.in-addr.arpa. 2 --ptr-rec=www.example.com.\n\n Add new SRV records for LDAP servers. Three quarters of the requests\n should go to fast.example.com, one quarter to slow.example.com. If neither\n is available, switch to backup.example.com.\n ipa dnsrecord-add example.com _ldap._tcp --srv-rec=\"0 3 389 fast.example.com\"\n ipa dnsrecord-add example.com _ldap._tcp --srv-rec=\"0 1 389 slow.example.com\"\n ipa dnsrecord-add example.com _ldap._tcp --srv-rec=\"1 1 389 backup.example.com\"\n\n The interactive mode can be used for easy modification:\n ipa dnsrecord-mod example.com _ldap._tcp\n No option to modify specific record provided.\n Current DNS record contents:\n\n SRV record: 0 3 389 fast.example.com, 0 1 389 slow.example.com, 1 1 389 backup.example.com\n\n Modify SRV record '0 3 389 fast.example.com'? Yes/No (default No):\n Modify SRV record '0 1 389 slow.example.com'? Yes/No (default No): y\n SRV Priority [0]: (keep the default value)\n SRV Weight [1]: 2 (modified value)\n SRV Port [389]: (keep the default value)\n SRV Target [slow.example.com]: (keep the default value)\n 1 SRV record skipped. Only one value per DNS record type can be modified at one time.\n Record name: _ldap._tcp\n SRV record: 0 3 389 fast.example.com, 1 1 389 backup.example.com, 0 2 389 slow.example.com\n\n After this modification, three fifths of the requests should go to\n fast.example.com and two fifths to slow.example.com.\n\n An example of the interactive mode for dnsrecord-del command:\n ipa dnsrecord-del example.com www\n No option to delete specific record provided.\n Delete all? Yes/No (default No): (do not delete all records)\n Current DNS record contents:\n\n A record: 192.0.2.2, 192.0.2.3\n\n Delete A record '192.0.2.2'? Yes/No (default No):\n Delete A record '192.0.2.3'? Yes/No (default No): y\n Record name: www\n A record: 192.0.2.2 (A record 192.0.2.3 has been deleted)\n\n Show zone example.com:\n ipa dnszone-show example.com\n\n Find zone with \"example\" in its domain name:\n ipa dnszone-find example\n\n Find records for resources with \"www\" in their name in zone example.com:\n ipa dnsrecord-find example.com www\n\n Find A records with value 192.0.2.2 in zone example.com\n ipa dnsrecord-find example.com --a-rec=192.0.2.2\n\n Show records for resource www in zone example.com\n ipa dnsrecord-show example.com www\n\n Delegate zone sub.example to another nameserver:\n ipa dnsrecord-add example.com ns.sub --a-rec=203.0.113.1\n ipa dnsrecord-add example.com sub --ns-rec=ns.sub.example.com.\n\n Delete zone example.com with all resource records:\n ipa dnszone-del example.com\n\n If a global forwarder is configured, all queries for which this server is not\n authoritative (e.g. sub.example.com) will be routed to the global forwarder.\n Global forwarding configuration can be overridden per-zone.\n\n Semantics of forwarding in IPA matches BIND semantics and depends on the type\n of zone:\n * Master zone: local BIND replies authoritatively to queries for data in\n the given zone (including authoritative NXDOMAIN answers) and forwarding\n affects only queries for names below zone cuts (NS records) of locally\n served zones.\n\n * Forward zone: forward zone contains no authoritative data. BIND forwards\n queries, which cannot be answered from its local cache, to configured\n forwarders.\n\n Semantics of the --forwarder-policy option:\n * none - disable forwarding for the given zone.\n * first - forward all queries to configured forwarders. If they fail,\n do resolution using DNS root servers.\n * only - forward all queries to configured forwarders and if they fail,\n return failure.\n\n Disable global forwarding for given sub-tree:\n ipa dnszone-mod example.com --forward-policy=none\n\n This configuration forwards all queries for names outside the example.com\n sub-tree to global forwarders. Normal recursive resolution process is used\n for names inside the example.com sub-tree (i.e. NS records are followed etc.).\n\n Forward all requests for the zone external.example.com to another forwarder\n using a \"first\" policy (it will send the queries to the selected forwarder\n and if not answered it will use global root servers):\n ipa dnsforwardzone-add external.example.com --forward-policy=first \\\n --forwarder=203.0.113.1\n\n Change forward-policy for external.example.com:\n ipa dnsforwardzone-mod external.example.com --forward-policy=only\n\n Show forward zone external.example.com:\n ipa dnsforwardzone-show external.example.com\n\n List all forward zones:\n ipa dnsforwardzone-find\n\n Delete forward zone external.example.com:\n ipa dnsforwardzone-del external.example.com\n\n Resolve a host name to see if it exists (will add default IPA domain\n if one is not included):\n ipa dns-resolve www.example.com\n ipa dns-resolve www\n\n\nGLOBAL DNS CONFIGURATION\n\nDNS configuration passed to command line install script is stored in a local\nconfiguration file on each IPA server where DNS service is configured. These\nlocal settings can be overridden with a common configuration stored in LDAP\nserver:\n\n Show global DNS configuration:\n ipa dnsconfig-show\n\n Modify global DNS configuration and set a list of global forwarders:\n ipa dnsconfig-mod --forwarder=203.0.113.113", - "full_name": "dns/1", - "name": "dns", - "version": "1" - }, - { - "doc": "Raise the IPA Domain Level.", - "full_name": "domainlevel/1", - "name": "domainlevel", - "version": "1" - }, - { - "doc": "Misc plug-ins", - "full_name": "misc/1", - "name": "misc", - "version": "1" - }, - { - "doc": - "Groups of users\n\nManage groups of users. By default, new groups are POSIX groups. You\ncan add the --nonposix option to the group-add command to mark a new group\nas non-POSIX. You can use the --posix argument with the group-mod command\nto convert a non-POSIX group into a POSIX group. POSIX groups cannot be\nconverted to non-POSIX groups.\n\nEvery group must have a description.\n\nPOSIX groups must have a Group ID (GID) number. Changing a GID is\nsupported but can have an impact on your file permissions. It is not necessary\nto supply a GID when creating a group. IPA will generate one automatically\nif it is not provided.\n\nEXAMPLES:\n\n Add a new group:\n ipa group-add --desc='local administrators' localadmins\n\n Add a new non-POSIX group:\n ipa group-add --nonposix --desc='remote administrators' remoteadmins\n\n Convert a non-POSIX group to posix:\n ipa group-mod --posix remoteadmins\n\n Add a new POSIX group with a specific Group ID number:\n ipa group-add --gid=500 --desc='unix admins' unixadmins\n\n Add a new POSIX group and let IPA assign a Group ID number:\n ipa group-add --desc='printer admins' printeradmins\n\n Remove a group:\n ipa group-del unixadmins\n\n To add the \"remoteadmins\" group to the \"localadmins\" group:\n ipa group-add-member --groups=remoteadmins localadmins\n\n Add multiple users to the \"localadmins\" group:\n ipa group-add-member --users=test1 --users=test2 localadmins\n\n Remove a user from the \"localadmins\" group:\n ipa group-remove-member --users=test2 localadmins\n\n Display information about a named group.\n ipa group-show localadmins\n\nExternal group membership is designed to allow users from trusted domains\nto be mapped to local POSIX groups in order to actually use IPA resources.\nExternal members should be added to groups that specifically created as\nexternal and non-POSIX. Such group later should be included into one of POSIX\ngroups.\n\nAn external group member is currently a Security Identifier (SID) as defined by\nthe trusted domain. When adding external group members, it is possible to\nspecify them in either SID, or DOM\\name, or name@domain format. IPA will attempt\nto resolve passed name to SID with the use of Global Catalog of the trusted domain.\n\nExample:\n\n1. Create group for the trusted domain admins' mapping and their local POSIX group:\n\n ipa group-add --desc=' admins external map' ad_admins_external --external\n ipa group-add --desc=' admins' ad_admins\n\n2. Add security identifier of Domain Admins of the to the ad_admins_external\n group:\n\n ipa group-add-member ad_admins_external --external 'AD\\Domain Admins'\n\n3. Allow members of ad_admins_external group to be associated with ad_admins POSIX group:\n\n ipa group-add-member ad_admins --groups ad_admins_external\n\n4. List members of external members of ad_admins_external group to see their SIDs:\n\n ipa group-show ad_admins_external", - "full_name": "group/1", - "name": "group", - "version": "1" - }, - { - "doc": - "Host-based access control\n\nControl who can access what services on what hosts. You\ncan use HBAC to control which users or groups can\naccess a service, or group of services, on a target host.\n\nYou can also specify a category of users and target hosts.\nThis is currently limited to \"all\", but might be expanded in the\nfuture.\n\nTarget hosts in HBAC rules must be hosts managed by IPA.\n\nThe available services and groups of services are controlled by the\nhbacsvc and hbacsvcgroup plug-ins respectively.\n\nEXAMPLES:\n\n Create a rule, \"test1\", that grants all users access to the host \"server\" from\n anywhere:\n ipa hbacrule-add --usercat=all test1\n ipa hbacrule-add-host --hosts=server.example.com test1\n\n Display the properties of a named HBAC rule:\n ipa hbacrule-show test1\n\n Create a rule for a specific service. This lets the user john access\n the sshd service on any machine from any machine:\n ipa hbacrule-add --hostcat=all john_sshd\n ipa hbacrule-add-user --users=john john_sshd\n ipa hbacrule-add-service --hbacsvcs=sshd john_sshd\n\n Create a rule for a new service group. This lets the user john access\n the FTP service on any machine from any machine:\n ipa hbacsvcgroup-add ftpers\n ipa hbacsvc-add sftp\n ipa hbacsvcgroup-add-member --hbacsvcs=ftp --hbacsvcs=sftp ftpers\n ipa hbacrule-add --hostcat=all john_ftp\n ipa hbacrule-add-user --users=john john_ftp\n ipa hbacrule-add-service --hbacsvcgroups=ftpers john_ftp\n\n Disable a named HBAC rule:\n ipa hbacrule-disable test1\n\n Remove a named HBAC rule:\n ipa hbacrule-del allow_server", - "full_name": "hbacrule/1", - "name": "hbacrule", - "topic_topic": { - "__base64__": "aGJhYy8x" - }, - "version": "1" - }, - { - "doc": "Host-based access control commands", - "full_name": "hbac/1", - "name": "hbac", - "version": "1" - }, - { - "doc": - "HBAC Services\n\nThe PAM services that HBAC can control access to. The name used here\nmust match the service name that PAM is evaluating.\n\nEXAMPLES:\n\n Add a new HBAC service:\n ipa hbacsvc-add tftp\n\n Modify an existing HBAC service:\n ipa hbacsvc-mod --desc=\"TFTP service\" tftp\n\n Search for HBAC services. This example will return two results, the FTP\n service and the newly-added tftp service:\n ipa hbacsvc-find ftp\n\n Delete an HBAC service:\n ipa hbacsvc-del tftp", - "full_name": "hbacsvc/1", - "name": "hbacsvc", - "topic_topic": { - "__base64__": "aGJhYy8x" - }, - "version": "1" - }, - { - "doc": - "HBAC Service Groups\n\nHBAC service groups can contain any number of individual services,\nor \"members\". Every group must have a description.\n\nEXAMPLES:\n\n Add a new HBAC service group:\n ipa hbacsvcgroup-add --desc=\"login services\" login\n\n Add members to an HBAC service group:\n ipa hbacsvcgroup-add-member --hbacsvcs=sshd --hbacsvcs=login login\n\n Display information about a named group:\n ipa hbacsvcgroup-show login\n\n Delete an HBAC service group:\n ipa hbacsvcgroup-del login", - "full_name": "hbacsvcgroup/1", - "name": "hbacsvcgroup", - "topic_topic": { - "__base64__": "aGJhYy8x" - }, - "version": "1" - }, - { - "doc": - "Simulate use of Host-based access controls\n\nHBAC rules control who can access what services on what hosts.\nYou can use HBAC to control which users or groups can access a service,\nor group of services, on a target host.\n\nSince applying HBAC rules implies use of a production environment,\nthis plugin aims to provide simulation of HBAC rules evaluation without\nhaving access to the production environment.\n\n Test user coming to a service on a named host against\n existing enabled rules.\n\n ipa hbactest --user= --host= --service=\n [--rules=rules-list] [--nodetail] [--enabled] [--disabled]\n [--sizelimit= ]\n\n --user, --host, and --service are mandatory, others are optional.\n\n If --rules is specified simulate enabling of the specified rules and test\n the login of the user using only these rules.\n\n If --enabled is specified, all enabled HBAC rules will be added to simulation\n\n If --disabled is specified, all disabled HBAC rules will be added to simulation\n\n If --nodetail is specified, do not return information about rules matched/not matched.\n\n If both --rules and --enabled are specified, apply simulation to --rules _and_\n all IPA enabled rules.\n\n If no --rules specified, simulation is run against all IPA enabled rules.\n By default there is a IPA-wide limit to number of entries fetched, you can change it\n with --sizelimit option.\n\nEXAMPLES:\n\n 1. Use all enabled HBAC rules in IPA database to simulate:\n $ ipa hbactest --user=a1a --host=bar --service=sshd\n --------------------\n Access granted: True\n --------------------\n Not matched rules: my-second-rule\n Not matched rules: my-third-rule\n Not matched rules: myrule\n Matched rules: allow_all\n\n 2. Disable detailed summary of how rules were applied:\n $ ipa hbactest --user=a1a --host=bar --service=sshd --nodetail\n --------------------\n Access granted: True\n --------------------\n\n 3. Test explicitly specified HBAC rules:\n $ ipa hbactest --user=a1a --host=bar --service=sshd \\\n --rules=myrule --rules=my-second-rule\n ---------------------\n Access granted: False\n ---------------------\n Not matched rules: my-second-rule\n Not matched rules: myrule\n\n 4. Use all enabled HBAC rules in IPA database + explicitly specified rules:\n $ ipa hbactest --user=a1a --host=bar --service=sshd \\\n --rules=myrule --rules=my-second-rule --enabled\n --------------------\n Access granted: True\n --------------------\n Not matched rules: my-second-rule\n Not matched rules: my-third-rule\n Not matched rules: myrule\n Matched rules: allow_all\n\n 5. Test all disabled HBAC rules in IPA database:\n $ ipa hbactest --user=a1a --host=bar --service=sshd --disabled\n ---------------------\n Access granted: False\n ---------------------\n Not matched rules: new-rule\n\n 6. Test all disabled HBAC rules in IPA database + explicitly specified rules:\n $ ipa hbactest --user=a1a --host=bar --service=sshd \\\n --rules=myrule --rules=my-second-rule --disabled\n ---------------------\n Access granted: False\n ---------------------\n Not matched rules: my-second-rule\n Not matched rules: my-third-rule\n Not matched rules: myrule\n\n 7. Test all (enabled and disabled) HBAC rules in IPA database:\n $ ipa hbactest --user=a1a --host=bar --service=sshd \\\n --enabled --disabled\n --------------------\n Access granted: True\n --------------------\n Not matched rules: my-second-rule\n Not matched rules: my-third-rule\n Not matched rules: myrule\n Not matched rules: new-rule\n Matched rules: allow_all\n\n\nHBACTEST AND TRUSTED DOMAINS\n\nWhen an external trusted domain is configured in IPA, HBAC rules are also applied\non users accessing IPA resources from the trusted domain. Trusted domain users and\ngroups (and their SIDs) can be then assigned to external groups which can be\nmembers of POSIX groups in IPA which can be used in HBAC rules and thus allowing\naccess to resources protected by the HBAC system.\n\nhbactest plugin is capable of testing access for both local IPA users and users\nfrom the trusted domains, either by a fully qualified user name or by user SID.\nSuch user names need to have a trusted domain specified as a short name\n(DOMAIN\\Administrator) or with a user principal name (UPN), Administrator@ad.test.\n\nPlease note that hbactest executed with a trusted domain user as --user parameter\ncan be only run by members of \"trust admins\" group.\n\nEXAMPLES:\n\n 1. Test if a user from a trusted domain specified by its shortname matches any\n rule:\n\n $ ipa hbactest --user 'DOMAIN\\Administrator' --host `hostname` --service sshd\n --------------------\n Access granted: True\n --------------------\n Matched rules: allow_all\n Matched rules: can_login\n\n 2. Test if a user from a trusted domain specified by its domain name matches\n any rule:\n\n $ ipa hbactest --user 'Administrator@domain.com' --host `hostname` --service sshd\n --------------------\n Access granted: True\n --------------------\n Matched rules: allow_all\n Matched rules: can_login\n\n 3. Test if a user from a trusted domain specified by its SID matches any rule:\n\n $ ipa hbactest --user S-1-5-21-3035198329-144811719-1378114514-500 \\\n --host `hostname` --service sshd\n --------------------\n Access granted: True\n --------------------\n Matched rules: allow_all\n Matched rules: can_login\n\n 4. Test if other user from a trusted domain specified by its SID matches any rule:\n\n $ ipa hbactest --user S-1-5-21-3035198329-144811719-1378114514-1203 \\\n --host `hostname` --service sshd\n --------------------\n Access granted: True\n --------------------\n Matched rules: allow_all\n Not matched rules: can_login\n\n 5. Test if other user from a trusted domain specified by its shortname matches\n any rule:\n\n $ ipa hbactest --user 'DOMAIN\\Otheruser' --host `hostname` --service sshd\n --------------------\n Access granted: True\n --------------------\n Matched rules: allow_all\n Not matched rules: can_login", - "full_name": "hbactest/1", - "name": "hbactest", - "version": "1" - }, - { - "doc": - "Hosts/Machines\n\nA host represents a machine. It can be used in a number of contexts:\n- service entries are associated with a host\n- a host stores the host/ service principal\n- a host can be used in Host-based Access Control (HBAC) rules\n- every enrolled client generates a host entry\n\nENROLLMENT:\n\nThere are three enrollment scenarios when enrolling a new client:\n\n1. You are enrolling as a full administrator. The host entry may exist\n or not. A full administrator is a member of the hostadmin role\n or the admins group.\n2. You are enrolling as a limited administrator. The host must already\n exist. A limited administrator is a member a role with the\n Host Enrollment privilege.\n3. The host has been created with a one-time password.\n\nRE-ENROLLMENT:\n\nHost that has been enrolled at some point, and lost its configuration (e.g. VM\ndestroyed) can be re-enrolled.\n\nFor more information, consult the manual pages for ipa-client-install.\n\nA host can optionally store information such as where it is located,\nthe OS that it runs, etc.\n\nEXAMPLES:\n\n Add a new host:\n ipa host-add --location=\"3rd floor lab\" --locality=Dallas test.example.com\n\n Delete a host:\n ipa host-del test.example.com\n\n Add a new host with a one-time password:\n ipa host-add --os='Fedora 12' --password=Secret123 test.example.com\n\n Add a new host with a random one-time password:\n ipa host-add --os='Fedora 12' --random test.example.com\n\n Modify information about a host:\n ipa host-mod --os='Fedora 12' test.example.com\n\n Remove SSH public keys of a host and update DNS to reflect this change:\n ipa host-mod --sshpubkey= --updatedns test.example.com\n\n Disable the host Kerberos key, SSL certificate and all of its services:\n ipa host-disable test.example.com\n\n Add a host that can manage this host's keytab and certificate:\n ipa host-add-managedby --hosts=test2 test\n\n Allow user to create a keytab:\n ipa host-allow-create-keytab test2 --users=tuser1", - "full_name": "host/1", - "name": "host", - "version": "1" - }, - { - "doc": - "Groups of hosts.\n\nManage groups of hosts. This is useful for applying access control to a\nnumber of hosts by using Host-based Access Control.\n\nEXAMPLES:\n\n Add a new host group:\n ipa hostgroup-add --desc=\"Baltimore hosts\" baltimore\n\n Add another new host group:\n ipa hostgroup-add --desc=\"Maryland hosts\" maryland\n\n Add members to the hostgroup (using Bash brace expansion):\n ipa hostgroup-add-member --hosts={box1,box2,box3} baltimore\n\n Add a hostgroup as a member of another hostgroup:\n ipa hostgroup-add-member --hostgroups=baltimore maryland\n\n Remove a host from the hostgroup:\n ipa hostgroup-remove-member --hosts=box2 baltimore\n\n Display a host group:\n ipa hostgroup-show baltimore\n\n Delete a hostgroup:\n ipa hostgroup-del baltimore", - "full_name": "hostgroup/1", - "name": "hostgroup", - "version": "1" - }, - { - "doc": - "Plugins not accessible directly through the CLI, commands used internally", - "full_name": "internal/1", - "name": "internal", - "version": "1" - }, - { - "doc": - "ID Views\nManage ID Views\nIPA allows to override certain properties of users and groups per each host.\nThis functionality is primarily used to allow migration from older systems or\nother Identity Management solutions.", - "full_name": "idviews/1", - "name": "idviews", - "version": "1" - }, - { - "doc": - "ID ranges\n\nManage ID ranges used to map Posix IDs to SIDs and back.\n\nThere are two type of ID ranges which are both handled by this utility:\n\n - the ID ranges of the local domain\n - the ID ranges of trusted remote domains\n\nBoth types have the following attributes in common:\n\n - base-id: the first ID of the Posix ID range\n - range-size: the size of the range\n\nWith those two attributes a range object can reserve the Posix IDs starting\nwith base-id up to but not including base-id+range-size exclusively.\n\nAdditionally an ID range of the local domain may set\n - rid-base: the first RID(*) of the corresponding RID range\n - secondary-rid-base: first RID of the secondary RID range\n\nand an ID range of a trusted domain must set\n - rid-base: the first RID of the corresponding RID range\n - sid: domain SID of the trusted domain\n\n\n\nEXAMPLE: Add a new ID range for a trusted domain\n\nSince there might be more than one trusted domain the domain SID must be given\nwhile creating the ID range.\n\n ipa idrange-add --base-id=1200000 --range-size=200000 --rid-base=0 \\\n --dom-sid=S-1-5-21-123-456-789 trusted_dom_range\n\nThis ID range is then used by the IPA server and the SSSD IPA provider to\nassign Posix UIDs to users from the trusted domain.\n\nIf e.g a range for a trusted domain is configured with the following values:\n base-id = 1200000\n range-size = 200000\n rid-base = 0\nthe RIDs 0 to 199999 are mapped to the Posix ID from 1200000 to 13999999. So\nRID 1000 <-> Posix ID 1201000\n\n\n\nEXAMPLE: Add a new ID range for the local domain\n\nTo create an ID range for the local domain it is not necessary to specify a\ndomain SID. But since it is possible that a user and a group can have the same\nvalue as Posix ID a second RID interval is needed to handle conflicts.\n\n ipa idrange-add --base-id=1200000 --range-size=200000 --rid-base=1000 \\\n --secondary-rid-base=1000000 local_range\n\nThe data from the ID ranges of the local domain are used by the IPA server\ninternally to assign SIDs to IPA users and groups. The SID will then be stored\nin the user or group objects.\n\nIf e.g. the ID range for the local domain is configured with the values from\nthe example above then a new user with the UID 1200007 will get the RID 1007.\nIf this RID is already used by a group the RID will be 1000007. This can only\nhappen if a user or a group object was created with a fixed ID because the\nautomatic assignment will not assign the same ID twice. Since there are only\nusers and groups sharing the same ID namespace it is sufficient to have only\none fallback range to handle conflicts.\n\nTo find the Posix ID for a given RID from the local domain it has to be\nchecked first if the RID falls in the primary or secondary RID range and\nthe rid-base or the secondary-rid-base has to be subtracted, respectively,\nand the base-id has to be added to get the Posix ID.\n\nTypically the creation of ID ranges happens behind the scenes and this CLI\nmust not be used at all. The ID range for the local domain will be created\nduring installation or upgrade from an older version. The ID range for a\ntrusted domain will be created together with the trust by 'ipa trust-add ...'.\n\nUSE CASES:\n\n Add an ID range from a transitively trusted domain\n\n If the trusted domain (A) trusts another domain (B) as well and this trust\n is transitive 'ipa trust-add domain-A' will only create a range for\n domain A. The ID range for domain B must be added manually.\n\n Add an additional ID range for the local domain\n\n If the ID range of the local domain is exhausted, i.e. no new IDs can be\n assigned to Posix users or groups by the DNA plugin, a new range has to be\n created to allow new users and groups to be added. (Currently there is no\n connection between this range CLI and the DNA plugin, but a future version\n might be able to modify the configuration of the DNS plugin as well)\n\nIn general it is not necessary to modify or delete ID ranges. If there is no\nother way to achieve a certain configuration than to modify or delete an ID\nrange it should be done with great care. Because UIDs are stored in the file\nsystem and are used for access control it might be possible that users are\nallowed to access files of other users if an ID range got deleted and reused\nfor a different domain.\n\n(*) The RID is typically the last integer of a user or group SID which follows\nthe domain SID. E.g. if the domain SID is S-1-5-21-123-456-789 and a user from\nthis domain has the SID S-1-5-21-123-456-789-1010 then 1010 id the RID of the\nuser. RIDs are unique in a domain, 32bit values and are used for users and\ngroups.\n\n=======\nWARNING:\n\nDNA plugin in 389-ds will allocate IDs based on the ranges configured for the\nlocal domain. Currently the DNA plugin *cannot* be reconfigured itself based\non the local ranges set via this family of commands.\n\nManual configuration change has to be done in the DNA plugin configuration for\nthe new local range. Specifically, The dnaNextRange attribute of 'cn=Posix\nIDs,cn=Distributed Numeric Assignment Plugin,cn=plugins,cn=config' has to be\nmodified to match the new range.\n=======", - "full_name": "idrange/1", - "name": "idrange", - "version": "1" - }, - { - "doc": "Joining an IPA domain", - "full_name": "join/1", - "name": "join", - "version": "1" - }, - { - "doc": - "Vaults\n\nManage vaults.\n\nVault is a secure place to store a secret.\n\nBased on the ownership there are three vault categories:\n* user/private vault\n* service vault\n* shared vault\n\nUser vaults are vaults owned used by a particular user. Private\nvaults are vaults owned the current user. Service vaults are\nvaults owned by a service. Shared vaults are owned by the admin\nbut they can be used by other users or services.\n\nBased on the security mechanism there are three types of\nvaults:\n* standard vault\n* symmetric vault\n* asymmetric vault\n\nStandard vault uses a secure mechanism to transport and\nstore the secret. The secret can only be retrieved by users\nthat have access to the vault.\n\nSymmetric vault is similar to the standard vault, but it\npre-encrypts the secret using a password before transport.\nThe secret can only be retrieved using the same password.\n\nAsymmetric vault is similar to the standard vault, but it\npre-encrypts the secret using a public key before transport.\nThe secret can only be retrieved using the private key.\n\nEXAMPLES:\n\n List vaults:\n ipa vault-find\n [--user |--service |--shared]\n\n Add a standard vault:\n ipa vault-add \n [--user |--service |--shared]\n --type standard\n\n Add a symmetric vault:\n ipa vault-add \n [--user |--service |--shared]\n --type symmetric --password-file password.txt\n\n Add an asymmetric vault:\n ipa vault-add \n [--user |--service |--shared]\n --type asymmetric --public-key-file public.pem\n\n Show a vault:\n ipa vault-show \n [--user |--service |--shared]\n\n Modify vault description:\n ipa vault-mod \n [--user |--service |--shared]\n --desc \n\n Modify vault type:\n ipa vault-mod \n [--user |--service |--shared]\n --type \n [old password/private key]\n [new password/public key]\n\n Modify symmetric vault password:\n ipa vault-mod \n [--user |--service |--shared]\n --change-password\n ipa vault-mod \n [--user |--service |--shared]\n --old-password \n --new-password \n ipa vault-mod \n [--user |--service |--shared]\n --old-password-file \n --new-password-file \n\n Modify asymmetric vault keys:\n ipa vault-mod \n [--user |--service |--shared]\n --private-key-file \n --public-key-file \n\n Delete a vault:\n ipa vault-del \n [--user |--service |--shared]\n\n Display vault configuration:\n ipa vaultconfig-show\n\n Archive data into standard vault:\n ipa vault-archive \n [--user |--service |--shared]\n --in \n\n Archive data into symmetric vault:\n ipa vault-archive \n [--user |--service |--shared]\n --in \n --password-file password.txt\n\n Archive data into asymmetric vault:\n ipa vault-archive \n [--user |--service |--shared]\n --in \n\n Retrieve data from standard vault:\n ipa vault-retrieve \n [--user |--service |--shared]\n --out \n\n Retrieve data from symmetric vault:\n ipa vault-retrieve \n [--user |--service |--shared]\n --out \n --password-file password.txt\n\n Retrieve data from asymmetric vault:\n ipa vault-retrieve \n [--user |--service |--shared]\n --out --private-key-file private.pem\n\n Add vault owners:\n ipa vault-add-owner \n [--user |--service |--shared]\n [--users ] [--groups ] [--services ]\n\n Delete vault owners:\n ipa vault-remove-owner \n [--user |--service |--shared]\n [--users ] [--groups ] [--services ]\n\n Add vault members:\n ipa vault-add-member \n [--user |--service |--shared]\n [--users ] [--groups ] [--services ]\n\n Delete vault members:\n ipa vault-remove-member \n [--user |--service |--shared]\n [--users ] [--groups ] [--services ]", - "full_name": "vault/1", - "name": "vault", - "version": "1" - }, - { - "doc": - "Kerberos ticket policy\n\nThere is a single Kerberos ticket policy. This policy defines the\nmaximum ticket lifetime and the maximum renewal age, the period during\nwhich the ticket is renewable.\n\nYou can also create a per-user ticket policy by specifying the user login.\n\nFor changes to the global policy to take effect, restarting the KDC service\nis required, which can be achieved using:\n\nservice krb5kdc restart\n\nChanges to per-user policies take effect immediately for newly requested\ntickets (e.g. when the user next runs kinit).\n\nEXAMPLES:\n\n Display the current Kerberos ticket policy:\n ipa krbtpolicy-show\n\n Reset the policy to the default:\n ipa krbtpolicy-reset\n\n Modify the policy to 8 hours max life, 1-day max renewal:\n ipa krbtpolicy-mod --maxlife=28800 --maxrenew=86400\n\n Display effective Kerberos ticket policy for user 'admin':\n ipa krbtpolicy-show admin\n\n Reset per-user policy for user 'admin':\n ipa krbtpolicy-reset admin\n\n Modify per-user policy for user 'admin':\n ipa krbtpolicy-mod admin --maxlife=3600", - "full_name": "krbtpolicy/1", - "name": "krbtpolicy", - "version": "1" - }, - { - "doc": - "IPA locations\n\nManipulate DNS locations\n\nEXAMPLES:\n\n Find all locations:\n ipa location-find\n\n Show specific location:\n ipa location-show location\n\n Add location:\n ipa location-add location --description 'My location'\n\n Delete location:\n ipa location-del location", - "full_name": "location/1", - "name": "location", - "version": "1" - }, - { - "doc": - "Migration to IPA\n\nMigrate users and groups from an LDAP server to IPA.\n\nThis performs an LDAP query against the remote server searching for\nusers and groups in a container. In order to migrate passwords you need\nto bind as a user that can read the userPassword attribute on the remote\nserver. This is generally restricted to high-level admins such as\ncn=Directory Manager in 389-ds (this is the default bind user).\n\nThe default user container is ou=People.\n\nThe default group container is ou=Groups.\n\nUsers and groups that already exist on the IPA server are skipped.\n\nTwo LDAP schemas define how group members are stored: RFC2307 and\nRFC2307bis. RFC2307bis uses member and uniquemember to specify group\nmembers, RFC2307 uses memberUid. The default schema is RFC2307bis.\n\nThe schema compat feature allows IPA to reformat data for systems that\ndo not support RFC2307bis. It is recommended that this feature is disabled\nduring migration to reduce system overhead. It can be re-enabled after\nmigration. To migrate with it enabled use the \"--with-compat\" option.\n\nMigrated users do not have Kerberos credentials, they have only their\nLDAP password. To complete the migration process, users need to go\nto http://ipa.example.com/ipa/migration and authenticate using their\nLDAP password in order to generate their Kerberos credentials.\n\nMigration is disabled by default. Use the command ipa config-mod to\nenable it:\n\n ipa config-mod --enable-migration=TRUE\n\nIf a base DN is not provided with --basedn then IPA will use either\nthe value of defaultNamingContext if it is set or the first value\nin namingContexts set in the root of the remote LDAP server.\n\nUsers are added as members to the default user group. This can be a\ntime-intensive task so during migration this is done in a batch\nmode for every 100 users. As a result there will be a window in which\nusers will be added to IPA but will not be members of the default\nuser group.\n\nEXAMPLES:\n\n The simplest migration, accepting all defaults:\n ipa migrate-ds ldap://ds.example.com:389\n\n Specify the user and group container. This can be used to migrate user\n and group data from an IPA v1 server:\n ipa migrate-ds --user-container='cn=users,cn=accounts' \\\n --group-container='cn=groups,cn=accounts' \\\n ldap://ds.example.com:389\n\n Since IPA v2 server already contain predefined groups that may collide with\n groups in migrated (IPA v1) server (for example admins, ipausers), users\n having colliding group as their primary group may happen to belong to\n an unknown group on new IPA v2 server.\n Use --group-overwrite-gid option to overwrite GID of already existing groups\n to prevent this issue:\n ipa migrate-ds --group-overwrite-gid \\\n --user-container='cn=users,cn=accounts' \\\n --group-container='cn=groups,cn=accounts' \\\n ldap://ds.example.com:389\n\n Migrated users or groups may have object class and accompanied attributes\n unknown to the IPA v2 server. These object classes and attributes may be\n left out of the migration process:\n ipa migrate-ds --user-container='cn=users,cn=accounts' \\\n --group-container='cn=groups,cn=accounts' \\\n --user-ignore-objectclass=radiusprofile \\\n --user-ignore-attribute=radiusgroupname \\\n ldap://ds.example.com:389\n\nLOGGING\n\nMigration will log warnings and errors to the Apache error log. This\nfile should be evaluated post-migration to correct or investigate any\nissues that were discovered.\n\nFor every 100 users migrated an info-level message will be displayed to\ngive the current progress and duration to make it possible to track\nthe progress of migration.\n\nIf the log level is debug, either by setting debug = True in\n/etc/ipa/default.conf or /etc/ipa/server.conf, then an entry will be printed\nfor each user added plus a summary when the default user group is\nupdated.", - "full_name": "migration/1", - "name": "migration", - "version": "1" - }, - { - "doc": - "Netgroups\n\nA netgroup is a group used for permission checking. It can contain both\nuser and host values.\n\nEXAMPLES:\n\n Add a new netgroup:\n ipa netgroup-add --desc=\"NFS admins\" admins\n\n Add members to the netgroup:\n ipa netgroup-add-member --users=tuser1 --users=tuser2 admins\n\n Remove a member from the netgroup:\n ipa netgroup-remove-member --users=tuser2 admins\n\n Display information about a netgroup:\n ipa netgroup-show admins\n\n Delete a netgroup:\n ipa netgroup-del admins", - "full_name": "netgroup/1", - "name": "netgroup", - "version": "1" - }, - { - "doc": - "OTP configuration\n\nManage the default values that IPA uses for OTP tokens.\n\nEXAMPLES:\n\n Show basic OTP configuration:\n ipa otpconfig-show\n\n Show all OTP configuration options:\n ipa otpconfig-show --all\n\n Change maximum TOTP authentication window to 10 minutes:\n ipa otpconfig-mod --totp-auth-window=600\n\n Change maximum TOTP synchronization window to 12 hours:\n ipa otpconfig-mod --totp-sync-window=43200\n\n Change maximum HOTP authentication window to 5:\n ipa hotpconfig-mod --hotp-auth-window=5\n\n Change maximum HOTP synchronization window to 50:\n ipa hotpconfig-mod --hotp-sync-window=50", - "full_name": "otpconfig/1", - "name": "otpconfig", - "topic_topic": { - "__base64__": "b3RwLzE=" - }, - "version": "1" - }, - { - "doc": "One time password commands", - "full_name": "otp/1", - "name": "otp", - "version": "1" - }, - { - "doc": - "OTP Tokens\n\nManage OTP tokens.\n\nIPA supports the use of OTP tokens for multi-factor authentication. This\ncode enables the management of OTP tokens.\n\nEXAMPLES:\n\n Add a new token:\n ipa otptoken-add --type=totp --owner=jdoe --desc=\"My soft token\"\n\n Examine the token:\n ipa otptoken-show a93db710-a31a-4639-8647-f15b2c70b78a\n\n Change the vendor:\n ipa otptoken-mod a93db710-a31a-4639-8647-f15b2c70b78a --vendor=\"Red Hat\"\n\n Delete a token:\n ipa otptoken-del a93db710-a31a-4639-8647-f15b2c70b78a", - "full_name": "otptoken/1", - "name": "otptoken", - "topic_topic": { - "__base64__": "b3RwLzE=" - }, - "version": "1" - }, - { - "doc": - "Set a user's password\n\nIf someone other than a user changes that user's password (e.g., Helpdesk\nresets it) then the password will need to be changed the first time it\nis used. This is so the end-user is the only one who knows the password.\n\nThe IPA password policy controls how often a password may be changed,\nwhat strength requirements exist, and the length of the password history.\n\nEXAMPLES:\n\n To reset your own password:\n ipa passwd\n\n To change another user's password:\n ipa passwd tuser1", - "full_name": "passwd/1", - "name": "passwd", - "version": "1" - }, - { - "doc": - "Permissions\n\nA permission enables fine-grained delegation of rights. A permission is\na human-readable wrapper around a 389-ds Access Control Rule,\nor instruction (ACI).\nA permission grants the right to perform a specific task such as adding a\nuser, modifying a group, etc.\n\nA permission may not contain other permissions.\n\n* A permission grants access to read, write, add, delete, read, search,\n or compare.\n* A privilege combines similar permissions (for example all the permissions\n needed to add a user).\n* A role grants a set of privileges to users, groups, hosts or hostgroups.\n\nA permission is made up of a number of different parts:\n\n1. The name of the permission.\n2. The target of the permission.\n3. The rights granted by the permission.\n\nRights define what operations are allowed, and may be one or more\nof the following:\n1. write - write one or more attributes\n2. read - read one or more attributes\n3. search - search on one or more attributes\n4. compare - compare one or more attributes\n5. add - add a new entry to the tree\n6. delete - delete an existing entry\n7. all - all permissions are granted\n\nNote the distinction between attributes and entries. The permissions are\nindependent, so being able to add a user does not mean that the user will\nbe editable.\n\nThere are a number of allowed targets:\n1. subtree: a DN; the permission applies to the subtree under this DN\n2. target filter: an LDAP filter\n3. target: DN with possible wildcards, specifies entries permission applies to\n\nAdditionally, there are the following convenience options.\nSetting one of these options will set the corresponding attribute(s).\n1. type: a type of object (user, group, etc); sets subtree and target filter.\n2. memberof: apply to members of a group; sets target filter\n3. targetgroup: grant access to modify a specific group (such as granting\n the rights to manage group membership); sets target.\n\nManaged permissions\n\nPermissions that come with IPA by default can be so-called \"managed\"\npermissions. These have a default set of attributes they apply to,\nbut the administrator can add/remove individual attributes to/from the set.\n\nDeleting or renaming a managed permission, as well as changing its target,\nis not allowed.\n\nEXAMPLES:\n\n Add a permission that grants the creation of users:\n ipa permission-add --type=user --permissions=add \"Add Users\"\n\n Add a permission that grants the ability to manage group membership:\n ipa permission-add --attrs=member --permissions=write --type=group \"Manage Group Members\"", - "full_name": "permission/1", - "name": "permission", - "version": "1" - }, - { - "doc": - "Ping the remote IPA server to ensure it is running.\n\nThe ping command sends an echo request to an IPA server. The server\nreturns its version information. This is used by an IPA client\nto confirm that the server is available and accepting requests.\n\nThe server from xmlrpc_uri in /etc/ipa/default.conf is contacted first.\nIf it does not respond then the client will contact any servers defined\nby ldap SRV records in DNS.\n\nEXAMPLES:\n\n Ping an IPA server:\n ipa ping\n ------------------------------------------\n IPA server version 2.1.9. API version 2.20\n ------------------------------------------\n\n Ping an IPA server verbosely:\n ipa -v ping\n ipa: INFO: trying https://ipa.example.com/ipa/xml\n ipa: INFO: Forwarding 'ping' to server 'https://ipa.example.com/ipa/xml'\n -----------------------------------------------------\n IPA server version 2.1.9. API version 2.20\n -----------------------------------------------------", - "full_name": "ping/1", - "name": "ping", - "version": "1" - }, - { - "doc": - "Kerberos pkinit options\n\nEnable or disable anonymous pkinit using the principal\nWELLKNOWN/ANONYMOUS@REALM. The server must have been installed with\npkinit support.\n\nEXAMPLES:\n\n Enable anonymous pkinit:\n ipa pkinit-anonymous enable\n\n Disable anonymous pkinit:\n ipa pkinit-anonymous disable\n\nFor more information on anonymous pkinit see:\n\nhttp://k5wiki.kerberos.org/wiki/Projects/Anonymous_pkinit", - "full_name": "pkinit/1", - "name": "pkinit", - "version": "1" - }, - { - "doc": - "Privileges\n\nA privilege combines permissions into a logical task. A permission provides\nthe rights to do a single task. There are some IPA operations that require\nmultiple permissions to succeed. A privilege is where permissions are\ncombined in order to perform a specific task.\n\nFor example, adding a user requires the following permissions:\n * Creating a new user entry\n * Resetting a user password\n * Adding the new user to the default IPA users group\n\nCombining these three low-level tasks into a higher level task in the\nform of a privilege named \"Add User\" makes it easier to manage Roles.\n\nA privilege may not contain other privileges.\n\nSee role and permission for additional information.", - "full_name": "privilege/1", - "name": "privilege", - "version": "1" - }, - { - "doc": - "RADIUS Proxy Servers\n\nManage RADIUS Proxy Servers.\n\nIPA supports the use of an external RADIUS proxy server for krb5 OTP\nauthentications. This permits a great deal of flexibility when\nintegrating with third-party authentication services.\n\nEXAMPLES:\n\n Add a new server:\n ipa radiusproxy-add MyRADIUS --server=radius.example.com:1812\n\n Find all servers whose entries include the string \"example.com\":\n ipa radiusproxy-find example.com\n\n Examine the configuration:\n ipa radiusproxy-show MyRADIUS\n\n Change the secret:\n ipa radiusproxy-mod MyRADIUS --secret\n\n Delete a configuration:\n ipa radiusproxy-del MyRADIUS", - "full_name": "radiusproxy/1", - "name": "radiusproxy", - "version": "1" - }, - { - "doc": - "Realm domains\n\nManage the list of domains associated with IPA realm.\n\nEXAMPLES:\n\n Display the current list of realm domains:\n ipa realmdomains-show\n\n Replace the list of realm domains:\n ipa realmdomains-mod --domain=example.com\n ipa realmdomains-mod --domain={example1.com,example2.com,example3.com}\n\n Add a domain to the list of realm domains:\n ipa realmdomains-mod --add-domain=newdomain.com\n\n Delete a domain from the list of realm domains:\n ipa realmdomains-mod --del-domain=olddomain.com", - "full_name": "realmdomains/1", - "name": "realmdomains", - "version": "1" - }, - { - "doc": - "Roles\n\nA role is used for fine-grained delegation. A permission grants the ability\nto perform given low-level tasks (add a user, modify a group, etc.). A\nprivilege combines one or more permissions into a higher-level abstraction\nsuch as useradmin. A useradmin would be able to add, delete and modify users.\n\nPrivileges are assigned to Roles.\n\nUsers, groups, hosts and hostgroups may be members of a Role.\n\nRoles can not contain other roles.\n\nEXAMPLES:\n\n Add a new role:\n ipa role-add --desc=\"Junior-level admin\" junioradmin\n\n Add some privileges to this role:\n ipa role-add-privilege --privileges=addusers junioradmin\n ipa role-add-privilege --privileges=change_password junioradmin\n ipa role-add-privilege --privileges=add_user_to_default_group junioradmin\n\n Add a group of users to this role:\n ipa group-add --desc=\"User admins\" useradmins\n ipa role-add-member --groups=useradmins junioradmin\n\n Display information about a role:\n ipa role-show junioradmin\n\n The result of this is that any users in the group 'junioradmin' can\n add users, reset passwords or add a user to the default IPA user group.", - "full_name": "role/1", - "name": "role", - "version": "1" - }, - { - "doc": - "Self-service Permissions\n\nA permission enables fine-grained delegation of permissions. Access Control\nRules, or instructions (ACIs), grant permission to permissions to perform\ngiven tasks such as adding a user, modifying a group, etc.\n\nA Self-service permission defines what an object can change in its own entry.\n\n\nEXAMPLES:\n\n Add a self-service rule to allow users to manage their address (using Bash\n brace expansion):\n ipa selfservice-add --permissions=write --attrs={street,postalCode,l,c,st} \"Users manage their own address\"\n\n When managing the list of attributes you need to include all attributes\n in the list, including existing ones.\n Add telephoneNumber to the list (using Bash brace expansion):\n ipa selfservice-mod --attrs={street,postalCode,l,c,st,telephoneNumber} \"Users manage their own address\"\n\n Display our updated rule:\n ipa selfservice-show \"Users manage their own address\"\n\n Delete a rule:\n ipa selfservice-del \"Users manage their own address\"", - "full_name": "selfservice/1", - "name": "selfservice", - "version": "1" - }, - { - "doc": - "SELinux User Mapping\n\nMap IPA users to SELinux users by host.\n\nHosts, hostgroups, users and groups can be either defined within\nthe rule or it may point to an existing HBAC rule. When using\n--hbacrule option to selinuxusermap-find an exact match is made on the\nHBAC rule name, so only one or zero entries will be returned.\n\nEXAMPLES:\n\n Create a rule, \"test1\", that sets all users to xguest_u:s0 on the host \"server\":\n ipa selinuxusermap-add --usercat=all --selinuxuser=xguest_u:s0 test1\n ipa selinuxusermap-add-host --hosts=server.example.com test1\n\n Create a rule, \"test2\", that sets all users to guest_u:s0 and uses an existing HBAC rule for users and hosts:\n ipa selinuxusermap-add --usercat=all --hbacrule=webserver --selinuxuser=guest_u:s0 test2\n\n Display the properties of a rule:\n ipa selinuxusermap-show test2\n\n Create a rule for a specific user. This sets the SELinux context for\n user john to unconfined_u:s0-s0:c0.c1023 on any machine:\n ipa selinuxusermap-add --hostcat=all --selinuxuser=unconfined_u:s0-s0:c0.c1023 john_unconfined\n ipa selinuxusermap-add-user --users=john john_unconfined\n\n Disable a rule:\n ipa selinuxusermap-disable test1\n\n Enable a rule:\n ipa selinuxusermap-enable test1\n\n Find a rule referencing a specific HBAC rule:\n ipa selinuxusermap-find --hbacrule=allow_some\n\n Remove a rule:\n ipa selinuxusermap-del john_unconfined\n\nSEEALSO:\n\n The list controlling the order in which the SELinux user map is applied\n and the default SELinux user are available in the config-show command.", - "full_name": "selinuxusermap/1", - "name": "selinuxusermap", - "version": "1" - }, - { - "doc": - "IPA servers\n\nGet information about installed IPA servers.\n\nEXAMPLES:\n\n Find all servers:\n ipa server-find\n\n Show specific server:\n ipa server-show ipa.example.com", - "full_name": "server/1", - "name": "server", - "version": "1" - }, - { - "doc": - "IPA server roles\n\nGet status of roles (DNS server, CA, etc.) provided by IPA masters.\n\nEXAMPLES:\n\n Show status of 'DNS server' role on a server:\n ipa server-role-show ipa.example.com \"DNS server\"\n\n Show status of all roles containing 'AD' on a server:\n ipa server-role-find --server ipa.example.com --role='AD'\n\n Show status of all configured roles on a server:\n ipa server-role-find ipa.example.com", - "full_name": "serverrole/1", - "name": "serverrole", - "version": "1" - }, - { - "doc": - "Services\n\nA IPA service represents a service that runs on a host. The IPA service\nrecord can store a Kerberos principal, an SSL certificate, or both.\n\nAn IPA service can be managed directly from a machine, provided that\nmachine has been given the correct permission. This is true even for\nmachines other than the one the service is associated with. For example,\nrequesting an SSL certificate using the host service principal credentials\nof the host. To manage a service using host credentials you need to\nkinit as the host:\n\n # kinit -kt /etc/krb5.keytab host/ipa.example.com@EXAMPLE.COM\n\nAdding an IPA service allows the associated service to request an SSL\ncertificate or keytab, but this is performed as a separate step; they\nare not produced as a result of adding the service.\n\nOnly the public aspect of a certificate is stored in a service record;\nthe private key is not stored.\n\nEXAMPLES:\n\n Add a new IPA service:\n ipa service-add HTTP/web.example.com\n\n Allow a host to manage an IPA service certificate:\n ipa service-add-host --hosts=web.example.com HTTP/web.example.com\n ipa role-add-member --hosts=web.example.com certadmin\n\n Override a default list of supported PAC types for the service:\n ipa service-mod HTTP/web.example.com --pac-type=MS-PAC\n\n A typical use case where overriding the PAC type is needed is NFS.\n Currently the related code in the Linux kernel can only handle Kerberos\n tickets up to a maximal size. Since the PAC data can become quite large it\n is recommended to set --pac-type=NONE for NFS services.\n\n Delete an IPA service:\n ipa service-del HTTP/web.example.com\n\n Find all IPA services associated with a host:\n ipa service-find web.example.com\n\n Find all HTTP services:\n ipa service-find HTTP\n\n Disable the service Kerberos key and SSL certificate:\n ipa service-disable HTTP/web.example.com\n\n Request a certificate for an IPA service:\n ipa cert-request --principal=HTTP/web.example.com example.csr\n\n Allow user to create a keytab:\n ipa service-allow-create-keytab HTTP/web.example.com --users=tuser1\n\n Generate and retrieve a keytab for an IPA service:\n ipa-getkeytab -s ipa.example.com -p HTTP/web.example.com -k /etc/httpd/httpd.keytab", - "full_name": "service/1", - "name": "service", - "version": "1" - }, - { - "doc": - "Service Constrained Delegation\n\nManage rules to allow constrained delegation of credentials so\nthat a service can impersonate a user when communicating with another\nservice without requiring the user to actually forward their TGT.\nThis makes for a much better method of delegating credentials as it\nprevents exposure of the short term secret of the user.\n\nThe naming convention is to append the word \"target\" or \"targets\" to\na matching rule name. This is not mandatory but helps conceptually\nto associate rules and targets.\n\nA rule consists of two things:\n - A list of targets the rule applies to\n - A list of memberPrincipals that are allowed to delegate for\n those targets\n\nA target consists of a list of principals that can be delegated.\n\nIn English, a rule says that this principal can delegate as this\nlist of principals, as defined by these targets.\n\nEXAMPLES:\n\n Add a new constrained delegation rule:\n ipa servicedelegationrule-add ftp-delegation\n\n Add a new constrained delegation target:\n ipa servicedelegationtarget-add ftp-delegation-target\n\n Add a principal to the rule:\n ipa servicedelegationrule-add-member --principals=ftp/ipa.example.com ftp-delegation\n\n Add our target to the rule:\n ipa servicedelegationrule-add-target --servicedelegationtargets=ftp-delegation-target ftp-delegation\n\n Add a principal to the target:\n ipa servicedelegationtarget-add-member --principals=ldap/ipa.example.com ftp-delegation-target\n\n Display information about a named delegation rule and target:\n ipa servicedelegationrule_show ftp-delegation\n ipa servicedelegationtarget_show ftp-delegation-target\n\n Remove a constrained delegation:\n ipa servicedelegationrule-del ftp-delegation-target\n ipa servicedelegationtarget-del ftp-delegation\n\nIn this example the ftp service can get a TGT for the ldap service on\nthe bound user's behalf.\n\nIt is strongly discouraged to modify the delegations that ship with\nIPA, ipa-http-delegation and its targets ipa-cifs-delegation-targets and\nipa-ldap-delegation-targets. Incorrect changes can remove the ability\nto delegate, causing the framework to stop functioning.", - "full_name": "servicedelegation/1", - "name": "servicedelegation", - "version": "1" - }, - { - "full_name": "session/1", - "name": "session", - "version": "1" - }, - { - "doc": - "Stageusers\n\nManage stage user entries.\n\nStage user entries are directly under the container: \"cn=stage users,\ncn=accounts, cn=provisioning, SUFFIX\".\nUsers can not authenticate with those entries (even if the entries\ncontain credentials). Those entries are only candidate to become Active entries.\n\nActive user entries are Posix users directly under the container: \"cn=accounts, SUFFIX\".\nUsers can authenticate with Active entries, at the condition they have\ncredentials.\n\nDeleted user entries are Posix users directly under the container: \"cn=deleted users,\ncn=accounts, cn=provisioning, SUFFIX\".\nUsers can not authenticate with those entries, even if the entries contain credentials.\n\nThe stage user container contains entries:\n - created by 'stageuser-add' commands that are Posix users,\n - created by external provisioning system.\n\nA valid stage user entry MUST have:\n - entry RDN is 'uid',\n - ipaUniqueID is 'autogenerate'.\n\nIPA supports a wide range of username formats, but you need to be aware of any\nrestrictions that may apply to your particular environment. For example,\nusernames that start with a digit or usernames that exceed a certain length\nmay cause problems for some UNIX systems.\nUse 'ipa config-mod' to change the username format allowed by IPA tools.\n\n\nEXAMPLES:\n\n Add a new stageuser:\n ipa stageuser-add --first=Tim --last=User --password tuser1\n\n Add a stageuser from the deleted users container:\n ipa stageuser-add --first=Tim --last=User --from-delete tuser1", - "full_name": "stageuser/1", - "name": "stageuser", - "version": "1" - }, - { - "doc": - "Sudo Commands\n\nCommands used as building blocks for sudo\n\nEXAMPLES:\n\n Create a new command\n ipa sudocmd-add --desc='For reading log files' /usr/bin/less\n\n Remove a command\n ipa sudocmd-del /usr/bin/less", - "full_name": "sudocmd/1", - "name": "sudocmd", - "topic_topic": { - "__base64__": "c3Vkby8x" - }, - "version": "1" - }, - { - "doc": "commands for controlling sudo configuration", - "full_name": "sudo/1", - "name": "sudo", - "version": "1" - }, - { - "doc": - "Groups of Sudo Commands\n\nManage groups of Sudo Commands.\n\nEXAMPLES:\n\n Add a new Sudo Command Group:\n ipa sudocmdgroup-add --desc='administrators commands' admincmds\n\n Remove a Sudo Command Group:\n ipa sudocmdgroup-del admincmds\n\n Manage Sudo Command Group membership, commands:\n ipa sudocmdgroup-add-member --sudocmds=/usr/bin/less --sudocmds=/usr/bin/vim admincmds\n\n Manage Sudo Command Group membership, commands:\n ipa sudocmdgroup-remove-member --sudocmds=/usr/bin/less admincmds\n\n Show a Sudo Command Group:\n ipa sudocmdgroup-show admincmds", - "full_name": "sudocmdgroup/1", - "name": "sudocmdgroup", - "topic_topic": { - "__base64__": "c3Vkby8x" - }, - "version": "1" - }, - { - "doc": - "Sudo Rules\n\nSudo (su \"do\") allows a system administrator to delegate authority to\ngive certain users (or groups of users) the ability to run some (or all)\ncommands as root or another user while providing an audit trail of the\ncommands and their arguments.\n\nFreeIPA provides a means to configure the various aspects of Sudo:\n Users: The user(s)/group(s) allowed to invoke Sudo.\n Hosts: The host(s)/hostgroup(s) which the user is allowed to to invoke Sudo.\n Allow Command: The specific command(s) permitted to be run via Sudo.\n Deny Command: The specific command(s) prohibited to be run via Sudo.\n RunAsUser: The user(s) or group(s) of users whose rights Sudo will be invoked with.\n RunAsGroup: The group(s) whose gid rights Sudo will be invoked with.\n Options: The various Sudoers Options that can modify Sudo's behavior.\n\nAn order can be added to a sudorule to control the order in which they\nare evaluated (if the client supports it). This order is an integer and\nmust be unique.\n\nFreeIPA provides a designated binddn to use with Sudo located at:\nuid=sudo,cn=sysaccounts,cn=etc,dc=example,dc=com\n\nTo enable the binddn run the following command to set the password:\nLDAPTLS_CACERT=/etc/ipa/ca.crt /usr/bin/ldappasswd -S -W -h ipa.example.com -ZZ -D \"cn=Directory Manager\" uid=sudo,cn=sysaccounts,cn=etc,dc=example,dc=com\n\nEXAMPLES:\n\n Create a new rule:\n ipa sudorule-add readfiles\n\n Add sudo command object and add it as allowed command in the rule:\n ipa sudocmd-add /usr/bin/less\n ipa sudorule-add-allow-command readfiles --sudocmds /usr/bin/less\n\n Add a host to the rule:\n ipa sudorule-add-host readfiles --hosts server.example.com\n\n Add a user to the rule:\n ipa sudorule-add-user readfiles --users jsmith\n\n Add a special Sudo rule for default Sudo server configuration:\n ipa sudorule-add defaults\n\n Set a default Sudo option:\n ipa sudorule-add-option defaults --sudooption '!authenticate'", - "full_name": "sudorule/1", - "name": "sudorule", - "topic_topic": { - "__base64__": "c3Vkby8x" - }, - "version": "1" - }, - { - "doc": - "Topology\n\nManagement of a replication topology at domain level 1.\n\nIPA server's data is stored in LDAP server in two suffixes:\n* domain suffix, e.g., 'dc=example,dc=com', contains all domain related data\n* ca suffix, 'o=ipaca', is present only on server with CA installed. It\n contains data for Certificate Server component\n\nData stored on IPA servers is replicated to other IPA servers. The way it is\nreplicated is defined by replication agreements. Replication agreements needs\nto be set for both suffixes separately. On domain level 0 they are managed\nusing ipa-replica-manage and ipa-csreplica-manage tools. With domain level 1\nthey are managed centrally using `ipa topology*` commands.\n\nAgreements are represented by topology segments. By default topology segment\nrepresents 2 replication agreements - one for each direction, e.g., A to B and\nB to A. Creation of unidirectional segments is not allowed.\n\nTo verify that no server is disconnected in the topology of the given suffix,\nuse:\n ipa topologysuffix-verify $suffix\n\n\nExamples:\n Find all IPA servers:\n ipa server-find\n\n Find all suffixes:\n ipa topologysuffix-find\n\n Add topology segment to 'domain' suffix:\n ipa topologysegment-add domain --left IPA_SERVER_A --right IPA_SERVER_B\n\n Add topology segment to 'ca' suffix:\n ipa topologysegment-add ca --left IPA_SERVER_A --right IPA_SERVER_B\n\n List all topology segments in 'domain' suffix:\n ipa topologysegment-find domain\n\n List all topology segments in 'ca' suffix:\n ipa topologysegment-find ca\n\n Delete topology segment in 'domain' suffix:\n ipa topologysegment-del domain segment_name\n\n Delete topology segment in 'ca' suffix:\n ipa topologysegment-del ca segment_name\n\n Verify topology of 'domain' suffix:\n ipa topologysuffix-verify domain\n\n Verify topology of 'ca' suffix:\n ipa topologysuffix-verify ca", - "full_name": "topology/1", - "name": "topology", - "version": "1" - }, - { - "doc": - "Users\n\nManage user entries. All users are POSIX users.\n\nIPA supports a wide range of username formats, but you need to be aware of any\nrestrictions that may apply to your particular environment. For example,\nusernames that start with a digit or usernames that exceed a certain length\nmay cause problems for some UNIX systems.\nUse 'ipa config-mod' to change the username format allowed by IPA tools.\n\nDisabling a user account prevents that user from obtaining new Kerberos\ncredentials. It does not invalidate any credentials that have already\nbeen issued.\n\nPassword management is not a part of this module. For more information\nabout this topic please see: ipa help passwd\n\nAccount lockout on password failure happens per IPA master. The user-status\ncommand can be used to identify which master the user is locked out on.\nIt is on that master the administrator must unlock the user.\n\nEXAMPLES:\n\n Add a new user:\n ipa user-add --first=Tim --last=User --password tuser1\n\n Find all users whose entries include the string \"Tim\":\n ipa user-find Tim\n\n Find all users with \"Tim\" as the first name:\n ipa user-find --first=Tim\n\n Disable a user account:\n ipa user-disable tuser1\n\n Enable a user account:\n ipa user-enable tuser1\n\n Delete a user:\n ipa user-del tuser1", - "full_name": "user/1", - "name": "user", - "version": "1" + "name": "vaultcontainer", + "full_name": "vaultcontainer/1" } ], - "ttl": 3600, - "version": "2.215" + "ttl": 3600 } }, - "version": "4.4.4" + "version": "4.6.5", + "error": null, + "id": null, + "principal": "admin@TEST.LOCAL" } From e830f9d7279f0c34cfa95cd54d5afd57f0b8814d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Pinson?= Date: Wed, 26 Feb 2020 10:17:15 +0100 Subject: [PATCH 2/5] No TopicTopic anymore --- gen/schema.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/gen/schema.go b/gen/schema.go index 9a87181..61d73ec 100644 --- a/gen/schema.go +++ b/gen/schema.go @@ -21,10 +21,6 @@ type Topic struct { FullName string `json:"full_name"` Doc string `json:"doc"` Version string `json:"version"` - - TopicTopic struct { - Base64 string `json:"__base64__"` - } `json:"topic_topic"` } type Class struct { From 6d355a3fe3a6a4282108f2453108a1462440b6b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Pinson?= Date: Wed, 26 Feb 2020 10:36:37 +0100 Subject: [PATCH 3/5] Map Certificate to interface{} and CertificateSigningRequest to string --- gen/convert.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gen/convert.go b/gen/convert.go index e7a87f6..4b6b330 100644 --- a/gen/convert.go +++ b/gen/convert.go @@ -49,6 +49,10 @@ func toGoType(ipaType string) string { return "string" case "Decimal": return "float64" + case "Certificate": + return "interface{}" + case "CertificateSigningRequest": + return "string" default: return ipaType } From 97c4966de80697aa3fa39f8d973142787aa4ccf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Pinson?= Date: Wed, 26 Feb 2020 11:22:59 +0100 Subject: [PATCH 4/5] Make various host fields optional --- gen/main.go | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/gen/main.go b/gen/main.go index 53648dd..a7eba87 100644 --- a/gen/main.go +++ b/gen/main.go @@ -113,6 +113,38 @@ func loadSchema() (*Schema, error) { } } + // HACK FreeIPA host has several fields which are not required. + hostNotRequiredParams := []string{ + "subject", + "serial_number", + "serial_number_hex", + "issuer", + "valid_not_before", + "valid_not_after", + "md5_fingerprint", + "sha1_fingerprint", + "sha256_fingerprint", + "managing_host", + "ipaallowedtoperform_read_keys_user", + "ipaallowedtoperform_read_keys_group", + "ipaallowedtoperform_read_keys_host", + "ipaallowedtoperform_read_keys_hostgroup", + "ipaallowedtoperform_write_keys_user", + "ipaallowedtoperform_write_keys_group", + "ipaallowedtoperform_write_keys_host", + "ipaallowedtoperform_write_keys_hostgroup", + } + if c.Name == "host" { + for _, p := range c.Params { + for _, pp := range hostNotRequiredParams { + if p.Name == pp { + v := false + p.RequiredRaw = &v + } + } + } + } + // HACK FreeIPA sometimes doesn't supply boolean fields which are // marked required in schema. This workaround makes them optional. for _, p := range c.Params { From f1a87e4d06ba2c31fee9b9b16aa138c9608622e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Pinson?= Date: Wed, 26 Feb 2020 10:36:45 +0100 Subject: [PATCH 5/5] Regenerate bindings --- freeipa/generated.go | 186948 +++++++++++++++++++++------------------- 1 file changed, 96004 insertions(+), 90944 deletions(-) diff --git a/freeipa/generated.go b/freeipa/generated.go index 3bc1538..2c73275 100644 --- a/freeipa/generated.go +++ b/freeipa/generated.go @@ -1,306 +1,309 @@ // Code generated by `github.com/tehwalris/go-freeipa/gen` - DO NOT EDIT. -package freeipa +package freeipa; import ( + "time" "encoding/json" - "fmt" - "reflect" - "strconv" - "time" + "fmt" + "reflect" + "strconv" ) -var apiVersion = "2.215" +var apiVersion = "2.231" type request struct { - Method string `json:"method"` - Params []interface{} `json:"params"` + Method string `json:"method"` + Params []interface{} `json:"params"` } + /* Create new ACI. */ func (c *Client) AciAdd( - reqArgs *AciAddArgs, - optArgs *AciAddOptionalArgs, // can be nil + reqArgs *AciAddArgs, + optArgs *AciAddOptionalArgs, // can be nil ) (*AciAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := aciAddKwParams{ - AciAddArgs: reqArgs, - AciAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "aci_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res aciAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := aciAddKwParams{ + AciAddArgs: reqArgs, + AciAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "aci_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res aciAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type AciAddArgs struct { - - /* - ACI name - - */ - Aciname string `json:"aciname,omitempty"` - - /* - Permissions - Permissions to grant(read, write, add, delete, all) - */ - Permissions []string `json:"permissions,omitempty"` - - /* - ACI prefix - Prefix used to distinguish ACI types (permission, delegation, selfservice, none) - */ - Aciprefix string `json:"aciprefix,omitempty"` -} + + /* +ACI name + + */ + Aciname string `json:"aciname,omitempty"` + + /* +Permissions +Permissions to grant(read, write, add, delete, all) + */ + Permissions []string `json:"permissions,omitempty"` + + /* +ACI prefix +Prefix used to distinguish ACI types (permission, delegation, selfservice, none) + */ + Aciprefix string `json:"aciprefix,omitempty"` + } type AciAddOptionalArgs struct { - - /* - Permission - Permission ACI grants access to - */ - Permission *string `json:"permission,omitempty"` - - /* - User group - User group ACI grants access to - */ - Group *string `json:"group,omitempty"` - - /* - Attributes to which the permission applies - Attributes - */ - Attrs *[]string `json:"attrs,omitempty"` - - /* - Type - type of IPA object (user, group, host, hostgroup, service, netgroup) - */ - Type *string `json:"type,omitempty"` - - /* - Member of - Member of a group - */ - Memberof *string `json:"memberof,omitempty"` - - /* - Filter - Legal LDAP filter (e.g. ou=Engineering) - */ - Filter *string `json:"filter,omitempty"` - - /* - Subtree - Subtree to apply ACI to - */ - Subtree *string `json:"subtree,omitempty"` - - /* - Target group - Group to apply ACI to - */ - Targetgroup *string `json:"targetgroup,omitempty"` - - /* - Target your own entry (self) - Apply ACI to your own entry (self) - */ - Selfaci *bool `json:"selfaci,omitempty"` - - /* - - Test the ACI syntax but don't write anything - */ - Test *bool `json:"test,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Permission +Permission ACI grants access to + */ + Permission *string `json:"permission,omitempty"` + + /* +User group +User group ACI grants access to + */ + Group *string `json:"group,omitempty"` + + /* +Attributes to which the permission applies +Attributes + */ + Attrs *[]string `json:"attrs,omitempty"` + + /* +Type +type of IPA object (user, group, host, hostgroup, service, netgroup) + */ + Type *string `json:"type,omitempty"` + + /* +Member of +Member of a group + */ + Memberof *string `json:"memberof,omitempty"` + + /* +Filter +Legal LDAP filter (e.g. ou=Engineering) + */ + Filter *string `json:"filter,omitempty"` + + /* +Subtree +Subtree to apply ACI to + */ + Subtree *string `json:"subtree,omitempty"` + + /* +Target group +Group to apply ACI to + */ + Targetgroup *string `json:"targetgroup,omitempty"` + + /* +Target your own entry (self) +Apply ACI to your own entry (self) + */ + Selfaci *bool `json:"selfaci,omitempty"` + + /* + +Test the ACI syntax but don't write anything + */ + Test *bool `json:"test,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type aciAddKwParams struct { - *AciAddArgs - *AciAddOptionalArgs + *AciAddArgs + *AciAddOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type aciAddResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *AciAddResult `json:"result"` } type AciAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Aci `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Aci `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *AciAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AciAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("AciAddResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AciAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AciAddResult%v", string(b)) } /* Delete ACI. */ func (c *Client) AciDel( - reqArgs *AciDelArgs, - optArgs *AciDelOptionalArgs, // can be nil + reqArgs *AciDelArgs, + optArgs *AciDelOptionalArgs, // can be nil ) (*AciDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := aciDelKwParams{ - AciDelArgs: reqArgs, - AciDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "aci_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res aciDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := aciDelKwParams{ + AciDelArgs: reqArgs, + AciDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "aci_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res aciDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type AciDelArgs struct { - - /* - ACI name - - */ - Aciname string `json:"aciname,omitempty"` - - /* - ACI prefix - Prefix used to distinguish ACI types (permission, delegation, selfservice, none) - */ - Aciprefix string `json:"aciprefix,omitempty"` -} + + /* +ACI name + + */ + Aciname string `json:"aciname,omitempty"` + + /* +ACI prefix +Prefix used to distinguish ACI types (permission, delegation, selfservice, none) + */ + Aciprefix string `json:"aciprefix,omitempty"` + } type AciDelOptionalArgs struct { -} + } type aciDelKwParams struct { - *AciDelArgs - *AciDelOptionalArgs + *AciDelArgs + *AciDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type aciDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *AciDelResult `json:"result"` } type AciDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - True means the operation was successful - (required) - */ - Result bool `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *AciDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AciDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("AciDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AciDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AciDelResult%v", string(b)) } /* @@ -323,27258 +326,28980 @@ Search for ACIs. members of that group indirectly. */ func (c *Client) AciFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *AciFindArgs, - optArgs *AciFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *AciFindArgs, + optArgs *AciFindOptionalArgs, // can be nil ) (*AciFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := aciFindKwParams{ - AciFindArgs: reqArgs, - AciFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "aci_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res aciFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := aciFindKwParams{ + AciFindArgs: reqArgs, + AciFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "aci_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res aciFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type AciFindArgs struct { -} + } type AciFindOptionalArgs struct { - - /* - ACI name - - */ - Aciname *string `json:"aciname,omitempty"` - - /* - Permission - Permission ACI grants access to - */ - Permission *string `json:"permission,omitempty"` - - /* - User group - User group ACI grants access to - */ - Group *string `json:"group,omitempty"` - - /* - Permissions - Permissions to grant(read, write, add, delete, all) - */ - Permissions *[]string `json:"permissions,omitempty"` - - /* - Attributes to which the permission applies - Attributes - */ - Attrs *[]string `json:"attrs,omitempty"` - - /* - Type - type of IPA object (user, group, host, hostgroup, service, netgroup) - */ - Type *string `json:"type,omitempty"` - - /* - Member of - Member of a group - */ - Memberof *string `json:"memberof,omitempty"` - - /* - Filter - Legal LDAP filter (e.g. ou=Engineering) - */ - Filter *string `json:"filter,omitempty"` - - /* - Subtree - Subtree to apply ACI to - */ - Subtree *string `json:"subtree,omitempty"` - - /* - Target group - Group to apply ACI to - */ - Targetgroup *string `json:"targetgroup,omitempty"` - - /* - Target your own entry (self) - Apply ACI to your own entry (self) - */ - Selfaci *bool `json:"selfaci,omitempty"` - - /* - ACI prefix - Prefix used to distinguish ACI types (permission, delegation, selfservice, none) - */ - Aciprefix *string `json:"aciprefix,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("name") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +ACI name + + */ + Aciname *string `json:"aciname,omitempty"` + + /* +Permission +Permission ACI grants access to + */ + Permission *string `json:"permission,omitempty"` + + /* +User group +User group ACI grants access to + */ + Group *string `json:"group,omitempty"` + + /* +Permissions +Permissions to grant(read, write, add, delete, all) + */ + Permissions *[]string `json:"permissions,omitempty"` + + /* +Attributes to which the permission applies +Attributes + */ + Attrs *[]string `json:"attrs,omitempty"` + + /* +Type +type of IPA object (user, group, host, hostgroup, service, netgroup) + */ + Type *string `json:"type,omitempty"` + + /* +Member of +Member of a group + */ + Memberof *string `json:"memberof,omitempty"` + + /* +Filter +Legal LDAP filter (e.g. ou=Engineering) + */ + Filter *string `json:"filter,omitempty"` + + /* +Subtree +Subtree to apply ACI to + */ + Subtree *string `json:"subtree,omitempty"` + + /* +Target group +Group to apply ACI to + */ + Targetgroup *string `json:"targetgroup,omitempty"` + + /* +Target your own entry (self) +Apply ACI to your own entry (self) + */ + Selfaci *bool `json:"selfaci,omitempty"` + + /* +ACI prefix +Prefix used to distinguish ACI types (permission, delegation, selfservice, none) + */ + Aciprefix *string `json:"aciprefix,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("name") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type aciFindKwParams struct { - *AciFindArgs - *AciFindOptionalArgs + *AciFindArgs + *AciFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type aciFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *AciFindResult `json:"result"` } type AciFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Aci `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Aci `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *AciFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AciFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("AciFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AciFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AciFindResult%v", string(b)) } /* Modify ACI. */ func (c *Client) AciMod( - reqArgs *AciModArgs, - optArgs *AciModOptionalArgs, // can be nil + reqArgs *AciModArgs, + optArgs *AciModOptionalArgs, // can be nil ) (*AciModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := aciModKwParams{ - AciModArgs: reqArgs, - AciModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "aci_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res aciModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := aciModKwParams{ + AciModArgs: reqArgs, + AciModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "aci_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res aciModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type AciModArgs struct { - - /* - ACI name - - */ - Aciname string `json:"aciname,omitempty"` - - /* - ACI prefix - Prefix used to distinguish ACI types (permission, delegation, selfservice, none) - */ - Aciprefix string `json:"aciprefix,omitempty"` -} + + /* +ACI name + + */ + Aciname string `json:"aciname,omitempty"` + + /* +ACI prefix +Prefix used to distinguish ACI types (permission, delegation, selfservice, none) + */ + Aciprefix string `json:"aciprefix,omitempty"` + } type AciModOptionalArgs struct { - - /* - Permission - Permission ACI grants access to - */ - Permission *string `json:"permission,omitempty"` - - /* - User group - User group ACI grants access to - */ - Group *string `json:"group,omitempty"` - - /* - Permissions - Permissions to grant(read, write, add, delete, all) - */ - Permissions *[]string `json:"permissions,omitempty"` - - /* - Attributes to which the permission applies - Attributes - */ - Attrs *[]string `json:"attrs,omitempty"` - - /* - Type - type of IPA object (user, group, host, hostgroup, service, netgroup) - */ - Type *string `json:"type,omitempty"` - - /* - Member of - Member of a group - */ - Memberof *string `json:"memberof,omitempty"` - - /* - Filter - Legal LDAP filter (e.g. ou=Engineering) - */ - Filter *string `json:"filter,omitempty"` - - /* - Subtree - Subtree to apply ACI to - */ - Subtree *string `json:"subtree,omitempty"` - - /* - Target group - Group to apply ACI to - */ - Targetgroup *string `json:"targetgroup,omitempty"` - - /* - Target your own entry (self) - Apply ACI to your own entry (self) - */ - Selfaci *bool `json:"selfaci,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Permission +Permission ACI grants access to + */ + Permission *string `json:"permission,omitempty"` + + /* +User group +User group ACI grants access to + */ + Group *string `json:"group,omitempty"` + + /* +Permissions +Permissions to grant(read, write, add, delete, all) + */ + Permissions *[]string `json:"permissions,omitempty"` + + /* +Attributes to which the permission applies +Attributes + */ + Attrs *[]string `json:"attrs,omitempty"` + + /* +Type +type of IPA object (user, group, host, hostgroup, service, netgroup) + */ + Type *string `json:"type,omitempty"` + + /* +Member of +Member of a group + */ + Memberof *string `json:"memberof,omitempty"` + + /* +Filter +Legal LDAP filter (e.g. ou=Engineering) + */ + Filter *string `json:"filter,omitempty"` + + /* +Subtree +Subtree to apply ACI to + */ + Subtree *string `json:"subtree,omitempty"` + + /* +Target group +Group to apply ACI to + */ + Targetgroup *string `json:"targetgroup,omitempty"` + + /* +Target your own entry (self) +Apply ACI to your own entry (self) + */ + Selfaci *bool `json:"selfaci,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type aciModKwParams struct { - *AciModArgs - *AciModOptionalArgs + *AciModArgs + *AciModOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type aciModResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *AciModResult `json:"result"` } type AciModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Aci `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Aci `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *AciModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AciModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("AciModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AciModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AciModResult%v", string(b)) } /* Rename an ACI. */ func (c *Client) AciRename( - reqArgs *AciRenameArgs, - optArgs *AciRenameOptionalArgs, // can be nil + reqArgs *AciRenameArgs, + optArgs *AciRenameOptionalArgs, // can be nil ) (*AciRenameResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := aciRenameKwParams{ - AciRenameArgs: reqArgs, - AciRenameOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "aci_rename", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res aciRenameResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := aciRenameKwParams{ + AciRenameArgs: reqArgs, + AciRenameOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "aci_rename", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res aciRenameResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type AciRenameArgs struct { - - /* - ACI name - - */ - Aciname string `json:"aciname,omitempty"` - - /* - ACI prefix - Prefix used to distinguish ACI types (permission, delegation, selfservice, none) - */ - Aciprefix string `json:"aciprefix,omitempty"` - - /* - - New ACI name - */ - Newname string `json:"newname,omitempty"` -} + + /* +ACI name + + */ + Aciname string `json:"aciname,omitempty"` + + /* +ACI prefix +Prefix used to distinguish ACI types (permission, delegation, selfservice, none) + */ + Aciprefix string `json:"aciprefix,omitempty"` + + /* + +New ACI name + */ + Newname string `json:"newname,omitempty"` + } type AciRenameOptionalArgs struct { - - /* - Permission - Permission ACI grants access to - */ - Permission *string `json:"permission,omitempty"` - - /* - User group - User group ACI grants access to - */ - Group *string `json:"group,omitempty"` - - /* - Permissions - Permissions to grant(read, write, add, delete, all) - */ - Permissions *[]string `json:"permissions,omitempty"` - - /* - Attributes to which the permission applies - Attributes - */ - Attrs *[]string `json:"attrs,omitempty"` - - /* - Type - type of IPA object (user, group, host, hostgroup, service, netgroup) - */ - Type *string `json:"type,omitempty"` - - /* - Member of - Member of a group - */ - Memberof *string `json:"memberof,omitempty"` - - /* - Filter - Legal LDAP filter (e.g. ou=Engineering) - */ - Filter *string `json:"filter,omitempty"` - - /* - Subtree - Subtree to apply ACI to - */ - Subtree *string `json:"subtree,omitempty"` - - /* - Target group - Group to apply ACI to - */ - Targetgroup *string `json:"targetgroup,omitempty"` - - /* - Target your own entry (self) - Apply ACI to your own entry (self) - */ - Selfaci *bool `json:"selfaci,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Permission +Permission ACI grants access to + */ + Permission *string `json:"permission,omitempty"` + + /* +User group +User group ACI grants access to + */ + Group *string `json:"group,omitempty"` + + /* +Permissions +Permissions to grant(read, write, add, delete, all) + */ + Permissions *[]string `json:"permissions,omitempty"` + + /* +Attributes to which the permission applies +Attributes + */ + Attrs *[]string `json:"attrs,omitempty"` + + /* +Type +type of IPA object (user, group, host, hostgroup, service, netgroup) + */ + Type *string `json:"type,omitempty"` + + /* +Member of +Member of a group + */ + Memberof *string `json:"memberof,omitempty"` + + /* +Filter +Legal LDAP filter (e.g. ou=Engineering) + */ + Filter *string `json:"filter,omitempty"` + + /* +Subtree +Subtree to apply ACI to + */ + Subtree *string `json:"subtree,omitempty"` + + /* +Target group +Group to apply ACI to + */ + Targetgroup *string `json:"targetgroup,omitempty"` + + /* +Target your own entry (self) +Apply ACI to your own entry (self) + */ + Selfaci *bool `json:"selfaci,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type aciRenameKwParams struct { - *AciRenameArgs - *AciRenameOptionalArgs + *AciRenameArgs + *AciRenameOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type aciRenameResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *AciRenameResult `json:"result"` } type AciRenameResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *AciRenameResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AciRenameResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("AciRenameResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AciRenameResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AciRenameResult%v", string(b)) } /* Display a single ACI given an ACI name. */ func (c *Client) AciShow( - reqArgs *AciShowArgs, - optArgs *AciShowOptionalArgs, // can be nil + reqArgs *AciShowArgs, + optArgs *AciShowOptionalArgs, // can be nil ) (*AciShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := aciShowKwParams{ - AciShowArgs: reqArgs, - AciShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "aci_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res aciShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := aciShowKwParams{ + AciShowArgs: reqArgs, + AciShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "aci_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res aciShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type AciShowArgs struct { - - /* - ACI name - - */ - Aciname string `json:"aciname,omitempty"` - - /* - ACI prefix - Prefix used to distinguish ACI types (permission, delegation, selfservice, none) - */ - Aciprefix string `json:"aciprefix,omitempty"` -} + + /* +ACI name + + */ + Aciname string `json:"aciname,omitempty"` + + /* +ACI prefix +Prefix used to distinguish ACI types (permission, delegation, selfservice, none) + */ + Aciprefix string `json:"aciprefix,omitempty"` + } type AciShowOptionalArgs struct { - - /* - Location of the ACI - - */ - Location *string `json:"location,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Location of the ACI + + */ + Location *string `json:"location,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type aciShowKwParams struct { - *AciShowArgs - *AciShowOptionalArgs + *AciShowArgs + *AciShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type aciShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *AciShowResult `json:"result"` } type AciShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Aci `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Aci `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *AciShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AciShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("AciShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AciShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AciShowResult%v", string(b)) } /* Determine whether ipa-adtrust-install has been run on this system */ func (c *Client) AdtrustIsEnabled( - reqArgs *AdtrustIsEnabledArgs, - optArgs *AdtrustIsEnabledOptionalArgs, // can be nil + reqArgs *AdtrustIsEnabledArgs, + optArgs *AdtrustIsEnabledOptionalArgs, // can be nil ) (*AdtrustIsEnabledResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := adtrustIsEnabledKwParams{ - AdtrustIsEnabledArgs: reqArgs, - AdtrustIsEnabledOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "adtrust_is_enabled", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res adtrustIsEnabledResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := adtrustIsEnabledKwParams{ + AdtrustIsEnabledArgs: reqArgs, + AdtrustIsEnabledOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "adtrust_is_enabled", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res adtrustIsEnabledResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type AdtrustIsEnabledArgs struct { -} + } type AdtrustIsEnabledOptionalArgs struct { -} + } type adtrustIsEnabledKwParams struct { - *AdtrustIsEnabledArgs - *AdtrustIsEnabledOptionalArgs + *AdtrustIsEnabledArgs + *AdtrustIsEnabledOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type adtrustIsEnabledResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *AdtrustIsEnabledResult `json:"result"` } type AdtrustIsEnabledResult struct { + + + /* - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` -} + (required) + */ + Result interface{} `json:"result,omitempty"` + } func (t *AdtrustIsEnabledResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AdtrustIsEnabledResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("AdtrustIsEnabledResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AdtrustIsEnabledResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AdtrustIsEnabledResult%v", string(b)) } /* Add an automember rule. */ func (c *Client) AutomemberAdd( - reqArgs *AutomemberAddArgs, - optArgs *AutomemberAddOptionalArgs, // can be nil + reqArgs *AutomemberAddArgs, + optArgs *AutomemberAddOptionalArgs, // can be nil ) (*AutomemberAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := automemberAddKwParams{ - AutomemberAddArgs: reqArgs, - AutomemberAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "automember_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res automemberAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := automemberAddKwParams{ + AutomemberAddArgs: reqArgs, + AutomemberAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "automember_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res automemberAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type AutomemberAddArgs struct { - - /* - Automember Rule - Automember Rule - */ - Cn string `json:"cn,omitempty"` - - /* - Grouping Type - Grouping to which the rule applies - */ - Type string `json:"type,omitempty"` -} + + /* +Automember Rule +Automember Rule + */ + Cn string `json:"cn,omitempty"` + + /* +Grouping Type +Grouping to which the rule applies + */ + Type string `json:"type,omitempty"` + } type AutomemberAddOptionalArgs struct { - - /* - Description - A description of this auto member rule - */ - Description *string `json:"description,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Description +A description of this auto member rule + */ + Description *string `json:"description,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type automemberAddKwParams struct { - *AutomemberAddArgs - *AutomemberAddOptionalArgs + *AutomemberAddArgs + *AutomemberAddOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type automemberAddResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *AutomemberAddResult `json:"result"` } type AutomemberAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Automember `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Automember `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *AutomemberAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AutomemberAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("AutomemberAddResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AutomemberAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AutomemberAddResult%v", string(b)) } /* Add conditions to an automember rule. */ func (c *Client) AutomemberAddCondition( - reqArgs *AutomemberAddConditionArgs, - optArgs *AutomemberAddConditionOptionalArgs, // can be nil + reqArgs *AutomemberAddConditionArgs, + optArgs *AutomemberAddConditionOptionalArgs, // can be nil ) (*AutomemberAddConditionResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := automemberAddConditionKwParams{ - AutomemberAddConditionArgs: reqArgs, - AutomemberAddConditionOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "automember_add_condition", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res automemberAddConditionResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := automemberAddConditionKwParams{ + AutomemberAddConditionArgs: reqArgs, + AutomemberAddConditionOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "automember_add_condition", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res automemberAddConditionResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type AutomemberAddConditionArgs struct { - - /* - Automember Rule - Automember Rule - */ - Cn string `json:"cn,omitempty"` - - /* - Attribute Key - Attribute to filter via regex. For example fqdn for a host, or manager for a user - */ - Key string `json:"key,omitempty"` - - /* - Grouping Type - Grouping to which the rule applies - */ - Type string `json:"type,omitempty"` -} + + /* +Automember Rule +Automember Rule + */ + Cn string `json:"cn,omitempty"` + + /* +Attribute Key +Attribute to filter via regex. For example fqdn for a host, or manager for a user + */ + Key string `json:"key,omitempty"` + + /* +Grouping Type +Grouping to which the rule applies + */ + Type string `json:"type,omitempty"` + } type AutomemberAddConditionOptionalArgs struct { - - /* - Description - A description of this auto member rule - */ - Description *string `json:"description,omitempty"` - - /* - Inclusive Regex - Inclusive Regex - */ - Automemberinclusiveregex *[]string `json:"automemberinclusiveregex,omitempty"` - - /* - Exclusive Regex - Exclusive Regex - */ - Automemberexclusiveregex *[]string `json:"automemberexclusiveregex,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Description +A description of this auto member rule + */ + Description *string `json:"description,omitempty"` + + /* +Inclusive Regex +Inclusive Regex + */ + Automemberinclusiveregex *[]string `json:"automemberinclusiveregex,omitempty"` + + /* +Exclusive Regex +Exclusive Regex + */ + Automemberexclusiveregex *[]string `json:"automemberexclusiveregex,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type automemberAddConditionKwParams struct { - *AutomemberAddConditionArgs - *AutomemberAddConditionOptionalArgs + *AutomemberAddConditionArgs + *AutomemberAddConditionOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type automemberAddConditionResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *AutomemberAddConditionResult `json:"result"` } type AutomemberAddConditionResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` - - /* - Conditions that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of conditions added - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + + /* +Conditions that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of conditions added + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *AutomemberAddConditionResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AutomemberAddConditionResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("AutomemberAddConditionResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AutomemberAddConditionResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AutomemberAddConditionResult%v", string(b)) } /* Remove default (fallback) group for all unmatched entries. */ func (c *Client) AutomemberDefaultGroupRemove( - reqArgs *AutomemberDefaultGroupRemoveArgs, - optArgs *AutomemberDefaultGroupRemoveOptionalArgs, // can be nil + reqArgs *AutomemberDefaultGroupRemoveArgs, + optArgs *AutomemberDefaultGroupRemoveOptionalArgs, // can be nil ) (*AutomemberDefaultGroupRemoveResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := automemberDefaultGroupRemoveKwParams{ - AutomemberDefaultGroupRemoveArgs: reqArgs, - AutomemberDefaultGroupRemoveOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "automember_default_group_remove", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res automemberDefaultGroupRemoveResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := automemberDefaultGroupRemoveKwParams{ + AutomemberDefaultGroupRemoveArgs: reqArgs, + AutomemberDefaultGroupRemoveOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "automember_default_group_remove", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res automemberDefaultGroupRemoveResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type AutomemberDefaultGroupRemoveArgs struct { - - /* - Grouping Type - Grouping to which the rule applies - */ - Type string `json:"type,omitempty"` -} + + /* +Grouping Type +Grouping to which the rule applies + */ + Type string `json:"type,omitempty"` + } type AutomemberDefaultGroupRemoveOptionalArgs struct { - - /* - Description - A description of this auto member rule - */ - Description *string `json:"description,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Description +A description of this auto member rule + */ + Description *string `json:"description,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type automemberDefaultGroupRemoveKwParams struct { - *AutomemberDefaultGroupRemoveArgs - *AutomemberDefaultGroupRemoveOptionalArgs + *AutomemberDefaultGroupRemoveArgs + *AutomemberDefaultGroupRemoveOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type automemberDefaultGroupRemoveResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *AutomemberDefaultGroupRemoveResult `json:"result"` } type AutomemberDefaultGroupRemoveResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value string `json:"value,omitempty"` + } func (t *AutomemberDefaultGroupRemoveResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AutomemberDefaultGroupRemoveResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("AutomemberDefaultGroupRemoveResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AutomemberDefaultGroupRemoveResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AutomemberDefaultGroupRemoveResult%v", string(b)) } /* Set default (fallback) group for all unmatched entries. */ func (c *Client) AutomemberDefaultGroupSet( - reqArgs *AutomemberDefaultGroupSetArgs, - optArgs *AutomemberDefaultGroupSetOptionalArgs, // can be nil + reqArgs *AutomemberDefaultGroupSetArgs, + optArgs *AutomemberDefaultGroupSetOptionalArgs, // can be nil ) (*AutomemberDefaultGroupSetResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := automemberDefaultGroupSetKwParams{ - AutomemberDefaultGroupSetArgs: reqArgs, - AutomemberDefaultGroupSetOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "automember_default_group_set", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res automemberDefaultGroupSetResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := automemberDefaultGroupSetKwParams{ + AutomemberDefaultGroupSetArgs: reqArgs, + AutomemberDefaultGroupSetOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "automember_default_group_set", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res automemberDefaultGroupSetResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type AutomemberDefaultGroupSetArgs struct { - - /* - Default (fallback) Group - Default (fallback) group for entries to land - */ - Automemberdefaultgroup string `json:"automemberdefaultgroup,omitempty"` - - /* - Grouping Type - Grouping to which the rule applies - */ - Type string `json:"type,omitempty"` -} + + /* +Default (fallback) Group +Default (fallback) group for entries to land + */ + Automemberdefaultgroup string `json:"automemberdefaultgroup,omitempty"` + + /* +Grouping Type +Grouping to which the rule applies + */ + Type string `json:"type,omitempty"` + } type AutomemberDefaultGroupSetOptionalArgs struct { - - /* - Description - A description of this auto member rule - */ - Description *string `json:"description,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Description +A description of this auto member rule + */ + Description *string `json:"description,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type automemberDefaultGroupSetKwParams struct { - *AutomemberDefaultGroupSetArgs - *AutomemberDefaultGroupSetOptionalArgs + *AutomemberDefaultGroupSetArgs + *AutomemberDefaultGroupSetOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type automemberDefaultGroupSetResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *AutomemberDefaultGroupSetResult `json:"result"` } type AutomemberDefaultGroupSetResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value string `json:"value,omitempty"` + } func (t *AutomemberDefaultGroupSetResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AutomemberDefaultGroupSetResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("AutomemberDefaultGroupSetResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AutomemberDefaultGroupSetResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AutomemberDefaultGroupSetResult%v", string(b)) } /* Display information about the default (fallback) automember groups. */ func (c *Client) AutomemberDefaultGroupShow( - reqArgs *AutomemberDefaultGroupShowArgs, - optArgs *AutomemberDefaultGroupShowOptionalArgs, // can be nil + reqArgs *AutomemberDefaultGroupShowArgs, + optArgs *AutomemberDefaultGroupShowOptionalArgs, // can be nil ) (*AutomemberDefaultGroupShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := automemberDefaultGroupShowKwParams{ - AutomemberDefaultGroupShowArgs: reqArgs, - AutomemberDefaultGroupShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "automember_default_group_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res automemberDefaultGroupShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := automemberDefaultGroupShowKwParams{ + AutomemberDefaultGroupShowArgs: reqArgs, + AutomemberDefaultGroupShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "automember_default_group_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res automemberDefaultGroupShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type AutomemberDefaultGroupShowArgs struct { - - /* - Grouping Type - Grouping to which the rule applies - */ - Type string `json:"type,omitempty"` -} + + /* +Grouping Type +Grouping to which the rule applies + */ + Type string `json:"type,omitempty"` + } type AutomemberDefaultGroupShowOptionalArgs struct { + + /* - /* +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type automemberDefaultGroupShowKwParams struct { - *AutomemberDefaultGroupShowArgs - *AutomemberDefaultGroupShowOptionalArgs + *AutomemberDefaultGroupShowArgs + *AutomemberDefaultGroupShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type automemberDefaultGroupShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *AutomemberDefaultGroupShowResult `json:"result"` } type AutomemberDefaultGroupShowResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result AutomemberDefaultGroup `json:"result,omitempty"` + + /* + + (required) + */ + Value string `json:"value,omitempty"` + } - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result AutomemberDefaultGroup `json:"result,omitempty"` - - /* - - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *AutomemberDefaultGroupShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AutomemberDefaultGroupShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("AutomemberDefaultGroupShowResult%v", string(b)) -} +func (t *AutomemberDefaultGroupShowResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AutomemberDefaultGroupShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AutomemberDefaultGroupShowResult%v", string(b)) +} /* Delete an automember rule. */ func (c *Client) AutomemberDel( - reqArgs *AutomemberDelArgs, - optArgs *AutomemberDelOptionalArgs, // can be nil + reqArgs *AutomemberDelArgs, + optArgs *AutomemberDelOptionalArgs, // can be nil ) (*AutomemberDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := automemberDelKwParams{ - AutomemberDelArgs: reqArgs, - AutomemberDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "automember_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res automemberDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := automemberDelKwParams{ + AutomemberDelArgs: reqArgs, + AutomemberDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "automember_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res automemberDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type AutomemberDelArgs struct { - - /* - Automember Rule - Automember Rule - */ - Cn []string `json:"cn,omitempty"` - - /* - Grouping Type - Grouping to which the rule applies - */ - Type string `json:"type,omitempty"` -} + + /* +Automember Rule +Automember Rule + */ + Cn []string `json:"cn,omitempty"` + + /* +Grouping Type +Grouping to which the rule applies + */ + Type string `json:"type,omitempty"` + } type AutomemberDelOptionalArgs struct { -} + } type automemberDelKwParams struct { - *AutomemberDelArgs - *AutomemberDelOptionalArgs + *AutomemberDelArgs + *AutomemberDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type automemberDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *AutomemberDelResult `json:"result"` } type AutomemberDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } func (t *AutomemberDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AutomemberDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("AutomemberDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AutomemberDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AutomemberDelResult%v", string(b)) } /* Search for automember rules. */ func (c *Client) AutomemberFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *AutomemberFindArgs, - optArgs *AutomemberFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *AutomemberFindArgs, + optArgs *AutomemberFindOptionalArgs, // can be nil ) (*AutomemberFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := automemberFindKwParams{ - AutomemberFindArgs: reqArgs, - AutomemberFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "automember_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res automemberFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := automemberFindKwParams{ + AutomemberFindArgs: reqArgs, + AutomemberFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "automember_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res automemberFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type AutomemberFindArgs struct { - - /* - Grouping Type - Grouping to which the rule applies - */ - Type string `json:"type,omitempty"` -} + + /* +Grouping Type +Grouping to which the rule applies + */ + Type string `json:"type,omitempty"` + } type AutomemberFindOptionalArgs struct { - - /* - Description - A description of this auto member rule - */ - Description *string `json:"description,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("automember-rule") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} + + /* +Description +A description of this auto member rule + */ + Description *string `json:"description,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("automember-rule") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } type automemberFindKwParams struct { - *AutomemberFindArgs - *AutomemberFindOptionalArgs + *AutomemberFindArgs + *AutomemberFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type automemberFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *AutomemberFindResult `json:"result"` } type AutomemberFindResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Automember `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Automember `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` +func (t *AutomemberFindResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AutomemberFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AutomemberFindResult%v", string(b)) } -func (t *AutomemberFindResult) String() string { - if t == nil { - return "" +/* +Search for orphan automember rules. The command might need to be run as + a privileged user user to get all orphan rules. +*/ +func (c *Client) AutomemberFindOrphans( + criteria string, // A string searched in all relevant object attributes + reqArgs *AutomemberFindOrphansArgs, + optArgs *AutomemberFindOrphansOptionalArgs, // can be nil +) (*AutomemberFindOrphansResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := automemberFindOrphansKwParams{ + AutomemberFindOrphansArgs: reqArgs, + AutomemberFindOrphansOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "automember_find_orphans", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res automemberFindOrphansResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AutomemberFindResult[failed json.Marshal: %v]", e) + if res.Error != nil { + return nil, res.Error } - return fmt.Sprintf("AutomemberFindResult%v", string(b)) + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} + +type AutomemberFindOrphansArgs struct { + + /* +Grouping Type +Grouping to which the rule applies + */ + Type string `json:"type,omitempty"` + } + +type AutomemberFindOrphansOptionalArgs struct { + + /* +Description +A description of this auto member rule + */ + Description *string `json:"description,omitempty"` + + /* + +Remove orphan automember rules + */ + Remove *bool `json:"remove,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("automember-rule") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } + +type automemberFindOrphansKwParams struct { + *AutomemberFindOrphansArgs + *AutomemberFindOrphansOptionalArgs + + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} + +type automemberFindOrphansResponse struct { + Error *Error `json:"error"` + Result *AutomemberFindOrphansResult `json:"result"` +} + +type AutomemberFindOrphansResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []interface{} `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } + +func (t *AutomemberFindOrphansResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AutomemberFindOrphansResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AutomemberFindOrphansResult%v", string(b)) } /* Modify an automember rule. */ func (c *Client) AutomemberMod( - reqArgs *AutomemberModArgs, - optArgs *AutomemberModOptionalArgs, // can be nil + reqArgs *AutomemberModArgs, + optArgs *AutomemberModOptionalArgs, // can be nil ) (*AutomemberModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := automemberModKwParams{ - AutomemberModArgs: reqArgs, - AutomemberModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "automember_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res automemberModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := automemberModKwParams{ + AutomemberModArgs: reqArgs, + AutomemberModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "automember_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res automemberModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type AutomemberModArgs struct { - - /* - Automember Rule - Automember Rule - */ - Cn string `json:"cn,omitempty"` - - /* - Grouping Type - Grouping to which the rule applies - */ - Type string `json:"type,omitempty"` -} + + /* +Automember Rule +Automember Rule + */ + Cn string `json:"cn,omitempty"` + + /* +Grouping Type +Grouping to which the rule applies + */ + Type string `json:"type,omitempty"` + } type AutomemberModOptionalArgs struct { - - /* - Description - A description of this auto member rule - */ - Description *string `json:"description,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Description +A description of this auto member rule + */ + Description *string `json:"description,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type automemberModKwParams struct { - *AutomemberModArgs - *AutomemberModOptionalArgs + *AutomemberModArgs + *AutomemberModOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type automemberModResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *AutomemberModResult `json:"result"` } type AutomemberModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Automember `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Automember `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *AutomemberModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AutomemberModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("AutomemberModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AutomemberModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AutomemberModResult%v", string(b)) } /* Rebuild auto membership. */ func (c *Client) AutomemberRebuild( - reqArgs *AutomemberRebuildArgs, - optArgs *AutomemberRebuildOptionalArgs, // can be nil + reqArgs *AutomemberRebuildArgs, + optArgs *AutomemberRebuildOptionalArgs, // can be nil ) (*AutomemberRebuildResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := automemberRebuildKwParams{ - AutomemberRebuildArgs: reqArgs, - AutomemberRebuildOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "automember_rebuild", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res automemberRebuildResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := automemberRebuildKwParams{ + AutomemberRebuildArgs: reqArgs, + AutomemberRebuildOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "automember_rebuild", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res automemberRebuildResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type AutomemberRebuildArgs struct { -} + } type AutomemberRebuildOptionalArgs struct { - - /* - Rebuild membership for all members of a grouping - Grouping to which the rule applies - */ - Type *string `json:"type,omitempty"` - - /* - Users - Rebuild membership for specified users - */ - Users *[]string `json:"users,omitempty"` - - /* - Hosts - Rebuild membership for specified hosts - */ - Hosts *[]string `json:"hosts,omitempty"` - - /* - No wait - Don't wait for rebuilding membership - */ - NoWait *bool `json:"no_wait,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Rebuild membership for all members of a grouping +Grouping to which the rule applies + */ + Type *string `json:"type,omitempty"` + + /* +Users +Rebuild membership for specified users + */ + Users *[]string `json:"users,omitempty"` + + /* +Hosts +Rebuild membership for specified hosts + */ + Hosts *[]string `json:"hosts,omitempty"` + + /* +No wait +Don't wait for rebuilding membership + */ + NoWait *bool `json:"no_wait,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type automemberRebuildKwParams struct { - *AutomemberRebuildArgs - *AutomemberRebuildOptionalArgs + *AutomemberRebuildArgs + *AutomemberRebuildOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type automemberRebuildResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *AutomemberRebuildResult `json:"result"` } type AutomemberRebuildResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value interface{} `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value interface{} `json:"value,omitempty"` + } func (t *AutomemberRebuildResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AutomemberRebuildResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("AutomemberRebuildResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AutomemberRebuildResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AutomemberRebuildResult%v", string(b)) } /* Remove conditions from an automember rule. */ func (c *Client) AutomemberRemoveCondition( - reqArgs *AutomemberRemoveConditionArgs, - optArgs *AutomemberRemoveConditionOptionalArgs, // can be nil + reqArgs *AutomemberRemoveConditionArgs, + optArgs *AutomemberRemoveConditionOptionalArgs, // can be nil ) (*AutomemberRemoveConditionResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := automemberRemoveConditionKwParams{ - AutomemberRemoveConditionArgs: reqArgs, - AutomemberRemoveConditionOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "automember_remove_condition", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res automemberRemoveConditionResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := automemberRemoveConditionKwParams{ + AutomemberRemoveConditionArgs: reqArgs, + AutomemberRemoveConditionOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "automember_remove_condition", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res automemberRemoveConditionResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type AutomemberRemoveConditionArgs struct { - - /* - Automember Rule - Automember Rule - */ - Cn string `json:"cn,omitempty"` - - /* - Attribute Key - Attribute to filter via regex. For example fqdn for a host, or manager for a user - */ - Key string `json:"key,omitempty"` - - /* - Grouping Type - Grouping to which the rule applies - */ - Type string `json:"type,omitempty"` -} + + /* +Automember Rule +Automember Rule + */ + Cn string `json:"cn,omitempty"` + + /* +Attribute Key +Attribute to filter via regex. For example fqdn for a host, or manager for a user + */ + Key string `json:"key,omitempty"` + + /* +Grouping Type +Grouping to which the rule applies + */ + Type string `json:"type,omitempty"` + } type AutomemberRemoveConditionOptionalArgs struct { - - /* - Description - A description of this auto member rule - */ - Description *string `json:"description,omitempty"` - - /* - Inclusive Regex - Inclusive Regex - */ - Automemberinclusiveregex *[]string `json:"automemberinclusiveregex,omitempty"` - - /* - Exclusive Regex - Exclusive Regex - */ - Automemberexclusiveregex *[]string `json:"automemberexclusiveregex,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Description +A description of this auto member rule + */ + Description *string `json:"description,omitempty"` + + /* +Inclusive Regex +Inclusive Regex + */ + Automemberinclusiveregex *[]string `json:"automemberinclusiveregex,omitempty"` + + /* +Exclusive Regex +Exclusive Regex + */ + Automemberexclusiveregex *[]string `json:"automemberexclusiveregex,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type automemberRemoveConditionKwParams struct { - *AutomemberRemoveConditionArgs - *AutomemberRemoveConditionOptionalArgs + *AutomemberRemoveConditionArgs + *AutomemberRemoveConditionOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type automemberRemoveConditionResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *AutomemberRemoveConditionResult `json:"result"` } type AutomemberRemoveConditionResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` - - /* - Conditions that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of conditions removed - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + + /* +Conditions that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of conditions removed + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *AutomemberRemoveConditionResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AutomemberRemoveConditionResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("AutomemberRemoveConditionResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AutomemberRemoveConditionResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AutomemberRemoveConditionResult%v", string(b)) } /* Display information about an automember rule. */ func (c *Client) AutomemberShow( - reqArgs *AutomemberShowArgs, - optArgs *AutomemberShowOptionalArgs, // can be nil + reqArgs *AutomemberShowArgs, + optArgs *AutomemberShowOptionalArgs, // can be nil ) (*AutomemberShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := automemberShowKwParams{ - AutomemberShowArgs: reqArgs, - AutomemberShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "automember_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res automemberShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := automemberShowKwParams{ + AutomemberShowArgs: reqArgs, + AutomemberShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "automember_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res automemberShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type AutomemberShowArgs struct { - - /* - Automember Rule - Automember Rule - */ - Cn string `json:"cn,omitempty"` - - /* - Grouping Type - Grouping to which the rule applies - */ - Type string `json:"type,omitempty"` -} + + /* +Automember Rule +Automember Rule + */ + Cn string `json:"cn,omitempty"` + + /* +Grouping Type +Grouping to which the rule applies + */ + Type string `json:"type,omitempty"` + } type AutomemberShowOptionalArgs struct { + + /* - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type automemberShowKwParams struct { - *AutomemberShowArgs - *AutomemberShowOptionalArgs + *AutomemberShowArgs + *AutomemberShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type automemberShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *AutomemberShowResult `json:"result"` } type AutomemberShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Automember `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Automember `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *AutomemberShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AutomemberShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("AutomemberShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AutomemberShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AutomemberShowResult%v", string(b)) } /* Create a new automount key. */ func (c *Client) AutomountkeyAdd( - reqArgs *AutomountkeyAddArgs, - optArgs *AutomountkeyAddOptionalArgs, // can be nil + reqArgs *AutomountkeyAddArgs, + optArgs *AutomountkeyAddOptionalArgs, // can be nil ) (*AutomountkeyAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := automountkeyAddKwParams{ - AutomountkeyAddArgs: reqArgs, - AutomountkeyAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "automountkey_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res automountkeyAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := automountkeyAddKwParams{ + AutomountkeyAddArgs: reqArgs, + AutomountkeyAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "automountkey_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res automountkeyAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type AutomountkeyAddArgs struct { - - /* - Location - Automount location name. - */ - Automountlocationcn string `json:"automountlocationcn,omitempty"` - - /* - Map - Automount map name. - */ - Automountmapautomountmapname string `json:"automountmapautomountmapname,omitempty"` - - /* - Key - Automount key name. - */ - Automountkey string `json:"automountkey,omitempty"` - - /* - Mount information - - */ - Automountinformation string `json:"automountinformation,omitempty"` -} + + /* +Location +Automount location name. + */ + Automountlocationcn string `json:"automountlocationcn,omitempty"` + + /* +Map +Automount map name. + */ + Automountmapautomountmapname string `json:"automountmapautomountmapname,omitempty"` + + /* +Key +Automount key name. + */ + Automountkey string `json:"automountkey,omitempty"` + + /* +Mount information + + */ + Automountinformation string `json:"automountinformation,omitempty"` + } type AutomountkeyAddOptionalArgs struct { - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type automountkeyAddKwParams struct { - *AutomountkeyAddArgs - *AutomountkeyAddOptionalArgs + *AutomountkeyAddArgs + *AutomountkeyAddOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type automountkeyAddResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *AutomountkeyAddResult `json:"result"` } type AutomountkeyAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Automountkey `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Automountkey `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *AutomountkeyAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AutomountkeyAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("AutomountkeyAddResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AutomountkeyAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AutomountkeyAddResult%v", string(b)) } /* Delete an automount key. */ func (c *Client) AutomountkeyDel( - reqArgs *AutomountkeyDelArgs, - optArgs *AutomountkeyDelOptionalArgs, // can be nil + reqArgs *AutomountkeyDelArgs, + optArgs *AutomountkeyDelOptionalArgs, // can be nil ) (*AutomountkeyDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := automountkeyDelKwParams{ - AutomountkeyDelArgs: reqArgs, - AutomountkeyDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "automountkey_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res automountkeyDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := automountkeyDelKwParams{ + AutomountkeyDelArgs: reqArgs, + AutomountkeyDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "automountkey_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res automountkeyDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type AutomountkeyDelArgs struct { - - /* - Location - Automount location name. - */ - Automountlocationcn string `json:"automountlocationcn,omitempty"` - - /* - Map - Automount map name. - */ - Automountmapautomountmapname string `json:"automountmapautomountmapname,omitempty"` - - /* - Key - Automount key name. - */ - Automountkey string `json:"automountkey,omitempty"` -} + + /* +Location +Automount location name. + */ + Automountlocationcn string `json:"automountlocationcn,omitempty"` + + /* +Map +Automount map name. + */ + Automountmapautomountmapname string `json:"automountmapautomountmapname,omitempty"` + + /* +Key +Automount key name. + */ + Automountkey string `json:"automountkey,omitempty"` + } type AutomountkeyDelOptionalArgs struct { + + /* - /* +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + + /* +Mount information - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` - - /* - Mount information - - */ - Automountinformation *string `json:"automountinformation,omitempty"` -} + */ + Automountinformation *string `json:"automountinformation,omitempty"` + } type automountkeyDelKwParams struct { - *AutomountkeyDelArgs - *AutomountkeyDelOptionalArgs + *AutomountkeyDelArgs + *AutomountkeyDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type automountkeyDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *AutomountkeyDelResult `json:"result"` } type AutomountkeyDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } func (t *AutomountkeyDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AutomountkeyDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("AutomountkeyDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AutomountkeyDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AutomountkeyDelResult%v", string(b)) } /* Search for an automount key. */ func (c *Client) AutomountkeyFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *AutomountkeyFindArgs, - optArgs *AutomountkeyFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *AutomountkeyFindArgs, + optArgs *AutomountkeyFindOptionalArgs, // can be nil ) (*AutomountkeyFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := automountkeyFindKwParams{ - AutomountkeyFindArgs: reqArgs, - AutomountkeyFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "automountkey_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res automountkeyFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := automountkeyFindKwParams{ + AutomountkeyFindArgs: reqArgs, + AutomountkeyFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "automountkey_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res automountkeyFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type AutomountkeyFindArgs struct { - - /* - Location - Automount location name. - */ - Automountlocationcn string `json:"automountlocationcn,omitempty"` - - /* - Map - Automount map name. - */ - Automountmapautomountmapname string `json:"automountmapautomountmapname,omitempty"` -} + + /* +Location +Automount location name. + */ + Automountlocationcn string `json:"automountlocationcn,omitempty"` + + /* +Map +Automount map name. + */ + Automountmapautomountmapname string `json:"automountmapautomountmapname,omitempty"` + } type AutomountkeyFindOptionalArgs struct { - - /* - Key - Automount key name. - */ - Automountkey *string `json:"automountkey,omitempty"` - - /* - Mount information - - */ - Automountinformation *string `json:"automountinformation,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Key +Automount key name. + */ + Automountkey *string `json:"automountkey,omitempty"` + + /* +Mount information + + */ + Automountinformation *string `json:"automountinformation,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type automountkeyFindKwParams struct { - *AutomountkeyFindArgs - *AutomountkeyFindOptionalArgs + *AutomountkeyFindArgs + *AutomountkeyFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type automountkeyFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *AutomountkeyFindResult `json:"result"` } type AutomountkeyFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Automountkey `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Automountkey `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *AutomountkeyFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AutomountkeyFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("AutomountkeyFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AutomountkeyFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AutomountkeyFindResult%v", string(b)) } /* Modify an automount key. */ func (c *Client) AutomountkeyMod( - reqArgs *AutomountkeyModArgs, - optArgs *AutomountkeyModOptionalArgs, // can be nil + reqArgs *AutomountkeyModArgs, + optArgs *AutomountkeyModOptionalArgs, // can be nil ) (*AutomountkeyModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := automountkeyModKwParams{ - AutomountkeyModArgs: reqArgs, - AutomountkeyModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "automountkey_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res automountkeyModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := automountkeyModKwParams{ + AutomountkeyModArgs: reqArgs, + AutomountkeyModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "automountkey_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res automountkeyModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type AutomountkeyModArgs struct { - - /* - Location - Automount location name. - */ - Automountlocationcn string `json:"automountlocationcn,omitempty"` - - /* - Map - Automount map name. - */ - Automountmapautomountmapname string `json:"automountmapautomountmapname,omitempty"` - - /* - Key - Automount key name. - */ - Automountkey string `json:"automountkey,omitempty"` -} + + /* +Location +Automount location name. + */ + Automountlocationcn string `json:"automountlocationcn,omitempty"` + + /* +Map +Automount map name. + */ + Automountmapautomountmapname string `json:"automountmapautomountmapname,omitempty"` + + /* +Key +Automount key name. + */ + Automountkey string `json:"automountkey,omitempty"` + } type AutomountkeyModOptionalArgs struct { + + /* +Mount information + + */ + Automountinformation *string `json:"automountinformation,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* +New mount information + + */ + Newautomountinformation *string `json:"newautomountinformation,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Rename +Rename the automount key object + */ + Rename *string `json:"rename,omitempty"` + } - /* - Mount information - - */ - Automountinformation *string `json:"automountinformation,omitempty"` - - /* +type automountkeyModKwParams struct { + *AutomountkeyModArgs + *AutomountkeyModOptionalArgs - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* +type automountkeyModResponse struct { + Error *Error `json:"error"` + Result *AutomountkeyModResult `json:"result"` +} - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` +type AutomountkeyModResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Automountkey `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - New mount information - - */ - Newautomountinformation *string `json:"newautomountinformation,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - Rename - Rename the automount key object - */ - Rename *string `json:"rename,omitempty"` -} - -type automountkeyModKwParams struct { - *AutomountkeyModArgs - *AutomountkeyModOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type automountkeyModResponse struct { - Error *Error `json:"error"` - Result *AutomountkeyModResult `json:"result"` -} - -type AutomountkeyModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Automountkey `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *AutomountkeyModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AutomountkeyModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("AutomountkeyModResult%v", string(b)) -} +func (t *AutomountkeyModResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AutomountkeyModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AutomountkeyModResult%v", string(b)) +} /* Display an automount key. */ func (c *Client) AutomountkeyShow( - reqArgs *AutomountkeyShowArgs, - optArgs *AutomountkeyShowOptionalArgs, // can be nil + reqArgs *AutomountkeyShowArgs, + optArgs *AutomountkeyShowOptionalArgs, // can be nil ) (*AutomountkeyShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := automountkeyShowKwParams{ - AutomountkeyShowArgs: reqArgs, - AutomountkeyShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "automountkey_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res automountkeyShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := automountkeyShowKwParams{ + AutomountkeyShowArgs: reqArgs, + AutomountkeyShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "automountkey_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res automountkeyShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type AutomountkeyShowArgs struct { - - /* - Location - Automount location name. - */ - Automountlocationcn string `json:"automountlocationcn,omitempty"` - - /* - Map - Automount map name. - */ - Automountmapautomountmapname string `json:"automountmapautomountmapname,omitempty"` - - /* - Key - Automount key name. - */ - Automountkey string `json:"automountkey,omitempty"` -} + + /* +Location +Automount location name. + */ + Automountlocationcn string `json:"automountlocationcn,omitempty"` + + /* +Map +Automount map name. + */ + Automountmapautomountmapname string `json:"automountmapautomountmapname,omitempty"` + + /* +Key +Automount key name. + */ + Automountkey string `json:"automountkey,omitempty"` + } type AutomountkeyShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - Mount information - - */ - Automountinformation *string `json:"automountinformation,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* +Mount information + + */ + Automountinformation *string `json:"automountinformation,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type automountkeyShowKwParams struct { - *AutomountkeyShowArgs - *AutomountkeyShowOptionalArgs + *AutomountkeyShowArgs + *AutomountkeyShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type automountkeyShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *AutomountkeyShowResult `json:"result"` } type AutomountkeyShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Automountkey `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Automountkey `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *AutomountkeyShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AutomountkeyShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("AutomountkeyShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AutomountkeyShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AutomountkeyShowResult%v", string(b)) } /* Create a new automount location. */ func (c *Client) AutomountlocationAdd( - reqArgs *AutomountlocationAddArgs, - optArgs *AutomountlocationAddOptionalArgs, // can be nil + reqArgs *AutomountlocationAddArgs, + optArgs *AutomountlocationAddOptionalArgs, // can be nil ) (*AutomountlocationAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := automountlocationAddKwParams{ - AutomountlocationAddArgs: reqArgs, - AutomountlocationAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "automountlocation_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res automountlocationAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := automountlocationAddKwParams{ + AutomountlocationAddArgs: reqArgs, + AutomountlocationAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "automountlocation_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res automountlocationAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type AutomountlocationAddArgs struct { - - /* - Location - Automount location name. - */ - Cn string `json:"cn,omitempty"` -} + + /* +Location +Automount location name. + */ + Cn string `json:"cn,omitempty"` + } type AutomountlocationAddOptionalArgs struct { - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type automountlocationAddKwParams struct { - *AutomountlocationAddArgs - *AutomountlocationAddOptionalArgs + *AutomountlocationAddArgs + *AutomountlocationAddOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type automountlocationAddResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *AutomountlocationAddResult `json:"result"` } type AutomountlocationAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Automountlocation `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Automountlocation `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *AutomountlocationAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AutomountlocationAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("AutomountlocationAddResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AutomountlocationAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AutomountlocationAddResult%v", string(b)) } /* Delete an automount location. */ func (c *Client) AutomountlocationDel( - reqArgs *AutomountlocationDelArgs, - optArgs *AutomountlocationDelOptionalArgs, // can be nil + reqArgs *AutomountlocationDelArgs, + optArgs *AutomountlocationDelOptionalArgs, // can be nil ) (*AutomountlocationDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := automountlocationDelKwParams{ - AutomountlocationDelArgs: reqArgs, - AutomountlocationDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "automountlocation_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res automountlocationDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := automountlocationDelKwParams{ + AutomountlocationDelArgs: reqArgs, + AutomountlocationDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "automountlocation_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res automountlocationDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type AutomountlocationDelArgs struct { - - /* - Location - Automount location name. - */ - Cn []string `json:"cn,omitempty"` -} + + /* +Location +Automount location name. + */ + Cn []string `json:"cn,omitempty"` + } type AutomountlocationDelOptionalArgs struct { + + /* - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` -} +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } type automountlocationDelKwParams struct { - *AutomountlocationDelArgs - *AutomountlocationDelOptionalArgs + *AutomountlocationDelArgs + *AutomountlocationDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type automountlocationDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *AutomountlocationDelResult `json:"result"` } type AutomountlocationDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } func (t *AutomountlocationDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AutomountlocationDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("AutomountlocationDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AutomountlocationDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AutomountlocationDelResult%v", string(b)) } /* Search for an automount location. */ func (c *Client) AutomountlocationFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *AutomountlocationFindArgs, - optArgs *AutomountlocationFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *AutomountlocationFindArgs, + optArgs *AutomountlocationFindOptionalArgs, // can be nil ) (*AutomountlocationFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := automountlocationFindKwParams{ - AutomountlocationFindArgs: reqArgs, - AutomountlocationFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "automountlocation_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res automountlocationFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := automountlocationFindKwParams{ + AutomountlocationFindArgs: reqArgs, + AutomountlocationFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "automountlocation_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res automountlocationFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type AutomountlocationFindArgs struct { -} + } type AutomountlocationFindOptionalArgs struct { - - /* - Location - Automount location name. - */ - Cn *string `json:"cn,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("location") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} + + /* +Location +Automount location name. + */ + Cn *string `json:"cn,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("location") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } type automountlocationFindKwParams struct { - *AutomountlocationFindArgs - *AutomountlocationFindOptionalArgs + *AutomountlocationFindArgs + *AutomountlocationFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type automountlocationFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *AutomountlocationFindResult `json:"result"` } type AutomountlocationFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Automountlocation `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Automountlocation `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *AutomountlocationFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AutomountlocationFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("AutomountlocationFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AutomountlocationFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AutomountlocationFindResult%v", string(b)) } /* Display an automount location. */ func (c *Client) AutomountlocationShow( - reqArgs *AutomountlocationShowArgs, - optArgs *AutomountlocationShowOptionalArgs, // can be nil + reqArgs *AutomountlocationShowArgs, + optArgs *AutomountlocationShowOptionalArgs, // can be nil ) (*AutomountlocationShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := automountlocationShowKwParams{ - AutomountlocationShowArgs: reqArgs, - AutomountlocationShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "automountlocation_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res automountlocationShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := automountlocationShowKwParams{ + AutomountlocationShowArgs: reqArgs, + AutomountlocationShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "automountlocation_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res automountlocationShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type AutomountlocationShowArgs struct { - - /* - Location - Automount location name. - */ - Cn string `json:"cn,omitempty"` -} + + /* +Location +Automount location name. + */ + Cn string `json:"cn,omitempty"` + } type AutomountlocationShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type automountlocationShowKwParams struct { - *AutomountlocationShowArgs - *AutomountlocationShowOptionalArgs + *AutomountlocationShowArgs + *AutomountlocationShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type automountlocationShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *AutomountlocationShowResult `json:"result"` } type AutomountlocationShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Automountlocation `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Automountlocation `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *AutomountlocationShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AutomountlocationShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("AutomountlocationShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AutomountlocationShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AutomountlocationShowResult%v", string(b)) } /* Generate automount files for a specific location. */ func (c *Client) AutomountlocationTofiles( - reqArgs *AutomountlocationTofilesArgs, - optArgs *AutomountlocationTofilesOptionalArgs, // can be nil + reqArgs *AutomountlocationTofilesArgs, + optArgs *AutomountlocationTofilesOptionalArgs, // can be nil ) (*AutomountlocationTofilesResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := automountlocationTofilesKwParams{ - AutomountlocationTofilesArgs: reqArgs, - AutomountlocationTofilesOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "automountlocation_tofiles", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res automountlocationTofilesResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := automountlocationTofilesKwParams{ + AutomountlocationTofilesArgs: reqArgs, + AutomountlocationTofilesOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "automountlocation_tofiles", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res automountlocationTofilesResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type AutomountlocationTofilesArgs struct { - - /* - Location - Automount location name. - */ - Cn string `json:"cn,omitempty"` -} + + /* +Location +Automount location name. + */ + Cn string `json:"cn,omitempty"` + } type AutomountlocationTofilesOptionalArgs struct { -} + } type automountlocationTofilesKwParams struct { - *AutomountlocationTofilesArgs - *AutomountlocationTofilesOptionalArgs + *AutomountlocationTofilesArgs + *AutomountlocationTofilesOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type automountlocationTofilesResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *AutomountlocationTofilesResult `json:"result"` } type AutomountlocationTofilesResult struct { + + + /* - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` -} + (required) + */ + Result interface{} `json:"result,omitempty"` + } func (t *AutomountlocationTofilesResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AutomountlocationTofilesResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("AutomountlocationTofilesResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AutomountlocationTofilesResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AutomountlocationTofilesResult%v", string(b)) } /* Create a new automount map. */ func (c *Client) AutomountmapAdd( - reqArgs *AutomountmapAddArgs, - optArgs *AutomountmapAddOptionalArgs, // can be nil + reqArgs *AutomountmapAddArgs, + optArgs *AutomountmapAddOptionalArgs, // can be nil ) (*AutomountmapAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := automountmapAddKwParams{ - AutomountmapAddArgs: reqArgs, - AutomountmapAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "automountmap_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res automountmapAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := automountmapAddKwParams{ + AutomountmapAddArgs: reqArgs, + AutomountmapAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "automountmap_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res automountmapAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type AutomountmapAddArgs struct { - - /* - Location - Automount location name. - */ - Automountlocationcn string `json:"automountlocationcn,omitempty"` - - /* - Map - Automount map name. - */ - Automountmapname string `json:"automountmapname,omitempty"` -} + + /* +Location +Automount location name. + */ + Automountlocationcn string `json:"automountlocationcn,omitempty"` + + /* +Map +Automount map name. + */ + Automountmapname string `json:"automountmapname,omitempty"` + } type AutomountmapAddOptionalArgs struct { - - /* - Description - - */ - Description *string `json:"description,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Description + + */ + Description *string `json:"description,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type automountmapAddKwParams struct { - *AutomountmapAddArgs - *AutomountmapAddOptionalArgs + *AutomountmapAddArgs + *AutomountmapAddOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type automountmapAddResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *AutomountmapAddResult `json:"result"` } type AutomountmapAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Automountmap `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Automountmap `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *AutomountmapAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AutomountmapAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("AutomountmapAddResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AutomountmapAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AutomountmapAddResult%v", string(b)) } /* Create a new indirect mount point. */ func (c *Client) AutomountmapAddIndirect( - reqArgs *AutomountmapAddIndirectArgs, - optArgs *AutomountmapAddIndirectOptionalArgs, // can be nil + reqArgs *AutomountmapAddIndirectArgs, + optArgs *AutomountmapAddIndirectOptionalArgs, // can be nil ) (*AutomountmapAddIndirectResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := automountmapAddIndirectKwParams{ - AutomountmapAddIndirectArgs: reqArgs, - AutomountmapAddIndirectOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "automountmap_add_indirect", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res automountmapAddIndirectResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := automountmapAddIndirectKwParams{ + AutomountmapAddIndirectArgs: reqArgs, + AutomountmapAddIndirectOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "automountmap_add_indirect", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res automountmapAddIndirectResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type AutomountmapAddIndirectArgs struct { - - /* - Location - Automount location name. - */ - Automountlocationcn string `json:"automountlocationcn,omitempty"` - - /* - Map - Automount map name. - */ - Automountmapname string `json:"automountmapname,omitempty"` - - /* - Mount point - - */ - Key string `json:"key,omitempty"` -} + + /* +Location +Automount location name. + */ + Automountlocationcn string `json:"automountlocationcn,omitempty"` + + /* +Map +Automount map name. + */ + Automountmapname string `json:"automountmapname,omitempty"` + + /* +Mount point + + */ + Key string `json:"key,omitempty"` + } type AutomountmapAddIndirectOptionalArgs struct { - - /* - Description - - */ - Description *string `json:"description,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - Parent map - Name of parent automount map (default: auto.master). - */ - Parentmap *string `json:"parentmap,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Description + + */ + Description *string `json:"description,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* +Parent map +Name of parent automount map (default: auto.master). + */ + Parentmap *string `json:"parentmap,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type automountmapAddIndirectKwParams struct { - *AutomountmapAddIndirectArgs - *AutomountmapAddIndirectOptionalArgs + *AutomountmapAddIndirectArgs + *AutomountmapAddIndirectOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type automountmapAddIndirectResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *AutomountmapAddIndirectResult `json:"result"` } type AutomountmapAddIndirectResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *AutomountmapAddIndirectResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AutomountmapAddIndirectResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("AutomountmapAddIndirectResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AutomountmapAddIndirectResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AutomountmapAddIndirectResult%v", string(b)) } /* Delete an automount map. */ func (c *Client) AutomountmapDel( - reqArgs *AutomountmapDelArgs, - optArgs *AutomountmapDelOptionalArgs, // can be nil + reqArgs *AutomountmapDelArgs, + optArgs *AutomountmapDelOptionalArgs, // can be nil ) (*AutomountmapDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := automountmapDelKwParams{ - AutomountmapDelArgs: reqArgs, - AutomountmapDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "automountmap_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res automountmapDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := automountmapDelKwParams{ + AutomountmapDelArgs: reqArgs, + AutomountmapDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "automountmap_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res automountmapDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type AutomountmapDelArgs struct { - - /* - Location - Automount location name. - */ - Automountlocationcn string `json:"automountlocationcn,omitempty"` - - /* - Map - Automount map name. - */ - Automountmapname []string `json:"automountmapname,omitempty"` -} + + /* +Location +Automount location name. + */ + Automountlocationcn string `json:"automountlocationcn,omitempty"` + + /* +Map +Automount map name. + */ + Automountmapname []string `json:"automountmapname,omitempty"` + } type AutomountmapDelOptionalArgs struct { + + /* - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` -} +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } type automountmapDelKwParams struct { - *AutomountmapDelArgs - *AutomountmapDelOptionalArgs + *AutomountmapDelArgs + *AutomountmapDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type automountmapDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *AutomountmapDelResult `json:"result"` } type AutomountmapDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } func (t *AutomountmapDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AutomountmapDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("AutomountmapDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AutomountmapDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AutomountmapDelResult%v", string(b)) } /* Search for an automount map. */ func (c *Client) AutomountmapFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *AutomountmapFindArgs, - optArgs *AutomountmapFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *AutomountmapFindArgs, + optArgs *AutomountmapFindOptionalArgs, // can be nil ) (*AutomountmapFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := automountmapFindKwParams{ - AutomountmapFindArgs: reqArgs, - AutomountmapFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "automountmap_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res automountmapFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := automountmapFindKwParams{ + AutomountmapFindArgs: reqArgs, + AutomountmapFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "automountmap_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res automountmapFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type AutomountmapFindArgs struct { - - /* - Location - Automount location name. - */ - Automountlocationcn string `json:"automountlocationcn,omitempty"` -} + + /* +Location +Automount location name. + */ + Automountlocationcn string `json:"automountlocationcn,omitempty"` + } type AutomountmapFindOptionalArgs struct { + + /* +Map +Automount map name. + */ + Automountmapname *string `json:"automountmapname,omitempty"` + + /* +Description + + */ + Description *string `json:"description,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("map") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } - /* - Map - Automount map name. - */ - Automountmapname *string `json:"automountmapname,omitempty"` - - /* - Description +type automountmapFindKwParams struct { + *AutomountmapFindArgs + *AutomountmapFindOptionalArgs - */ - Description *string `json:"description,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` +type automountmapFindResponse struct { + Error *Error `json:"error"` + Result *AutomountmapFindResult `json:"result"` +} - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` +type AutomountmapFindResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Automountmap `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("map") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} - -type automountmapFindKwParams struct { - *AutomountmapFindArgs - *AutomountmapFindOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type automountmapFindResponse struct { - Error *Error `json:"error"` - Result *AutomountmapFindResult `json:"result"` -} - -type AutomountmapFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Automountmap `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} - -func (t *AutomountmapFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AutomountmapFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("AutomountmapFindResult%v", string(b)) -} +func (t *AutomountmapFindResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AutomountmapFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AutomountmapFindResult%v", string(b)) +} /* Modify an automount map. */ func (c *Client) AutomountmapMod( - reqArgs *AutomountmapModArgs, - optArgs *AutomountmapModOptionalArgs, // can be nil + reqArgs *AutomountmapModArgs, + optArgs *AutomountmapModOptionalArgs, // can be nil ) (*AutomountmapModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := automountmapModKwParams{ - AutomountmapModArgs: reqArgs, - AutomountmapModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "automountmap_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res automountmapModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := automountmapModKwParams{ + AutomountmapModArgs: reqArgs, + AutomountmapModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "automountmap_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res automountmapModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type AutomountmapModArgs struct { - - /* - Location - Automount location name. - */ - Automountlocationcn string `json:"automountlocationcn,omitempty"` - - /* - Map - Automount map name. - */ - Automountmapname string `json:"automountmapname,omitempty"` -} + + /* +Location +Automount location name. + */ + Automountlocationcn string `json:"automountlocationcn,omitempty"` + + /* +Map +Automount map name. + */ + Automountmapname string `json:"automountmapname,omitempty"` + } type AutomountmapModOptionalArgs struct { - - /* - Description - - */ - Description *string `json:"description,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Description + + */ + Description *string `json:"description,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type automountmapModKwParams struct { - *AutomountmapModArgs - *AutomountmapModOptionalArgs + *AutomountmapModArgs + *AutomountmapModOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type automountmapModResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *AutomountmapModResult `json:"result"` } type AutomountmapModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Automountmap `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Automountmap `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *AutomountmapModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AutomountmapModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("AutomountmapModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AutomountmapModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AutomountmapModResult%v", string(b)) } /* Display an automount map. */ func (c *Client) AutomountmapShow( - reqArgs *AutomountmapShowArgs, - optArgs *AutomountmapShowOptionalArgs, // can be nil + reqArgs *AutomountmapShowArgs, + optArgs *AutomountmapShowOptionalArgs, // can be nil ) (*AutomountmapShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := automountmapShowKwParams{ - AutomountmapShowArgs: reqArgs, - AutomountmapShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "automountmap_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res automountmapShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := automountmapShowKwParams{ + AutomountmapShowArgs: reqArgs, + AutomountmapShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "automountmap_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res automountmapShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type AutomountmapShowArgs struct { - - /* - Location - Automount location name. - */ - Automountlocationcn string `json:"automountlocationcn,omitempty"` - - /* - Map - Automount map name. - */ - Automountmapname string `json:"automountmapname,omitempty"` -} + + /* +Location +Automount location name. + */ + Automountlocationcn string `json:"automountlocationcn,omitempty"` + + /* +Map +Automount map name. + */ + Automountmapname string `json:"automountmapname,omitempty"` + } type AutomountmapShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type automountmapShowKwParams struct { - *AutomountmapShowArgs - *AutomountmapShowOptionalArgs + *AutomountmapShowArgs + *AutomountmapShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type automountmapShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *AutomountmapShowResult `json:"result"` } type AutomountmapShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Automountmap `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Automountmap `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *AutomountmapShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AutomountmapShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("AutomountmapShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AutomountmapShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AutomountmapShowResult%v", string(b)) } /* Create a CA. */ func (c *Client) CaAdd( - reqArgs *CaAddArgs, - optArgs *CaAddOptionalArgs, // can be nil + reqArgs *CaAddArgs, + optArgs *CaAddOptionalArgs, // can be nil ) (*CaAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := caAddKwParams{ - CaAddArgs: reqArgs, - CaAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "ca_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res caAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := caAddKwParams{ + CaAddArgs: reqArgs, + CaAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "ca_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res caAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CaAddArgs struct { - - /* - Name - Name for referencing the CA - */ - Cn string `json:"cn,omitempty"` - - /* - Subject DN - Subject Distinguished Name - */ - Ipacasubjectdn string `json:"ipacasubjectdn,omitempty"` -} + + /* +Name +Name for referencing the CA + */ + Cn string `json:"cn,omitempty"` + + /* +Subject DN +Subject Distinguished Name + */ + Ipacasubjectdn string `json:"ipacasubjectdn,omitempty"` + } type CaAddOptionalArgs struct { - - /* - Description - Description of the purpose of the CA - */ - Description *string `json:"description,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Description +Description of the purpose of the CA + */ + Description *string `json:"description,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Include certificate chain in output + */ + Chain *bool `json:"chain,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type caAddKwParams struct { - *CaAddArgs - *CaAddOptionalArgs + *CaAddArgs + *CaAddOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type caAddResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CaAddResult `json:"result"` } type CaAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Ca `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Ca `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *CaAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CaAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CaAddResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CaAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CaAddResult%v", string(b)) } /* Delete a CA. */ func (c *Client) CaDel( - reqArgs *CaDelArgs, - optArgs *CaDelOptionalArgs, // can be nil + reqArgs *CaDelArgs, + optArgs *CaDelOptionalArgs, // can be nil ) (*CaDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := caDelKwParams{ - CaDelArgs: reqArgs, - CaDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "ca_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res caDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := caDelKwParams{ + CaDelArgs: reqArgs, + CaDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "ca_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res caDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CaDelArgs struct { - - /* - Name - Name for referencing the CA - */ - Cn []string `json:"cn,omitempty"` -} + + /* +Name +Name for referencing the CA + */ + Cn []string `json:"cn,omitempty"` + } type CaDelOptionalArgs struct { + + /* - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` -} +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } type caDelKwParams struct { - *CaDelArgs - *CaDelOptionalArgs + *CaDelArgs + *CaDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type caDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CaDelResult `json:"result"` } type CaDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } func (t *CaDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CaDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CaDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CaDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CaDelResult%v", string(b)) } /* Disable a CA. */ func (c *Client) CaDisable( - reqArgs *CaDisableArgs, - optArgs *CaDisableOptionalArgs, // can be nil + reqArgs *CaDisableArgs, + optArgs *CaDisableOptionalArgs, // can be nil ) (*CaDisableResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := caDisableKwParams{ - CaDisableArgs: reqArgs, - CaDisableOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "ca_disable", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res caDisableResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := caDisableKwParams{ + CaDisableArgs: reqArgs, + CaDisableOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "ca_disable", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res caDisableResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CaDisableArgs struct { - - /* - Name - Name for referencing the CA - */ - Cn string `json:"cn,omitempty"` -} + + /* +Name +Name for referencing the CA + */ + Cn string `json:"cn,omitempty"` + } type CaDisableOptionalArgs struct { -} + } type caDisableKwParams struct { - *CaDisableArgs - *CaDisableOptionalArgs + *CaDisableArgs + *CaDisableOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type caDisableResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CaDisableResult `json:"result"` } type CaDisableResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - True means the operation was successful - (required) - */ - Result bool `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *CaDisableResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CaDisableResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CaDisableResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CaDisableResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CaDisableResult%v", string(b)) } /* Enable a CA. */ func (c *Client) CaEnable( - reqArgs *CaEnableArgs, - optArgs *CaEnableOptionalArgs, // can be nil + reqArgs *CaEnableArgs, + optArgs *CaEnableOptionalArgs, // can be nil ) (*CaEnableResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := caEnableKwParams{ - CaEnableArgs: reqArgs, - CaEnableOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "ca_enable", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res caEnableResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := caEnableKwParams{ + CaEnableArgs: reqArgs, + CaEnableOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "ca_enable", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res caEnableResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CaEnableArgs struct { - - /* - Name - Name for referencing the CA - */ - Cn string `json:"cn,omitempty"` -} + + /* +Name +Name for referencing the CA + */ + Cn string `json:"cn,omitempty"` + } type CaEnableOptionalArgs struct { -} + } type caEnableKwParams struct { - *CaEnableArgs - *CaEnableOptionalArgs + *CaEnableArgs + *CaEnableOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type caEnableResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CaEnableResult `json:"result"` } type CaEnableResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - True means the operation was successful - (required) - */ - Result bool `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *CaEnableResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CaEnableResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CaEnableResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CaEnableResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CaEnableResult%v", string(b)) } /* Search for CAs. */ func (c *Client) CaFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *CaFindArgs, - optArgs *CaFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *CaFindArgs, + optArgs *CaFindOptionalArgs, // can be nil ) (*CaFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := caFindKwParams{ - CaFindArgs: reqArgs, - CaFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "ca_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res caFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := caFindKwParams{ + CaFindArgs: reqArgs, + CaFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "ca_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res caFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CaFindArgs struct { -} + } type CaFindOptionalArgs struct { - - /* - Name - Name for referencing the CA - */ - Cn *string `json:"cn,omitempty"` - - /* - Description - Description of the purpose of the CA - */ - Description *string `json:"description,omitempty"` - - /* - Authority ID - Dogtag Authority ID - */ - Ipacaid *string `json:"ipacaid,omitempty"` - - /* - Subject DN - Subject Distinguished Name - */ - Ipacasubjectdn *string `json:"ipacasubjectdn,omitempty"` - - /* - Issuer DN - Issuer Distinguished Name - */ - Ipacaissuerdn *string `json:"ipacaissuerdn,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("name") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} + + /* +Name +Name for referencing the CA + */ + Cn *string `json:"cn,omitempty"` + + /* +Description +Description of the purpose of the CA + */ + Description *string `json:"description,omitempty"` + + /* +Authority ID +Dogtag Authority ID + */ + Ipacaid *string `json:"ipacaid,omitempty"` + + /* +Subject DN +Subject Distinguished Name + */ + Ipacasubjectdn *string `json:"ipacasubjectdn,omitempty"` + + /* +Issuer DN +Issuer Distinguished Name + */ + Ipacaissuerdn *string `json:"ipacaissuerdn,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("name") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } type caFindKwParams struct { - *CaFindArgs - *CaFindOptionalArgs + *CaFindArgs + *CaFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type caFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CaFindResult `json:"result"` } type CaFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Ca `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Ca `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *CaFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CaFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CaFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CaFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CaFindResult%v", string(b)) } /* Checks if any of the servers has the CA service enabled. */ func (c *Client) CaIsEnabled( - reqArgs *CaIsEnabledArgs, - optArgs *CaIsEnabledOptionalArgs, // can be nil + reqArgs *CaIsEnabledArgs, + optArgs *CaIsEnabledOptionalArgs, // can be nil ) (*CaIsEnabledResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := caIsEnabledKwParams{ - CaIsEnabledArgs: reqArgs, - CaIsEnabledOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "ca_is_enabled", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res caIsEnabledResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := caIsEnabledKwParams{ + CaIsEnabledArgs: reqArgs, + CaIsEnabledOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "ca_is_enabled", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res caIsEnabledResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CaIsEnabledArgs struct { -} + } type CaIsEnabledOptionalArgs struct { -} + } type caIsEnabledKwParams struct { - *CaIsEnabledArgs - *CaIsEnabledOptionalArgs + *CaIsEnabledArgs + *CaIsEnabledOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type caIsEnabledResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CaIsEnabledResult `json:"result"` } type CaIsEnabledResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - True means the operation was successful - (required) - */ - Result bool `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value interface{} `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value interface{} `json:"value,omitempty"` + } func (t *CaIsEnabledResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CaIsEnabledResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CaIsEnabledResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CaIsEnabledResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CaIsEnabledResult%v", string(b)) } /* Modify CA configuration. */ func (c *Client) CaMod( - reqArgs *CaModArgs, - optArgs *CaModOptionalArgs, // can be nil + reqArgs *CaModArgs, + optArgs *CaModOptionalArgs, // can be nil ) (*CaModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := caModKwParams{ - CaModArgs: reqArgs, - CaModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "ca_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res caModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := caModKwParams{ + CaModArgs: reqArgs, + CaModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "ca_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res caModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CaModArgs struct { - - /* - Name - Name for referencing the CA - */ - Cn string `json:"cn,omitempty"` -} + + /* +Name +Name for referencing the CA + */ + Cn string `json:"cn,omitempty"` + } type CaModOptionalArgs struct { - - /* - Description - Description of the purpose of the CA - */ - Description *string `json:"description,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - Rename - Rename the Certificate Authority object - */ - Rename *string `json:"rename,omitempty"` -} + + /* +Description +Description of the purpose of the CA + */ + Description *string `json:"description,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Rename +Rename the Certificate Authority object + */ + Rename *string `json:"rename,omitempty"` + } type caModKwParams struct { - *CaModArgs - *CaModOptionalArgs + *CaModArgs + *CaModOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type caModResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CaModResult `json:"result"` } type CaModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Ca `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Ca `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *CaModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CaModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CaModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CaModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CaModResult%v", string(b)) } /* Display the properties of a CA. */ func (c *Client) CaShow( - reqArgs *CaShowArgs, - optArgs *CaShowOptionalArgs, // can be nil + reqArgs *CaShowArgs, + optArgs *CaShowOptionalArgs, // can be nil ) (*CaShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := caShowKwParams{ - CaShowArgs: reqArgs, - CaShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "ca_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res caShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := caShowKwParams{ + CaShowArgs: reqArgs, + CaShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "ca_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res caShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CaShowArgs struct { - - /* - Name - Name for referencing the CA - */ - Cn string `json:"cn,omitempty"` -} + + /* +Name +Name for referencing the CA + */ + Cn string `json:"cn,omitempty"` + } type CaShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Include certificate chain in output + */ + Chain *bool `json:"chain,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type caShowKwParams struct { - *CaShowArgs - *CaShowOptionalArgs + *CaShowArgs + *CaShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type caShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CaShowResult `json:"result"` } type CaShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Ca `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Ca `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *CaShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CaShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CaShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CaShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CaShowResult%v", string(b)) } /* Create a new CA ACL. */ func (c *Client) CaaclAdd( - reqArgs *CaaclAddArgs, - optArgs *CaaclAddOptionalArgs, // can be nil + reqArgs *CaaclAddArgs, + optArgs *CaaclAddOptionalArgs, // can be nil ) (*CaaclAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := caaclAddKwParams{ - CaaclAddArgs: reqArgs, - CaaclAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "caacl_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res caaclAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := caaclAddKwParams{ + CaaclAddArgs: reqArgs, + CaaclAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "caacl_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res caaclAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CaaclAddArgs struct { + + /* +ACL name - /* - ACL name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type CaaclAddOptionalArgs struct { + + /* +Description + + */ + Description *string `json:"description,omitempty"` + + /* +Enabled + + */ + Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` + + /* +CA category +CA category the ACL applies to + */ + Ipacacategory *string `json:"ipacacategory,omitempty"` + + /* +Profile category +Profile category the ACL applies to + */ + Ipacertprofilecategory *string `json:"ipacertprofilecategory,omitempty"` + + /* +User category +User category the ACL applies to + */ + Usercategory *string `json:"usercategory,omitempty"` + + /* +Host category +Host category the ACL applies to + */ + Hostcategory *string `json:"hostcategory,omitempty"` + + /* +Service category +Service category the ACL applies to + */ + Servicecategory *string `json:"servicecategory,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } - /* - Description +type caaclAddKwParams struct { + *CaaclAddArgs + *CaaclAddOptionalArgs - */ - Description *string `json:"description,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - Enabled - - */ - Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` - - /* - CA category - CA category the ACL applies to - */ - Ipacacategory *string `json:"ipacacategory,omitempty"` - - /* - Profile category - Profile category the ACL applies to - */ - Ipacertprofilecategory *string `json:"ipacertprofilecategory,omitempty"` - - /* - User category - User category the ACL applies to - */ - Usercategory *string `json:"usercategory,omitempty"` - - /* - Host category - Host category the ACL applies to - */ - Hostcategory *string `json:"hostcategory,omitempty"` - - /* - Service category - Service category the ACL applies to - */ - Servicecategory *string `json:"servicecategory,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} - -type caaclAddKwParams struct { - *CaaclAddArgs - *CaaclAddOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type caaclAddResponse struct { - Error *Error `json:"error"` - Result *CaaclAddResult `json:"result"` -} +type caaclAddResponse struct { + Error *Error `json:"error"` + Result *CaaclAddResult `json:"result"` +} type CaaclAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Caacl `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Caacl `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *CaaclAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CaaclAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CaaclAddResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CaaclAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CaaclAddResult%v", string(b)) } /* Add CAs to a CA ACL. */ func (c *Client) CaaclAddCa( - reqArgs *CaaclAddCaArgs, - optArgs *CaaclAddCaOptionalArgs, // can be nil + reqArgs *CaaclAddCaArgs, + optArgs *CaaclAddCaOptionalArgs, // can be nil ) (*CaaclAddCaResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := caaclAddCaKwParams{ - CaaclAddCaArgs: reqArgs, - CaaclAddCaOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "caacl_add_ca", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res caaclAddCaResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := caaclAddCaKwParams{ + CaaclAddCaArgs: reqArgs, + CaaclAddCaOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "caacl_add_ca", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res caaclAddCaResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CaaclAddCaArgs struct { + + /* +ACL name - /* - ACL name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type CaaclAddCaOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member Certificate Authority - Certificate Authorities to add - */ - Ca *[]string `json:"ca,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member Certificate Authority +Certificate Authorities to add + */ + Ca *[]string `json:"ca,omitempty"` + } type caaclAddCaKwParams struct { - *CaaclAddCaArgs - *CaaclAddCaOptionalArgs + *CaaclAddCaArgs + *CaaclAddCaOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type caaclAddCaResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CaaclAddCaResult `json:"result"` } type CaaclAddCaResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *CaaclAddCaResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CaaclAddCaResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CaaclAddCaResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CaaclAddCaResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CaaclAddCaResult%v", string(b)) } /* Add target hosts and hostgroups to a CA ACL. */ func (c *Client) CaaclAddHost( - reqArgs *CaaclAddHostArgs, - optArgs *CaaclAddHostOptionalArgs, // can be nil + reqArgs *CaaclAddHostArgs, + optArgs *CaaclAddHostOptionalArgs, // can be nil ) (*CaaclAddHostResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := caaclAddHostKwParams{ - CaaclAddHostArgs: reqArgs, - CaaclAddHostOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "caacl_add_host", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res caaclAddHostResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := caaclAddHostKwParams{ + CaaclAddHostArgs: reqArgs, + CaaclAddHostOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "caacl_add_host", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res caaclAddHostResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CaaclAddHostArgs struct { + + /* +ACL name - /* - ACL name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type CaaclAddHostOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member host - hosts to add - */ - Host *[]string `json:"host,omitempty"` - - /* - member host group - host groups to add - */ - Hostgroup *[]string `json:"hostgroup,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member host +hosts to add + */ + Host *[]string `json:"host,omitempty"` + + /* +member host group +host groups to add + */ + Hostgroup *[]string `json:"hostgroup,omitempty"` + } type caaclAddHostKwParams struct { - *CaaclAddHostArgs - *CaaclAddHostOptionalArgs + *CaaclAddHostArgs + *CaaclAddHostOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type caaclAddHostResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CaaclAddHostResult `json:"result"` } type CaaclAddHostResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *CaaclAddHostResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CaaclAddHostResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CaaclAddHostResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CaaclAddHostResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CaaclAddHostResult%v", string(b)) } /* Add profiles to a CA ACL. */ func (c *Client) CaaclAddProfile( - reqArgs *CaaclAddProfileArgs, - optArgs *CaaclAddProfileOptionalArgs, // can be nil + reqArgs *CaaclAddProfileArgs, + optArgs *CaaclAddProfileOptionalArgs, // can be nil ) (*CaaclAddProfileResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := caaclAddProfileKwParams{ - CaaclAddProfileArgs: reqArgs, - CaaclAddProfileOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "caacl_add_profile", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res caaclAddProfileResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := caaclAddProfileKwParams{ + CaaclAddProfileArgs: reqArgs, + CaaclAddProfileOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "caacl_add_profile", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res caaclAddProfileResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CaaclAddProfileArgs struct { + + /* +ACL name - /* - ACL name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type CaaclAddProfileOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member Certificate Profile - Certificate Profiles to add - */ - Certprofile *[]string `json:"certprofile,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member Certificate Profile +Certificate Profiles to add + */ + Certprofile *[]string `json:"certprofile,omitempty"` + } type caaclAddProfileKwParams struct { - *CaaclAddProfileArgs - *CaaclAddProfileOptionalArgs + *CaaclAddProfileArgs + *CaaclAddProfileOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type caaclAddProfileResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CaaclAddProfileResult `json:"result"` } type CaaclAddProfileResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *CaaclAddProfileResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CaaclAddProfileResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CaaclAddProfileResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CaaclAddProfileResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CaaclAddProfileResult%v", string(b)) } /* Add services to a CA ACL. */ func (c *Client) CaaclAddService( - reqArgs *CaaclAddServiceArgs, - optArgs *CaaclAddServiceOptionalArgs, // can be nil + reqArgs *CaaclAddServiceArgs, + optArgs *CaaclAddServiceOptionalArgs, // can be nil ) (*CaaclAddServiceResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := caaclAddServiceKwParams{ - CaaclAddServiceArgs: reqArgs, - CaaclAddServiceOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "caacl_add_service", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res caaclAddServiceResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := caaclAddServiceKwParams{ + CaaclAddServiceArgs: reqArgs, + CaaclAddServiceOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "caacl_add_service", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res caaclAddServiceResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CaaclAddServiceArgs struct { + + /* +ACL name - /* - ACL name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type CaaclAddServiceOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member service - services to add - */ - Service *[]string `json:"service,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member service +services to add + */ + Service *[]string `json:"service,omitempty"` + } type caaclAddServiceKwParams struct { - *CaaclAddServiceArgs - *CaaclAddServiceOptionalArgs + *CaaclAddServiceArgs + *CaaclAddServiceOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type caaclAddServiceResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CaaclAddServiceResult `json:"result"` } type CaaclAddServiceResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *CaaclAddServiceResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CaaclAddServiceResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CaaclAddServiceResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CaaclAddServiceResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CaaclAddServiceResult%v", string(b)) } /* Add users and groups to a CA ACL. */ func (c *Client) CaaclAddUser( - reqArgs *CaaclAddUserArgs, - optArgs *CaaclAddUserOptionalArgs, // can be nil + reqArgs *CaaclAddUserArgs, + optArgs *CaaclAddUserOptionalArgs, // can be nil ) (*CaaclAddUserResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := caaclAddUserKwParams{ - CaaclAddUserArgs: reqArgs, - CaaclAddUserOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "caacl_add_user", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res caaclAddUserResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := caaclAddUserKwParams{ + CaaclAddUserArgs: reqArgs, + CaaclAddUserOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "caacl_add_user", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res caaclAddUserResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CaaclAddUserArgs struct { + + /* +ACL name - /* - ACL name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type CaaclAddUserOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member user - users to add - */ - User *[]string `json:"user,omitempty"` - - /* - member group - groups to add - */ - Group *[]string `json:"group,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member user +users to add + */ + User *[]string `json:"user,omitempty"` + + /* +member group +groups to add + */ + Group *[]string `json:"group,omitempty"` + } type caaclAddUserKwParams struct { - *CaaclAddUserArgs - *CaaclAddUserOptionalArgs + *CaaclAddUserArgs + *CaaclAddUserOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type caaclAddUserResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CaaclAddUserResult `json:"result"` } type CaaclAddUserResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *CaaclAddUserResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CaaclAddUserResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CaaclAddUserResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CaaclAddUserResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CaaclAddUserResult%v", string(b)) } /* Delete a CA ACL. */ func (c *Client) CaaclDel( - reqArgs *CaaclDelArgs, - optArgs *CaaclDelOptionalArgs, // can be nil + reqArgs *CaaclDelArgs, + optArgs *CaaclDelOptionalArgs, // can be nil ) (*CaaclDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := caaclDelKwParams{ - CaaclDelArgs: reqArgs, - CaaclDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "caacl_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res caaclDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := caaclDelKwParams{ + CaaclDelArgs: reqArgs, + CaaclDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "caacl_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res caaclDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CaaclDelArgs struct { + + /* +ACL name - /* - ACL name - - */ - Cn []string `json:"cn,omitempty"` -} + */ + Cn []string `json:"cn,omitempty"` + } type CaaclDelOptionalArgs struct { + + /* - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` -} +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } type caaclDelKwParams struct { - *CaaclDelArgs - *CaaclDelOptionalArgs + *CaaclDelArgs + *CaaclDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type caaclDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CaaclDelResult `json:"result"` } type CaaclDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } func (t *CaaclDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CaaclDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CaaclDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CaaclDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CaaclDelResult%v", string(b)) } /* Disable a CA ACL. */ func (c *Client) CaaclDisable( - reqArgs *CaaclDisableArgs, - optArgs *CaaclDisableOptionalArgs, // can be nil + reqArgs *CaaclDisableArgs, + optArgs *CaaclDisableOptionalArgs, // can be nil ) (*CaaclDisableResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := caaclDisableKwParams{ - CaaclDisableArgs: reqArgs, - CaaclDisableOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "caacl_disable", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res caaclDisableResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := caaclDisableKwParams{ + CaaclDisableArgs: reqArgs, + CaaclDisableOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "caacl_disable", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res caaclDisableResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CaaclDisableArgs struct { + + /* +ACL name - /* - ACL name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type CaaclDisableOptionalArgs struct { -} + } type caaclDisableKwParams struct { - *CaaclDisableArgs - *CaaclDisableOptionalArgs + *CaaclDisableArgs + *CaaclDisableOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type caaclDisableResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CaaclDisableResult `json:"result"` } type CaaclDisableResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - True means the operation was successful - (required) - */ - Result bool `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *CaaclDisableResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CaaclDisableResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CaaclDisableResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CaaclDisableResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CaaclDisableResult%v", string(b)) } /* Enable a CA ACL. */ func (c *Client) CaaclEnable( - reqArgs *CaaclEnableArgs, - optArgs *CaaclEnableOptionalArgs, // can be nil + reqArgs *CaaclEnableArgs, + optArgs *CaaclEnableOptionalArgs, // can be nil ) (*CaaclEnableResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := caaclEnableKwParams{ - CaaclEnableArgs: reqArgs, - CaaclEnableOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "caacl_enable", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res caaclEnableResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := caaclEnableKwParams{ + CaaclEnableArgs: reqArgs, + CaaclEnableOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "caacl_enable", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res caaclEnableResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CaaclEnableArgs struct { + + /* +ACL name - /* - ACL name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type CaaclEnableOptionalArgs struct { -} + } type caaclEnableKwParams struct { - *CaaclEnableArgs - *CaaclEnableOptionalArgs + *CaaclEnableArgs + *CaaclEnableOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type caaclEnableResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CaaclEnableResult `json:"result"` } type CaaclEnableResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - True means the operation was successful - (required) - */ - Result bool `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *CaaclEnableResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CaaclEnableResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CaaclEnableResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CaaclEnableResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CaaclEnableResult%v", string(b)) } /* Search for CA ACLs. */ func (c *Client) CaaclFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *CaaclFindArgs, - optArgs *CaaclFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *CaaclFindArgs, + optArgs *CaaclFindOptionalArgs, // can be nil ) (*CaaclFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := caaclFindKwParams{ - CaaclFindArgs: reqArgs, - CaaclFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "caacl_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res caaclFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := caaclFindKwParams{ + CaaclFindArgs: reqArgs, + CaaclFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "caacl_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res caaclFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CaaclFindArgs struct { -} + } type CaaclFindOptionalArgs struct { - - /* - ACL name - - */ - Cn *string `json:"cn,omitempty"` - - /* - Description - - */ - Description *string `json:"description,omitempty"` - - /* - Enabled - - */ - Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` - - /* - CA category - CA category the ACL applies to - */ - Ipacacategory *string `json:"ipacacategory,omitempty"` - - /* - Profile category - Profile category the ACL applies to - */ - Ipacertprofilecategory *string `json:"ipacertprofilecategory,omitempty"` - - /* - User category - User category the ACL applies to - */ - Usercategory *string `json:"usercategory,omitempty"` - - /* - Host category - Host category the ACL applies to - */ - Hostcategory *string `json:"hostcategory,omitempty"` - - /* - Service category - Service category the ACL applies to - */ - Servicecategory *string `json:"servicecategory,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("name") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} + + /* +ACL name + + */ + Cn *string `json:"cn,omitempty"` + + /* +Description + + */ + Description *string `json:"description,omitempty"` + + /* +Enabled + + */ + Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` + + /* +CA category +CA category the ACL applies to + */ + Ipacacategory *string `json:"ipacacategory,omitempty"` + + /* +Profile category +Profile category the ACL applies to + */ + Ipacertprofilecategory *string `json:"ipacertprofilecategory,omitempty"` + + /* +User category +User category the ACL applies to + */ + Usercategory *string `json:"usercategory,omitempty"` + + /* +Host category +Host category the ACL applies to + */ + Hostcategory *string `json:"hostcategory,omitempty"` + + /* +Service category +Service category the ACL applies to + */ + Servicecategory *string `json:"servicecategory,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("name") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } type caaclFindKwParams struct { - *CaaclFindArgs - *CaaclFindOptionalArgs + *CaaclFindArgs + *CaaclFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type caaclFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CaaclFindResult `json:"result"` } type CaaclFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Caacl `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Caacl `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *CaaclFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CaaclFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CaaclFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CaaclFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CaaclFindResult%v", string(b)) } /* Modify a CA ACL. */ func (c *Client) CaaclMod( - reqArgs *CaaclModArgs, - optArgs *CaaclModOptionalArgs, // can be nil + reqArgs *CaaclModArgs, + optArgs *CaaclModOptionalArgs, // can be nil ) (*CaaclModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := caaclModKwParams{ - CaaclModArgs: reqArgs, - CaaclModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "caacl_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res caaclModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := caaclModKwParams{ + CaaclModArgs: reqArgs, + CaaclModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "caacl_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res caaclModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CaaclModArgs struct { + + /* +ACL name - /* - ACL name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type CaaclModOptionalArgs struct { + + /* +Description + + */ + Description *string `json:"description,omitempty"` + + /* +Enabled + + */ + Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` + + /* +CA category +CA category the ACL applies to + */ + Ipacacategory *string `json:"ipacacategory,omitempty"` + + /* +Profile category +Profile category the ACL applies to + */ + Ipacertprofilecategory *string `json:"ipacertprofilecategory,omitempty"` + + /* +User category +User category the ACL applies to + */ + Usercategory *string `json:"usercategory,omitempty"` + + /* +Host category +Host category the ACL applies to + */ + Hostcategory *string `json:"hostcategory,omitempty"` + + /* +Service category +Service category the ACL applies to + */ + Servicecategory *string `json:"servicecategory,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } - /* - Description +type caaclModKwParams struct { + *CaaclModArgs + *CaaclModOptionalArgs - */ - Description *string `json:"description,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - Enabled +type caaclModResponse struct { + Error *Error `json:"error"` + Result *CaaclModResult `json:"result"` +} - */ - Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` - - /* - CA category - CA category the ACL applies to - */ - Ipacacategory *string `json:"ipacacategory,omitempty"` - - /* - Profile category - Profile category the ACL applies to - */ - Ipacertprofilecategory *string `json:"ipacertprofilecategory,omitempty"` - - /* - User category - User category the ACL applies to - */ - Usercategory *string `json:"usercategory,omitempty"` - - /* - Host category - Host category the ACL applies to - */ - Hostcategory *string `json:"hostcategory,omitempty"` - - /* - Service category - Service category the ACL applies to - */ - Servicecategory *string `json:"servicecategory,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} - -type caaclModKwParams struct { - *CaaclModArgs - *CaaclModOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type caaclModResponse struct { - Error *Error `json:"error"` - Result *CaaclModResult `json:"result"` -} - -type CaaclModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Caacl `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} +type CaaclModResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Caacl `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *CaaclModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CaaclModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CaaclModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CaaclModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CaaclModResult%v", string(b)) } /* Remove CAs from a CA ACL. */ func (c *Client) CaaclRemoveCa( - reqArgs *CaaclRemoveCaArgs, - optArgs *CaaclRemoveCaOptionalArgs, // can be nil + reqArgs *CaaclRemoveCaArgs, + optArgs *CaaclRemoveCaOptionalArgs, // can be nil ) (*CaaclRemoveCaResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := caaclRemoveCaKwParams{ - CaaclRemoveCaArgs: reqArgs, - CaaclRemoveCaOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "caacl_remove_ca", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res caaclRemoveCaResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := caaclRemoveCaKwParams{ + CaaclRemoveCaArgs: reqArgs, + CaaclRemoveCaOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "caacl_remove_ca", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res caaclRemoveCaResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CaaclRemoveCaArgs struct { + + /* +ACL name - /* - ACL name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type CaaclRemoveCaOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member Certificate Authority - Certificate Authorities to remove - */ - Ca *[]string `json:"ca,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member Certificate Authority +Certificate Authorities to remove + */ + Ca *[]string `json:"ca,omitempty"` + } type caaclRemoveCaKwParams struct { - *CaaclRemoveCaArgs - *CaaclRemoveCaOptionalArgs + *CaaclRemoveCaArgs + *CaaclRemoveCaOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type caaclRemoveCaResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CaaclRemoveCaResult `json:"result"` } type CaaclRemoveCaResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *CaaclRemoveCaResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CaaclRemoveCaResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CaaclRemoveCaResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CaaclRemoveCaResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CaaclRemoveCaResult%v", string(b)) } /* Remove target hosts and hostgroups from a CA ACL. */ func (c *Client) CaaclRemoveHost( - reqArgs *CaaclRemoveHostArgs, - optArgs *CaaclRemoveHostOptionalArgs, // can be nil + reqArgs *CaaclRemoveHostArgs, + optArgs *CaaclRemoveHostOptionalArgs, // can be nil ) (*CaaclRemoveHostResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := caaclRemoveHostKwParams{ - CaaclRemoveHostArgs: reqArgs, - CaaclRemoveHostOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "caacl_remove_host", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res caaclRemoveHostResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := caaclRemoveHostKwParams{ + CaaclRemoveHostArgs: reqArgs, + CaaclRemoveHostOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "caacl_remove_host", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res caaclRemoveHostResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CaaclRemoveHostArgs struct { + + /* +ACL name - /* - ACL name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type CaaclRemoveHostOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member host - hosts to remove - */ - Host *[]string `json:"host,omitempty"` - - /* - member host group - host groups to remove - */ - Hostgroup *[]string `json:"hostgroup,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member host +hosts to remove + */ + Host *[]string `json:"host,omitempty"` + + /* +member host group +host groups to remove + */ + Hostgroup *[]string `json:"hostgroup,omitempty"` + } type caaclRemoveHostKwParams struct { - *CaaclRemoveHostArgs - *CaaclRemoveHostOptionalArgs + *CaaclRemoveHostArgs + *CaaclRemoveHostOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type caaclRemoveHostResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CaaclRemoveHostResult `json:"result"` } type CaaclRemoveHostResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *CaaclRemoveHostResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CaaclRemoveHostResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CaaclRemoveHostResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CaaclRemoveHostResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CaaclRemoveHostResult%v", string(b)) } /* Remove profiles from a CA ACL. */ func (c *Client) CaaclRemoveProfile( - reqArgs *CaaclRemoveProfileArgs, - optArgs *CaaclRemoveProfileOptionalArgs, // can be nil + reqArgs *CaaclRemoveProfileArgs, + optArgs *CaaclRemoveProfileOptionalArgs, // can be nil ) (*CaaclRemoveProfileResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := caaclRemoveProfileKwParams{ - CaaclRemoveProfileArgs: reqArgs, - CaaclRemoveProfileOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "caacl_remove_profile", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res caaclRemoveProfileResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := caaclRemoveProfileKwParams{ + CaaclRemoveProfileArgs: reqArgs, + CaaclRemoveProfileOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "caacl_remove_profile", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res caaclRemoveProfileResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CaaclRemoveProfileArgs struct { + + /* +ACL name - /* - ACL name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type CaaclRemoveProfileOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member Certificate Profile - Certificate Profiles to remove - */ - Certprofile *[]string `json:"certprofile,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member Certificate Profile +Certificate Profiles to remove + */ + Certprofile *[]string `json:"certprofile,omitempty"` + } type caaclRemoveProfileKwParams struct { - *CaaclRemoveProfileArgs - *CaaclRemoveProfileOptionalArgs + *CaaclRemoveProfileArgs + *CaaclRemoveProfileOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type caaclRemoveProfileResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CaaclRemoveProfileResult `json:"result"` } type CaaclRemoveProfileResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *CaaclRemoveProfileResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CaaclRemoveProfileResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CaaclRemoveProfileResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CaaclRemoveProfileResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CaaclRemoveProfileResult%v", string(b)) } /* Remove services from a CA ACL. */ func (c *Client) CaaclRemoveService( - reqArgs *CaaclRemoveServiceArgs, - optArgs *CaaclRemoveServiceOptionalArgs, // can be nil + reqArgs *CaaclRemoveServiceArgs, + optArgs *CaaclRemoveServiceOptionalArgs, // can be nil ) (*CaaclRemoveServiceResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := caaclRemoveServiceKwParams{ - CaaclRemoveServiceArgs: reqArgs, - CaaclRemoveServiceOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "caacl_remove_service", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res caaclRemoveServiceResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := caaclRemoveServiceKwParams{ + CaaclRemoveServiceArgs: reqArgs, + CaaclRemoveServiceOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "caacl_remove_service", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res caaclRemoveServiceResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CaaclRemoveServiceArgs struct { + + /* +ACL name - /* - ACL name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type CaaclRemoveServiceOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member service - services to remove - */ - Service *[]string `json:"service,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member service +services to remove + */ + Service *[]string `json:"service,omitempty"` + } type caaclRemoveServiceKwParams struct { - *CaaclRemoveServiceArgs - *CaaclRemoveServiceOptionalArgs + *CaaclRemoveServiceArgs + *CaaclRemoveServiceOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type caaclRemoveServiceResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CaaclRemoveServiceResult `json:"result"` } type CaaclRemoveServiceResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *CaaclRemoveServiceResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CaaclRemoveServiceResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CaaclRemoveServiceResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CaaclRemoveServiceResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CaaclRemoveServiceResult%v", string(b)) } /* Remove users and groups from a CA ACL. */ func (c *Client) CaaclRemoveUser( - reqArgs *CaaclRemoveUserArgs, - optArgs *CaaclRemoveUserOptionalArgs, // can be nil + reqArgs *CaaclRemoveUserArgs, + optArgs *CaaclRemoveUserOptionalArgs, // can be nil ) (*CaaclRemoveUserResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := caaclRemoveUserKwParams{ - CaaclRemoveUserArgs: reqArgs, - CaaclRemoveUserOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "caacl_remove_user", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res caaclRemoveUserResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := caaclRemoveUserKwParams{ + CaaclRemoveUserArgs: reqArgs, + CaaclRemoveUserOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "caacl_remove_user", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res caaclRemoveUserResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CaaclRemoveUserArgs struct { + + /* +ACL name - /* - ACL name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type CaaclRemoveUserOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member user - users to remove - */ - User *[]string `json:"user,omitempty"` - - /* - member group - groups to remove - */ - Group *[]string `json:"group,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member user +users to remove + */ + User *[]string `json:"user,omitempty"` + + /* +member group +groups to remove + */ + Group *[]string `json:"group,omitempty"` + } type caaclRemoveUserKwParams struct { - *CaaclRemoveUserArgs - *CaaclRemoveUserOptionalArgs + *CaaclRemoveUserArgs + *CaaclRemoveUserOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type caaclRemoveUserResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CaaclRemoveUserResult `json:"result"` } type CaaclRemoveUserResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *CaaclRemoveUserResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CaaclRemoveUserResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CaaclRemoveUserResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CaaclRemoveUserResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CaaclRemoveUserResult%v", string(b)) } /* Display the properties of a CA ACL. */ func (c *Client) CaaclShow( - reqArgs *CaaclShowArgs, - optArgs *CaaclShowOptionalArgs, // can be nil + reqArgs *CaaclShowArgs, + optArgs *CaaclShowOptionalArgs, // can be nil ) (*CaaclShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := caaclShowKwParams{ - CaaclShowArgs: reqArgs, - CaaclShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "caacl_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res caaclShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := caaclShowKwParams{ + CaaclShowArgs: reqArgs, + CaaclShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "caacl_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res caaclShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CaaclShowArgs struct { + + /* +ACL name - /* - ACL name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type CaaclShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type caaclShowKwParams struct { - *CaaclShowArgs - *CaaclShowOptionalArgs + *CaaclShowArgs + *CaaclShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type caaclShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CaaclShowResult `json:"result"` } type CaaclShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Caacl `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Caacl `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *CaaclShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CaaclShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CaaclShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CaaclShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CaaclShowResult%v", string(b)) } /* Search for existing certificates. */ func (c *Client) CertFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *CertFindArgs, - optArgs *CertFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *CertFindArgs, + optArgs *CertFindOptionalArgs, // can be nil ) (*CertFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := certFindKwParams{ - CertFindArgs: reqArgs, - CertFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "cert_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res certFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := certFindKwParams{ + CertFindArgs: reqArgs, + CertFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "cert_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res certFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CertFindArgs struct { -} + } type CertFindOptionalArgs struct { - - /* - Certificate - Base-64 encoded certificate. - */ - Certificate *string `json:"certificate,omitempty"` - - /* - Issuer - Issuer DN - */ - Issuer *string `json:"issuer,omitempty"` - - /* - Revocation reason - Reason for revoking the certificate (0-10). Type "ipa help cert" for revocation reason details. - */ - RevocationReason *int `json:"revocation_reason,omitempty"` - - /* - Issuing CA - Name of issuing CA - */ - Cacn *string `json:"cacn,omitempty"` - - /* - Subject - Subject - */ - Subject *string `json:"subject,omitempty"` - - /* - - minimum serial number - */ - MinSerialNumber *int `json:"min_serial_number,omitempty"` - - /* - - maximum serial number - */ - MaxSerialNumber *int `json:"max_serial_number,omitempty"` - - /* - - match the common name exactly - */ - Exactly *bool `json:"exactly,omitempty"` - - /* - - Valid not after from this date (YYYY-mm-dd) - */ - ValidnotafterFrom *time.Time `json:"validnotafter_from,omitempty"` - - /* - - Valid not after to this date (YYYY-mm-dd) - */ - ValidnotafterTo *time.Time `json:"validnotafter_to,omitempty"` - - /* - - Valid not before from this date (YYYY-mm-dd) - */ - ValidnotbeforeFrom *time.Time `json:"validnotbefore_from,omitempty"` - - /* - - Valid not before to this date (YYYY-mm-dd) - */ - ValidnotbeforeTo *time.Time `json:"validnotbefore_to,omitempty"` - - /* - - Issued on from this date (YYYY-mm-dd) - */ - IssuedonFrom *time.Time `json:"issuedon_from,omitempty"` - - /* - - Issued on to this date (YYYY-mm-dd) - */ - IssuedonTo *time.Time `json:"issuedon_to,omitempty"` - - /* - - Revoked on from this date (YYYY-mm-dd) - */ - RevokedonFrom *time.Time `json:"revokedon_from,omitempty"` - - /* - - Revoked on to this date (YYYY-mm-dd) - */ - RevokedonTo *time.Time `json:"revokedon_to,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("certificate") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - user - Search for certificates with these owner users. - */ - User *[]string `json:"user,omitempty"` - - /* - user - Search for certificates without these owner users. - */ - NoUser *[]string `json:"no_user,omitempty"` - - /* - host - Search for certificates with these owner hosts. - */ - Host *[]string `json:"host,omitempty"` - - /* - host - Search for certificates without these owner hosts. - */ - NoHost *[]string `json:"no_host,omitempty"` - - /* - service - Search for certificates with these owner services. - */ - Service *[]string `json:"service,omitempty"` - - /* - service - Search for certificates without these owner services. - */ - NoService *[]string `json:"no_service,omitempty"` -} + + /* +Certificate +Base-64 encoded certificate. + */ + Certificate *interface{} `json:"certificate,omitempty"` + + /* +Issuer +Issuer DN + */ + Issuer *string `json:"issuer,omitempty"` + + /* +Revocation reason +Reason for revoking the certificate (0-10). Type "ipa help cert" for revocation reason details. + */ + RevocationReason *int `json:"revocation_reason,omitempty"` + + /* +Issuing CA +Name of issuing CA + */ + Cacn *string `json:"cacn,omitempty"` + + /* +Subject +Subject + */ + Subject *string `json:"subject,omitempty"` + + /* + +minimum serial number + */ + MinSerialNumber *int `json:"min_serial_number,omitempty"` + + /* + +maximum serial number + */ + MaxSerialNumber *int `json:"max_serial_number,omitempty"` + + /* + +match the common name exactly + */ + Exactly *bool `json:"exactly,omitempty"` + + /* + +Valid not after from this date (YYYY-mm-dd) + */ + ValidnotafterFrom *time.Time `json:"validnotafter_from,omitempty"` + + /* + +Valid not after to this date (YYYY-mm-dd) + */ + ValidnotafterTo *time.Time `json:"validnotafter_to,omitempty"` + + /* + +Valid not before from this date (YYYY-mm-dd) + */ + ValidnotbeforeFrom *time.Time `json:"validnotbefore_from,omitempty"` + + /* + +Valid not before to this date (YYYY-mm-dd) + */ + ValidnotbeforeTo *time.Time `json:"validnotbefore_to,omitempty"` + + /* + +Issued on from this date (YYYY-mm-dd) + */ + IssuedonFrom *time.Time `json:"issuedon_from,omitempty"` + + /* + +Issued on to this date (YYYY-mm-dd) + */ + IssuedonTo *time.Time `json:"issuedon_to,omitempty"` + + /* + +Revoked on from this date (YYYY-mm-dd) + */ + RevokedonFrom *time.Time `json:"revokedon_from,omitempty"` + + /* + +Revoked on to this date (YYYY-mm-dd) + */ + RevokedonTo *time.Time `json:"revokedon_to,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("certificate") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +user +Search for certificates with these owner users. + */ + User *[]string `json:"user,omitempty"` + + /* +user +Search for certificates without these owner users. + */ + NoUser *[]string `json:"no_user,omitempty"` + + /* +host +Search for certificates with these owner hosts. + */ + Host *[]string `json:"host,omitempty"` + + /* +host +Search for certificates without these owner hosts. + */ + NoHost *[]string `json:"no_host,omitempty"` + + /* +service +Search for certificates with these owner services. + */ + Service *[]string `json:"service,omitempty"` + + /* +service +Search for certificates without these owner services. + */ + NoService *[]string `json:"no_service,omitempty"` + } type certFindKwParams struct { - *CertFindArgs - *CertFindOptionalArgs + *CertFindArgs + *CertFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type certFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CertFindResult `json:"result"` } type CertFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Cert `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Cert `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *CertFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CertFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CertFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CertFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CertFindResult%v", string(b)) } /* Take a revoked certificate off hold. */ func (c *Client) CertRemoveHold( - reqArgs *CertRemoveHoldArgs, - optArgs *CertRemoveHoldOptionalArgs, // can be nil + reqArgs *CertRemoveHoldArgs, + optArgs *CertRemoveHoldOptionalArgs, // can be nil ) (*CertRemoveHoldResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := certRemoveHoldKwParams{ - CertRemoveHoldArgs: reqArgs, - CertRemoveHoldOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "cert_remove_hold", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res certRemoveHoldResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := certRemoveHoldKwParams{ + CertRemoveHoldArgs: reqArgs, + CertRemoveHoldOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "cert_remove_hold", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res certRemoveHoldResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CertRemoveHoldArgs struct { - - /* - Serial number - Serial number in decimal or if prefixed with 0x in hexadecimal - */ - SerialNumber int `json:"serial_number,omitempty"` -} + + /* +Serial number +Serial number in decimal or if prefixed with 0x in hexadecimal + */ + SerialNumber int `json:"serial_number,omitempty"` + } type CertRemoveHoldOptionalArgs struct { - - /* - Issuing CA - Name of issuing CA - */ - Cacn *string `json:"cacn,omitempty"` -} + + /* +Issuing CA +Name of issuing CA + */ + Cacn *string `json:"cacn,omitempty"` + } type certRemoveHoldKwParams struct { - *CertRemoveHoldArgs - *CertRemoveHoldOptionalArgs + *CertRemoveHoldArgs + *CertRemoveHoldOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type certRemoveHoldResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CertRemoveHoldResult `json:"result"` } type CertRemoveHoldResult struct { + + + /* - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` -} + (required) + */ + Result interface{} `json:"result,omitempty"` + } func (t *CertRemoveHoldResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CertRemoveHoldResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CertRemoveHoldResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CertRemoveHoldResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CertRemoveHoldResult%v", string(b)) } /* Submit a certificate signing request. */ func (c *Client) CertRequest( - reqArgs *CertRequestArgs, - optArgs *CertRequestOptionalArgs, // can be nil + reqArgs *CertRequestArgs, + optArgs *CertRequestOptionalArgs, // can be nil ) (*CertRequestResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := certRequestKwParams{ - CertRequestArgs: reqArgs, - CertRequestOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "cert_request", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res certRequestResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := certRequestKwParams{ + CertRequestArgs: reqArgs, + CertRequestOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "cert_request", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res certRequestResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CertRequestArgs struct { - - /* - CSR - - */ - Csr string `json:"csr,omitempty"` - - /* - Principal - Principal for this certificate (e.g. HTTP/test.example.com) - */ - Principal string `json:"principal,omitempty"` -} + + /* +CSR + + */ + Csr string `json:"csr,omitempty"` + + /* +Principal +Principal for this certificate (e.g. HTTP/test.example.com) + */ + Principal string `json:"principal,omitempty"` + } type CertRequestOptionalArgs struct { - - /* - - - */ - RequestType *string `json:"request_type,omitempty"` - - /* - Profile ID - Certificate Profile to use - */ - ProfileID *string `json:"profile_id,omitempty"` - - /* - Issuing CA - Name of issuing CA - */ - Cacn *string `json:"cacn,omitempty"` - - /* - - automatically add the principal if it doesn't exist (service principals only) - */ - Add *bool `json:"add,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* + + + */ + RequestType *string `json:"request_type,omitempty"` + + /* +Profile ID +Certificate Profile to use + */ + ProfileID *string `json:"profile_id,omitempty"` + + /* +Issuing CA +Name of issuing CA + */ + Cacn *string `json:"cacn,omitempty"` + + /* + +automatically add the principal if it doesn't exist (service principals only) + */ + Add *bool `json:"add,omitempty"` + + /* + +Include certificate chain in output + */ + Chain *bool `json:"chain,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type certRequestKwParams struct { - *CertRequestArgs - *CertRequestOptionalArgs + *CertRequestArgs + *CertRequestOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type certRequestResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CertRequestResult `json:"result"` } type CertRequestResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value int `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value int `json:"value,omitempty"` + } func (t *CertRequestResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CertRequestResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CertRequestResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CertRequestResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CertRequestResult%v", string(b)) } /* Revoke a certificate. */ func (c *Client) CertRevoke( - reqArgs *CertRevokeArgs, - optArgs *CertRevokeOptionalArgs, // can be nil + reqArgs *CertRevokeArgs, + optArgs *CertRevokeOptionalArgs, // can be nil ) (*CertRevokeResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := certRevokeKwParams{ - CertRevokeArgs: reqArgs, - CertRevokeOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "cert_revoke", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res certRevokeResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := certRevokeKwParams{ + CertRevokeArgs: reqArgs, + CertRevokeOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "cert_revoke", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res certRevokeResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CertRevokeArgs struct { - - /* - Serial number - Serial number in decimal or if prefixed with 0x in hexadecimal - */ - SerialNumber int `json:"serial_number,omitempty"` -} + + /* +Serial number +Serial number in decimal or if prefixed with 0x in hexadecimal + */ + SerialNumber int `json:"serial_number,omitempty"` + } type CertRevokeOptionalArgs struct { - - /* - Revocation reason - Reason for revoking the certificate (0-10). Type "ipa help cert" for revocation reason details. - */ - RevocationReason *int `json:"revocation_reason,omitempty"` - - /* - Issuing CA - Name of issuing CA - */ - Cacn *string `json:"cacn,omitempty"` -} + + /* +Revocation reason +Reason for revoking the certificate (0-10). Type "ipa help cert" for revocation reason details. + */ + RevocationReason *int `json:"revocation_reason,omitempty"` + + /* +Issuing CA +Name of issuing CA + */ + Cacn *string `json:"cacn,omitempty"` + } type certRevokeKwParams struct { - *CertRevokeArgs - *CertRevokeOptionalArgs + *CertRevokeArgs + *CertRevokeOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type certRevokeResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CertRevokeResult `json:"result"` } type CertRevokeResult struct { + + + /* - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` -} + (required) + */ + Result interface{} `json:"result,omitempty"` + } func (t *CertRevokeResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CertRevokeResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CertRevokeResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CertRevokeResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CertRevokeResult%v", string(b)) } /* Retrieve an existing certificate. */ func (c *Client) CertShow( - reqArgs *CertShowArgs, - optArgs *CertShowOptionalArgs, // can be nil + reqArgs *CertShowArgs, + optArgs *CertShowOptionalArgs, // can be nil ) (*CertShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := certShowKwParams{ - CertShowArgs: reqArgs, - CertShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "cert_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res certShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := certShowKwParams{ + CertShowArgs: reqArgs, + CertShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "cert_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res certShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CertShowArgs struct { - - /* - Serial number - Serial number in decimal or if prefixed with 0x in hexadecimal - */ - SerialNumber int `json:"serial_number,omitempty"` -} + + /* +Serial number +Serial number in decimal or if prefixed with 0x in hexadecimal + */ + SerialNumber int `json:"serial_number,omitempty"` + } type CertShowOptionalArgs struct { - - /* - Issuing CA - Name of issuing CA - */ - Cacn *string `json:"cacn,omitempty"` - - /* - Output filename - File to store the certificate in. - */ - Out *string `json:"out,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Issuing CA +Name of issuing CA + */ + Cacn *string `json:"cacn,omitempty"` + + /* +Output filename +File to store the certificate in. + */ + Out *string `json:"out,omitempty"` + + /* + +Include certificate chain in output + */ + Chain *bool `json:"chain,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type certShowKwParams struct { - *CertShowArgs - *CertShowOptionalArgs + *CertShowArgs + *CertShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type certShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CertShowResult `json:"result"` } type CertShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Cert `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value int `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Cert `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value int `json:"value,omitempty"` + } func (t *CertShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CertShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CertShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CertShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CertShowResult%v", string(b)) } /* Check the status of a certificate signing request. */ func (c *Client) CertStatus( - reqArgs *CertStatusArgs, - optArgs *CertStatusOptionalArgs, // can be nil + reqArgs *CertStatusArgs, + optArgs *CertStatusOptionalArgs, // can be nil ) (*CertStatusResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := certStatusKwParams{ - CertStatusArgs: reqArgs, - CertStatusOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "cert_status", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res certStatusResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := certStatusKwParams{ + CertStatusArgs: reqArgs, + CertStatusOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "cert_status", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res certStatusResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CertStatusArgs struct { + + /* +Request id - /* - Request id - - */ - RequestID int `json:"request_id,omitempty"` -} + */ + RequestID int `json:"request_id,omitempty"` + } type CertStatusOptionalArgs struct { - - /* - Issuing CA - Name of issuing CA - */ - Cacn *string `json:"cacn,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Issuing CA +Name of issuing CA + */ + Cacn *string `json:"cacn,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type certStatusKwParams struct { - *CertStatusArgs - *CertStatusOptionalArgs + *CertStatusArgs + *CertStatusOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type certStatusResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CertStatusResult `json:"result"` } type CertStatusResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value int `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value int `json:"value,omitempty"` + } func (t *CertStatusResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CertStatusResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CertStatusResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CertStatusResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CertStatusResult%v", string(b)) } /* -Delete a Certificate Profile. +Search for users matching the provided certificate. + + This command relies on SSSD to retrieve the list of matching users and + may return cached data. For more information on purging SSSD cache, + please refer to sss_cache documentation. */ -func (c *Client) CertprofileDel( - reqArgs *CertprofileDelArgs, - optArgs *CertprofileDelOptionalArgs, // can be nil -) (*CertprofileDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := certprofileDelKwParams{ - CertprofileDelArgs: reqArgs, - CertprofileDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "certprofile_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res certprofileDelResponse +func (c *Client) CertmapMatch( + reqArgs *CertmapMatchArgs, + optArgs *CertmapMatchOptionalArgs, // can be nil +) (*CertmapMatchResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := certmapMatchKwParams{ + CertmapMatchArgs: reqArgs, + CertmapMatchOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "certmap_match", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res certmapMatchResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type CertprofileDelArgs struct { - - /* - Profile ID - Profile ID for referring to this profile - */ - Cn []string `json:"cn,omitempty"` + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type CertprofileDelOptionalArgs struct { +type CertmapMatchArgs struct { + + /* +Certificate +Base-64 encoded user certificate + */ + Certificate interface{} `json:"certificate,omitempty"` + } - /* +type CertmapMatchOptionalArgs struct { + + /* - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` -} +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* -type certprofileDelKwParams struct { - *CertprofileDelArgs - *CertprofileDelOptionalArgs +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} +type certmapMatchKwParams struct { + *CertmapMatchArgs + *CertmapMatchOptionalArgs -type certprofileDelResponse struct { - Error *Error `json:"error"` - Result *CertprofileDelResult `json:"result"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } -type CertprofileDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` +type certmapMatchResponse struct { + Error *Error `json:"error"` + Result *CertmapMatchResult `json:"result"` +} + +type CertmapMatchResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []interface{} `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } + +func (t *CertmapMatchResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CertmapMatchResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CertmapMatchResult%v", string(b)) } -func (t *CertprofileDelResult) String() string { - if t == nil { - return "" +/* +Modify Certificate Identity Mapping configuration. +*/ +func (c *Client) CertmapconfigMod( + reqArgs *CertmapconfigModArgs, + optArgs *CertmapconfigModOptionalArgs, // can be nil +) (*CertmapconfigModResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := certmapconfigModKwParams{ + CertmapconfigModArgs: reqArgs, + CertmapconfigModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "certmapconfig_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res certmapconfigModResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CertprofileDelResult[failed json.Marshal: %v]", e) + if res.Error != nil { + return nil, res.Error } - return fmt.Sprintf("CertprofileDelResult%v", string(b)) + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} + +type CertmapconfigModArgs struct { + } + +type CertmapconfigModOptionalArgs struct { + + /* +Prompt for the username +Prompt for the username when multiple identities are mapped to a certificate + */ + Ipacertmappromptusername *bool `json:"ipacertmappromptusername,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } + +type certmapconfigModKwParams struct { + *CertmapconfigModArgs + *CertmapconfigModOptionalArgs + + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} + +type certmapconfigModResponse struct { + Error *Error `json:"error"` + Result *CertmapconfigModResult `json:"result"` +} + +type CertmapconfigModResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Certmapconfig `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value interface{} `json:"value,omitempty"` + } + +func (t *CertmapconfigModResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CertmapconfigModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CertmapconfigModResult%v", string(b)) } /* -Search for Certificate Profiles. +Show the current Certificate Identity Mapping configuration. */ -func (c *Client) CertprofileFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *CertprofileFindArgs, - optArgs *CertprofileFindOptionalArgs, // can be nil -) (*CertprofileFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := certprofileFindKwParams{ - CertprofileFindArgs: reqArgs, - CertprofileFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "certprofile_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res certprofileFindResponse +func (c *Client) CertmapconfigShow( + reqArgs *CertmapconfigShowArgs, + optArgs *CertmapconfigShowOptionalArgs, // can be nil +) (*CertmapconfigShowResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := certmapconfigShowKwParams{ + CertmapconfigShowArgs: reqArgs, + CertmapconfigShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "certmapconfig_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res certmapconfigShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type CertprofileFindArgs struct { -} - -type CertprofileFindOptionalArgs struct { - - /* - Profile ID - Profile ID for referring to this profile - */ - Cn *string `json:"cn,omitempty"` - - /* - Profile description - Brief description of this profile - */ - Description *string `json:"description,omitempty"` - - /* - Store issued certificates - Whether to store certs issued using this profile - */ - Ipacertprofilestoreissued *bool `json:"ipacertprofilestoreissued,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` +type CertmapconfigShowArgs struct { + } - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` +type CertmapconfigShowOptionalArgs struct { + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* - /* +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } - /* +type certmapconfigShowKwParams struct { + *CertmapconfigShowArgs + *CertmapconfigShowOptionalArgs - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("id") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} - -type certprofileFindKwParams struct { - *CertprofileFindArgs - *CertprofileFindOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type certprofileFindResponse struct { - Error *Error `json:"error"` - Result *CertprofileFindResult `json:"result"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } -type CertprofileFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Certprofile `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` +type certmapconfigShowResponse struct { + Error *Error `json:"error"` + Result *CertmapconfigShowResult `json:"result"` +} + +type CertmapconfigShowResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Certmapconfig `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value interface{} `json:"value,omitempty"` + } + +func (t *CertmapconfigShowResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CertmapconfigShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CertmapconfigShowResult%v", string(b)) } -func (t *CertprofileFindResult) String() string { - if t == nil { - return "" +/* +Create a new Certificate Identity Mapping Rule. +*/ +func (c *Client) CertmapruleAdd( + reqArgs *CertmapruleAddArgs, + optArgs *CertmapruleAddOptionalArgs, // can be nil +) (*CertmapruleAddResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := certmapruleAddKwParams{ + CertmapruleAddArgs: reqArgs, + CertmapruleAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "certmaprule_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res certmapruleAddResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CertprofileFindResult[failed json.Marshal: %v]", e) + if res.Error != nil { + return nil, res.Error } - return fmt.Sprintf("CertprofileFindResult%v", string(b)) + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} + +type CertmapruleAddArgs struct { + + /* +Rule name +Certificate Identity Mapping Rule name + */ + Cn string `json:"cn,omitempty"` + } + +type CertmapruleAddOptionalArgs struct { + + /* +Description +Certificate Identity Mapping Rule description + */ + Description *string `json:"description,omitempty"` + + /* +Mapping rule +Rule used to map the certificate with a user entry + */ + Ipacertmapmaprule *string `json:"ipacertmapmaprule,omitempty"` + + /* +Matching rule +Rule used to check if a certificate can be used for authentication + */ + Ipacertmapmatchrule *string `json:"ipacertmapmatchrule,omitempty"` + + /* +Domain name +Domain where the user entry will be searched + */ + Associateddomain *[]string `json:"associateddomain,omitempty"` + + /* +Priority +Priority of the rule (higher number means lower priority + */ + Ipacertmappriority *int `json:"ipacertmappriority,omitempty"` + + /* +Enabled + + */ + Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } + +type certmapruleAddKwParams struct { + *CertmapruleAddArgs + *CertmapruleAddOptionalArgs + + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} + +type certmapruleAddResponse struct { + Error *Error `json:"error"` + Result *CertmapruleAddResult `json:"result"` +} + +type CertmapruleAddResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Certmaprule `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } + +func (t *CertmapruleAddResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CertmapruleAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CertmapruleAddResult%v", string(b)) } /* -Import a Certificate Profile. +Delete a Certificate Identity Mapping Rule. */ -func (c *Client) CertprofileImport( - reqArgs *CertprofileImportArgs, - optArgs *CertprofileImportOptionalArgs, // can be nil -) (*CertprofileImportResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := certprofileImportKwParams{ - CertprofileImportArgs: reqArgs, - CertprofileImportOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "certprofile_import", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res certprofileImportResponse +func (c *Client) CertmapruleDel( + reqArgs *CertmapruleDelArgs, + optArgs *CertmapruleDelOptionalArgs, // can be nil +) (*CertmapruleDelResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := certmapruleDelKwParams{ + CertmapruleDelArgs: reqArgs, + CertmapruleDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "certmaprule_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res certmapruleDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type CertprofileImportArgs struct { +type CertmapruleDelArgs struct { + + /* +Rule name +Certificate Identity Mapping Rule name + */ + Cn []string `json:"cn,omitempty"` + } - /* - Profile ID - Profile ID for referring to this profile - */ - Cn string `json:"cn,omitempty"` +type CertmapruleDelOptionalArgs struct { + + /* - /* - Profile description - Brief description of this profile - */ - Description string `json:"description,omitempty"` +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } - /* - Filename of a raw profile. The XML format is not supported. +type certmapruleDelKwParams struct { + *CertmapruleDelArgs + *CertmapruleDelOptionalArgs - */ - File string `json:"file,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } -type CertprofileImportOptionalArgs struct { +type certmapruleDelResponse struct { + Error *Error `json:"error"` + Result *CertmapruleDelResult `json:"result"` +} + +type CertmapruleDelResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } + +func (t *CertmapruleDelResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CertmapruleDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CertmapruleDelResult%v", string(b)) +} - /* - Store issued certificates - Whether to store certs issued using this profile - */ - Ipacertprofilestoreissued *bool `json:"ipacertprofilestoreissued,omitempty"` +/* +Disable a Certificate Identity Mapping Rule. +*/ +func (c *Client) CertmapruleDisable( + reqArgs *CertmapruleDisableArgs, + optArgs *CertmapruleDisableOptionalArgs, // can be nil +) (*CertmapruleDisableResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := certmapruleDisableKwParams{ + CertmapruleDisableArgs: reqArgs, + CertmapruleDisableOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "certmaprule_disable", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res certmapruleDisableResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - /* +type CertmapruleDisableArgs struct { + + /* +Rule name +Certificate Identity Mapping Rule name + */ + Cn string `json:"cn,omitempty"` + } - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` +type CertmapruleDisableOptionalArgs struct { + } - /* +type certmapruleDisableKwParams struct { + *CertmapruleDisableArgs + *CertmapruleDisableOptionalArgs - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } -type certprofileImportKwParams struct { - *CertprofileImportArgs - *CertprofileImportOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` +type certmapruleDisableResponse struct { + Error *Error `json:"error"` + Result *CertmapruleDisableResult `json:"result"` +} + +type CertmapruleDisableResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } + +func (t *CertmapruleDisableResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CertmapruleDisableResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CertmapruleDisableResult%v", string(b)) } -type certprofileImportResponse struct { - Error *Error `json:"error"` - Result *CertprofileImportResult `json:"result"` +/* +Enable a Certificate Identity Mapping Rule. +*/ +func (c *Client) CertmapruleEnable( + reqArgs *CertmapruleEnableArgs, + optArgs *CertmapruleEnableOptionalArgs, // can be nil +) (*CertmapruleEnableResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := certmapruleEnableKwParams{ + CertmapruleEnableArgs: reqArgs, + CertmapruleEnableOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "certmaprule_enable", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res certmapruleEnableResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type CertprofileImportResult struct { +type CertmapruleEnableArgs struct { + + /* +Rule name +Certificate Identity Mapping Rule name + */ + Cn string `json:"cn,omitempty"` + } - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` +type CertmapruleEnableOptionalArgs struct { + } - /* +type certmapruleEnableKwParams struct { + *CertmapruleEnableArgs + *CertmapruleEnableOptionalArgs - (required) - */ - Result interface{} `json:"result,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` +type certmapruleEnableResponse struct { + Error *Error `json:"error"` + Result *CertmapruleEnableResult `json:"result"` +} + +type CertmapruleEnableResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } + +func (t *CertmapruleEnableResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CertmapruleEnableResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CertmapruleEnableResult%v", string(b)) } -func (t *CertprofileImportResult) String() string { - if t == nil { - return "" +/* +Search for Certificate Identity Mapping Rules. +*/ +func (c *Client) CertmapruleFind( + criteria string, // A string searched in all relevant object attributes + reqArgs *CertmapruleFindArgs, + optArgs *CertmapruleFindOptionalArgs, // can be nil +) (*CertmapruleFindResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := certmapruleFindKwParams{ + CertmapruleFindArgs: reqArgs, + CertmapruleFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "certmaprule_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res certmapruleFindResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CertprofileImportResult[failed json.Marshal: %v]", e) + if res.Error != nil { + return nil, res.Error } - return fmt.Sprintf("CertprofileImportResult%v", string(b)) + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} + +type CertmapruleFindArgs struct { + } + +type CertmapruleFindOptionalArgs struct { + + /* +Rule name +Certificate Identity Mapping Rule name + */ + Cn *string `json:"cn,omitempty"` + + /* +Description +Certificate Identity Mapping Rule description + */ + Description *string `json:"description,omitempty"` + + /* +Mapping rule +Rule used to map the certificate with a user entry + */ + Ipacertmapmaprule *string `json:"ipacertmapmaprule,omitempty"` + + /* +Matching rule +Rule used to check if a certificate can be used for authentication + */ + Ipacertmapmatchrule *string `json:"ipacertmapmatchrule,omitempty"` + + /* +Domain name +Domain where the user entry will be searched + */ + Associateddomain *[]string `json:"associateddomain,omitempty"` + + /* +Priority +Priority of the rule (higher number means lower priority + */ + Ipacertmappriority *int `json:"ipacertmappriority,omitempty"` + + /* +Enabled + + */ + Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("rulename") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } + +type certmapruleFindKwParams struct { + *CertmapruleFindArgs + *CertmapruleFindOptionalArgs + + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} + +type certmapruleFindResponse struct { + Error *Error `json:"error"` + Result *CertmapruleFindResult `json:"result"` +} + +type CertmapruleFindResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Certmaprule `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } + +func (t *CertmapruleFindResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CertmapruleFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CertmapruleFindResult%v", string(b)) } /* -Modify Certificate Profile configuration. +Modify a Certificate Identity Mapping Rule. */ -func (c *Client) CertprofileMod( - reqArgs *CertprofileModArgs, - optArgs *CertprofileModOptionalArgs, // can be nil -) (*CertprofileModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := certprofileModKwParams{ - CertprofileModArgs: reqArgs, - CertprofileModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "certprofile_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { +func (c *Client) CertmapruleMod( + reqArgs *CertmapruleModArgs, + optArgs *CertmapruleModOptionalArgs, // can be nil +) (*CertmapruleModResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := certmapruleModKwParams{ + CertmapruleModArgs: reqArgs, + CertmapruleModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "certmaprule_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res certmapruleModResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } - defer readCloser.Close() - var res certprofileModResponse + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} + +type CertmapruleModArgs struct { + + /* +Rule name +Certificate Identity Mapping Rule name + */ + Cn string `json:"cn,omitempty"` + } + +type CertmapruleModOptionalArgs struct { + + /* +Description +Certificate Identity Mapping Rule description + */ + Description *string `json:"description,omitempty"` + + /* +Mapping rule +Rule used to map the certificate with a user entry + */ + Ipacertmapmaprule *string `json:"ipacertmapmaprule,omitempty"` + + /* +Matching rule +Rule used to check if a certificate can be used for authentication + */ + Ipacertmapmatchrule *string `json:"ipacertmapmatchrule,omitempty"` + + /* +Domain name +Domain where the user entry will be searched + */ + Associateddomain *[]string `json:"associateddomain,omitempty"` + + /* +Priority +Priority of the rule (higher number means lower priority + */ + Ipacertmappriority *int `json:"ipacertmappriority,omitempty"` + + /* +Enabled + + */ + Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } + +type certmapruleModKwParams struct { + *CertmapruleModArgs + *CertmapruleModOptionalArgs + + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} + +type certmapruleModResponse struct { + Error *Error `json:"error"` + Result *CertmapruleModResult `json:"result"` +} + +type CertmapruleModResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Certmaprule `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } + +func (t *CertmapruleModResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CertmapruleModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CertmapruleModResult%v", string(b)) +} + +/* +Display information about a Certificate Identity Mapping Rule. +*/ +func (c *Client) CertmapruleShow( + reqArgs *CertmapruleShowArgs, + optArgs *CertmapruleShowOptionalArgs, // can be nil +) (*CertmapruleShowResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := certmapruleShowKwParams{ + CertmapruleShowArgs: reqArgs, + CertmapruleShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "certmaprule_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res certmapruleShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} + +type CertmapruleShowArgs struct { + + /* +Rule name +Certificate Identity Mapping Rule name + */ + Cn string `json:"cn,omitempty"` + } + +type CertmapruleShowOptionalArgs struct { + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } + +type certmapruleShowKwParams struct { + *CertmapruleShowArgs + *CertmapruleShowOptionalArgs + + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} + +type certmapruleShowResponse struct { + Error *Error `json:"error"` + Result *CertmapruleShowResult `json:"result"` +} + +type CertmapruleShowResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Certmaprule `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } + +func (t *CertmapruleShowResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CertmapruleShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CertmapruleShowResult%v", string(b)) } -type CertprofileModArgs struct { - - /* - Profile ID - Profile ID for referring to this profile - */ - Cn string `json:"cn,omitempty"` +/* +Delete a Certificate Profile. +*/ +func (c *Client) CertprofileDel( + reqArgs *CertprofileDelArgs, + optArgs *CertprofileDelOptionalArgs, // can be nil +) (*CertprofileDelResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := certprofileDelKwParams{ + CertprofileDelArgs: reqArgs, + CertprofileDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "certprofile_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res certprofileDelResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type CertprofileModOptionalArgs struct { +type CertprofileDelArgs struct { + + /* +Profile ID +Profile ID for referring to this profile + */ + Cn []string `json:"cn,omitempty"` + } - /* - Profile description - Brief description of this profile - */ - Description *string `json:"description,omitempty"` +type CertprofileDelOptionalArgs struct { + + /* - /* - Store issued certificates - Whether to store certs issued using this profile - */ - Ipacertprofilestoreissued *bool `json:"ipacertprofilestoreissued,omitempty"` +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } - /* +type certprofileDelKwParams struct { + *CertprofileDelArgs + *CertprofileDelOptionalArgs - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* +type certprofileDelResponse struct { + Error *Error `json:"error"` + Result *CertprofileDelResult `json:"result"` +} - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` +type CertprofileDelResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } - /* +func (t *CertprofileDelResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CertprofileDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CertprofileDelResult%v", string(b)) +} - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - File containing profile configuration +/* +Search for Certificate Profiles. +*/ +func (c *Client) CertprofileFind( + criteria string, // A string searched in all relevant object attributes + reqArgs *CertprofileFindArgs, + optArgs *CertprofileFindOptionalArgs, // can be nil +) (*CertprofileFindResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := certprofileFindKwParams{ + CertprofileFindArgs: reqArgs, + CertprofileFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "certprofile_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res certprofileFindResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - */ - File *string `json:"file,omitempty"` +type CertprofileFindArgs struct { + } - /* +type CertprofileFindOptionalArgs struct { + + /* +Profile ID +Profile ID for referring to this profile + */ + Cn *string `json:"cn,omitempty"` + + /* +Profile description +Brief description of this profile + */ + Description *string `json:"description,omitempty"` + + /* +Store issued certificates +Whether to store certs issued using this profile + */ + Ipacertprofilestoreissued *bool `json:"ipacertprofilestoreissued,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("id") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` +type certprofileFindKwParams struct { + *CertprofileFindArgs + *CertprofileFindOptionalArgs - /* + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` +type certprofileFindResponse struct { + Error *Error `json:"error"` + Result *CertprofileFindResult `json:"result"` } -type certprofileModKwParams struct { - *CertprofileModArgs - *CertprofileModOptionalArgs +type CertprofileFindResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Certprofile `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` +func (t *CertprofileFindResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CertprofileFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CertprofileFindResult%v", string(b)) } -type certprofileModResponse struct { - Error *Error `json:"error"` - Result *CertprofileModResult `json:"result"` +/* +Import a Certificate Profile. +*/ +func (c *Client) CertprofileImport( + reqArgs *CertprofileImportArgs, + optArgs *CertprofileImportOptionalArgs, // can be nil +) (*CertprofileImportResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := certprofileImportKwParams{ + CertprofileImportArgs: reqArgs, + CertprofileImportOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "certprofile_import", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res certprofileImportResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type CertprofileModResult struct { +type CertprofileImportArgs struct { + + /* +Profile ID +Profile ID for referring to this profile + */ + Cn string `json:"cn,omitempty"` + + /* +Profile description +Brief description of this profile + */ + Description string `json:"description,omitempty"` + + /* +Filename of a raw profile. The XML format is not supported. + + */ + File string `json:"file,omitempty"` + } - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` +type CertprofileImportOptionalArgs struct { + + /* +Store issued certificates +Whether to store certs issued using this profile + */ + Ipacertprofilestoreissued *bool `json:"ipacertprofilestoreissued,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } - /* +type certprofileImportKwParams struct { + *CertprofileImportArgs + *CertprofileImportOptionalArgs - (required) - */ - Result Certprofile `json:"result,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` +type certprofileImportResponse struct { + Error *Error `json:"error"` + Result *CertprofileImportResult `json:"result"` } -func (t *CertprofileModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CertprofileModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CertprofileModResult%v", string(b)) +type CertprofileImportResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } + +func (t *CertprofileImportResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CertprofileImportResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CertprofileImportResult%v", string(b)) } /* -Display the properties of a Certificate Profile. +Modify Certificate Profile configuration. */ -func (c *Client) CertprofileShow( - reqArgs *CertprofileShowArgs, - optArgs *CertprofileShowOptionalArgs, // can be nil -) (*CertprofileShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := certprofileShowKwParams{ - CertprofileShowArgs: reqArgs, - CertprofileShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "certprofile_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res certprofileShowResponse +func (c *Client) CertprofileMod( + reqArgs *CertprofileModArgs, + optArgs *CertprofileModOptionalArgs, // can be nil +) (*CertprofileModResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := certprofileModKwParams{ + CertprofileModArgs: reqArgs, + CertprofileModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "certprofile_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res certprofileModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type CertprofileShowArgs struct { +type CertprofileModArgs struct { + + /* +Profile ID +Profile ID for referring to this profile + */ + Cn string `json:"cn,omitempty"` + } - /* - Profile ID - Profile ID for referring to this profile - */ - Cn string `json:"cn,omitempty"` -} +type CertprofileModOptionalArgs struct { + + /* +Profile description +Brief description of this profile + */ + Description *string `json:"description,omitempty"` + + /* +Store issued certificates +Whether to store certs issued using this profile + */ + Ipacertprofilestoreissued *bool `json:"ipacertprofilestoreissued,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* +File containing profile configuration + + */ + File *string `json:"file,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } -type CertprofileShowOptionalArgs struct { +type certprofileModKwParams struct { + *CertprofileModArgs + *CertprofileModOptionalArgs - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* +type certprofileModResponse struct { + Error *Error `json:"error"` + Result *CertprofileModResult `json:"result"` +} - Write profile configuration to file - */ - Out *string `json:"out,omitempty"` +type CertprofileModResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Certprofile `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } - /* +func (t *CertprofileModResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CertprofileModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CertprofileModResult%v", string(b)) +} - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` +/* +Display the properties of a Certificate Profile. +*/ +func (c *Client) CertprofileShow( + reqArgs *CertprofileShowArgs, + optArgs *CertprofileShowOptionalArgs, // can be nil +) (*CertprofileShowResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := certprofileShowKwParams{ + CertprofileShowArgs: reqArgs, + CertprofileShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "certprofile_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res certprofileShowResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - /* +type CertprofileShowArgs struct { + + /* +Profile ID +Profile ID for referring to this profile + */ + Cn string `json:"cn,omitempty"` + } - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} +type CertprofileShowOptionalArgs struct { + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Write profile configuration to file + */ + Out *string `json:"out,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type certprofileShowKwParams struct { - *CertprofileShowArgs - *CertprofileShowOptionalArgs + *CertprofileShowArgs + *CertprofileShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type certprofileShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CertprofileShowResult `json:"result"` } type CertprofileShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Certprofile `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Certprofile `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *CertprofileShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CertprofileShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CertprofileShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CertprofileShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CertprofileShowResult%v", string(b)) } /* Search for classes. */ func (c *Client) ClassFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *ClassFindArgs, - optArgs *ClassFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *ClassFindArgs, + optArgs *ClassFindOptionalArgs, // can be nil ) (*ClassFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := classFindKwParams{ - ClassFindArgs: reqArgs, - ClassFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "class_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res classFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := classFindKwParams{ + ClassFindArgs: reqArgs, + ClassFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "class_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res classFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ClassFindArgs struct { -} + } type ClassFindOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("name") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("name") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } type classFindKwParams struct { - *ClassFindArgs - *ClassFindOptionalArgs + *ClassFindArgs + *ClassFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type classFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ClassFindResult `json:"result"` } type ClassFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Class `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Class `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *ClassFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ClassFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ClassFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ClassFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ClassFindResult%v", string(b)) } /* Display information about a class. */ func (c *Client) ClassShow( - reqArgs *ClassShowArgs, - optArgs *ClassShowOptionalArgs, // can be nil + reqArgs *ClassShowArgs, + optArgs *ClassShowOptionalArgs, // can be nil ) (*ClassShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := classShowKwParams{ - ClassShowArgs: reqArgs, - ClassShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "class_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res classShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := classShowKwParams{ + ClassShowArgs: reqArgs, + ClassShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "class_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res classShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ClassShowArgs struct { + + /* +Full name - /* - Full name - - */ - FullName string `json:"full_name,omitempty"` -} + */ + FullName string `json:"full_name,omitempty"` + } type ClassShowOptionalArgs struct { + + /* - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type classShowKwParams struct { - *ClassShowArgs - *ClassShowOptionalArgs + *ClassShowArgs + *ClassShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type classShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ClassShowResult `json:"result"` } type ClassShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Class `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Class `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *ClassShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ClassShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ClassShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ClassShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ClassShowResult%v", string(b)) } /* Search for commands. */ func (c *Client) CommandFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *CommandFindArgs, - optArgs *CommandFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *CommandFindArgs, + optArgs *CommandFindOptionalArgs, // can be nil ) (*CommandFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := commandFindKwParams{ - CommandFindArgs: reqArgs, - CommandFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "command_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res commandFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := commandFindKwParams{ + CommandFindArgs: reqArgs, + CommandFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "command_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res commandFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CommandFindArgs struct { -} + } type CommandFindOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("name") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("name") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } type commandFindKwParams struct { - *CommandFindArgs - *CommandFindOptionalArgs + *CommandFindArgs + *CommandFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type commandFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CommandFindResult `json:"result"` } type CommandFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Command `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Command `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *CommandFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CommandFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CommandFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CommandFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CommandFindResult%v", string(b)) } /* Display information about a command. */ func (c *Client) CommandShow( - reqArgs *CommandShowArgs, - optArgs *CommandShowOptionalArgs, // can be nil + reqArgs *CommandShowArgs, + optArgs *CommandShowOptionalArgs, // can be nil ) (*CommandShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := commandShowKwParams{ - CommandShowArgs: reqArgs, - CommandShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "command_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res commandShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := commandShowKwParams{ + CommandShowArgs: reqArgs, + CommandShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "command_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res commandShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CommandShowArgs struct { + + /* +Full name - /* - Full name - - */ - FullName string `json:"full_name,omitempty"` -} + */ + FullName string `json:"full_name,omitempty"` + } type CommandShowOptionalArgs struct { + + /* - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type commandShowKwParams struct { - *CommandShowArgs - *CommandShowOptionalArgs + *CommandShowArgs + *CommandShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type commandShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CommandShowResult `json:"result"` } type CommandShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Command `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Command `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *CommandShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CommandShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CommandShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CommandShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CommandShowResult%v", string(b)) } /* Determine whether Schema Compatibility plugin is configured to serve trusted domain users and groups */ func (c *Client) CompatIsEnabled( - reqArgs *CompatIsEnabledArgs, - optArgs *CompatIsEnabledOptionalArgs, // can be nil + reqArgs *CompatIsEnabledArgs, + optArgs *CompatIsEnabledOptionalArgs, // can be nil ) (*CompatIsEnabledResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := compatIsEnabledKwParams{ - CompatIsEnabledArgs: reqArgs, - CompatIsEnabledOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "compat_is_enabled", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res compatIsEnabledResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := compatIsEnabledKwParams{ + CompatIsEnabledArgs: reqArgs, + CompatIsEnabledOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "compat_is_enabled", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res compatIsEnabledResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CompatIsEnabledArgs struct { -} + } type CompatIsEnabledOptionalArgs struct { -} + } type compatIsEnabledKwParams struct { - *CompatIsEnabledArgs - *CompatIsEnabledOptionalArgs + *CompatIsEnabledArgs + *CompatIsEnabledOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type compatIsEnabledResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CompatIsEnabledResult `json:"result"` } type CompatIsEnabledResult struct { + + + /* - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` -} + (required) + */ + Result interface{} `json:"result,omitempty"` + } func (t *CompatIsEnabledResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CompatIsEnabledResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CompatIsEnabledResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CompatIsEnabledResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CompatIsEnabledResult%v", string(b)) } /* Modify configuration options. */ func (c *Client) ConfigMod( - reqArgs *ConfigModArgs, - optArgs *ConfigModOptionalArgs, // can be nil + reqArgs *ConfigModArgs, + optArgs *ConfigModOptionalArgs, // can be nil ) (*ConfigModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := configModKwParams{ - ConfigModArgs: reqArgs, - ConfigModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "config_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res configModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := configModKwParams{ + ConfigModArgs: reqArgs, + ConfigModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "config_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res configModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ConfigModArgs struct { -} + } type ConfigModOptionalArgs struct { - - /* - Maximum username length - - */ - Ipamaxusernamelength *int `json:"ipamaxusernamelength,omitempty"` - - /* - Home directory base - Default location of home directories - */ - Ipahomesrootdir *string `json:"ipahomesrootdir,omitempty"` - - /* - Default shell - Default shell for new users - */ - Ipadefaultloginshell *string `json:"ipadefaultloginshell,omitempty"` - - /* - Default users group - Default group for new users - */ - Ipadefaultprimarygroup *string `json:"ipadefaultprimarygroup,omitempty"` - - /* - Default e-mail domain - Default e-mail domain - */ - Ipadefaultemaildomain *string `json:"ipadefaultemaildomain,omitempty"` - - /* - Search time limit - Maximum amount of time (seconds) for a search (-1 or 0 is unlimited) - */ - Ipasearchtimelimit *int `json:"ipasearchtimelimit,omitempty"` - - /* - Search size limit - Maximum number of records to search (-1 or 0 is unlimited) - */ - Ipasearchrecordslimit *int `json:"ipasearchrecordslimit,omitempty"` - - /* - User search fields - A comma-separated list of fields to search in when searching for users - */ - Ipausersearchfields *string `json:"ipausersearchfields,omitempty"` - - /* - Group search fields - A comma-separated list of fields to search in when searching for groups - */ - Ipagroupsearchfields *string `json:"ipagroupsearchfields,omitempty"` - - /* - Enable migration mode - Enable migration mode - */ - Ipamigrationenabled *bool `json:"ipamigrationenabled,omitempty"` - - /* - Default group objectclasses - Default group objectclasses (comma-separated list) - */ - Ipagroupobjectclasses *[]string `json:"ipagroupobjectclasses,omitempty"` - - /* - Default user objectclasses - Default user objectclasses (comma-separated list) - */ - Ipauserobjectclasses *[]string `json:"ipauserobjectclasses,omitempty"` - - /* - Password Expiration Notification (days) - Number of days's notice of impending password expiration - */ - Ipapwdexpadvnotify *int `json:"ipapwdexpadvnotify,omitempty"` - - /* - Password plugin features - Extra hashes to generate in password plug-in - */ - Ipaconfigstring *[]string `json:"ipaconfigstring,omitempty"` - - /* - SELinux user map order - Order in increasing priority of SELinux users, delimited by $ - */ - Ipaselinuxusermaporder *string `json:"ipaselinuxusermaporder,omitempty"` - - /* - Default SELinux user - Default SELinux user when no match is found in SELinux map rule - */ - Ipaselinuxusermapdefault *string `json:"ipaselinuxusermapdefault,omitempty"` - - /* - Default PAC types - Default types of PAC supported for services - */ - Ipakrbauthzdata *[]string `json:"ipakrbauthzdata,omitempty"` - - /* - Default user authentication types - Default types of supported user authentication - */ - Ipauserauthtype *[]string `json:"ipauserauthtype,omitempty"` - - /* - IPA CA renewal master - Renewal master for IPA certificate authority - */ - CaRenewalMasterServer *string `json:"ca_renewal_master_server,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Maximum username length + + */ + Ipamaxusernamelength *int `json:"ipamaxusernamelength,omitempty"` + + /* +Home directory base +Default location of home directories + */ + Ipahomesrootdir *string `json:"ipahomesrootdir,omitempty"` + + /* +Default shell +Default shell for new users + */ + Ipadefaultloginshell *string `json:"ipadefaultloginshell,omitempty"` + + /* +Default users group +Default group for new users + */ + Ipadefaultprimarygroup *string `json:"ipadefaultprimarygroup,omitempty"` + + /* +Default e-mail domain +Default e-mail domain + */ + Ipadefaultemaildomain *string `json:"ipadefaultemaildomain,omitempty"` + + /* +Search time limit +Maximum amount of time (seconds) for a search (-1 or 0 is unlimited) + */ + Ipasearchtimelimit *int `json:"ipasearchtimelimit,omitempty"` + + /* +Search size limit +Maximum number of records to search (-1 or 0 is unlimited) + */ + Ipasearchrecordslimit *int `json:"ipasearchrecordslimit,omitempty"` + + /* +User search fields +A comma-separated list of fields to search in when searching for users + */ + Ipausersearchfields *string `json:"ipausersearchfields,omitempty"` + + /* +Group search fields +A comma-separated list of fields to search in when searching for groups + */ + Ipagroupsearchfields *string `json:"ipagroupsearchfields,omitempty"` + + /* +Enable migration mode +Enable migration mode + */ + Ipamigrationenabled *bool `json:"ipamigrationenabled,omitempty"` + + /* +Default group objectclasses +Default group objectclasses (comma-separated list) + */ + Ipagroupobjectclasses *[]string `json:"ipagroupobjectclasses,omitempty"` + + /* +Default user objectclasses +Default user objectclasses (comma-separated list) + */ + Ipauserobjectclasses *[]string `json:"ipauserobjectclasses,omitempty"` + + /* +Password Expiration Notification (days) +Number of days's notice of impending password expiration + */ + Ipapwdexpadvnotify *int `json:"ipapwdexpadvnotify,omitempty"` + + /* +Password plugin features +Extra hashes to generate in password plug-in + */ + Ipaconfigstring *[]string `json:"ipaconfigstring,omitempty"` + + /* +SELinux user map order +Order in increasing priority of SELinux users, delimited by $ + */ + Ipaselinuxusermaporder *string `json:"ipaselinuxusermaporder,omitempty"` + + /* +Default SELinux user +Default SELinux user when no match is found in SELinux map rule + */ + Ipaselinuxusermapdefault *string `json:"ipaselinuxusermapdefault,omitempty"` + + /* +Default PAC types +Default types of PAC supported for services + */ + Ipakrbauthzdata *[]string `json:"ipakrbauthzdata,omitempty"` + + /* +Default user authentication types +Default types of supported user authentication + */ + Ipauserauthtype *[]string `json:"ipauserauthtype,omitempty"` + + /* +IPA CA renewal master +Renewal master for IPA certificate authority + */ + CaRenewalMasterServer *string `json:"ca_renewal_master_server,omitempty"` + + /* +Domain resolution order +colon-separated list of domains used for short name qualification + */ + Ipadomainresolutionorder *string `json:"ipadomainresolutionorder,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type configModKwParams struct { - *ConfigModArgs - *ConfigModOptionalArgs + *ConfigModArgs + *ConfigModOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type configModResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ConfigModResult `json:"result"` } type ConfigModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Config `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value interface{} `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Config `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value interface{} `json:"value,omitempty"` + } func (t *ConfigModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ConfigModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ConfigModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ConfigModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ConfigModResult%v", string(b)) } /* Show the current configuration. */ func (c *Client) ConfigShow( - reqArgs *ConfigShowArgs, - optArgs *ConfigShowOptionalArgs, // can be nil + reqArgs *ConfigShowArgs, + optArgs *ConfigShowOptionalArgs, // can be nil ) (*ConfigShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := configShowKwParams{ - ConfigShowArgs: reqArgs, - ConfigShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "config_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res configShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := configShowKwParams{ + ConfigShowArgs: reqArgs, + ConfigShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "config_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res configShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ConfigShowArgs struct { -} + } type ConfigShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type configShowKwParams struct { - *ConfigShowArgs - *ConfigShowOptionalArgs + *ConfigShowArgs + *ConfigShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type configShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ConfigShowResult `json:"result"` } type ConfigShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Config `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value interface{} `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Config `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value interface{} `json:"value,omitempty"` + } func (t *ConfigShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ConfigShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ConfigShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ConfigShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ConfigShowResult%v", string(b)) } /* - */ +*/ func (c *Client) CosentryAdd( - reqArgs *CosentryAddArgs, - optArgs *CosentryAddOptionalArgs, // can be nil + reqArgs *CosentryAddArgs, + optArgs *CosentryAddOptionalArgs, // can be nil ) (*CosentryAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := cosentryAddKwParams{ - CosentryAddArgs: reqArgs, - CosentryAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "cosentry_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res cosentryAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := cosentryAddKwParams{ + CosentryAddArgs: reqArgs, + CosentryAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "cosentry_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res cosentryAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CosentryAddArgs struct { + + /* - /* + */ + Cn string `json:"cn,omitempty"` + + /* - */ - Cn string `json:"cn,omitempty"` - /* + */ + Krbpwdpolicyreference string `json:"krbpwdpolicyreference,omitempty"` + + /* - */ - Krbpwdpolicyreference string `json:"krbpwdpolicyreference,omitempty"` - - /* - - - */ - Cospriority int `json:"cospriority,omitempty"` -} + */ + Cospriority int `json:"cospriority,omitempty"` + } type CosentryAddOptionalArgs struct { - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type cosentryAddKwParams struct { - *CosentryAddArgs - *CosentryAddOptionalArgs + *CosentryAddArgs + *CosentryAddOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type cosentryAddResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CosentryAddResult `json:"result"` } type CosentryAddResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Cosentry `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Cosentry `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *CosentryAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CosentryAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CosentryAddResult%v", string(b)) -} +func (t *CosentryAddResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CosentryAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CosentryAddResult%v", string(b)) +} /* - */ +*/ func (c *Client) CosentryDel( - reqArgs *CosentryDelArgs, - optArgs *CosentryDelOptionalArgs, // can be nil + reqArgs *CosentryDelArgs, + optArgs *CosentryDelOptionalArgs, // can be nil ) (*CosentryDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := cosentryDelKwParams{ - CosentryDelArgs: reqArgs, - CosentryDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "cosentry_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res cosentryDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := cosentryDelKwParams{ + CosentryDelArgs: reqArgs, + CosentryDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "cosentry_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res cosentryDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CosentryDelArgs struct { + + /* - /* - - */ - Cn []string `json:"cn,omitempty"` -} + */ + Cn []string `json:"cn,omitempty"` + } type CosentryDelOptionalArgs struct { + + /* - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` -} +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } type cosentryDelKwParams struct { - *CosentryDelArgs - *CosentryDelOptionalArgs + *CosentryDelArgs + *CosentryDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type cosentryDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CosentryDelResult `json:"result"` } type CosentryDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } func (t *CosentryDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CosentryDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CosentryDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CosentryDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CosentryDelResult%v", string(b)) } /* - */ +*/ func (c *Client) CosentryFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *CosentryFindArgs, - optArgs *CosentryFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *CosentryFindArgs, + optArgs *CosentryFindOptionalArgs, // can be nil ) (*CosentryFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := cosentryFindKwParams{ - CosentryFindArgs: reqArgs, - CosentryFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "cosentry_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res cosentryFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := cosentryFindKwParams{ + CosentryFindArgs: reqArgs, + CosentryFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "cosentry_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res cosentryFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CosentryFindArgs struct { -} + } type CosentryFindOptionalArgs struct { - - /* - - - */ - Cn *string `json:"cn,omitempty"` - - /* - - - */ - Krbpwdpolicyreference *string `json:"krbpwdpolicyreference,omitempty"` - - /* - - - */ - Cospriority *int `json:"cospriority,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("cn") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} + + /* + + + */ + Cn *string `json:"cn,omitempty"` + + /* + + + */ + Krbpwdpolicyreference *string `json:"krbpwdpolicyreference,omitempty"` + + /* + + + */ + Cospriority *int `json:"cospriority,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("cn") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } type cosentryFindKwParams struct { - *CosentryFindArgs - *CosentryFindOptionalArgs + *CosentryFindArgs + *CosentryFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type cosentryFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CosentryFindResult `json:"result"` } type CosentryFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Cosentry `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Cosentry `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *CosentryFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CosentryFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CosentryFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CosentryFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CosentryFindResult%v", string(b)) } /* - */ +*/ func (c *Client) CosentryMod( - reqArgs *CosentryModArgs, - optArgs *CosentryModOptionalArgs, // can be nil + reqArgs *CosentryModArgs, + optArgs *CosentryModOptionalArgs, // can be nil ) (*CosentryModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := cosentryModKwParams{ - CosentryModArgs: reqArgs, - CosentryModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "cosentry_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res cosentryModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := cosentryModKwParams{ + CosentryModArgs: reqArgs, + CosentryModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "cosentry_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res cosentryModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CosentryModArgs struct { - - /* + + /* - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type CosentryModOptionalArgs struct { - - /* - - - */ - Krbpwdpolicyreference *string `json:"krbpwdpolicyreference,omitempty"` - - /* - - - */ - Cospriority *int `json:"cospriority,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* + + + */ + Krbpwdpolicyreference *string `json:"krbpwdpolicyreference,omitempty"` + + /* + + + */ + Cospriority *int `json:"cospriority,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type cosentryModKwParams struct { - *CosentryModArgs - *CosentryModOptionalArgs + *CosentryModArgs + *CosentryModOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type cosentryModResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CosentryModResult `json:"result"` } type CosentryModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Cosentry `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Cosentry `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *CosentryModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CosentryModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CosentryModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CosentryModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CosentryModResult%v", string(b)) } /* - */ +*/ func (c *Client) CosentryShow( - reqArgs *CosentryShowArgs, - optArgs *CosentryShowOptionalArgs, // can be nil + reqArgs *CosentryShowArgs, + optArgs *CosentryShowOptionalArgs, // can be nil ) (*CosentryShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := cosentryShowKwParams{ - CosentryShowArgs: reqArgs, - CosentryShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "cosentry_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res cosentryShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := cosentryShowKwParams{ + CosentryShowArgs: reqArgs, + CosentryShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "cosentry_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res cosentryShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type CosentryShowArgs struct { + + /* - /* - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type CosentryShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type cosentryShowKwParams struct { - *CosentryShowArgs - *CosentryShowOptionalArgs + *CosentryShowArgs + *CosentryShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type cosentryShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *CosentryShowResult `json:"result"` } type CosentryShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Cosentry `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Cosentry `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *CosentryShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("CosentryShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("CosentryShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("CosentryShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("CosentryShowResult%v", string(b)) } /* Add a new delegation. */ func (c *Client) DelegationAdd( - reqArgs *DelegationAddArgs, - optArgs *DelegationAddOptionalArgs, // can be nil + reqArgs *DelegationAddArgs, + optArgs *DelegationAddOptionalArgs, // can be nil ) (*DelegationAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := delegationAddKwParams{ - DelegationAddArgs: reqArgs, - DelegationAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "delegation_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res delegationAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := delegationAddKwParams{ + DelegationAddArgs: reqArgs, + DelegationAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "delegation_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res delegationAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DelegationAddArgs struct { - - /* - Delegation name - Delegation name - */ - Aciname string `json:"aciname,omitempty"` - - /* - Attributes - Attributes to which the delegation applies - */ - Attrs []string `json:"attrs,omitempty"` - - /* - Member user group - User group to apply delegation to - */ - Memberof string `json:"memberof,omitempty"` - - /* - User group - User group ACI grants access to - */ - Group string `json:"group,omitempty"` -} + + /* +Delegation name +Delegation name + */ + Aciname string `json:"aciname,omitempty"` + + /* +Attributes +Attributes to which the delegation applies + */ + Attrs []string `json:"attrs,omitempty"` + + /* +Member user group +User group to apply delegation to + */ + Memberof string `json:"memberof,omitempty"` + + /* +User group +User group ACI grants access to + */ + Group string `json:"group,omitempty"` + } type DelegationAddOptionalArgs struct { - - /* - Permissions - Permissions to grant (read, write). Default is write. - */ - Permissions *[]string `json:"permissions,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Permissions +Permissions to grant (read, write). Default is write. + */ + Permissions *[]string `json:"permissions,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type delegationAddKwParams struct { - *DelegationAddArgs - *DelegationAddOptionalArgs + *DelegationAddArgs + *DelegationAddOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type delegationAddResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DelegationAddResult `json:"result"` } type DelegationAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Delegation `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Delegation `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *DelegationAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DelegationAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DelegationAddResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DelegationAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DelegationAddResult%v", string(b)) } /* Delete a delegation. */ func (c *Client) DelegationDel( - reqArgs *DelegationDelArgs, - optArgs *DelegationDelOptionalArgs, // can be nil + reqArgs *DelegationDelArgs, + optArgs *DelegationDelOptionalArgs, // can be nil ) (*DelegationDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := delegationDelKwParams{ - DelegationDelArgs: reqArgs, - DelegationDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "delegation_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res delegationDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := delegationDelKwParams{ + DelegationDelArgs: reqArgs, + DelegationDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "delegation_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res delegationDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DelegationDelArgs struct { - - /* - Delegation name - Delegation name - */ - Aciname string `json:"aciname,omitempty"` -} + + /* +Delegation name +Delegation name + */ + Aciname string `json:"aciname,omitempty"` + } type DelegationDelOptionalArgs struct { -} + } type delegationDelKwParams struct { - *DelegationDelArgs - *DelegationDelOptionalArgs + *DelegationDelArgs + *DelegationDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type delegationDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DelegationDelResult `json:"result"` } type DelegationDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - True means the operation was successful - (required) - */ - Result bool `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *DelegationDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DelegationDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DelegationDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DelegationDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DelegationDelResult%v", string(b)) } /* Search for delegations. */ func (c *Client) DelegationFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *DelegationFindArgs, - optArgs *DelegationFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *DelegationFindArgs, + optArgs *DelegationFindOptionalArgs, // can be nil ) (*DelegationFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := delegationFindKwParams{ - DelegationFindArgs: reqArgs, - DelegationFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "delegation_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res delegationFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := delegationFindKwParams{ + DelegationFindArgs: reqArgs, + DelegationFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "delegation_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res delegationFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DelegationFindArgs struct { -} + } type DelegationFindOptionalArgs struct { - - /* - Delegation name - Delegation name - */ - Aciname *string `json:"aciname,omitempty"` - - /* - Permissions - Permissions to grant (read, write). Default is write. - */ - Permissions *[]string `json:"permissions,omitempty"` - - /* - Attributes - Attributes to which the delegation applies - */ - Attrs *[]string `json:"attrs,omitempty"` - - /* - Member user group - User group to apply delegation to - */ - Memberof *string `json:"memberof,omitempty"` - - /* - User group - User group ACI grants access to - */ - Group *string `json:"group,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("name") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Delegation name +Delegation name + */ + Aciname *string `json:"aciname,omitempty"` + + /* +Permissions +Permissions to grant (read, write). Default is write. + */ + Permissions *[]string `json:"permissions,omitempty"` + + /* +Attributes +Attributes to which the delegation applies + */ + Attrs *[]string `json:"attrs,omitempty"` + + /* +Member user group +User group to apply delegation to + */ + Memberof *string `json:"memberof,omitempty"` + + /* +User group +User group ACI grants access to + */ + Group *string `json:"group,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("name") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type delegationFindKwParams struct { - *DelegationFindArgs - *DelegationFindOptionalArgs + *DelegationFindArgs + *DelegationFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type delegationFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DelegationFindResult `json:"result"` } type DelegationFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Delegation `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Delegation `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *DelegationFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DelegationFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DelegationFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DelegationFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DelegationFindResult%v", string(b)) } /* Modify a delegation. */ func (c *Client) DelegationMod( - reqArgs *DelegationModArgs, - optArgs *DelegationModOptionalArgs, // can be nil + reqArgs *DelegationModArgs, + optArgs *DelegationModOptionalArgs, // can be nil ) (*DelegationModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := delegationModKwParams{ - DelegationModArgs: reqArgs, - DelegationModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "delegation_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res delegationModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := delegationModKwParams{ + DelegationModArgs: reqArgs, + DelegationModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "delegation_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res delegationModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DelegationModArgs struct { - - /* - Delegation name - Delegation name - */ - Aciname string `json:"aciname,omitempty"` -} + + /* +Delegation name +Delegation name + */ + Aciname string `json:"aciname,omitempty"` + } type DelegationModOptionalArgs struct { - - /* - Permissions - Permissions to grant (read, write). Default is write. - */ - Permissions *[]string `json:"permissions,omitempty"` - - /* - Attributes - Attributes to which the delegation applies - */ - Attrs *[]string `json:"attrs,omitempty"` - - /* - Member user group - User group to apply delegation to - */ - Memberof *string `json:"memberof,omitempty"` - - /* - User group - User group ACI grants access to - */ - Group *string `json:"group,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Permissions +Permissions to grant (read, write). Default is write. + */ + Permissions *[]string `json:"permissions,omitempty"` + + /* +Attributes +Attributes to which the delegation applies + */ + Attrs *[]string `json:"attrs,omitempty"` + + /* +Member user group +User group to apply delegation to + */ + Memberof *string `json:"memberof,omitempty"` + + /* +User group +User group ACI grants access to + */ + Group *string `json:"group,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type delegationModKwParams struct { - *DelegationModArgs - *DelegationModOptionalArgs + *DelegationModArgs + *DelegationModOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type delegationModResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DelegationModResult `json:"result"` } type DelegationModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Delegation `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Delegation `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *DelegationModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DelegationModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DelegationModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DelegationModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DelegationModResult%v", string(b)) } /* Display information about a delegation. */ func (c *Client) DelegationShow( - reqArgs *DelegationShowArgs, - optArgs *DelegationShowOptionalArgs, // can be nil + reqArgs *DelegationShowArgs, + optArgs *DelegationShowOptionalArgs, // can be nil ) (*DelegationShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := delegationShowKwParams{ - DelegationShowArgs: reqArgs, - DelegationShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "delegation_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res delegationShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := delegationShowKwParams{ + DelegationShowArgs: reqArgs, + DelegationShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "delegation_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res delegationShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DelegationShowArgs struct { - - /* - Delegation name - Delegation name - */ - Aciname string `json:"aciname,omitempty"` -} + + /* +Delegation name +Delegation name + */ + Aciname string `json:"aciname,omitempty"` + } type DelegationShowOptionalArgs struct { + + /* - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type delegationShowKwParams struct { - *DelegationShowArgs - *DelegationShowOptionalArgs + *DelegationShowArgs + *DelegationShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type delegationShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DelegationShowResult `json:"result"` } type DelegationShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Delegation `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Delegation `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *DelegationShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DelegationShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DelegationShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DelegationShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DelegationShowResult%v", string(b)) } /* Checks if any of the servers has the DNS service enabled. */ func (c *Client) DNSIsEnabled( - reqArgs *DNSIsEnabledArgs, - optArgs *DNSIsEnabledOptionalArgs, // can be nil + reqArgs *DNSIsEnabledArgs, + optArgs *DNSIsEnabledOptionalArgs, // can be nil ) (*DNSIsEnabledResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := dnsIsEnabledKwParams{ - DNSIsEnabledArgs: reqArgs, - DNSIsEnabledOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "dns_is_enabled", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res dnsIsEnabledResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := dnsIsEnabledKwParams{ + DNSIsEnabledArgs: reqArgs, + DNSIsEnabledOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "dns_is_enabled", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res dnsIsEnabledResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DNSIsEnabledArgs struct { -} + } type DNSIsEnabledOptionalArgs struct { -} + } type dnsIsEnabledKwParams struct { - *DNSIsEnabledArgs - *DNSIsEnabledOptionalArgs + *DNSIsEnabledArgs + *DNSIsEnabledOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type dnsIsEnabledResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DNSIsEnabledResult `json:"result"` } type DNSIsEnabledResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - True means the operation was successful - (required) - */ - Result bool `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value interface{} `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value interface{} `json:"value,omitempty"` + } func (t *DNSIsEnabledResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DNSIsEnabledResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DNSIsEnabledResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DNSIsEnabledResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DNSIsEnabledResult%v", string(b)) } /* Resolve a host name in DNS. (Deprecated) */ func (c *Client) DNSResolve( - reqArgs *DNSResolveArgs, - optArgs *DNSResolveOptionalArgs, // can be nil + reqArgs *DNSResolveArgs, + optArgs *DNSResolveOptionalArgs, // can be nil ) (*DNSResolveResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := dnsResolveKwParams{ - DNSResolveArgs: reqArgs, - DNSResolveOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "dns_resolve", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res dnsResolveResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := dnsResolveKwParams{ + DNSResolveArgs: reqArgs, + DNSResolveOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "dns_resolve", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res dnsResolveResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DNSResolveArgs struct { + + /* +Hostname (FQDN) - /* - Hostname (FQDN) - - */ - Hostname string `json:"hostname,omitempty"` -} + */ + Hostname string `json:"hostname,omitempty"` + } type DNSResolveOptionalArgs struct { -} + } type dnsResolveKwParams struct { - *DNSResolveArgs - *DNSResolveOptionalArgs + *DNSResolveArgs + *DNSResolveOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type dnsResolveResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DNSResolveResult `json:"result"` } type DNSResolveResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - True means the operation was successful - (required) - */ - Result bool `json:"result,omitempty"` - - /* - - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* + + (required) + */ + Value string `json:"value,omitempty"` + } func (t *DNSResolveResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DNSResolveResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DNSResolveResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DNSResolveResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DNSResolveResult%v", string(b)) } /* Update location and IPA server DNS records */ func (c *Client) DNSUpdateSystemRecords( - reqArgs *DNSUpdateSystemRecordsArgs, - optArgs *DNSUpdateSystemRecordsOptionalArgs, // can be nil + reqArgs *DNSUpdateSystemRecordsArgs, + optArgs *DNSUpdateSystemRecordsOptionalArgs, // can be nil ) (*DNSUpdateSystemRecordsResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := dnsUpdateSystemRecordsKwParams{ - DNSUpdateSystemRecordsArgs: reqArgs, - DNSUpdateSystemRecordsOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "dns_update_system_records", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res dnsUpdateSystemRecordsResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := dnsUpdateSystemRecordsKwParams{ + DNSUpdateSystemRecordsArgs: reqArgs, + DNSUpdateSystemRecordsOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "dns_update_system_records", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res dnsUpdateSystemRecordsResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DNSUpdateSystemRecordsArgs struct { -} + } type DNSUpdateSystemRecordsOptionalArgs struct { - - /* - Dry run - Do not update records only return expected records - */ - DryRun *bool `json:"dry_run,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Dry run +Do not update records only return expected records + */ + DryRun *bool `json:"dry_run,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type dnsUpdateSystemRecordsKwParams struct { - *DNSUpdateSystemRecordsArgs - *DNSUpdateSystemRecordsOptionalArgs + *DNSUpdateSystemRecordsArgs + *DNSUpdateSystemRecordsOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type dnsUpdateSystemRecordsResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DNSUpdateSystemRecordsResult `json:"result"` } type DNSUpdateSystemRecordsResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Result of the command - (required) - */ - Value bool `json:"value,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Result of the command + (required) + */ + Value bool `json:"value,omitempty"` + } func (t *DNSUpdateSystemRecordsResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DNSUpdateSystemRecordsResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DNSUpdateSystemRecordsResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DNSUpdateSystemRecordsResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DNSUpdateSystemRecordsResult%v", string(b)) } /* Modify global DNS configuration. */ func (c *Client) DnsconfigMod( - reqArgs *DnsconfigModArgs, - optArgs *DnsconfigModOptionalArgs, // can be nil + reqArgs *DnsconfigModArgs, + optArgs *DnsconfigModOptionalArgs, // can be nil ) (*DnsconfigModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := dnsconfigModKwParams{ - DnsconfigModArgs: reqArgs, - DnsconfigModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "dnsconfig_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res dnsconfigModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := dnsconfigModKwParams{ + DnsconfigModArgs: reqArgs, + DnsconfigModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "dnsconfig_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res dnsconfigModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DnsconfigModArgs struct { -} + } type DnsconfigModOptionalArgs struct { - - /* - Global forwarders - Global forwarders. A custom port can be specified for each forwarder using a standard format "IP_ADDRESS port PORT" - */ - Idnsforwarders *[]string `json:"idnsforwarders,omitempty"` - - /* - Forward policy - Global forwarding policy. Set to "none" to disable any configured global forwarders. - */ - Idnsforwardpolicy *string `json:"idnsforwardpolicy,omitempty"` - - /* - Allow PTR sync - Allow synchronization of forward (A, AAAA) and reverse (PTR) records - */ - Idnsallowsyncptr *bool `json:"idnsallowsyncptr,omitempty"` - - /* - Zone refresh interval - An interval between regular polls of the name server for new DNS zones - */ - Idnszonerefresh *int `json:"idnszonerefresh,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Global forwarders +Global forwarders. A custom port can be specified for each forwarder using a standard format "IP_ADDRESS port PORT" + */ + Idnsforwarders *[]string `json:"idnsforwarders,omitempty"` + + /* +Forward policy +Global forwarding policy. Set to "none" to disable any configured global forwarders. + */ + Idnsforwardpolicy *string `json:"idnsforwardpolicy,omitempty"` + + /* +Allow PTR sync +Allow synchronization of forward (A, AAAA) and reverse (PTR) records + */ + Idnsallowsyncptr *bool `json:"idnsallowsyncptr,omitempty"` + + /* +Zone refresh interval +An interval between regular polls of the name server for new DNS zones + */ + Idnszonerefresh *int `json:"idnszonerefresh,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type dnsconfigModKwParams struct { - *DnsconfigModArgs - *DnsconfigModOptionalArgs + *DnsconfigModArgs + *DnsconfigModOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type dnsconfigModResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DnsconfigModResult `json:"result"` } type DnsconfigModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Dnsconfig `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value interface{} `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Dnsconfig `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value interface{} `json:"value,omitempty"` + } func (t *DnsconfigModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DnsconfigModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DnsconfigModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DnsconfigModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DnsconfigModResult%v", string(b)) } /* Show the current global DNS configuration. */ func (c *Client) DnsconfigShow( - reqArgs *DnsconfigShowArgs, - optArgs *DnsconfigShowOptionalArgs, // can be nil + reqArgs *DnsconfigShowArgs, + optArgs *DnsconfigShowOptionalArgs, // can be nil ) (*DnsconfigShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := dnsconfigShowKwParams{ - DnsconfigShowArgs: reqArgs, - DnsconfigShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "dnsconfig_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res dnsconfigShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := dnsconfigShowKwParams{ + DnsconfigShowArgs: reqArgs, + DnsconfigShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "dnsconfig_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res dnsconfigShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DnsconfigShowArgs struct { -} + } type DnsconfigShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type dnsconfigShowKwParams struct { - *DnsconfigShowArgs - *DnsconfigShowOptionalArgs + *DnsconfigShowArgs + *DnsconfigShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type dnsconfigShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DnsconfigShowResult `json:"result"` } type DnsconfigShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Dnsconfig `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value interface{} `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Dnsconfig `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value interface{} `json:"value,omitempty"` + } func (t *DnsconfigShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DnsconfigShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DnsconfigShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DnsconfigShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DnsconfigShowResult%v", string(b)) } /* Create new DNS forward zone. */ func (c *Client) DnsforwardzoneAdd( - reqArgs *DnsforwardzoneAddArgs, - optArgs *DnsforwardzoneAddOptionalArgs, // can be nil + reqArgs *DnsforwardzoneAddArgs, + optArgs *DnsforwardzoneAddOptionalArgs, // can be nil ) (*DnsforwardzoneAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := dnsforwardzoneAddKwParams{ - DnsforwardzoneAddArgs: reqArgs, - DnsforwardzoneAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "dnsforwardzone_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res dnsforwardzoneAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := dnsforwardzoneAddKwParams{ + DnsforwardzoneAddArgs: reqArgs, + DnsforwardzoneAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "dnsforwardzone_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res dnsforwardzoneAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DnsforwardzoneAddArgs struct { -} + } type DnsforwardzoneAddOptionalArgs struct { - - /* - Zone name - Zone name (FQDN) - */ - Idnsname *string `json:"idnsname,omitempty"` - - /* - Reverse zone IP network - IP network to create reverse zone name from - */ - NameFromIP *string `json:"name_from_ip,omitempty"` - - /* - Zone forwarders - Per-zone forwarders. A custom port can be specified for each forwarder using a standard format "IP_ADDRESS port PORT" - */ - Idnsforwarders *[]string `json:"idnsforwarders,omitempty"` - - /* - Forward policy - Per-zone conditional forwarding policy. Set to "none" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded. - */ - Idnsforwardpolicy *string `json:"idnsforwardpolicy,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Force DNS zone creation even if it will overlap with an existing zone. - */ - SkipOverlapCheck *bool `json:"skip_overlap_check,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Zone name +Zone name (FQDN) + */ + Idnsname *string `json:"idnsname,omitempty"` + + /* +Reverse zone IP network +IP network to create reverse zone name from + */ + NameFromIP *string `json:"name_from_ip,omitempty"` + + /* +Zone forwarders +Per-zone forwarders. A custom port can be specified for each forwarder using a standard format "IP_ADDRESS port PORT" + */ + Idnsforwarders *[]string `json:"idnsforwarders,omitempty"` + + /* +Forward policy +Per-zone conditional forwarding policy. Set to "none" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded. + */ + Idnsforwardpolicy *string `json:"idnsforwardpolicy,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Force DNS zone creation even if it will overlap with an existing zone. + */ + SkipOverlapCheck *bool `json:"skip_overlap_check,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type dnsforwardzoneAddKwParams struct { - *DnsforwardzoneAddArgs - *DnsforwardzoneAddOptionalArgs + *DnsforwardzoneAddArgs + *DnsforwardzoneAddOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type dnsforwardzoneAddResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DnsforwardzoneAddResult `json:"result"` } type DnsforwardzoneAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Dnsforwardzone `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Dnsforwardzone `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *DnsforwardzoneAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DnsforwardzoneAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DnsforwardzoneAddResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DnsforwardzoneAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DnsforwardzoneAddResult%v", string(b)) } /* Add a permission for per-forward zone access delegation. */ func (c *Client) DnsforwardzoneAddPermission( - reqArgs *DnsforwardzoneAddPermissionArgs, - optArgs *DnsforwardzoneAddPermissionOptionalArgs, // can be nil + reqArgs *DnsforwardzoneAddPermissionArgs, + optArgs *DnsforwardzoneAddPermissionOptionalArgs, // can be nil ) (*DnsforwardzoneAddPermissionResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := dnsforwardzoneAddPermissionKwParams{ - DnsforwardzoneAddPermissionArgs: reqArgs, - DnsforwardzoneAddPermissionOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "dnsforwardzone_add_permission", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res dnsforwardzoneAddPermissionResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := dnsforwardzoneAddPermissionKwParams{ + DnsforwardzoneAddPermissionArgs: reqArgs, + DnsforwardzoneAddPermissionOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "dnsforwardzone_add_permission", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res dnsforwardzoneAddPermissionResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DnsforwardzoneAddPermissionArgs struct { -} + } type DnsforwardzoneAddPermissionOptionalArgs struct { - - /* - Zone name - Zone name (FQDN) - */ - Idnsname *string `json:"idnsname,omitempty"` -} + + /* +Zone name +Zone name (FQDN) + */ + Idnsname *string `json:"idnsname,omitempty"` + } type dnsforwardzoneAddPermissionKwParams struct { - *DnsforwardzoneAddPermissionArgs - *DnsforwardzoneAddPermissionOptionalArgs + *DnsforwardzoneAddPermissionArgs + *DnsforwardzoneAddPermissionOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type dnsforwardzoneAddPermissionResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DnsforwardzoneAddPermissionResult `json:"result"` } type DnsforwardzoneAddPermissionResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - True means the operation was successful - (required) - */ - Result bool `json:"result,omitempty"` - - /* - Permission value - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +Permission value + (required) + */ + Value string `json:"value,omitempty"` + } func (t *DnsforwardzoneAddPermissionResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DnsforwardzoneAddPermissionResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DnsforwardzoneAddPermissionResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DnsforwardzoneAddPermissionResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DnsforwardzoneAddPermissionResult%v", string(b)) } /* Delete DNS forward zone. */ func (c *Client) DnsforwardzoneDel( - reqArgs *DnsforwardzoneDelArgs, - optArgs *DnsforwardzoneDelOptionalArgs, // can be nil + reqArgs *DnsforwardzoneDelArgs, + optArgs *DnsforwardzoneDelOptionalArgs, // can be nil ) (*DnsforwardzoneDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := dnsforwardzoneDelKwParams{ - DnsforwardzoneDelArgs: reqArgs, - DnsforwardzoneDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "dnsforwardzone_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res dnsforwardzoneDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := dnsforwardzoneDelKwParams{ + DnsforwardzoneDelArgs: reqArgs, + DnsforwardzoneDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "dnsforwardzone_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res dnsforwardzoneDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DnsforwardzoneDelArgs struct { -} + } type DnsforwardzoneDelOptionalArgs struct { - - /* - Zone name - Zone name (FQDN) - */ - Idnsname *[]string `json:"idnsname,omitempty"` - - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` -} + + /* +Zone name +Zone name (FQDN) + */ + Idnsname *[]string `json:"idnsname,omitempty"` + + /* + +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } type dnsforwardzoneDelKwParams struct { - *DnsforwardzoneDelArgs - *DnsforwardzoneDelOptionalArgs + *DnsforwardzoneDelArgs + *DnsforwardzoneDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type dnsforwardzoneDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DnsforwardzoneDelResult `json:"result"` } type DnsforwardzoneDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } func (t *DnsforwardzoneDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DnsforwardzoneDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DnsforwardzoneDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DnsforwardzoneDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DnsforwardzoneDelResult%v", string(b)) } /* Disable DNS Forward Zone. */ func (c *Client) DnsforwardzoneDisable( - reqArgs *DnsforwardzoneDisableArgs, - optArgs *DnsforwardzoneDisableOptionalArgs, // can be nil + reqArgs *DnsforwardzoneDisableArgs, + optArgs *DnsforwardzoneDisableOptionalArgs, // can be nil ) (*DnsforwardzoneDisableResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := dnsforwardzoneDisableKwParams{ - DnsforwardzoneDisableArgs: reqArgs, - DnsforwardzoneDisableOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "dnsforwardzone_disable", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res dnsforwardzoneDisableResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := dnsforwardzoneDisableKwParams{ + DnsforwardzoneDisableArgs: reqArgs, + DnsforwardzoneDisableOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "dnsforwardzone_disable", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res dnsforwardzoneDisableResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DnsforwardzoneDisableArgs struct { -} + } type DnsforwardzoneDisableOptionalArgs struct { - - /* - Zone name - Zone name (FQDN) - */ - Idnsname *string `json:"idnsname,omitempty"` -} + + /* +Zone name +Zone name (FQDN) + */ + Idnsname *string `json:"idnsname,omitempty"` + } type dnsforwardzoneDisableKwParams struct { - *DnsforwardzoneDisableArgs - *DnsforwardzoneDisableOptionalArgs + *DnsforwardzoneDisableArgs + *DnsforwardzoneDisableOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type dnsforwardzoneDisableResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DnsforwardzoneDisableResult `json:"result"` } type DnsforwardzoneDisableResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - True means the operation was successful - (required) - */ - Result bool `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *DnsforwardzoneDisableResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DnsforwardzoneDisableResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DnsforwardzoneDisableResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DnsforwardzoneDisableResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DnsforwardzoneDisableResult%v", string(b)) } /* Enable DNS Forward Zone. */ func (c *Client) DnsforwardzoneEnable( - reqArgs *DnsforwardzoneEnableArgs, - optArgs *DnsforwardzoneEnableOptionalArgs, // can be nil + reqArgs *DnsforwardzoneEnableArgs, + optArgs *DnsforwardzoneEnableOptionalArgs, // can be nil ) (*DnsforwardzoneEnableResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := dnsforwardzoneEnableKwParams{ - DnsforwardzoneEnableArgs: reqArgs, - DnsforwardzoneEnableOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "dnsforwardzone_enable", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res dnsforwardzoneEnableResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := dnsforwardzoneEnableKwParams{ + DnsforwardzoneEnableArgs: reqArgs, + DnsforwardzoneEnableOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "dnsforwardzone_enable", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res dnsforwardzoneEnableResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DnsforwardzoneEnableArgs struct { -} + } type DnsforwardzoneEnableOptionalArgs struct { - - /* - Zone name - Zone name (FQDN) - */ - Idnsname *string `json:"idnsname,omitempty"` -} + + /* +Zone name +Zone name (FQDN) + */ + Idnsname *string `json:"idnsname,omitempty"` + } type dnsforwardzoneEnableKwParams struct { - *DnsforwardzoneEnableArgs - *DnsforwardzoneEnableOptionalArgs + *DnsforwardzoneEnableArgs + *DnsforwardzoneEnableOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type dnsforwardzoneEnableResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DnsforwardzoneEnableResult `json:"result"` } type DnsforwardzoneEnableResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - True means the operation was successful - (required) - */ - Result bool `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *DnsforwardzoneEnableResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DnsforwardzoneEnableResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DnsforwardzoneEnableResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DnsforwardzoneEnableResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DnsforwardzoneEnableResult%v", string(b)) } /* Search for DNS forward zones. */ func (c *Client) DnsforwardzoneFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *DnsforwardzoneFindArgs, - optArgs *DnsforwardzoneFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *DnsforwardzoneFindArgs, + optArgs *DnsforwardzoneFindOptionalArgs, // can be nil ) (*DnsforwardzoneFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := dnsforwardzoneFindKwParams{ - DnsforwardzoneFindArgs: reqArgs, - DnsforwardzoneFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "dnsforwardzone_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res dnsforwardzoneFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := dnsforwardzoneFindKwParams{ + DnsforwardzoneFindArgs: reqArgs, + DnsforwardzoneFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "dnsforwardzone_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res dnsforwardzoneFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DnsforwardzoneFindArgs struct { -} + } type DnsforwardzoneFindOptionalArgs struct { - - /* - Zone name - Zone name (FQDN) - */ - Idnsname *string `json:"idnsname,omitempty"` - - /* - Reverse zone IP network - IP network to create reverse zone name from - */ - NameFromIP *string `json:"name_from_ip,omitempty"` - - /* - Active zone - Is zone active? - */ - Idnszoneactive *bool `json:"idnszoneactive,omitempty"` - - /* - Zone forwarders - Per-zone forwarders. A custom port can be specified for each forwarder using a standard format "IP_ADDRESS port PORT" - */ - Idnsforwarders *[]string `json:"idnsforwarders,omitempty"` - - /* - Forward policy - Per-zone conditional forwarding policy. Set to "none" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded. - */ - Idnsforwardpolicy *string `json:"idnsforwardpolicy,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("name") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} + + /* +Zone name +Zone name (FQDN) + */ + Idnsname *string `json:"idnsname,omitempty"` + + /* +Reverse zone IP network +IP network to create reverse zone name from + */ + NameFromIP *string `json:"name_from_ip,omitempty"` + + /* +Active zone +Is zone active? + */ + Idnszoneactive *bool `json:"idnszoneactive,omitempty"` + + /* +Zone forwarders +Per-zone forwarders. A custom port can be specified for each forwarder using a standard format "IP_ADDRESS port PORT" + */ + Idnsforwarders *[]string `json:"idnsforwarders,omitempty"` + + /* +Forward policy +Per-zone conditional forwarding policy. Set to "none" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded. + */ + Idnsforwardpolicy *string `json:"idnsforwardpolicy,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("name") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } type dnsforwardzoneFindKwParams struct { - *DnsforwardzoneFindArgs - *DnsforwardzoneFindOptionalArgs + *DnsforwardzoneFindArgs + *DnsforwardzoneFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type dnsforwardzoneFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DnsforwardzoneFindResult `json:"result"` } type DnsforwardzoneFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Dnsforwardzone `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Dnsforwardzone `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *DnsforwardzoneFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DnsforwardzoneFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DnsforwardzoneFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DnsforwardzoneFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DnsforwardzoneFindResult%v", string(b)) } /* Modify DNS forward zone. */ func (c *Client) DnsforwardzoneMod( - reqArgs *DnsforwardzoneModArgs, - optArgs *DnsforwardzoneModOptionalArgs, // can be nil + reqArgs *DnsforwardzoneModArgs, + optArgs *DnsforwardzoneModOptionalArgs, // can be nil ) (*DnsforwardzoneModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := dnsforwardzoneModKwParams{ - DnsforwardzoneModArgs: reqArgs, - DnsforwardzoneModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "dnsforwardzone_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res dnsforwardzoneModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := dnsforwardzoneModKwParams{ + DnsforwardzoneModArgs: reqArgs, + DnsforwardzoneModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "dnsforwardzone_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res dnsforwardzoneModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DnsforwardzoneModArgs struct { -} + } type DnsforwardzoneModOptionalArgs struct { - - /* - Zone name - Zone name (FQDN) - */ - Idnsname *string `json:"idnsname,omitempty"` - - /* - Reverse zone IP network - IP network to create reverse zone name from - */ - NameFromIP *string `json:"name_from_ip,omitempty"` - - /* - Zone forwarders - Per-zone forwarders. A custom port can be specified for each forwarder using a standard format "IP_ADDRESS port PORT" - */ - Idnsforwarders *[]string `json:"idnsforwarders,omitempty"` - - /* - Forward policy - Per-zone conditional forwarding policy. Set to "none" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded. - */ - Idnsforwardpolicy *string `json:"idnsforwardpolicy,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Zone name +Zone name (FQDN) + */ + Idnsname *string `json:"idnsname,omitempty"` + + /* +Reverse zone IP network +IP network to create reverse zone name from + */ + NameFromIP *string `json:"name_from_ip,omitempty"` + + /* +Zone forwarders +Per-zone forwarders. A custom port can be specified for each forwarder using a standard format "IP_ADDRESS port PORT" + */ + Idnsforwarders *[]string `json:"idnsforwarders,omitempty"` + + /* +Forward policy +Per-zone conditional forwarding policy. Set to "none" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded. + */ + Idnsforwardpolicy *string `json:"idnsforwardpolicy,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type dnsforwardzoneModKwParams struct { - *DnsforwardzoneModArgs - *DnsforwardzoneModOptionalArgs + *DnsforwardzoneModArgs + *DnsforwardzoneModOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type dnsforwardzoneModResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DnsforwardzoneModResult `json:"result"` } type DnsforwardzoneModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Dnsforwardzone `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Dnsforwardzone `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *DnsforwardzoneModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DnsforwardzoneModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DnsforwardzoneModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DnsforwardzoneModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DnsforwardzoneModResult%v", string(b)) } /* Remove a permission for per-forward zone access delegation. */ func (c *Client) DnsforwardzoneRemovePermission( - reqArgs *DnsforwardzoneRemovePermissionArgs, - optArgs *DnsforwardzoneRemovePermissionOptionalArgs, // can be nil + reqArgs *DnsforwardzoneRemovePermissionArgs, + optArgs *DnsforwardzoneRemovePermissionOptionalArgs, // can be nil ) (*DnsforwardzoneRemovePermissionResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := dnsforwardzoneRemovePermissionKwParams{ - DnsforwardzoneRemovePermissionArgs: reqArgs, - DnsforwardzoneRemovePermissionOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "dnsforwardzone_remove_permission", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res dnsforwardzoneRemovePermissionResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := dnsforwardzoneRemovePermissionKwParams{ + DnsforwardzoneRemovePermissionArgs: reqArgs, + DnsforwardzoneRemovePermissionOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "dnsforwardzone_remove_permission", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res dnsforwardzoneRemovePermissionResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DnsforwardzoneRemovePermissionArgs struct { -} + } type DnsforwardzoneRemovePermissionOptionalArgs struct { - - /* - Zone name - Zone name (FQDN) - */ - Idnsname *string `json:"idnsname,omitempty"` -} + + /* +Zone name +Zone name (FQDN) + */ + Idnsname *string `json:"idnsname,omitempty"` + } type dnsforwardzoneRemovePermissionKwParams struct { - *DnsforwardzoneRemovePermissionArgs - *DnsforwardzoneRemovePermissionOptionalArgs + *DnsforwardzoneRemovePermissionArgs + *DnsforwardzoneRemovePermissionOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type dnsforwardzoneRemovePermissionResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DnsforwardzoneRemovePermissionResult `json:"result"` } type DnsforwardzoneRemovePermissionResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - True means the operation was successful - (required) - */ - Result bool `json:"result,omitempty"` - - /* - Permission value - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +Permission value + (required) + */ + Value string `json:"value,omitempty"` + } func (t *DnsforwardzoneRemovePermissionResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DnsforwardzoneRemovePermissionResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DnsforwardzoneRemovePermissionResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DnsforwardzoneRemovePermissionResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DnsforwardzoneRemovePermissionResult%v", string(b)) } /* Display information about a DNS forward zone. */ func (c *Client) DnsforwardzoneShow( - reqArgs *DnsforwardzoneShowArgs, - optArgs *DnsforwardzoneShowOptionalArgs, // can be nil + reqArgs *DnsforwardzoneShowArgs, + optArgs *DnsforwardzoneShowOptionalArgs, // can be nil ) (*DnsforwardzoneShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := dnsforwardzoneShowKwParams{ - DnsforwardzoneShowArgs: reqArgs, - DnsforwardzoneShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "dnsforwardzone_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res dnsforwardzoneShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := dnsforwardzoneShowKwParams{ + DnsforwardzoneShowArgs: reqArgs, + DnsforwardzoneShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "dnsforwardzone_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res dnsforwardzoneShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DnsforwardzoneShowArgs struct { -} + } type DnsforwardzoneShowOptionalArgs struct { - - /* - Zone name - Zone name (FQDN) - */ - Idnsname *string `json:"idnsname,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Zone name +Zone name (FQDN) + */ + Idnsname *string `json:"idnsname,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type dnsforwardzoneShowKwParams struct { - *DnsforwardzoneShowArgs - *DnsforwardzoneShowOptionalArgs + *DnsforwardzoneShowArgs + *DnsforwardzoneShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type dnsforwardzoneShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DnsforwardzoneShowResult `json:"result"` } type DnsforwardzoneShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Dnsforwardzone `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Dnsforwardzone `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *DnsforwardzoneShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DnsforwardzoneShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DnsforwardzoneShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DnsforwardzoneShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DnsforwardzoneShowResult%v", string(b)) } /* Add new DNS resource record. */ func (c *Client) DnsrecordAdd( - reqArgs *DnsrecordAddArgs, - optArgs *DnsrecordAddOptionalArgs, // can be nil + reqArgs *DnsrecordAddArgs, + optArgs *DnsrecordAddOptionalArgs, // can be nil ) (*DnsrecordAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := dnsrecordAddKwParams{ - DnsrecordAddArgs: reqArgs, - DnsrecordAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "dnsrecord_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res dnsrecordAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := dnsrecordAddKwParams{ + DnsrecordAddArgs: reqArgs, + DnsrecordAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "dnsrecord_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res dnsrecordAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DnsrecordAddArgs struct { - - /* - Record name - Record name - */ - Idnsname string `json:"idnsname,omitempty"` -} + + /* +Record name +Record name + */ + Idnsname string `json:"idnsname,omitempty"` + } type DnsrecordAddOptionalArgs struct { - - /* - Zone name - Zone name (FQDN) - */ - Dnszoneidnsname *string `json:"dnszoneidnsname,omitempty"` - - /* - Time to live - Time to live - */ - Dnsttl *int `json:"dnsttl,omitempty"` - - /* - - - */ - Dnsclass *string `json:"dnsclass,omitempty"` - - /* - A record - Raw A records - */ - Arecord *[]string `json:"arecord,omitempty"` - - /* - A IP Address - - */ - APartIPAddress *string `json:"a_part_ip_address,omitempty"` - - /* - A Create reverse - Create reverse record for this IP Address - */ - AExtraCreateReverse *bool `json:"a_extra_create_reverse,omitempty"` - - /* - AAAA record - Raw AAAA records - */ - Aaaarecord *[]string `json:"aaaarecord,omitempty"` - - /* - AAAA IP Address - - */ - AaaaPartIPAddress *string `json:"aaaa_part_ip_address,omitempty"` - - /* - AAAA Create reverse - Create reverse record for this IP Address - */ - AaaaExtraCreateReverse *bool `json:"aaaa_extra_create_reverse,omitempty"` - - /* - A6 record - Raw A6 records - */ - A6record *[]string `json:"a6record,omitempty"` - - /* - A6 Record data - - */ - A6PartData *string `json:"a6_part_data,omitempty"` - - /* - AFSDB record - Raw AFSDB records - */ - Afsdbrecord *[]string `json:"afsdbrecord,omitempty"` - - /* - AFSDB Subtype - - */ - AfsdbPartSubtype *int `json:"afsdb_part_subtype,omitempty"` - - /* - AFSDB Hostname - - */ - AfsdbPartHostname *string `json:"afsdb_part_hostname,omitempty"` - - /* - APL record - Raw APL records - */ - Aplrecord *[]string `json:"aplrecord,omitempty"` - - /* - CERT record - Raw CERT records - */ - Certrecord *[]string `json:"certrecord,omitempty"` - - /* - CERT Certificate Type - - */ - CertPartType *int `json:"cert_part_type,omitempty"` - - /* - CERT Key Tag - - */ - CertPartKeyTag *int `json:"cert_part_key_tag,omitempty"` - - /* - CERT Algorithm - - */ - CertPartAlgorithm *int `json:"cert_part_algorithm,omitempty"` - - /* - CERT Certificate/CRL - - */ - CertPartCertificateOrCrl *string `json:"cert_part_certificate_or_crl,omitempty"` - - /* - CNAME record - Raw CNAME records - */ - Cnamerecord *[]string `json:"cnamerecord,omitempty"` - - /* - CNAME Hostname - A hostname which this alias hostname points to - */ - CnamePartHostname *string `json:"cname_part_hostname,omitempty"` - - /* - DHCID record - Raw DHCID records - */ - Dhcidrecord *[]string `json:"dhcidrecord,omitempty"` - - /* - DLV record - Raw DLV records - */ - Dlvrecord *[]string `json:"dlvrecord,omitempty"` - - /* - DLV Key Tag - - */ - DlvPartKeyTag *int `json:"dlv_part_key_tag,omitempty"` - - /* - DLV Algorithm - - */ - DlvPartAlgorithm *int `json:"dlv_part_algorithm,omitempty"` - - /* - DLV Digest Type - - */ - DlvPartDigestType *int `json:"dlv_part_digest_type,omitempty"` - - /* - DLV Digest - - */ - DlvPartDigest *string `json:"dlv_part_digest,omitempty"` - - /* - DNAME record - Raw DNAME records - */ - Dnamerecord *[]string `json:"dnamerecord,omitempty"` - - /* - DNAME Target - - */ - DnamePartTarget *string `json:"dname_part_target,omitempty"` - - /* - DS record - Raw DS records - */ - Dsrecord *[]string `json:"dsrecord,omitempty"` - - /* - DS Key Tag - - */ - DsPartKeyTag *int `json:"ds_part_key_tag,omitempty"` - - /* - DS Algorithm - - */ - DsPartAlgorithm *int `json:"ds_part_algorithm,omitempty"` - - /* - DS Digest Type - - */ - DsPartDigestType *int `json:"ds_part_digest_type,omitempty"` - - /* - DS Digest - - */ - DsPartDigest *string `json:"ds_part_digest,omitempty"` - - /* - HIP record - Raw HIP records - */ - Hiprecord *[]string `json:"hiprecord,omitempty"` - - /* - IPSECKEY record - Raw IPSECKEY records - */ - Ipseckeyrecord *[]string `json:"ipseckeyrecord,omitempty"` - - /* - KEY record - Raw KEY records - */ - Keyrecord *[]string `json:"keyrecord,omitempty"` - - /* - KX record - Raw KX records - */ - Kxrecord *[]string `json:"kxrecord,omitempty"` - - /* - KX Preference - Preference given to this exchanger. Lower values are more preferred - */ - KxPartPreference *int `json:"kx_part_preference,omitempty"` - - /* - KX Exchanger - A host willing to act as a key exchanger - */ - KxPartExchanger *string `json:"kx_part_exchanger,omitempty"` - - /* - LOC record - Raw LOC records - */ - Locrecord *[]string `json:"locrecord,omitempty"` - - /* - LOC Degrees Latitude - - */ - LocPartLatDeg *int `json:"loc_part_lat_deg,omitempty"` - - /* - LOC Minutes Latitude - - */ - LocPartLatMin *int `json:"loc_part_lat_min,omitempty"` - - /* - LOC Seconds Latitude - - */ - LocPartLatSec *float64 `json:"loc_part_lat_sec,omitempty"` - - /* - LOC Direction Latitude - - */ - LocPartLatDir *string `json:"loc_part_lat_dir,omitempty"` - - /* - LOC Degrees Longitude - - */ - LocPartLonDeg *int `json:"loc_part_lon_deg,omitempty"` - - /* - LOC Minutes Longitude - - */ - LocPartLonMin *int `json:"loc_part_lon_min,omitempty"` - - /* - LOC Seconds Longitude - - */ - LocPartLonSec *float64 `json:"loc_part_lon_sec,omitempty"` - - /* - LOC Direction Longitude - - */ - LocPartLonDir *string `json:"loc_part_lon_dir,omitempty"` - - /* - LOC Altitude - - */ - LocPartAltitude *float64 `json:"loc_part_altitude,omitempty"` - - /* - LOC Size - - */ - LocPartSize *float64 `json:"loc_part_size,omitempty"` - - /* - LOC Horizontal Precision - - */ - LocPartHPrecision *float64 `json:"loc_part_h_precision,omitempty"` - - /* - LOC Vertical Precision - - */ - LocPartVPrecision *float64 `json:"loc_part_v_precision,omitempty"` - - /* - MX record - Raw MX records - */ - Mxrecord *[]string `json:"mxrecord,omitempty"` - - /* - MX Preference - Preference given to this exchanger. Lower values are more preferred - */ - MxPartPreference *int `json:"mx_part_preference,omitempty"` - - /* - MX Exchanger - A host willing to act as a mail exchanger - */ - MxPartExchanger *string `json:"mx_part_exchanger,omitempty"` - - /* - NAPTR record - Raw NAPTR records - */ - Naptrrecord *[]string `json:"naptrrecord,omitempty"` - - /* - NAPTR Order - - */ - NaptrPartOrder *int `json:"naptr_part_order,omitempty"` - - /* - NAPTR Preference - - */ - NaptrPartPreference *int `json:"naptr_part_preference,omitempty"` - - /* - NAPTR Flags - - */ - NaptrPartFlags *string `json:"naptr_part_flags,omitempty"` - - /* - NAPTR Service - - */ - NaptrPartService *string `json:"naptr_part_service,omitempty"` - - /* - NAPTR Regular Expression - - */ - NaptrPartRegexp *string `json:"naptr_part_regexp,omitempty"` - - /* - NAPTR Replacement - - */ - NaptrPartReplacement *string `json:"naptr_part_replacement,omitempty"` - - /* - NS record - Raw NS records - */ - Nsrecord *[]string `json:"nsrecord,omitempty"` - - /* - NS Hostname - - */ - NsPartHostname *string `json:"ns_part_hostname,omitempty"` - - /* - NSEC record - Raw NSEC records - */ - Nsecrecord *[]string `json:"nsecrecord,omitempty"` - - /* - PTR record - Raw PTR records - */ - Ptrrecord *[]string `json:"ptrrecord,omitempty"` - - /* - PTR Hostname - The hostname this reverse record points to - */ - PtrPartHostname *string `json:"ptr_part_hostname,omitempty"` - - /* - RRSIG record - Raw RRSIG records - */ - Rrsigrecord *[]string `json:"rrsigrecord,omitempty"` - - /* - RP record - Raw RP records - */ - Rprecord *[]string `json:"rprecord,omitempty"` - - /* - SIG record - Raw SIG records - */ - Sigrecord *[]string `json:"sigrecord,omitempty"` - - /* - SPF record - Raw SPF records - */ - Spfrecord *[]string `json:"spfrecord,omitempty"` - - /* - SRV record - Raw SRV records - */ - Srvrecord *[]string `json:"srvrecord,omitempty"` - - /* - SRV Priority - - */ - SrvPartPriority *int `json:"srv_part_priority,omitempty"` - - /* - SRV Weight - - */ - SrvPartWeight *int `json:"srv_part_weight,omitempty"` - - /* - SRV Port - - */ - SrvPartPort *int `json:"srv_part_port,omitempty"` - - /* - SRV Target - The domain name of the target host or '.' if the service is decidedly not available at this domain - */ - SrvPartTarget *string `json:"srv_part_target,omitempty"` - - /* - SSHFP record - Raw SSHFP records - */ - Sshfprecord *[]string `json:"sshfprecord,omitempty"` - - /* - SSHFP Algorithm - - */ - SshfpPartAlgorithm *int `json:"sshfp_part_algorithm,omitempty"` - - /* - SSHFP Fingerprint Type - - */ - SshfpPartFpType *int `json:"sshfp_part_fp_type,omitempty"` - - /* - SSHFP Fingerprint - - */ - SshfpPartFingerprint *string `json:"sshfp_part_fingerprint,omitempty"` - - /* - TLSA record - Raw TLSA records - */ - Tlsarecord *[]string `json:"tlsarecord,omitempty"` - - /* - TLSA Certificate Usage - - */ - TlsaPartCertUsage *int `json:"tlsa_part_cert_usage,omitempty"` - - /* - TLSA Selector - - */ - TlsaPartSelector *int `json:"tlsa_part_selector,omitempty"` - - /* - TLSA Matching Type - - */ - TlsaPartMatchingType *int `json:"tlsa_part_matching_type,omitempty"` - - /* - TLSA Certificate Association Data - - */ - TlsaPartCertAssociationData *string `json:"tlsa_part_cert_association_data,omitempty"` - - /* - TXT record - Raw TXT records - */ - Txtrecord *[]string `json:"txtrecord,omitempty"` - - /* - TXT Text Data - - */ - TxtPartData *string `json:"txt_part_data,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - Force - force NS record creation even if its hostname is not in DNS - */ - Force *bool `json:"force,omitempty"` - - /* - Structured - Parse all raw DNS records and return them in a structured way - */ - Structured *bool `json:"structured,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Zone name +Zone name (FQDN) + */ + Dnszoneidnsname *string `json:"dnszoneidnsname,omitempty"` + + /* +Time to live +Time to live + */ + Dnsttl *int `json:"dnsttl,omitempty"` + + /* + + + */ + Dnsclass *string `json:"dnsclass,omitempty"` + + /* +A record +Raw A records + */ + Arecord *[]string `json:"arecord,omitempty"` + + /* +A IP Address + + */ + APartIPAddress *string `json:"a_part_ip_address,omitempty"` + + /* +A Create reverse +Create reverse record for this IP Address + */ + AExtraCreateReverse *bool `json:"a_extra_create_reverse,omitempty"` + + /* +AAAA record +Raw AAAA records + */ + Aaaarecord *[]string `json:"aaaarecord,omitempty"` + + /* +AAAA IP Address + + */ + AaaaPartIPAddress *string `json:"aaaa_part_ip_address,omitempty"` + + /* +AAAA Create reverse +Create reverse record for this IP Address + */ + AaaaExtraCreateReverse *bool `json:"aaaa_extra_create_reverse,omitempty"` + + /* +A6 record +Raw A6 records + */ + A6record *[]string `json:"a6record,omitempty"` + + /* +A6 Record data + + */ + A6PartData *string `json:"a6_part_data,omitempty"` + + /* +AFSDB record +Raw AFSDB records + */ + Afsdbrecord *[]string `json:"afsdbrecord,omitempty"` + + /* +AFSDB Subtype + + */ + AfsdbPartSubtype *int `json:"afsdb_part_subtype,omitempty"` + + /* +AFSDB Hostname + + */ + AfsdbPartHostname *string `json:"afsdb_part_hostname,omitempty"` + + /* +APL record +Raw APL records + */ + Aplrecord *[]string `json:"aplrecord,omitempty"` + + /* +CERT record +Raw CERT records + */ + Certrecord *[]string `json:"certrecord,omitempty"` + + /* +CERT Certificate Type + + */ + CertPartType *int `json:"cert_part_type,omitempty"` + + /* +CERT Key Tag + + */ + CertPartKeyTag *int `json:"cert_part_key_tag,omitempty"` + + /* +CERT Algorithm + + */ + CertPartAlgorithm *int `json:"cert_part_algorithm,omitempty"` + + /* +CERT Certificate/CRL + + */ + CertPartCertificateOrCrl *string `json:"cert_part_certificate_or_crl,omitempty"` + + /* +CNAME record +Raw CNAME records + */ + Cnamerecord *[]string `json:"cnamerecord,omitempty"` + + /* +CNAME Hostname +A hostname which this alias hostname points to + */ + CnamePartHostname *string `json:"cname_part_hostname,omitempty"` + + /* +DHCID record +Raw DHCID records + */ + Dhcidrecord *[]string `json:"dhcidrecord,omitempty"` + + /* +DLV record +Raw DLV records + */ + Dlvrecord *[]string `json:"dlvrecord,omitempty"` + + /* +DLV Key Tag + + */ + DlvPartKeyTag *int `json:"dlv_part_key_tag,omitempty"` + + /* +DLV Algorithm + + */ + DlvPartAlgorithm *int `json:"dlv_part_algorithm,omitempty"` + + /* +DLV Digest Type + + */ + DlvPartDigestType *int `json:"dlv_part_digest_type,omitempty"` + + /* +DLV Digest + + */ + DlvPartDigest *string `json:"dlv_part_digest,omitempty"` + + /* +DNAME record +Raw DNAME records + */ + Dnamerecord *[]string `json:"dnamerecord,omitempty"` + + /* +DNAME Target + + */ + DnamePartTarget *string `json:"dname_part_target,omitempty"` + + /* +DS record +Raw DS records + */ + Dsrecord *[]string `json:"dsrecord,omitempty"` + + /* +DS Key Tag + + */ + DsPartKeyTag *int `json:"ds_part_key_tag,omitempty"` + + /* +DS Algorithm + + */ + DsPartAlgorithm *int `json:"ds_part_algorithm,omitempty"` + + /* +DS Digest Type + + */ + DsPartDigestType *int `json:"ds_part_digest_type,omitempty"` + + /* +DS Digest + + */ + DsPartDigest *string `json:"ds_part_digest,omitempty"` + + /* +HIP record +Raw HIP records + */ + Hiprecord *[]string `json:"hiprecord,omitempty"` + + /* +IPSECKEY record +Raw IPSECKEY records + */ + Ipseckeyrecord *[]string `json:"ipseckeyrecord,omitempty"` + + /* +KEY record +Raw KEY records + */ + Keyrecord *[]string `json:"keyrecord,omitempty"` + + /* +KX record +Raw KX records + */ + Kxrecord *[]string `json:"kxrecord,omitempty"` + + /* +KX Preference +Preference given to this exchanger. Lower values are more preferred + */ + KxPartPreference *int `json:"kx_part_preference,omitempty"` + + /* +KX Exchanger +A host willing to act as a key exchanger + */ + KxPartExchanger *string `json:"kx_part_exchanger,omitempty"` + + /* +LOC record +Raw LOC records + */ + Locrecord *[]string `json:"locrecord,omitempty"` + + /* +LOC Degrees Latitude + + */ + LocPartLatDeg *int `json:"loc_part_lat_deg,omitempty"` + + /* +LOC Minutes Latitude + + */ + LocPartLatMin *int `json:"loc_part_lat_min,omitempty"` + + /* +LOC Seconds Latitude + + */ + LocPartLatSec *float64 `json:"loc_part_lat_sec,omitempty"` + + /* +LOC Direction Latitude + + */ + LocPartLatDir *string `json:"loc_part_lat_dir,omitempty"` + + /* +LOC Degrees Longitude + + */ + LocPartLonDeg *int `json:"loc_part_lon_deg,omitempty"` + + /* +LOC Minutes Longitude + + */ + LocPartLonMin *int `json:"loc_part_lon_min,omitempty"` + + /* +LOC Seconds Longitude + + */ + LocPartLonSec *float64 `json:"loc_part_lon_sec,omitempty"` + + /* +LOC Direction Longitude + + */ + LocPartLonDir *string `json:"loc_part_lon_dir,omitempty"` + + /* +LOC Altitude + + */ + LocPartAltitude *float64 `json:"loc_part_altitude,omitempty"` + + /* +LOC Size + + */ + LocPartSize *float64 `json:"loc_part_size,omitempty"` + + /* +LOC Horizontal Precision + + */ + LocPartHPrecision *float64 `json:"loc_part_h_precision,omitempty"` + + /* +LOC Vertical Precision + + */ + LocPartVPrecision *float64 `json:"loc_part_v_precision,omitempty"` + + /* +MX record +Raw MX records + */ + Mxrecord *[]string `json:"mxrecord,omitempty"` + + /* +MX Preference +Preference given to this exchanger. Lower values are more preferred + */ + MxPartPreference *int `json:"mx_part_preference,omitempty"` + + /* +MX Exchanger +A host willing to act as a mail exchanger + */ + MxPartExchanger *string `json:"mx_part_exchanger,omitempty"` + + /* +NAPTR record +Raw NAPTR records + */ + Naptrrecord *[]string `json:"naptrrecord,omitempty"` + + /* +NAPTR Order + + */ + NaptrPartOrder *int `json:"naptr_part_order,omitempty"` + + /* +NAPTR Preference + + */ + NaptrPartPreference *int `json:"naptr_part_preference,omitempty"` + + /* +NAPTR Flags + + */ + NaptrPartFlags *string `json:"naptr_part_flags,omitempty"` + + /* +NAPTR Service + + */ + NaptrPartService *string `json:"naptr_part_service,omitempty"` + + /* +NAPTR Regular Expression + + */ + NaptrPartRegexp *string `json:"naptr_part_regexp,omitempty"` + + /* +NAPTR Replacement + + */ + NaptrPartReplacement *string `json:"naptr_part_replacement,omitempty"` + + /* +NS record +Raw NS records + */ + Nsrecord *[]string `json:"nsrecord,omitempty"` + + /* +NS Hostname + + */ + NsPartHostname *string `json:"ns_part_hostname,omitempty"` + + /* +NSEC record +Raw NSEC records + */ + Nsecrecord *[]string `json:"nsecrecord,omitempty"` + + /* +PTR record +Raw PTR records + */ + Ptrrecord *[]string `json:"ptrrecord,omitempty"` + + /* +PTR Hostname +The hostname this reverse record points to + */ + PtrPartHostname *string `json:"ptr_part_hostname,omitempty"` + + /* +RRSIG record +Raw RRSIG records + */ + Rrsigrecord *[]string `json:"rrsigrecord,omitempty"` + + /* +RP record +Raw RP records + */ + Rprecord *[]string `json:"rprecord,omitempty"` + + /* +SIG record +Raw SIG records + */ + Sigrecord *[]string `json:"sigrecord,omitempty"` + + /* +SPF record +Raw SPF records + */ + Spfrecord *[]string `json:"spfrecord,omitempty"` + + /* +SRV record +Raw SRV records + */ + Srvrecord *[]string `json:"srvrecord,omitempty"` + + /* +SRV Priority (order) +Lower number means higher priority. Clients will attempt to contact the server with the lowest-numbered priority they can reach. + */ + SrvPartPriority *int `json:"srv_part_priority,omitempty"` + + /* +SRV Weight +Relative weight for entries with the same priority. + */ + SrvPartWeight *int `json:"srv_part_weight,omitempty"` + + /* +SRV Port + + */ + SrvPartPort *int `json:"srv_part_port,omitempty"` + + /* +SRV Target +The domain name of the target host or '.' if the service is decidedly not available at this domain + */ + SrvPartTarget *string `json:"srv_part_target,omitempty"` + + /* +SSHFP record +Raw SSHFP records + */ + Sshfprecord *[]string `json:"sshfprecord,omitempty"` + + /* +SSHFP Algorithm + + */ + SshfpPartAlgorithm *int `json:"sshfp_part_algorithm,omitempty"` + + /* +SSHFP Fingerprint Type + + */ + SshfpPartFpType *int `json:"sshfp_part_fp_type,omitempty"` + + /* +SSHFP Fingerprint + + */ + SshfpPartFingerprint *string `json:"sshfp_part_fingerprint,omitempty"` + + /* +TLSA record +Raw TLSA records + */ + Tlsarecord *[]string `json:"tlsarecord,omitempty"` + + /* +TLSA Certificate Usage + + */ + TlsaPartCertUsage *int `json:"tlsa_part_cert_usage,omitempty"` + + /* +TLSA Selector + + */ + TlsaPartSelector *int `json:"tlsa_part_selector,omitempty"` + + /* +TLSA Matching Type + + */ + TlsaPartMatchingType *int `json:"tlsa_part_matching_type,omitempty"` + + /* +TLSA Certificate Association Data + + */ + TlsaPartCertAssociationData *string `json:"tlsa_part_cert_association_data,omitempty"` + + /* +TXT record +Raw TXT records + */ + Txtrecord *[]string `json:"txtrecord,omitempty"` + + /* +TXT Text Data + + */ + TxtPartData *string `json:"txt_part_data,omitempty"` + + /* +URI record +Raw URI records + */ + Urirecord *[]string `json:"urirecord,omitempty"` + + /* +URI Priority (order) +Lower number means higher priority. Clients will attempt to contact the URI with the lowest-numbered priority they can reach. + */ + URIPartPriority *int `json:"uri_part_priority,omitempty"` + + /* +URI Weight +Relative weight for entries with the same priority. + */ + URIPartWeight *int `json:"uri_part_weight,omitempty"` + + /* +URI Target Uniform Resource Identifier +Target Uniform Resource Identifier according to RFC 3986 + */ + URIPartTarget *string `json:"uri_part_target,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* +Force +force NS record creation even if its hostname is not in DNS + */ + Force *bool `json:"force,omitempty"` + + /* +Structured +Parse all raw DNS records and return them in a structured way + */ + Structured *bool `json:"structured,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type dnsrecordAddKwParams struct { - *DnsrecordAddArgs - *DnsrecordAddOptionalArgs + *DnsrecordAddArgs + *DnsrecordAddOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type dnsrecordAddResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DnsrecordAddResult `json:"result"` } type DnsrecordAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Dnsrecord `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Dnsrecord `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *DnsrecordAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DnsrecordAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DnsrecordAddResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DnsrecordAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DnsrecordAddResult%v", string(b)) } /* Delete DNS resource record. */ func (c *Client) DnsrecordDel( - reqArgs *DnsrecordDelArgs, - optArgs *DnsrecordDelOptionalArgs, // can be nil + reqArgs *DnsrecordDelArgs, + optArgs *DnsrecordDelOptionalArgs, // can be nil ) (*DnsrecordDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := dnsrecordDelKwParams{ - DnsrecordDelArgs: reqArgs, - DnsrecordDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "dnsrecord_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res dnsrecordDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := dnsrecordDelKwParams{ + DnsrecordDelArgs: reqArgs, + DnsrecordDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "dnsrecord_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res dnsrecordDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DnsrecordDelArgs struct { - - /* - Record name - Record name - */ - Idnsname string `json:"idnsname,omitempty"` -} + + /* +Record name +Record name + */ + Idnsname string `json:"idnsname,omitempty"` + } type DnsrecordDelOptionalArgs struct { - - /* - Zone name - Zone name (FQDN) - */ - Dnszoneidnsname *string `json:"dnszoneidnsname,omitempty"` - - /* - Time to live - Time to live - */ - Dnsttl *int `json:"dnsttl,omitempty"` - - /* - - - */ - Dnsclass *string `json:"dnsclass,omitempty"` - - /* - A record - Raw A records - */ - Arecord *[]string `json:"arecord,omitempty"` - - /* - AAAA record - Raw AAAA records - */ - Aaaarecord *[]string `json:"aaaarecord,omitempty"` - - /* - A6 record - Raw A6 records - */ - A6record *[]string `json:"a6record,omitempty"` - - /* - AFSDB record - Raw AFSDB records - */ - Afsdbrecord *[]string `json:"afsdbrecord,omitempty"` - - /* - APL record - Raw APL records - */ - Aplrecord *[]string `json:"aplrecord,omitempty"` - - /* - CERT record - Raw CERT records - */ - Certrecord *[]string `json:"certrecord,omitempty"` - - /* - CNAME record - Raw CNAME records - */ - Cnamerecord *[]string `json:"cnamerecord,omitempty"` - - /* - DHCID record - Raw DHCID records - */ - Dhcidrecord *[]string `json:"dhcidrecord,omitempty"` - - /* - DLV record - Raw DLV records - */ - Dlvrecord *[]string `json:"dlvrecord,omitempty"` - - /* - DNAME record - Raw DNAME records - */ - Dnamerecord *[]string `json:"dnamerecord,omitempty"` - - /* - DS record - Raw DS records - */ - Dsrecord *[]string `json:"dsrecord,omitempty"` - - /* - HIP record - Raw HIP records - */ - Hiprecord *[]string `json:"hiprecord,omitempty"` - - /* - IPSECKEY record - Raw IPSECKEY records - */ - Ipseckeyrecord *[]string `json:"ipseckeyrecord,omitempty"` - - /* - KEY record - Raw KEY records - */ - Keyrecord *[]string `json:"keyrecord,omitempty"` - - /* - KX record - Raw KX records - */ - Kxrecord *[]string `json:"kxrecord,omitempty"` - - /* - LOC record - Raw LOC records - */ - Locrecord *[]string `json:"locrecord,omitempty"` - - /* - MX record - Raw MX records - */ - Mxrecord *[]string `json:"mxrecord,omitempty"` - - /* - NAPTR record - Raw NAPTR records - */ - Naptrrecord *[]string `json:"naptrrecord,omitempty"` - - /* - NS record - Raw NS records - */ - Nsrecord *[]string `json:"nsrecord,omitempty"` - - /* - NSEC record - Raw NSEC records - */ - Nsecrecord *[]string `json:"nsecrecord,omitempty"` - - /* - PTR record - Raw PTR records - */ - Ptrrecord *[]string `json:"ptrrecord,omitempty"` - - /* - RRSIG record - Raw RRSIG records - */ - Rrsigrecord *[]string `json:"rrsigrecord,omitempty"` - - /* - RP record - Raw RP records - */ - Rprecord *[]string `json:"rprecord,omitempty"` - - /* - SIG record - Raw SIG records - */ - Sigrecord *[]string `json:"sigrecord,omitempty"` - - /* - SPF record - Raw SPF records - */ - Spfrecord *[]string `json:"spfrecord,omitempty"` - - /* - SRV record - Raw SRV records - */ - Srvrecord *[]string `json:"srvrecord,omitempty"` - - /* - SSHFP record - Raw SSHFP records - */ - Sshfprecord *[]string `json:"sshfprecord,omitempty"` - - /* - TLSA record - Raw TLSA records - */ - Tlsarecord *[]string `json:"tlsarecord,omitempty"` - - /* - TXT record - Raw TXT records - */ - Txtrecord *[]string `json:"txtrecord,omitempty"` - - /* - Delete all associated records - - */ - DelAll *bool `json:"del_all,omitempty"` - - /* - Structured - Parse all raw DNS records and return them in a structured way - */ - Structured *bool `json:"structured,omitempty"` - - /* - - - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Zone name +Zone name (FQDN) + */ + Dnszoneidnsname *string `json:"dnszoneidnsname,omitempty"` + + /* +Time to live +Time to live + */ + Dnsttl *int `json:"dnsttl,omitempty"` + + /* + + + */ + Dnsclass *string `json:"dnsclass,omitempty"` + + /* +A record +Raw A records + */ + Arecord *[]string `json:"arecord,omitempty"` + + /* +AAAA record +Raw AAAA records + */ + Aaaarecord *[]string `json:"aaaarecord,omitempty"` + + /* +A6 record +Raw A6 records + */ + A6record *[]string `json:"a6record,omitempty"` + + /* +AFSDB record +Raw AFSDB records + */ + Afsdbrecord *[]string `json:"afsdbrecord,omitempty"` + + /* +APL record +Raw APL records + */ + Aplrecord *[]string `json:"aplrecord,omitempty"` + + /* +CERT record +Raw CERT records + */ + Certrecord *[]string `json:"certrecord,omitempty"` + + /* +CNAME record +Raw CNAME records + */ + Cnamerecord *[]string `json:"cnamerecord,omitempty"` + + /* +DHCID record +Raw DHCID records + */ + Dhcidrecord *[]string `json:"dhcidrecord,omitempty"` + + /* +DLV record +Raw DLV records + */ + Dlvrecord *[]string `json:"dlvrecord,omitempty"` + + /* +DNAME record +Raw DNAME records + */ + Dnamerecord *[]string `json:"dnamerecord,omitempty"` + + /* +DS record +Raw DS records + */ + Dsrecord *[]string `json:"dsrecord,omitempty"` + + /* +HIP record +Raw HIP records + */ + Hiprecord *[]string `json:"hiprecord,omitempty"` + + /* +IPSECKEY record +Raw IPSECKEY records + */ + Ipseckeyrecord *[]string `json:"ipseckeyrecord,omitempty"` + + /* +KEY record +Raw KEY records + */ + Keyrecord *[]string `json:"keyrecord,omitempty"` + + /* +KX record +Raw KX records + */ + Kxrecord *[]string `json:"kxrecord,omitempty"` + + /* +LOC record +Raw LOC records + */ + Locrecord *[]string `json:"locrecord,omitempty"` + + /* +MX record +Raw MX records + */ + Mxrecord *[]string `json:"mxrecord,omitempty"` + + /* +NAPTR record +Raw NAPTR records + */ + Naptrrecord *[]string `json:"naptrrecord,omitempty"` + + /* +NS record +Raw NS records + */ + Nsrecord *[]string `json:"nsrecord,omitempty"` + + /* +NSEC record +Raw NSEC records + */ + Nsecrecord *[]string `json:"nsecrecord,omitempty"` + + /* +PTR record +Raw PTR records + */ + Ptrrecord *[]string `json:"ptrrecord,omitempty"` + + /* +RRSIG record +Raw RRSIG records + */ + Rrsigrecord *[]string `json:"rrsigrecord,omitempty"` + + /* +RP record +Raw RP records + */ + Rprecord *[]string `json:"rprecord,omitempty"` + + /* +SIG record +Raw SIG records + */ + Sigrecord *[]string `json:"sigrecord,omitempty"` + + /* +SPF record +Raw SPF records + */ + Spfrecord *[]string `json:"spfrecord,omitempty"` + + /* +SRV record +Raw SRV records + */ + Srvrecord *[]string `json:"srvrecord,omitempty"` + + /* +SSHFP record +Raw SSHFP records + */ + Sshfprecord *[]string `json:"sshfprecord,omitempty"` + + /* +TLSA record +Raw TLSA records + */ + Tlsarecord *[]string `json:"tlsarecord,omitempty"` + + /* +TXT record +Raw TXT records + */ + Txtrecord *[]string `json:"txtrecord,omitempty"` + + /* +URI record +Raw URI records + */ + Urirecord *[]string `json:"urirecord,omitempty"` + + /* +Delete all associated records + + */ + DelAll *bool `json:"del_all,omitempty"` + + /* +Structured +Parse all raw DNS records and return them in a structured way + */ + Structured *bool `json:"structured,omitempty"` + + /* + + + */ + Raw *bool `json:"raw,omitempty"` + } type dnsrecordDelKwParams struct { - *DnsrecordDelArgs - *DnsrecordDelOptionalArgs + *DnsrecordDelArgs + *DnsrecordDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type dnsrecordDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DnsrecordDelResult `json:"result"` } type DnsrecordDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } func (t *DnsrecordDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DnsrecordDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DnsrecordDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DnsrecordDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DnsrecordDelResult%v", string(b)) } /* Delete DNS record entry. */ func (c *Client) DnsrecordDelentry( - reqArgs *DnsrecordDelentryArgs, - optArgs *DnsrecordDelentryOptionalArgs, // can be nil + reqArgs *DnsrecordDelentryArgs, + optArgs *DnsrecordDelentryOptionalArgs, // can be nil ) (*DnsrecordDelentryResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := dnsrecordDelentryKwParams{ - DnsrecordDelentryArgs: reqArgs, - DnsrecordDelentryOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "dnsrecord_delentry", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res dnsrecordDelentryResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := dnsrecordDelentryKwParams{ + DnsrecordDelentryArgs: reqArgs, + DnsrecordDelentryOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "dnsrecord_delentry", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res dnsrecordDelentryResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DnsrecordDelentryArgs struct { - - /* - Record name - Record name - */ - Idnsname []string `json:"idnsname,omitempty"` -} + + /* +Record name +Record name + */ + Idnsname []string `json:"idnsname,omitempty"` + } type DnsrecordDelentryOptionalArgs struct { - - /* - Zone name - Zone name (FQDN) - */ - Dnszoneidnsname *string `json:"dnszoneidnsname,omitempty"` - - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` -} + + /* +Zone name +Zone name (FQDN) + */ + Dnszoneidnsname *string `json:"dnszoneidnsname,omitempty"` + + /* + +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } type dnsrecordDelentryKwParams struct { - *DnsrecordDelentryArgs - *DnsrecordDelentryOptionalArgs + *DnsrecordDelentryArgs + *DnsrecordDelentryOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type dnsrecordDelentryResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DnsrecordDelentryResult `json:"result"` } type DnsrecordDelentryResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } func (t *DnsrecordDelentryResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DnsrecordDelentryResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DnsrecordDelentryResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DnsrecordDelentryResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DnsrecordDelentryResult%v", string(b)) } /* Search for DNS resources. */ func (c *Client) DnsrecordFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *DnsrecordFindArgs, - optArgs *DnsrecordFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *DnsrecordFindArgs, + optArgs *DnsrecordFindOptionalArgs, // can be nil ) (*DnsrecordFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := dnsrecordFindKwParams{ - DnsrecordFindArgs: reqArgs, - DnsrecordFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "dnsrecord_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res dnsrecordFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := dnsrecordFindKwParams{ + DnsrecordFindArgs: reqArgs, + DnsrecordFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "dnsrecord_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res dnsrecordFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DnsrecordFindArgs struct { -} + } type DnsrecordFindOptionalArgs struct { - - /* - Zone name - Zone name (FQDN) - */ - Dnszoneidnsname *string `json:"dnszoneidnsname,omitempty"` - - /* - Record name - Record name - */ - Idnsname *string `json:"idnsname,omitempty"` - - /* - Time to live - Time to live - */ - Dnsttl *int `json:"dnsttl,omitempty"` - - /* - - - */ - Dnsclass *string `json:"dnsclass,omitempty"` - - /* - A record - Raw A records - */ - Arecord *[]string `json:"arecord,omitempty"` - - /* - AAAA record - Raw AAAA records - */ - Aaaarecord *[]string `json:"aaaarecord,omitempty"` - - /* - A6 record - Raw A6 records - */ - A6record *[]string `json:"a6record,omitempty"` - - /* - AFSDB record - Raw AFSDB records - */ - Afsdbrecord *[]string `json:"afsdbrecord,omitempty"` - - /* - APL record - Raw APL records - */ - Aplrecord *[]string `json:"aplrecord,omitempty"` - - /* - CERT record - Raw CERT records - */ - Certrecord *[]string `json:"certrecord,omitempty"` - - /* - CNAME record - Raw CNAME records - */ - Cnamerecord *[]string `json:"cnamerecord,omitempty"` - - /* - DHCID record - Raw DHCID records - */ - Dhcidrecord *[]string `json:"dhcidrecord,omitempty"` - - /* - DLV record - Raw DLV records - */ - Dlvrecord *[]string `json:"dlvrecord,omitempty"` - - /* - DNAME record - Raw DNAME records - */ - Dnamerecord *[]string `json:"dnamerecord,omitempty"` - - /* - DS record - Raw DS records - */ - Dsrecord *[]string `json:"dsrecord,omitempty"` - - /* - HIP record - Raw HIP records - */ - Hiprecord *[]string `json:"hiprecord,omitempty"` - - /* - IPSECKEY record - Raw IPSECKEY records - */ - Ipseckeyrecord *[]string `json:"ipseckeyrecord,omitempty"` - - /* - KEY record - Raw KEY records - */ - Keyrecord *[]string `json:"keyrecord,omitempty"` - - /* - KX record - Raw KX records - */ - Kxrecord *[]string `json:"kxrecord,omitempty"` - - /* - LOC record - Raw LOC records - */ - Locrecord *[]string `json:"locrecord,omitempty"` - - /* - MX record - Raw MX records - */ - Mxrecord *[]string `json:"mxrecord,omitempty"` - - /* - NAPTR record - Raw NAPTR records - */ - Naptrrecord *[]string `json:"naptrrecord,omitempty"` - - /* - NS record - Raw NS records - */ - Nsrecord *[]string `json:"nsrecord,omitempty"` - - /* - NSEC record - Raw NSEC records - */ - Nsecrecord *[]string `json:"nsecrecord,omitempty"` - - /* - PTR record - Raw PTR records - */ - Ptrrecord *[]string `json:"ptrrecord,omitempty"` - - /* - RRSIG record - Raw RRSIG records - */ - Rrsigrecord *[]string `json:"rrsigrecord,omitempty"` - - /* - RP record - Raw RP records - */ - Rprecord *[]string `json:"rprecord,omitempty"` - - /* - SIG record - Raw SIG records - */ - Sigrecord *[]string `json:"sigrecord,omitempty"` - - /* - SPF record - Raw SPF records - */ - Spfrecord *[]string `json:"spfrecord,omitempty"` - - /* - SRV record - Raw SRV records - */ - Srvrecord *[]string `json:"srvrecord,omitempty"` - - /* - SSHFP record - Raw SSHFP records - */ - Sshfprecord *[]string `json:"sshfprecord,omitempty"` - - /* - TLSA record - Raw TLSA records - */ - Tlsarecord *[]string `json:"tlsarecord,omitempty"` - - /* - TXT record - Raw TXT records - */ - Txtrecord *[]string `json:"txtrecord,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - Structured - Parse all raw DNS records and return them in a structured way - */ - Structured *bool `json:"structured,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("name") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} + + /* +Zone name +Zone name (FQDN) + */ + Dnszoneidnsname *string `json:"dnszoneidnsname,omitempty"` + + /* +Record name +Record name + */ + Idnsname *string `json:"idnsname,omitempty"` + + /* +Time to live +Time to live + */ + Dnsttl *int `json:"dnsttl,omitempty"` + + /* + + + */ + Dnsclass *string `json:"dnsclass,omitempty"` + + /* +A record +Raw A records + */ + Arecord *[]string `json:"arecord,omitempty"` + + /* +AAAA record +Raw AAAA records + */ + Aaaarecord *[]string `json:"aaaarecord,omitempty"` + + /* +A6 record +Raw A6 records + */ + A6record *[]string `json:"a6record,omitempty"` + + /* +AFSDB record +Raw AFSDB records + */ + Afsdbrecord *[]string `json:"afsdbrecord,omitempty"` + + /* +APL record +Raw APL records + */ + Aplrecord *[]string `json:"aplrecord,omitempty"` + + /* +CERT record +Raw CERT records + */ + Certrecord *[]string `json:"certrecord,omitempty"` + + /* +CNAME record +Raw CNAME records + */ + Cnamerecord *[]string `json:"cnamerecord,omitempty"` + + /* +DHCID record +Raw DHCID records + */ + Dhcidrecord *[]string `json:"dhcidrecord,omitempty"` + + /* +DLV record +Raw DLV records + */ + Dlvrecord *[]string `json:"dlvrecord,omitempty"` + + /* +DNAME record +Raw DNAME records + */ + Dnamerecord *[]string `json:"dnamerecord,omitempty"` + + /* +DS record +Raw DS records + */ + Dsrecord *[]string `json:"dsrecord,omitempty"` + + /* +HIP record +Raw HIP records + */ + Hiprecord *[]string `json:"hiprecord,omitempty"` + + /* +IPSECKEY record +Raw IPSECKEY records + */ + Ipseckeyrecord *[]string `json:"ipseckeyrecord,omitempty"` + + /* +KEY record +Raw KEY records + */ + Keyrecord *[]string `json:"keyrecord,omitempty"` + + /* +KX record +Raw KX records + */ + Kxrecord *[]string `json:"kxrecord,omitempty"` + + /* +LOC record +Raw LOC records + */ + Locrecord *[]string `json:"locrecord,omitempty"` + + /* +MX record +Raw MX records + */ + Mxrecord *[]string `json:"mxrecord,omitempty"` + + /* +NAPTR record +Raw NAPTR records + */ + Naptrrecord *[]string `json:"naptrrecord,omitempty"` + + /* +NS record +Raw NS records + */ + Nsrecord *[]string `json:"nsrecord,omitempty"` + + /* +NSEC record +Raw NSEC records + */ + Nsecrecord *[]string `json:"nsecrecord,omitempty"` + + /* +PTR record +Raw PTR records + */ + Ptrrecord *[]string `json:"ptrrecord,omitempty"` + + /* +RRSIG record +Raw RRSIG records + */ + Rrsigrecord *[]string `json:"rrsigrecord,omitempty"` + + /* +RP record +Raw RP records + */ + Rprecord *[]string `json:"rprecord,omitempty"` + + /* +SIG record +Raw SIG records + */ + Sigrecord *[]string `json:"sigrecord,omitempty"` + + /* +SPF record +Raw SPF records + */ + Spfrecord *[]string `json:"spfrecord,omitempty"` + + /* +SRV record +Raw SRV records + */ + Srvrecord *[]string `json:"srvrecord,omitempty"` + + /* +SSHFP record +Raw SSHFP records + */ + Sshfprecord *[]string `json:"sshfprecord,omitempty"` + + /* +TLSA record +Raw TLSA records + */ + Tlsarecord *[]string `json:"tlsarecord,omitempty"` + + /* +TXT record +Raw TXT records + */ + Txtrecord *[]string `json:"txtrecord,omitempty"` + + /* +URI record +Raw URI records + */ + Urirecord *[]string `json:"urirecord,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* +Structured +Parse all raw DNS records and return them in a structured way + */ + Structured *bool `json:"structured,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("name") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } type dnsrecordFindKwParams struct { - *DnsrecordFindArgs - *DnsrecordFindOptionalArgs + *DnsrecordFindArgs + *DnsrecordFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type dnsrecordFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DnsrecordFindResult `json:"result"` } type DnsrecordFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Dnsrecord `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Dnsrecord `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *DnsrecordFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DnsrecordFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DnsrecordFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DnsrecordFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DnsrecordFindResult%v", string(b)) } /* Modify a DNS resource record. */ func (c *Client) DnsrecordMod( - reqArgs *DnsrecordModArgs, - optArgs *DnsrecordModOptionalArgs, // can be nil + reqArgs *DnsrecordModArgs, + optArgs *DnsrecordModOptionalArgs, // can be nil ) (*DnsrecordModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := dnsrecordModKwParams{ - DnsrecordModArgs: reqArgs, - DnsrecordModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "dnsrecord_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res dnsrecordModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := dnsrecordModKwParams{ + DnsrecordModArgs: reqArgs, + DnsrecordModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "dnsrecord_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res dnsrecordModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DnsrecordModArgs struct { - - /* - Record name - Record name - */ - Idnsname string `json:"idnsname,omitempty"` -} + + /* +Record name +Record name + */ + Idnsname string `json:"idnsname,omitempty"` + } type DnsrecordModOptionalArgs struct { + + /* +Zone name +Zone name (FQDN) + */ + Dnszoneidnsname *string `json:"dnszoneidnsname,omitempty"` + + /* +Time to live +Time to live + */ + Dnsttl *int `json:"dnsttl,omitempty"` + + /* + + + */ + Dnsclass *string `json:"dnsclass,omitempty"` + + /* +A record +Raw A records + */ + Arecord *[]string `json:"arecord,omitempty"` + + /* +A IP Address + + */ + APartIPAddress *string `json:"a_part_ip_address,omitempty"` + + /* +AAAA record +Raw AAAA records + */ + Aaaarecord *[]string `json:"aaaarecord,omitempty"` + + /* +AAAA IP Address + + */ + AaaaPartIPAddress *string `json:"aaaa_part_ip_address,omitempty"` + + /* +A6 record +Raw A6 records + */ + A6record *[]string `json:"a6record,omitempty"` + + /* +A6 Record data + + */ + A6PartData *string `json:"a6_part_data,omitempty"` + + /* +AFSDB record +Raw AFSDB records + */ + Afsdbrecord *[]string `json:"afsdbrecord,omitempty"` + + /* +AFSDB Subtype + + */ + AfsdbPartSubtype *int `json:"afsdb_part_subtype,omitempty"` + + /* +AFSDB Hostname + + */ + AfsdbPartHostname *string `json:"afsdb_part_hostname,omitempty"` + + /* +APL record +Raw APL records + */ + Aplrecord *[]string `json:"aplrecord,omitempty"` + + /* +CERT record +Raw CERT records + */ + Certrecord *[]string `json:"certrecord,omitempty"` + + /* +CERT Certificate Type + + */ + CertPartType *int `json:"cert_part_type,omitempty"` + + /* +CERT Key Tag + + */ + CertPartKeyTag *int `json:"cert_part_key_tag,omitempty"` + + /* +CERT Algorithm + + */ + CertPartAlgorithm *int `json:"cert_part_algorithm,omitempty"` + + /* +CERT Certificate/CRL + + */ + CertPartCertificateOrCrl *string `json:"cert_part_certificate_or_crl,omitempty"` + + /* +CNAME record +Raw CNAME records + */ + Cnamerecord *[]string `json:"cnamerecord,omitempty"` + + /* +CNAME Hostname +A hostname which this alias hostname points to + */ + CnamePartHostname *string `json:"cname_part_hostname,omitempty"` + + /* +DHCID record +Raw DHCID records + */ + Dhcidrecord *[]string `json:"dhcidrecord,omitempty"` + + /* +DLV record +Raw DLV records + */ + Dlvrecord *[]string `json:"dlvrecord,omitempty"` + + /* +DLV Key Tag + + */ + DlvPartKeyTag *int `json:"dlv_part_key_tag,omitempty"` + + /* +DLV Algorithm + + */ + DlvPartAlgorithm *int `json:"dlv_part_algorithm,omitempty"` + + /* +DLV Digest Type + + */ + DlvPartDigestType *int `json:"dlv_part_digest_type,omitempty"` + + /* +DLV Digest + + */ + DlvPartDigest *string `json:"dlv_part_digest,omitempty"` + + /* +DNAME record +Raw DNAME records + */ + Dnamerecord *[]string `json:"dnamerecord,omitempty"` + + /* +DNAME Target + + */ + DnamePartTarget *string `json:"dname_part_target,omitempty"` + + /* +DS record +Raw DS records + */ + Dsrecord *[]string `json:"dsrecord,omitempty"` + + /* +DS Key Tag + + */ + DsPartKeyTag *int `json:"ds_part_key_tag,omitempty"` + + /* +DS Algorithm + + */ + DsPartAlgorithm *int `json:"ds_part_algorithm,omitempty"` + + /* +DS Digest Type + + */ + DsPartDigestType *int `json:"ds_part_digest_type,omitempty"` + + /* +DS Digest + + */ + DsPartDigest *string `json:"ds_part_digest,omitempty"` + + /* +HIP record +Raw HIP records + */ + Hiprecord *[]string `json:"hiprecord,omitempty"` + + /* +IPSECKEY record +Raw IPSECKEY records + */ + Ipseckeyrecord *[]string `json:"ipseckeyrecord,omitempty"` + + /* +KEY record +Raw KEY records + */ + Keyrecord *[]string `json:"keyrecord,omitempty"` + + /* +KX record +Raw KX records + */ + Kxrecord *[]string `json:"kxrecord,omitempty"` + + /* +KX Preference +Preference given to this exchanger. Lower values are more preferred + */ + KxPartPreference *int `json:"kx_part_preference,omitempty"` + + /* +KX Exchanger +A host willing to act as a key exchanger + */ + KxPartExchanger *string `json:"kx_part_exchanger,omitempty"` + + /* +LOC record +Raw LOC records + */ + Locrecord *[]string `json:"locrecord,omitempty"` + + /* +LOC Degrees Latitude + + */ + LocPartLatDeg *int `json:"loc_part_lat_deg,omitempty"` + + /* +LOC Minutes Latitude + + */ + LocPartLatMin *int `json:"loc_part_lat_min,omitempty"` + + /* +LOC Seconds Latitude + + */ + LocPartLatSec *float64 `json:"loc_part_lat_sec,omitempty"` + + /* +LOC Direction Latitude + + */ + LocPartLatDir *string `json:"loc_part_lat_dir,omitempty"` + + /* +LOC Degrees Longitude + + */ + LocPartLonDeg *int `json:"loc_part_lon_deg,omitempty"` + + /* +LOC Minutes Longitude + + */ + LocPartLonMin *int `json:"loc_part_lon_min,omitempty"` + + /* +LOC Seconds Longitude + + */ + LocPartLonSec *float64 `json:"loc_part_lon_sec,omitempty"` + + /* +LOC Direction Longitude + + */ + LocPartLonDir *string `json:"loc_part_lon_dir,omitempty"` + + /* +LOC Altitude + + */ + LocPartAltitude *float64 `json:"loc_part_altitude,omitempty"` + + /* +LOC Size + + */ + LocPartSize *float64 `json:"loc_part_size,omitempty"` + + /* +LOC Horizontal Precision + + */ + LocPartHPrecision *float64 `json:"loc_part_h_precision,omitempty"` + + /* +LOC Vertical Precision + + */ + LocPartVPrecision *float64 `json:"loc_part_v_precision,omitempty"` + + /* +MX record +Raw MX records + */ + Mxrecord *[]string `json:"mxrecord,omitempty"` + + /* +MX Preference +Preference given to this exchanger. Lower values are more preferred + */ + MxPartPreference *int `json:"mx_part_preference,omitempty"` + + /* +MX Exchanger +A host willing to act as a mail exchanger + */ + MxPartExchanger *string `json:"mx_part_exchanger,omitempty"` + + /* +NAPTR record +Raw NAPTR records + */ + Naptrrecord *[]string `json:"naptrrecord,omitempty"` + + /* +NAPTR Order + + */ + NaptrPartOrder *int `json:"naptr_part_order,omitempty"` + + /* +NAPTR Preference + + */ + NaptrPartPreference *int `json:"naptr_part_preference,omitempty"` + + /* +NAPTR Flags + + */ + NaptrPartFlags *string `json:"naptr_part_flags,omitempty"` + + /* +NAPTR Service + + */ + NaptrPartService *string `json:"naptr_part_service,omitempty"` + + /* +NAPTR Regular Expression + + */ + NaptrPartRegexp *string `json:"naptr_part_regexp,omitempty"` + + /* +NAPTR Replacement + + */ + NaptrPartReplacement *string `json:"naptr_part_replacement,omitempty"` + + /* +NS record +Raw NS records + */ + Nsrecord *[]string `json:"nsrecord,omitempty"` + + /* +NS Hostname + + */ + NsPartHostname *string `json:"ns_part_hostname,omitempty"` + + /* +NSEC record +Raw NSEC records + */ + Nsecrecord *[]string `json:"nsecrecord,omitempty"` + + /* +PTR record +Raw PTR records + */ + Ptrrecord *[]string `json:"ptrrecord,omitempty"` + + /* +PTR Hostname +The hostname this reverse record points to + */ + PtrPartHostname *string `json:"ptr_part_hostname,omitempty"` + + /* +RRSIG record +Raw RRSIG records + */ + Rrsigrecord *[]string `json:"rrsigrecord,omitempty"` + + /* +RP record +Raw RP records + */ + Rprecord *[]string `json:"rprecord,omitempty"` + + /* +SIG record +Raw SIG records + */ + Sigrecord *[]string `json:"sigrecord,omitempty"` + + /* +SPF record +Raw SPF records + */ + Spfrecord *[]string `json:"spfrecord,omitempty"` + + /* +SRV record +Raw SRV records + */ + Srvrecord *[]string `json:"srvrecord,omitempty"` + + /* +SRV Priority (order) +Lower number means higher priority. Clients will attempt to contact the server with the lowest-numbered priority they can reach. + */ + SrvPartPriority *int `json:"srv_part_priority,omitempty"` + + /* +SRV Weight +Relative weight for entries with the same priority. + */ + SrvPartWeight *int `json:"srv_part_weight,omitempty"` + + /* +SRV Port + + */ + SrvPartPort *int `json:"srv_part_port,omitempty"` + + /* +SRV Target +The domain name of the target host or '.' if the service is decidedly not available at this domain + */ + SrvPartTarget *string `json:"srv_part_target,omitempty"` + + /* +SSHFP record +Raw SSHFP records + */ + Sshfprecord *[]string `json:"sshfprecord,omitempty"` + + /* +SSHFP Algorithm + + */ + SshfpPartAlgorithm *int `json:"sshfp_part_algorithm,omitempty"` + + /* +SSHFP Fingerprint Type + + */ + SshfpPartFpType *int `json:"sshfp_part_fp_type,omitempty"` + + /* +SSHFP Fingerprint + + */ + SshfpPartFingerprint *string `json:"sshfp_part_fingerprint,omitempty"` + + /* +TLSA record +Raw TLSA records + */ + Tlsarecord *[]string `json:"tlsarecord,omitempty"` + + /* +TLSA Certificate Usage + + */ + TlsaPartCertUsage *int `json:"tlsa_part_cert_usage,omitempty"` + + /* +TLSA Selector + + */ + TlsaPartSelector *int `json:"tlsa_part_selector,omitempty"` + + /* +TLSA Matching Type + + */ + TlsaPartMatchingType *int `json:"tlsa_part_matching_type,omitempty"` + + /* +TLSA Certificate Association Data + + */ + TlsaPartCertAssociationData *string `json:"tlsa_part_cert_association_data,omitempty"` + + /* +TXT record +Raw TXT records + */ + Txtrecord *[]string `json:"txtrecord,omitempty"` + + /* +TXT Text Data + + */ + TxtPartData *string `json:"txt_part_data,omitempty"` + + /* +URI record +Raw URI records + */ + Urirecord *[]string `json:"urirecord,omitempty"` + + /* +URI Priority (order) +Lower number means higher priority. Clients will attempt to contact the URI with the lowest-numbered priority they can reach. + */ + URIPartPriority *int `json:"uri_part_priority,omitempty"` + + /* +URI Weight +Relative weight for entries with the same priority. + */ + URIPartWeight *int `json:"uri_part_weight,omitempty"` + + /* +URI Target Uniform Resource Identifier +Target Uniform Resource Identifier according to RFC 3986 + */ + URIPartTarget *string `json:"uri_part_target,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* +Structured +Parse all raw DNS records and return them in a structured way + */ + Structured *bool `json:"structured,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Rename +Rename the DNS resource record object + */ + Rename *string `json:"rename,omitempty"` + } - /* - Zone name - Zone name (FQDN) - */ - Dnszoneidnsname *string `json:"dnszoneidnsname,omitempty"` - - /* - Time to live - Time to live - */ - Dnsttl *int `json:"dnsttl,omitempty"` - - /* - - - */ - Dnsclass *string `json:"dnsclass,omitempty"` - - /* - A record - Raw A records - */ - Arecord *[]string `json:"arecord,omitempty"` - - /* - A IP Address - - */ - APartIPAddress *string `json:"a_part_ip_address,omitempty"` - - /* - AAAA record - Raw AAAA records - */ - Aaaarecord *[]string `json:"aaaarecord,omitempty"` - - /* - AAAA IP Address - - */ - AaaaPartIPAddress *string `json:"aaaa_part_ip_address,omitempty"` +type dnsrecordModKwParams struct { + *DnsrecordModArgs + *DnsrecordModOptionalArgs - /* - A6 record - Raw A6 records - */ - A6record *[]string `json:"a6record,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - A6 Record data +type dnsrecordModResponse struct { + Error *Error `json:"error"` + Result *DnsrecordModResult `json:"result"` +} - */ - A6PartData *string `json:"a6_part_data,omitempty"` +type DnsrecordModResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Dnsrecord `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } - /* - AFSDB record - Raw AFSDB records - */ - Afsdbrecord *[]string `json:"afsdbrecord,omitempty"` - - /* - AFSDB Subtype - - */ - AfsdbPartSubtype *int `json:"afsdb_part_subtype,omitempty"` - - /* - AFSDB Hostname - - */ - AfsdbPartHostname *string `json:"afsdb_part_hostname,omitempty"` - - /* - APL record - Raw APL records - */ - Aplrecord *[]string `json:"aplrecord,omitempty"` - - /* - CERT record - Raw CERT records - */ - Certrecord *[]string `json:"certrecord,omitempty"` - - /* - CERT Certificate Type - - */ - CertPartType *int `json:"cert_part_type,omitempty"` - - /* - CERT Key Tag - - */ - CertPartKeyTag *int `json:"cert_part_key_tag,omitempty"` - - /* - CERT Algorithm - - */ - CertPartAlgorithm *int `json:"cert_part_algorithm,omitempty"` - - /* - CERT Certificate/CRL - - */ - CertPartCertificateOrCrl *string `json:"cert_part_certificate_or_crl,omitempty"` - - /* - CNAME record - Raw CNAME records - */ - Cnamerecord *[]string `json:"cnamerecord,omitempty"` - - /* - CNAME Hostname - A hostname which this alias hostname points to - */ - CnamePartHostname *string `json:"cname_part_hostname,omitempty"` - - /* - DHCID record - Raw DHCID records - */ - Dhcidrecord *[]string `json:"dhcidrecord,omitempty"` - - /* - DLV record - Raw DLV records - */ - Dlvrecord *[]string `json:"dlvrecord,omitempty"` - - /* - DLV Key Tag - - */ - DlvPartKeyTag *int `json:"dlv_part_key_tag,omitempty"` - - /* - DLV Algorithm - - */ - DlvPartAlgorithm *int `json:"dlv_part_algorithm,omitempty"` - - /* - DLV Digest Type - - */ - DlvPartDigestType *int `json:"dlv_part_digest_type,omitempty"` - - /* - DLV Digest - - */ - DlvPartDigest *string `json:"dlv_part_digest,omitempty"` - - /* - DNAME record - Raw DNAME records - */ - Dnamerecord *[]string `json:"dnamerecord,omitempty"` - - /* - DNAME Target - - */ - DnamePartTarget *string `json:"dname_part_target,omitempty"` - - /* - DS record - Raw DS records - */ - Dsrecord *[]string `json:"dsrecord,omitempty"` - - /* - DS Key Tag - - */ - DsPartKeyTag *int `json:"ds_part_key_tag,omitempty"` - - /* - DS Algorithm - - */ - DsPartAlgorithm *int `json:"ds_part_algorithm,omitempty"` - - /* - DS Digest Type - - */ - DsPartDigestType *int `json:"ds_part_digest_type,omitempty"` - - /* - DS Digest - - */ - DsPartDigest *string `json:"ds_part_digest,omitempty"` - - /* - HIP record - Raw HIP records - */ - Hiprecord *[]string `json:"hiprecord,omitempty"` - - /* - IPSECKEY record - Raw IPSECKEY records - */ - Ipseckeyrecord *[]string `json:"ipseckeyrecord,omitempty"` - - /* - KEY record - Raw KEY records - */ - Keyrecord *[]string `json:"keyrecord,omitempty"` - - /* - KX record - Raw KX records - */ - Kxrecord *[]string `json:"kxrecord,omitempty"` - - /* - KX Preference - Preference given to this exchanger. Lower values are more preferred - */ - KxPartPreference *int `json:"kx_part_preference,omitempty"` - - /* - KX Exchanger - A host willing to act as a key exchanger - */ - KxPartExchanger *string `json:"kx_part_exchanger,omitempty"` - - /* - LOC record - Raw LOC records - */ - Locrecord *[]string `json:"locrecord,omitempty"` - - /* - LOC Degrees Latitude - - */ - LocPartLatDeg *int `json:"loc_part_lat_deg,omitempty"` - - /* - LOC Minutes Latitude - - */ - LocPartLatMin *int `json:"loc_part_lat_min,omitempty"` - - /* - LOC Seconds Latitude - - */ - LocPartLatSec *float64 `json:"loc_part_lat_sec,omitempty"` - - /* - LOC Direction Latitude - - */ - LocPartLatDir *string `json:"loc_part_lat_dir,omitempty"` - - /* - LOC Degrees Longitude - - */ - LocPartLonDeg *int `json:"loc_part_lon_deg,omitempty"` - - /* - LOC Minutes Longitude - - */ - LocPartLonMin *int `json:"loc_part_lon_min,omitempty"` - - /* - LOC Seconds Longitude - - */ - LocPartLonSec *float64 `json:"loc_part_lon_sec,omitempty"` - - /* - LOC Direction Longitude - - */ - LocPartLonDir *string `json:"loc_part_lon_dir,omitempty"` - - /* - LOC Altitude - - */ - LocPartAltitude *float64 `json:"loc_part_altitude,omitempty"` - - /* - LOC Size - - */ - LocPartSize *float64 `json:"loc_part_size,omitempty"` - - /* - LOC Horizontal Precision - - */ - LocPartHPrecision *float64 `json:"loc_part_h_precision,omitempty"` - - /* - LOC Vertical Precision - - */ - LocPartVPrecision *float64 `json:"loc_part_v_precision,omitempty"` - - /* - MX record - Raw MX records - */ - Mxrecord *[]string `json:"mxrecord,omitempty"` - - /* - MX Preference - Preference given to this exchanger. Lower values are more preferred - */ - MxPartPreference *int `json:"mx_part_preference,omitempty"` - - /* - MX Exchanger - A host willing to act as a mail exchanger - */ - MxPartExchanger *string `json:"mx_part_exchanger,omitempty"` - - /* - NAPTR record - Raw NAPTR records - */ - Naptrrecord *[]string `json:"naptrrecord,omitempty"` - - /* - NAPTR Order - - */ - NaptrPartOrder *int `json:"naptr_part_order,omitempty"` - - /* - NAPTR Preference - - */ - NaptrPartPreference *int `json:"naptr_part_preference,omitempty"` - - /* - NAPTR Flags - - */ - NaptrPartFlags *string `json:"naptr_part_flags,omitempty"` - - /* - NAPTR Service - - */ - NaptrPartService *string `json:"naptr_part_service,omitempty"` - - /* - NAPTR Regular Expression - - */ - NaptrPartRegexp *string `json:"naptr_part_regexp,omitempty"` - - /* - NAPTR Replacement - - */ - NaptrPartReplacement *string `json:"naptr_part_replacement,omitempty"` - - /* - NS record - Raw NS records - */ - Nsrecord *[]string `json:"nsrecord,omitempty"` - - /* - NS Hostname - - */ - NsPartHostname *string `json:"ns_part_hostname,omitempty"` - - /* - NSEC record - Raw NSEC records - */ - Nsecrecord *[]string `json:"nsecrecord,omitempty"` - - /* - PTR record - Raw PTR records - */ - Ptrrecord *[]string `json:"ptrrecord,omitempty"` - - /* - PTR Hostname - The hostname this reverse record points to - */ - PtrPartHostname *string `json:"ptr_part_hostname,omitempty"` - - /* - RRSIG record - Raw RRSIG records - */ - Rrsigrecord *[]string `json:"rrsigrecord,omitempty"` - - /* - RP record - Raw RP records - */ - Rprecord *[]string `json:"rprecord,omitempty"` - - /* - SIG record - Raw SIG records - */ - Sigrecord *[]string `json:"sigrecord,omitempty"` - - /* - SPF record - Raw SPF records - */ - Spfrecord *[]string `json:"spfrecord,omitempty"` - - /* - SRV record - Raw SRV records - */ - Srvrecord *[]string `json:"srvrecord,omitempty"` - - /* - SRV Priority - - */ - SrvPartPriority *int `json:"srv_part_priority,omitempty"` - - /* - SRV Weight - - */ - SrvPartWeight *int `json:"srv_part_weight,omitempty"` - - /* - SRV Port - - */ - SrvPartPort *int `json:"srv_part_port,omitempty"` - - /* - SRV Target - The domain name of the target host or '.' if the service is decidedly not available at this domain - */ - SrvPartTarget *string `json:"srv_part_target,omitempty"` - - /* - SSHFP record - Raw SSHFP records - */ - Sshfprecord *[]string `json:"sshfprecord,omitempty"` - - /* - SSHFP Algorithm - - */ - SshfpPartAlgorithm *int `json:"sshfp_part_algorithm,omitempty"` - - /* - SSHFP Fingerprint Type - - */ - SshfpPartFpType *int `json:"sshfp_part_fp_type,omitempty"` - - /* - SSHFP Fingerprint - - */ - SshfpPartFingerprint *string `json:"sshfp_part_fingerprint,omitempty"` - - /* - TLSA record - Raw TLSA records - */ - Tlsarecord *[]string `json:"tlsarecord,omitempty"` - - /* - TLSA Certificate Usage - - */ - TlsaPartCertUsage *int `json:"tlsa_part_cert_usage,omitempty"` - - /* - TLSA Selector - - */ - TlsaPartSelector *int `json:"tlsa_part_selector,omitempty"` - - /* - TLSA Matching Type - - */ - TlsaPartMatchingType *int `json:"tlsa_part_matching_type,omitempty"` - - /* - TLSA Certificate Association Data - - */ - TlsaPartCertAssociationData *string `json:"tlsa_part_cert_association_data,omitempty"` - - /* - TXT record - Raw TXT records - */ - Txtrecord *[]string `json:"txtrecord,omitempty"` - - /* - TXT Text Data - - */ - TxtPartData *string `json:"txt_part_data,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - Structured - Parse all raw DNS records and return them in a structured way - */ - Structured *bool `json:"structured,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - Rename - Rename the DNS resource record object - */ - Rename *string `json:"rename,omitempty"` -} - -type dnsrecordModKwParams struct { - *DnsrecordModArgs - *DnsrecordModOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type dnsrecordModResponse struct { - Error *Error `json:"error"` - Result *DnsrecordModResult `json:"result"` -} - -type DnsrecordModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Dnsrecord `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *DnsrecordModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DnsrecordModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DnsrecordModResult%v", string(b)) -} +func (t *DnsrecordModResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DnsrecordModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DnsrecordModResult%v", string(b)) +} /* Display DNS resource. */ func (c *Client) DnsrecordShow( - reqArgs *DnsrecordShowArgs, - optArgs *DnsrecordShowOptionalArgs, // can be nil + reqArgs *DnsrecordShowArgs, + optArgs *DnsrecordShowOptionalArgs, // can be nil ) (*DnsrecordShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := dnsrecordShowKwParams{ - DnsrecordShowArgs: reqArgs, - DnsrecordShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "dnsrecord_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res dnsrecordShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := dnsrecordShowKwParams{ + DnsrecordShowArgs: reqArgs, + DnsrecordShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "dnsrecord_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res dnsrecordShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DnsrecordShowArgs struct { - - /* - Record name - Record name - */ - Idnsname string `json:"idnsname,omitempty"` -} + + /* +Record name +Record name + */ + Idnsname string `json:"idnsname,omitempty"` + } type DnsrecordShowOptionalArgs struct { - - /* - Zone name - Zone name (FQDN) - */ - Dnszoneidnsname *string `json:"dnszoneidnsname,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - Structured - Parse all raw DNS records and return them in a structured way - */ - Structured *bool `json:"structured,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Zone name +Zone name (FQDN) + */ + Dnszoneidnsname *string `json:"dnszoneidnsname,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* +Structured +Parse all raw DNS records and return them in a structured way + */ + Structured *bool `json:"structured,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type dnsrecordShowKwParams struct { - *DnsrecordShowArgs - *DnsrecordShowOptionalArgs + *DnsrecordShowArgs + *DnsrecordShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type dnsrecordShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DnsrecordShowResult `json:"result"` } type DnsrecordShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Dnsrecord `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Dnsrecord `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *DnsrecordShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DnsrecordShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DnsrecordShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DnsrecordShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DnsrecordShowResult%v", string(b)) } /* - */ +*/ func (c *Client) DnsrecordSplitParts( - reqArgs *DnsrecordSplitPartsArgs, - optArgs *DnsrecordSplitPartsOptionalArgs, // can be nil + reqArgs *DnsrecordSplitPartsArgs, + optArgs *DnsrecordSplitPartsOptionalArgs, // can be nil ) (*DnsrecordSplitPartsResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := dnsrecordSplitPartsKwParams{ - DnsrecordSplitPartsArgs: reqArgs, - DnsrecordSplitPartsOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "dnsrecord_split_parts", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res dnsrecordSplitPartsResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := dnsrecordSplitPartsKwParams{ + DnsrecordSplitPartsArgs: reqArgs, + DnsrecordSplitPartsOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "dnsrecord_split_parts", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res dnsrecordSplitPartsResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DnsrecordSplitPartsArgs struct { - - /* + + /* - */ - Name string `json:"name,omitempty"` + */ + Name string `json:"name,omitempty"` + + /* - /* - - */ - Value string `json:"value,omitempty"` -} + */ + Value string `json:"value,omitempty"` + } type DnsrecordSplitPartsOptionalArgs struct { -} + } type dnsrecordSplitPartsKwParams struct { - *DnsrecordSplitPartsArgs - *DnsrecordSplitPartsOptionalArgs + *DnsrecordSplitPartsArgs + *DnsrecordSplitPartsOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type dnsrecordSplitPartsResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DnsrecordSplitPartsResult `json:"result"` } type DnsrecordSplitPartsResult struct { + + + /* - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` -} + (required) + */ + Result interface{} `json:"result,omitempty"` + } func (t *DnsrecordSplitPartsResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DnsrecordSplitPartsResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DnsrecordSplitPartsResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DnsrecordSplitPartsResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DnsrecordSplitPartsResult%v", string(b)) } /* Search for DNS servers. */ func (c *Client) DnsserverFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *DnsserverFindArgs, - optArgs *DnsserverFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *DnsserverFindArgs, + optArgs *DnsserverFindOptionalArgs, // can be nil ) (*DnsserverFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := dnsserverFindKwParams{ - DnsserverFindArgs: reqArgs, - DnsserverFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "dnsserver_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res dnsserverFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := dnsserverFindKwParams{ + DnsserverFindArgs: reqArgs, + DnsserverFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "dnsserver_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res dnsserverFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DnsserverFindArgs struct { -} + } type DnsserverFindOptionalArgs struct { - - /* - Server name - DNS Server name - */ - Idnsserverid *string `json:"idnsserverid,omitempty"` - - /* - SOA mname override - SOA mname (authoritative server) override - */ - Idnssoamname *string `json:"idnssoamname,omitempty"` - - /* - Forwarders - Per-server forwarders. A custom port can be specified for each forwarder using a standard format "IP_ADDRESS port PORT" - */ - Idnsforwarders *[]string `json:"idnsforwarders,omitempty"` - - /* - Forward policy - Per-server conditional forwarding policy. Set to "none" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded. - */ - Idnsforwardpolicy *string `json:"idnsforwardpolicy,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("hostname") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} + + /* +Server name +DNS Server name + */ + Idnsserverid *string `json:"idnsserverid,omitempty"` + + /* +SOA mname override +SOA mname (authoritative server) override + */ + Idnssoamname *string `json:"idnssoamname,omitempty"` + + /* +Forwarders +Per-server forwarders. A custom port can be specified for each forwarder using a standard format "IP_ADDRESS port PORT" + */ + Idnsforwarders *[]string `json:"idnsforwarders,omitempty"` + + /* +Forward policy +Per-server conditional forwarding policy. Set to "none" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded. + */ + Idnsforwardpolicy *string `json:"idnsforwardpolicy,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("hostname") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } type dnsserverFindKwParams struct { - *DnsserverFindArgs - *DnsserverFindOptionalArgs + *DnsserverFindArgs + *DnsserverFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type dnsserverFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DnsserverFindResult `json:"result"` } type DnsserverFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Dnsserver `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Dnsserver `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *DnsserverFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DnsserverFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DnsserverFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DnsserverFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DnsserverFindResult%v", string(b)) } /* Modify DNS server configuration */ func (c *Client) DnsserverMod( - reqArgs *DnsserverModArgs, - optArgs *DnsserverModOptionalArgs, // can be nil + reqArgs *DnsserverModArgs, + optArgs *DnsserverModOptionalArgs, // can be nil ) (*DnsserverModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := dnsserverModKwParams{ - DnsserverModArgs: reqArgs, - DnsserverModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "dnsserver_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res dnsserverModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := dnsserverModKwParams{ + DnsserverModArgs: reqArgs, + DnsserverModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "dnsserver_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res dnsserverModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DnsserverModArgs struct { - - /* - Server name - DNS Server name - */ - Idnsserverid string `json:"idnsserverid,omitempty"` -} + + /* +Server name +DNS Server name + */ + Idnsserverid string `json:"idnsserverid,omitempty"` + } type DnsserverModOptionalArgs struct { - - /* - SOA mname override - SOA mname (authoritative server) override - */ - Idnssoamname *string `json:"idnssoamname,omitempty"` - - /* - Forwarders - Per-server forwarders. A custom port can be specified for each forwarder using a standard format "IP_ADDRESS port PORT" - */ - Idnsforwarders *[]string `json:"idnsforwarders,omitempty"` - - /* - Forward policy - Per-server conditional forwarding policy. Set to "none" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded. - */ - Idnsforwardpolicy *string `json:"idnsforwardpolicy,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +SOA mname override +SOA mname (authoritative server) override + */ + Idnssoamname *string `json:"idnssoamname,omitempty"` + + /* +Forwarders +Per-server forwarders. A custom port can be specified for each forwarder using a standard format "IP_ADDRESS port PORT" + */ + Idnsforwarders *[]string `json:"idnsforwarders,omitempty"` + + /* +Forward policy +Per-server conditional forwarding policy. Set to "none" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded. + */ + Idnsforwardpolicy *string `json:"idnsforwardpolicy,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type dnsserverModKwParams struct { - *DnsserverModArgs - *DnsserverModOptionalArgs + *DnsserverModArgs + *DnsserverModOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type dnsserverModResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DnsserverModResult `json:"result"` } type DnsserverModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Dnsserver `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Dnsserver `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *DnsserverModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DnsserverModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DnsserverModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DnsserverModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DnsserverModResult%v", string(b)) } /* Display configuration of a DNS server. */ func (c *Client) DnsserverShow( - reqArgs *DnsserverShowArgs, - optArgs *DnsserverShowOptionalArgs, // can be nil + reqArgs *DnsserverShowArgs, + optArgs *DnsserverShowOptionalArgs, // can be nil ) (*DnsserverShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := dnsserverShowKwParams{ - DnsserverShowArgs: reqArgs, - DnsserverShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "dnsserver_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res dnsserverShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := dnsserverShowKwParams{ + DnsserverShowArgs: reqArgs, + DnsserverShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "dnsserver_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res dnsserverShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DnsserverShowArgs struct { - - /* - Server name - DNS Server name - */ - Idnsserverid string `json:"idnsserverid,omitempty"` -} + + /* +Server name +DNS Server name + */ + Idnsserverid string `json:"idnsserverid,omitempty"` + } type DnsserverShowOptionalArgs struct { + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* +type dnsserverShowKwParams struct { + *DnsserverShowArgs + *DnsserverShowOptionalArgs - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} - -type dnsserverShowKwParams struct { - *DnsserverShowArgs - *DnsserverShowOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} type dnsserverShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DnsserverShowResult `json:"result"` } type DnsserverShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Dnsserver `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Dnsserver `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *DnsserverShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DnsserverShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DnsserverShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DnsserverShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DnsserverShowResult%v", string(b)) } /* Create new DNS zone (SOA record). */ func (c *Client) DnszoneAdd( - reqArgs *DnszoneAddArgs, - optArgs *DnszoneAddOptionalArgs, // can be nil + reqArgs *DnszoneAddArgs, + optArgs *DnszoneAddOptionalArgs, // can be nil ) (*DnszoneAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := dnszoneAddKwParams{ - DnszoneAddArgs: reqArgs, - DnszoneAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "dnszone_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res dnszoneAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := dnszoneAddKwParams{ + DnszoneAddArgs: reqArgs, + DnszoneAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "dnszone_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res dnszoneAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DnszoneAddArgs struct { - - /* - SOA serial - SOA record serial number - */ - Idnssoaserial int `json:"idnssoaserial,omitempty"` -} + + /* +SOA serial +SOA record serial number + */ + Idnssoaserial int `json:"idnssoaserial,omitempty"` + } type DnszoneAddOptionalArgs struct { - - /* - Zone name - Zone name (FQDN) - */ - Idnsname *string `json:"idnsname,omitempty"` - - /* - Reverse zone IP network - IP network to create reverse zone name from - */ - NameFromIP *string `json:"name_from_ip,omitempty"` - - /* - Zone forwarders - Per-zone forwarders. A custom port can be specified for each forwarder using a standard format "IP_ADDRESS port PORT" - */ - Idnsforwarders *[]string `json:"idnsforwarders,omitempty"` - - /* - Forward policy - Per-zone conditional forwarding policy. Set to "none" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded. - */ - Idnsforwardpolicy *string `json:"idnsforwardpolicy,omitempty"` - - /* - Authoritative nameserver - Authoritative nameserver domain name - */ - Idnssoamname *string `json:"idnssoamname,omitempty"` - - /* - Administrator e-mail address - Administrator e-mail address - */ - Idnssoarname *string `json:"idnssoarname,omitempty"` - - /* - SOA refresh - SOA record refresh time - */ - Idnssoarefresh *int `json:"idnssoarefresh,omitempty"` - - /* - SOA retry - SOA record retry time - */ - Idnssoaretry *int `json:"idnssoaretry,omitempty"` - - /* - SOA expire - SOA record expire time - */ - Idnssoaexpire *int `json:"idnssoaexpire,omitempty"` - - /* - SOA minimum - How long should negative responses be cached - */ - Idnssoaminimum *int `json:"idnssoaminimum,omitempty"` - - /* - Time to live - Time to live for records at zone apex - */ - Dnsttl *int `json:"dnsttl,omitempty"` - - /* - Default time to live - Time to live for records without explicit TTL definition - */ - Dnsdefaultttl *int `json:"dnsdefaultttl,omitempty"` - - /* - - - */ - Dnsclass *string `json:"dnsclass,omitempty"` - - /* - BIND update policy - BIND update policy - */ - Idnsupdatepolicy *string `json:"idnsupdatepolicy,omitempty"` - - /* - Dynamic update - Allow dynamic updates. - */ - Idnsallowdynupdate *bool `json:"idnsallowdynupdate,omitempty"` - - /* - Allow query - Semicolon separated list of IP addresses or networks which are allowed to issue queries - */ - Idnsallowquery *string `json:"idnsallowquery,omitempty"` - - /* - Allow transfer - Semicolon separated list of IP addresses or networks which are allowed to transfer the zone - */ - Idnsallowtransfer *string `json:"idnsallowtransfer,omitempty"` - - /* - Allow PTR sync - Allow synchronization of forward (A, AAAA) and reverse (PTR) records in the zone - */ - Idnsallowsyncptr *bool `json:"idnsallowsyncptr,omitempty"` - - /* - Allow in-line DNSSEC signing - Allow inline DNSSEC signing of records in the zone - */ - Idnssecinlinesigning *bool `json:"idnssecinlinesigning,omitempty"` - - /* - NSEC3PARAM record - NSEC3PARAM record for zone in format: hash_algorithm flags iterations salt - */ - Nsec3paramrecord *string `json:"nsec3paramrecord,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Force DNS zone creation even if it will overlap with an existing zone. - */ - SkipOverlapCheck *bool `json:"skip_overlap_check,omitempty"` - - /* - - Force DNS zone creation even if nameserver is not resolvable. (Deprecated) - */ - Force *bool `json:"force,omitempty"` - - /* - - Force DNS zone creation even if nameserver is not resolvable. - */ - SkipNameserverCheck *bool `json:"skip_nameserver_check,omitempty"` - - /* - - - */ - IPAddress *string `json:"ip_address,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Zone name +Zone name (FQDN) + */ + Idnsname *string `json:"idnsname,omitempty"` + + /* +Reverse zone IP network +IP network to create reverse zone name from + */ + NameFromIP *string `json:"name_from_ip,omitempty"` + + /* +Zone forwarders +Per-zone forwarders. A custom port can be specified for each forwarder using a standard format "IP_ADDRESS port PORT" + */ + Idnsforwarders *[]string `json:"idnsforwarders,omitempty"` + + /* +Forward policy +Per-zone conditional forwarding policy. Set to "none" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded. + */ + Idnsforwardpolicy *string `json:"idnsforwardpolicy,omitempty"` + + /* +Authoritative nameserver +Authoritative nameserver domain name + */ + Idnssoamname *string `json:"idnssoamname,omitempty"` + + /* +Administrator e-mail address +Administrator e-mail address + */ + Idnssoarname *string `json:"idnssoarname,omitempty"` + + /* +SOA refresh +SOA record refresh time + */ + Idnssoarefresh *int `json:"idnssoarefresh,omitempty"` + + /* +SOA retry +SOA record retry time + */ + Idnssoaretry *int `json:"idnssoaretry,omitempty"` + + /* +SOA expire +SOA record expire time + */ + Idnssoaexpire *int `json:"idnssoaexpire,omitempty"` + + /* +SOA minimum +How long should negative responses be cached + */ + Idnssoaminimum *int `json:"idnssoaminimum,omitempty"` + + /* +Time to live +Time to live for records at zone apex + */ + Dnsttl *int `json:"dnsttl,omitempty"` + + /* +Default time to live +Time to live for records without explicit TTL definition + */ + Dnsdefaultttl *int `json:"dnsdefaultttl,omitempty"` + + /* + + + */ + Dnsclass *string `json:"dnsclass,omitempty"` + + /* +BIND update policy +BIND update policy + */ + Idnsupdatepolicy *string `json:"idnsupdatepolicy,omitempty"` + + /* +Dynamic update +Allow dynamic updates. + */ + Idnsallowdynupdate *bool `json:"idnsallowdynupdate,omitempty"` + + /* +Allow query +Semicolon separated list of IP addresses or networks which are allowed to issue queries + */ + Idnsallowquery *string `json:"idnsallowquery,omitempty"` + + /* +Allow transfer +Semicolon separated list of IP addresses or networks which are allowed to transfer the zone + */ + Idnsallowtransfer *string `json:"idnsallowtransfer,omitempty"` + + /* +Allow PTR sync +Allow synchronization of forward (A, AAAA) and reverse (PTR) records in the zone + */ + Idnsallowsyncptr *bool `json:"idnsallowsyncptr,omitempty"` + + /* +Allow in-line DNSSEC signing +Allow inline DNSSEC signing of records in the zone + */ + Idnssecinlinesigning *bool `json:"idnssecinlinesigning,omitempty"` + + /* +NSEC3PARAM record +NSEC3PARAM record for zone in format: hash_algorithm flags iterations salt + */ + Nsec3paramrecord *string `json:"nsec3paramrecord,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Force DNS zone creation even if it will overlap with an existing zone. + */ + SkipOverlapCheck *bool `json:"skip_overlap_check,omitempty"` + + /* + +Force DNS zone creation even if nameserver is not resolvable. (Deprecated) + */ + Force *bool `json:"force,omitempty"` + + /* + +Force DNS zone creation even if nameserver is not resolvable. + */ + SkipNameserverCheck *bool `json:"skip_nameserver_check,omitempty"` + + /* + + + */ + IPAddress *string `json:"ip_address,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type dnszoneAddKwParams struct { - *DnszoneAddArgs - *DnszoneAddOptionalArgs + *DnszoneAddArgs + *DnszoneAddOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type dnszoneAddResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DnszoneAddResult `json:"result"` } type DnszoneAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Dnszone `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Dnszone `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *DnszoneAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DnszoneAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DnszoneAddResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DnszoneAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DnszoneAddResult%v", string(b)) } /* Add a permission for per-zone access delegation. */ func (c *Client) DnszoneAddPermission( - reqArgs *DnszoneAddPermissionArgs, - optArgs *DnszoneAddPermissionOptionalArgs, // can be nil + reqArgs *DnszoneAddPermissionArgs, + optArgs *DnszoneAddPermissionOptionalArgs, // can be nil ) (*DnszoneAddPermissionResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := dnszoneAddPermissionKwParams{ - DnszoneAddPermissionArgs: reqArgs, - DnszoneAddPermissionOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "dnszone_add_permission", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res dnszoneAddPermissionResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := dnszoneAddPermissionKwParams{ + DnszoneAddPermissionArgs: reqArgs, + DnszoneAddPermissionOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "dnszone_add_permission", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res dnszoneAddPermissionResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DnszoneAddPermissionArgs struct { -} + } type DnszoneAddPermissionOptionalArgs struct { - - /* - Zone name - Zone name (FQDN) - */ - Idnsname *string `json:"idnsname,omitempty"` -} + + /* +Zone name +Zone name (FQDN) + */ + Idnsname *string `json:"idnsname,omitempty"` + } type dnszoneAddPermissionKwParams struct { - *DnszoneAddPermissionArgs - *DnszoneAddPermissionOptionalArgs + *DnszoneAddPermissionArgs + *DnszoneAddPermissionOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type dnszoneAddPermissionResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DnszoneAddPermissionResult `json:"result"` } type DnszoneAddPermissionResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - True means the operation was successful - (required) - */ - Result bool `json:"result,omitempty"` - - /* - Permission value - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +Permission value + (required) + */ + Value string `json:"value,omitempty"` + } func (t *DnszoneAddPermissionResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DnszoneAddPermissionResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DnszoneAddPermissionResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DnszoneAddPermissionResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DnszoneAddPermissionResult%v", string(b)) } /* Delete DNS zone (SOA record). */ func (c *Client) DnszoneDel( - reqArgs *DnszoneDelArgs, - optArgs *DnszoneDelOptionalArgs, // can be nil + reqArgs *DnszoneDelArgs, + optArgs *DnszoneDelOptionalArgs, // can be nil ) (*DnszoneDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := dnszoneDelKwParams{ - DnszoneDelArgs: reqArgs, - DnszoneDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "dnszone_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res dnszoneDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := dnszoneDelKwParams{ + DnszoneDelArgs: reqArgs, + DnszoneDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "dnszone_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res dnszoneDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DnszoneDelArgs struct { -} + } type DnszoneDelOptionalArgs struct { - - /* - Zone name - Zone name (FQDN) - */ - Idnsname *[]string `json:"idnsname,omitempty"` - - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` -} + + /* +Zone name +Zone name (FQDN) + */ + Idnsname *[]string `json:"idnsname,omitempty"` + + /* + +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } type dnszoneDelKwParams struct { - *DnszoneDelArgs - *DnszoneDelOptionalArgs + *DnszoneDelArgs + *DnszoneDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type dnszoneDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DnszoneDelResult `json:"result"` } type DnszoneDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } func (t *DnszoneDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DnszoneDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DnszoneDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DnszoneDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DnszoneDelResult%v", string(b)) } /* Disable DNS Zone. */ func (c *Client) DnszoneDisable( - reqArgs *DnszoneDisableArgs, - optArgs *DnszoneDisableOptionalArgs, // can be nil + reqArgs *DnszoneDisableArgs, + optArgs *DnszoneDisableOptionalArgs, // can be nil ) (*DnszoneDisableResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := dnszoneDisableKwParams{ - DnszoneDisableArgs: reqArgs, - DnszoneDisableOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "dnszone_disable", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res dnszoneDisableResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := dnszoneDisableKwParams{ + DnszoneDisableArgs: reqArgs, + DnszoneDisableOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "dnszone_disable", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res dnszoneDisableResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DnszoneDisableArgs struct { -} + } type DnszoneDisableOptionalArgs struct { - - /* - Zone name - Zone name (FQDN) - */ - Idnsname *string `json:"idnsname,omitempty"` -} + + /* +Zone name +Zone name (FQDN) + */ + Idnsname *string `json:"idnsname,omitempty"` + } type dnszoneDisableKwParams struct { - *DnszoneDisableArgs - *DnszoneDisableOptionalArgs + *DnszoneDisableArgs + *DnszoneDisableOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type dnszoneDisableResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DnszoneDisableResult `json:"result"` } type DnszoneDisableResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - True means the operation was successful - (required) - */ - Result bool `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *DnszoneDisableResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DnszoneDisableResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DnszoneDisableResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DnszoneDisableResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DnszoneDisableResult%v", string(b)) } /* Enable DNS Zone. */ func (c *Client) DnszoneEnable( - reqArgs *DnszoneEnableArgs, - optArgs *DnszoneEnableOptionalArgs, // can be nil + reqArgs *DnszoneEnableArgs, + optArgs *DnszoneEnableOptionalArgs, // can be nil ) (*DnszoneEnableResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := dnszoneEnableKwParams{ - DnszoneEnableArgs: reqArgs, - DnszoneEnableOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "dnszone_enable", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res dnszoneEnableResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := dnszoneEnableKwParams{ + DnszoneEnableArgs: reqArgs, + DnszoneEnableOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "dnszone_enable", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res dnszoneEnableResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DnszoneEnableArgs struct { -} + } type DnszoneEnableOptionalArgs struct { - - /* - Zone name - Zone name (FQDN) - */ - Idnsname *string `json:"idnsname,omitempty"` -} + + /* +Zone name +Zone name (FQDN) + */ + Idnsname *string `json:"idnsname,omitempty"` + } type dnszoneEnableKwParams struct { - *DnszoneEnableArgs - *DnszoneEnableOptionalArgs + *DnszoneEnableArgs + *DnszoneEnableOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type dnszoneEnableResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DnszoneEnableResult `json:"result"` } type DnszoneEnableResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - True means the operation was successful - (required) - */ - Result bool `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *DnszoneEnableResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DnszoneEnableResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DnszoneEnableResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DnszoneEnableResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DnszoneEnableResult%v", string(b)) } /* Search for DNS zones (SOA records). */ func (c *Client) DnszoneFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *DnszoneFindArgs, - optArgs *DnszoneFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *DnszoneFindArgs, + optArgs *DnszoneFindOptionalArgs, // can be nil ) (*DnszoneFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := dnszoneFindKwParams{ - DnszoneFindArgs: reqArgs, - DnszoneFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "dnszone_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res dnszoneFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := dnszoneFindKwParams{ + DnszoneFindArgs: reqArgs, + DnszoneFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "dnszone_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res dnszoneFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DnszoneFindArgs struct { -} + } type DnszoneFindOptionalArgs struct { - - /* - Zone name - Zone name (FQDN) - */ - Idnsname *string `json:"idnsname,omitempty"` - - /* - Reverse zone IP network - IP network to create reverse zone name from - */ - NameFromIP *string `json:"name_from_ip,omitempty"` - - /* - Active zone - Is zone active? - */ - Idnszoneactive *bool `json:"idnszoneactive,omitempty"` - - /* - Zone forwarders - Per-zone forwarders. A custom port can be specified for each forwarder using a standard format "IP_ADDRESS port PORT" - */ - Idnsforwarders *[]string `json:"idnsforwarders,omitempty"` - - /* - Forward policy - Per-zone conditional forwarding policy. Set to "none" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded. - */ - Idnsforwardpolicy *string `json:"idnsforwardpolicy,omitempty"` - - /* - Authoritative nameserver - Authoritative nameserver domain name - */ - Idnssoamname *string `json:"idnssoamname,omitempty"` - - /* - Administrator e-mail address - Administrator e-mail address - */ - Idnssoarname *string `json:"idnssoarname,omitempty"` - - /* - SOA serial - SOA record serial number - */ - Idnssoaserial *int `json:"idnssoaserial,omitempty"` - - /* - SOA refresh - SOA record refresh time - */ - Idnssoarefresh *int `json:"idnssoarefresh,omitempty"` - - /* - SOA retry - SOA record retry time - */ - Idnssoaretry *int `json:"idnssoaretry,omitempty"` - - /* - SOA expire - SOA record expire time - */ - Idnssoaexpire *int `json:"idnssoaexpire,omitempty"` - - /* - SOA minimum - How long should negative responses be cached - */ - Idnssoaminimum *int `json:"idnssoaminimum,omitempty"` - - /* - Time to live - Time to live for records at zone apex - */ - Dnsttl *int `json:"dnsttl,omitempty"` - - /* - Default time to live - Time to live for records without explicit TTL definition - */ - Dnsdefaultttl *int `json:"dnsdefaultttl,omitempty"` - - /* - - - */ - Dnsclass *string `json:"dnsclass,omitempty"` - - /* - BIND update policy - BIND update policy - */ - Idnsupdatepolicy *string `json:"idnsupdatepolicy,omitempty"` - - /* - Dynamic update - Allow dynamic updates. - */ - Idnsallowdynupdate *bool `json:"idnsallowdynupdate,omitempty"` - - /* - Allow query - Semicolon separated list of IP addresses or networks which are allowed to issue queries - */ - Idnsallowquery *string `json:"idnsallowquery,omitempty"` - - /* - Allow transfer - Semicolon separated list of IP addresses or networks which are allowed to transfer the zone - */ - Idnsallowtransfer *string `json:"idnsallowtransfer,omitempty"` - - /* - Allow PTR sync - Allow synchronization of forward (A, AAAA) and reverse (PTR) records in the zone - */ - Idnsallowsyncptr *bool `json:"idnsallowsyncptr,omitempty"` - - /* - Allow in-line DNSSEC signing - Allow inline DNSSEC signing of records in the zone - */ - Idnssecinlinesigning *bool `json:"idnssecinlinesigning,omitempty"` - - /* - NSEC3PARAM record - NSEC3PARAM record for zone in format: hash_algorithm flags iterations salt - */ - Nsec3paramrecord *string `json:"nsec3paramrecord,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - Forward zones only - Search for forward zones only - */ - ForwardOnly *bool `json:"forward_only,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("name") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} + + /* +Zone name +Zone name (FQDN) + */ + Idnsname *string `json:"idnsname,omitempty"` + + /* +Reverse zone IP network +IP network to create reverse zone name from + */ + NameFromIP *string `json:"name_from_ip,omitempty"` + + /* +Active zone +Is zone active? + */ + Idnszoneactive *bool `json:"idnszoneactive,omitempty"` + + /* +Zone forwarders +Per-zone forwarders. A custom port can be specified for each forwarder using a standard format "IP_ADDRESS port PORT" + */ + Idnsforwarders *[]string `json:"idnsforwarders,omitempty"` + + /* +Forward policy +Per-zone conditional forwarding policy. Set to "none" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded. + */ + Idnsforwardpolicy *string `json:"idnsforwardpolicy,omitempty"` + + /* +Authoritative nameserver +Authoritative nameserver domain name + */ + Idnssoamname *string `json:"idnssoamname,omitempty"` + + /* +Administrator e-mail address +Administrator e-mail address + */ + Idnssoarname *string `json:"idnssoarname,omitempty"` + + /* +SOA serial +SOA record serial number + */ + Idnssoaserial *int `json:"idnssoaserial,omitempty"` + + /* +SOA refresh +SOA record refresh time + */ + Idnssoarefresh *int `json:"idnssoarefresh,omitempty"` + + /* +SOA retry +SOA record retry time + */ + Idnssoaretry *int `json:"idnssoaretry,omitempty"` + + /* +SOA expire +SOA record expire time + */ + Idnssoaexpire *int `json:"idnssoaexpire,omitempty"` + + /* +SOA minimum +How long should negative responses be cached + */ + Idnssoaminimum *int `json:"idnssoaminimum,omitempty"` + + /* +Time to live +Time to live for records at zone apex + */ + Dnsttl *int `json:"dnsttl,omitempty"` + + /* +Default time to live +Time to live for records without explicit TTL definition + */ + Dnsdefaultttl *int `json:"dnsdefaultttl,omitempty"` + + /* + + + */ + Dnsclass *string `json:"dnsclass,omitempty"` + + /* +BIND update policy +BIND update policy + */ + Idnsupdatepolicy *string `json:"idnsupdatepolicy,omitempty"` + + /* +Dynamic update +Allow dynamic updates. + */ + Idnsallowdynupdate *bool `json:"idnsallowdynupdate,omitempty"` + + /* +Allow query +Semicolon separated list of IP addresses or networks which are allowed to issue queries + */ + Idnsallowquery *string `json:"idnsallowquery,omitempty"` + + /* +Allow transfer +Semicolon separated list of IP addresses or networks which are allowed to transfer the zone + */ + Idnsallowtransfer *string `json:"idnsallowtransfer,omitempty"` + + /* +Allow PTR sync +Allow synchronization of forward (A, AAAA) and reverse (PTR) records in the zone + */ + Idnsallowsyncptr *bool `json:"idnsallowsyncptr,omitempty"` + + /* +Allow in-line DNSSEC signing +Allow inline DNSSEC signing of records in the zone + */ + Idnssecinlinesigning *bool `json:"idnssecinlinesigning,omitempty"` + + /* +NSEC3PARAM record +NSEC3PARAM record for zone in format: hash_algorithm flags iterations salt + */ + Nsec3paramrecord *string `json:"nsec3paramrecord,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* +Forward zones only +Search for forward zones only + */ + ForwardOnly *bool `json:"forward_only,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("name") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } type dnszoneFindKwParams struct { - *DnszoneFindArgs - *DnszoneFindOptionalArgs + *DnszoneFindArgs + *DnszoneFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type dnszoneFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DnszoneFindResult `json:"result"` } type DnszoneFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Dnszone `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Dnszone `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *DnszoneFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DnszoneFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DnszoneFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DnszoneFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DnszoneFindResult%v", string(b)) } /* Modify DNS zone (SOA record). */ func (c *Client) DnszoneMod( - reqArgs *DnszoneModArgs, - optArgs *DnszoneModOptionalArgs, // can be nil + reqArgs *DnszoneModArgs, + optArgs *DnszoneModOptionalArgs, // can be nil ) (*DnszoneModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := dnszoneModKwParams{ - DnszoneModArgs: reqArgs, - DnszoneModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "dnszone_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res dnszoneModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := dnszoneModKwParams{ + DnszoneModArgs: reqArgs, + DnszoneModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "dnszone_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res dnszoneModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DnszoneModArgs struct { -} + } type DnszoneModOptionalArgs struct { - - /* - Zone name - Zone name (FQDN) - */ - Idnsname *string `json:"idnsname,omitempty"` - - /* - Reverse zone IP network - IP network to create reverse zone name from - */ - NameFromIP *string `json:"name_from_ip,omitempty"` - - /* - Zone forwarders - Per-zone forwarders. A custom port can be specified for each forwarder using a standard format "IP_ADDRESS port PORT" - */ - Idnsforwarders *[]string `json:"idnsforwarders,omitempty"` - - /* - Forward policy - Per-zone conditional forwarding policy. Set to "none" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded. - */ - Idnsforwardpolicy *string `json:"idnsforwardpolicy,omitempty"` - - /* - Authoritative nameserver - Authoritative nameserver domain name - */ - Idnssoamname *string `json:"idnssoamname,omitempty"` - - /* - Administrator e-mail address - Administrator e-mail address - */ - Idnssoarname *string `json:"idnssoarname,omitempty"` - - /* - SOA serial - SOA record serial number - */ - Idnssoaserial *int `json:"idnssoaserial,omitempty"` - - /* - SOA refresh - SOA record refresh time - */ - Idnssoarefresh *int `json:"idnssoarefresh,omitempty"` - - /* - SOA retry - SOA record retry time - */ - Idnssoaretry *int `json:"idnssoaretry,omitempty"` - - /* - SOA expire - SOA record expire time - */ - Idnssoaexpire *int `json:"idnssoaexpire,omitempty"` - - /* - SOA minimum - How long should negative responses be cached - */ - Idnssoaminimum *int `json:"idnssoaminimum,omitempty"` - - /* - Time to live - Time to live for records at zone apex - */ - Dnsttl *int `json:"dnsttl,omitempty"` - - /* - Default time to live - Time to live for records without explicit TTL definition - */ - Dnsdefaultttl *int `json:"dnsdefaultttl,omitempty"` - - /* - - - */ - Dnsclass *string `json:"dnsclass,omitempty"` - - /* - BIND update policy - BIND update policy - */ - Idnsupdatepolicy *string `json:"idnsupdatepolicy,omitempty"` - - /* - Dynamic update - Allow dynamic updates. - */ - Idnsallowdynupdate *bool `json:"idnsallowdynupdate,omitempty"` - - /* - Allow query - Semicolon separated list of IP addresses or networks which are allowed to issue queries - */ - Idnsallowquery *string `json:"idnsallowquery,omitempty"` - - /* - Allow transfer - Semicolon separated list of IP addresses or networks which are allowed to transfer the zone - */ - Idnsallowtransfer *string `json:"idnsallowtransfer,omitempty"` - - /* - Allow PTR sync - Allow synchronization of forward (A, AAAA) and reverse (PTR) records in the zone - */ - Idnsallowsyncptr *bool `json:"idnsallowsyncptr,omitempty"` - - /* - Allow in-line DNSSEC signing - Allow inline DNSSEC signing of records in the zone - */ - Idnssecinlinesigning *bool `json:"idnssecinlinesigning,omitempty"` - - /* - NSEC3PARAM record - NSEC3PARAM record for zone in format: hash_algorithm flags iterations salt - */ - Nsec3paramrecord *string `json:"nsec3paramrecord,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - Force - Force nameserver change even if nameserver not in DNS - */ - Force *bool `json:"force,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Zone name +Zone name (FQDN) + */ + Idnsname *string `json:"idnsname,omitempty"` + + /* +Reverse zone IP network +IP network to create reverse zone name from + */ + NameFromIP *string `json:"name_from_ip,omitempty"` + + /* +Zone forwarders +Per-zone forwarders. A custom port can be specified for each forwarder using a standard format "IP_ADDRESS port PORT" + */ + Idnsforwarders *[]string `json:"idnsforwarders,omitempty"` + + /* +Forward policy +Per-zone conditional forwarding policy. Set to "none" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded. + */ + Idnsforwardpolicy *string `json:"idnsforwardpolicy,omitempty"` + + /* +Authoritative nameserver +Authoritative nameserver domain name + */ + Idnssoamname *string `json:"idnssoamname,omitempty"` + + /* +Administrator e-mail address +Administrator e-mail address + */ + Idnssoarname *string `json:"idnssoarname,omitempty"` + + /* +SOA serial +SOA record serial number + */ + Idnssoaserial *int `json:"idnssoaserial,omitempty"` + + /* +SOA refresh +SOA record refresh time + */ + Idnssoarefresh *int `json:"idnssoarefresh,omitempty"` + + /* +SOA retry +SOA record retry time + */ + Idnssoaretry *int `json:"idnssoaretry,omitempty"` + + /* +SOA expire +SOA record expire time + */ + Idnssoaexpire *int `json:"idnssoaexpire,omitempty"` + + /* +SOA minimum +How long should negative responses be cached + */ + Idnssoaminimum *int `json:"idnssoaminimum,omitempty"` + + /* +Time to live +Time to live for records at zone apex + */ + Dnsttl *int `json:"dnsttl,omitempty"` + + /* +Default time to live +Time to live for records without explicit TTL definition + */ + Dnsdefaultttl *int `json:"dnsdefaultttl,omitempty"` + + /* + + + */ + Dnsclass *string `json:"dnsclass,omitempty"` + + /* +BIND update policy +BIND update policy + */ + Idnsupdatepolicy *string `json:"idnsupdatepolicy,omitempty"` + + /* +Dynamic update +Allow dynamic updates. + */ + Idnsallowdynupdate *bool `json:"idnsallowdynupdate,omitempty"` + + /* +Allow query +Semicolon separated list of IP addresses or networks which are allowed to issue queries + */ + Idnsallowquery *string `json:"idnsallowquery,omitempty"` + + /* +Allow transfer +Semicolon separated list of IP addresses or networks which are allowed to transfer the zone + */ + Idnsallowtransfer *string `json:"idnsallowtransfer,omitempty"` + + /* +Allow PTR sync +Allow synchronization of forward (A, AAAA) and reverse (PTR) records in the zone + */ + Idnsallowsyncptr *bool `json:"idnsallowsyncptr,omitempty"` + + /* +Allow in-line DNSSEC signing +Allow inline DNSSEC signing of records in the zone + */ + Idnssecinlinesigning *bool `json:"idnssecinlinesigning,omitempty"` + + /* +NSEC3PARAM record +NSEC3PARAM record for zone in format: hash_algorithm flags iterations salt + */ + Nsec3paramrecord *string `json:"nsec3paramrecord,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* +Force +Force nameserver change even if nameserver not in DNS + */ + Force *bool `json:"force,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type dnszoneModKwParams struct { - *DnszoneModArgs - *DnszoneModOptionalArgs + *DnszoneModArgs + *DnszoneModOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type dnszoneModResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DnszoneModResult `json:"result"` } type DnszoneModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Dnszone `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Dnszone `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *DnszoneModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DnszoneModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DnszoneModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DnszoneModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DnszoneModResult%v", string(b)) } /* Remove a permission for per-zone access delegation. */ func (c *Client) DnszoneRemovePermission( - reqArgs *DnszoneRemovePermissionArgs, - optArgs *DnszoneRemovePermissionOptionalArgs, // can be nil + reqArgs *DnszoneRemovePermissionArgs, + optArgs *DnszoneRemovePermissionOptionalArgs, // can be nil ) (*DnszoneRemovePermissionResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := dnszoneRemovePermissionKwParams{ - DnszoneRemovePermissionArgs: reqArgs, - DnszoneRemovePermissionOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "dnszone_remove_permission", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res dnszoneRemovePermissionResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := dnszoneRemovePermissionKwParams{ + DnszoneRemovePermissionArgs: reqArgs, + DnszoneRemovePermissionOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "dnszone_remove_permission", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res dnszoneRemovePermissionResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DnszoneRemovePermissionArgs struct { -} + } type DnszoneRemovePermissionOptionalArgs struct { - - /* - Zone name - Zone name (FQDN) - */ - Idnsname *string `json:"idnsname,omitempty"` -} + + /* +Zone name +Zone name (FQDN) + */ + Idnsname *string `json:"idnsname,omitempty"` + } type dnszoneRemovePermissionKwParams struct { - *DnszoneRemovePermissionArgs - *DnszoneRemovePermissionOptionalArgs + *DnszoneRemovePermissionArgs + *DnszoneRemovePermissionOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type dnszoneRemovePermissionResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DnszoneRemovePermissionResult `json:"result"` } type DnszoneRemovePermissionResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - True means the operation was successful - (required) - */ - Result bool `json:"result,omitempty"` - - /* - Permission value - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +Permission value + (required) + */ + Value string `json:"value,omitempty"` + } func (t *DnszoneRemovePermissionResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DnszoneRemovePermissionResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DnszoneRemovePermissionResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DnszoneRemovePermissionResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DnszoneRemovePermissionResult%v", string(b)) } /* Display information about a DNS zone (SOA record). */ func (c *Client) DnszoneShow( - reqArgs *DnszoneShowArgs, - optArgs *DnszoneShowOptionalArgs, // can be nil + reqArgs *DnszoneShowArgs, + optArgs *DnszoneShowOptionalArgs, // can be nil ) (*DnszoneShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := dnszoneShowKwParams{ - DnszoneShowArgs: reqArgs, - DnszoneShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "dnszone_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res dnszoneShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := dnszoneShowKwParams{ + DnszoneShowArgs: reqArgs, + DnszoneShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "dnszone_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res dnszoneShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DnszoneShowArgs struct { -} + } type DnszoneShowOptionalArgs struct { - - /* - Zone name - Zone name (FQDN) - */ - Idnsname *string `json:"idnsname,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Zone name +Zone name (FQDN) + */ + Idnsname *string `json:"idnsname,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type dnszoneShowKwParams struct { - *DnszoneShowArgs - *DnszoneShowOptionalArgs + *DnszoneShowArgs + *DnszoneShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type dnszoneShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DnszoneShowResult `json:"result"` } type DnszoneShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Dnszone `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Dnszone `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *DnszoneShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DnszoneShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DnszoneShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DnszoneShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DnszoneShowResult%v", string(b)) } /* Query current Domain Level. */ func (c *Client) DomainlevelGet( - reqArgs *DomainlevelGetArgs, - optArgs *DomainlevelGetOptionalArgs, // can be nil + reqArgs *DomainlevelGetArgs, + optArgs *DomainlevelGetOptionalArgs, // can be nil ) (*DomainlevelGetResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := domainlevelGetKwParams{ - DomainlevelGetArgs: reqArgs, - DomainlevelGetOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "domainlevel_get", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res domainlevelGetResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := domainlevelGetKwParams{ + DomainlevelGetArgs: reqArgs, + DomainlevelGetOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "domainlevel_get", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res domainlevelGetResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DomainlevelGetArgs struct { -} + } type DomainlevelGetOptionalArgs struct { -} + } type domainlevelGetKwParams struct { - *DomainlevelGetArgs - *DomainlevelGetOptionalArgs + *DomainlevelGetArgs + *DomainlevelGetOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type domainlevelGetResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DomainlevelGetResult `json:"result"` } type DomainlevelGetResult struct { - - /* - Current domain level: - (required) - */ - Result int `json:"result,omitempty"` -} + + + /* +Current domain level: + (required) + */ + Result int `json:"result,omitempty"` + } func (t *DomainlevelGetResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DomainlevelGetResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DomainlevelGetResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DomainlevelGetResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DomainlevelGetResult%v", string(b)) } /* Change current Domain Level. */ func (c *Client) DomainlevelSet( - reqArgs *DomainlevelSetArgs, - optArgs *DomainlevelSetOptionalArgs, // can be nil + reqArgs *DomainlevelSetArgs, + optArgs *DomainlevelSetOptionalArgs, // can be nil ) (*DomainlevelSetResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := domainlevelSetKwParams{ - DomainlevelSetArgs: reqArgs, - DomainlevelSetOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "domainlevel_set", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res domainlevelSetResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := domainlevelSetKwParams{ + DomainlevelSetArgs: reqArgs, + DomainlevelSetOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "domainlevel_set", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res domainlevelSetResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type DomainlevelSetArgs struct { + + /* +Domain Level - /* - Domain Level - - */ - Ipadomainlevel int `json:"ipadomainlevel,omitempty"` -} + */ + Ipadomainlevel int `json:"ipadomainlevel,omitempty"` + } type DomainlevelSetOptionalArgs struct { -} + } type domainlevelSetKwParams struct { - *DomainlevelSetArgs - *DomainlevelSetOptionalArgs + *DomainlevelSetArgs + *DomainlevelSetOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type domainlevelSetResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *DomainlevelSetResult `json:"result"` } type DomainlevelSetResult struct { - - /* - Current domain level: - (required) - */ - Result int `json:"result,omitempty"` -} + + + /* +Current domain level: + (required) + */ + Result int `json:"result,omitempty"` + } func (t *DomainlevelSetResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DomainlevelSetResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DomainlevelSetResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DomainlevelSetResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DomainlevelSetResult%v", string(b)) } /* Create a new group. */ func (c *Client) GroupAdd( - reqArgs *GroupAddArgs, - optArgs *GroupAddOptionalArgs, // can be nil + reqArgs *GroupAddArgs, + optArgs *GroupAddOptionalArgs, // can be nil ) (*GroupAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := groupAddKwParams{ - GroupAddArgs: reqArgs, - GroupAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "group_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res groupAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := groupAddKwParams{ + GroupAddArgs: reqArgs, + GroupAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "group_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res groupAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type GroupAddArgs struct { + + /* +Group name - /* - Group name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type GroupAddOptionalArgs struct { - - /* - Description - Group description - */ - Description *string `json:"description,omitempty"` - - /* - GID - GID (use this option to set it manually) - */ - Gidnumber *int `json:"gidnumber,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Create as a non-POSIX group - */ - Nonposix *bool `json:"nonposix,omitempty"` - - /* - - Allow adding external non-IPA members from trusted domains - */ - External *bool `json:"external,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Description +Group description + */ + Description *string `json:"description,omitempty"` + + /* +GID +GID (use this option to set it manually) + */ + Gidnumber *int `json:"gidnumber,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Create as a non-POSIX group + */ + Nonposix *bool `json:"nonposix,omitempty"` + + /* + +Allow adding external non-IPA members from trusted domains + */ + External *bool `json:"external,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type groupAddKwParams struct { - *GroupAddArgs - *GroupAddOptionalArgs + *GroupAddArgs + *GroupAddOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type groupAddResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *GroupAddResult `json:"result"` } type GroupAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Group `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Group `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *GroupAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("GroupAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("GroupAddResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("GroupAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("GroupAddResult%v", string(b)) } /* Add members to a group. */ func (c *Client) GroupAddMember( - reqArgs *GroupAddMemberArgs, - optArgs *GroupAddMemberOptionalArgs, // can be nil + reqArgs *GroupAddMemberArgs, + optArgs *GroupAddMemberOptionalArgs, // can be nil ) (*GroupAddMemberResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := groupAddMemberKwParams{ - GroupAddMemberArgs: reqArgs, - GroupAddMemberOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "group_add_member", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res groupAddMemberResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := groupAddMemberKwParams{ + GroupAddMemberArgs: reqArgs, + GroupAddMemberOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "group_add_member", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res groupAddMemberResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type GroupAddMemberArgs struct { + + /* +Group name - /* - Group name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type GroupAddMemberOptionalArgs struct { - - /* - External member - Members of a trusted domain in DOM\name or name@domain form - */ - Ipaexternalmember *[]string `json:"ipaexternalmember,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member user - users to add - */ - User *[]string `json:"user,omitempty"` - - /* - member group - groups to add - */ - Group *[]string `json:"group,omitempty"` -} + + /* +External member +Members of a trusted domain in DOM\name or name@domain form + */ + Ipaexternalmember *[]string `json:"ipaexternalmember,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member user +users to add + */ + User *[]string `json:"user,omitempty"` + + /* +member group +groups to add + */ + Group *[]string `json:"group,omitempty"` + } type groupAddMemberKwParams struct { - *GroupAddMemberArgs - *GroupAddMemberOptionalArgs + *GroupAddMemberArgs + *GroupAddMemberOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type groupAddMemberResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *GroupAddMemberResult `json:"result"` } type GroupAddMemberResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *GroupAddMemberResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("GroupAddMemberResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("GroupAddMemberResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("GroupAddMemberResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("GroupAddMemberResult%v", string(b)) } /* Delete group. */ func (c *Client) GroupDel( - reqArgs *GroupDelArgs, - optArgs *GroupDelOptionalArgs, // can be nil + reqArgs *GroupDelArgs, + optArgs *GroupDelOptionalArgs, // can be nil ) (*GroupDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := groupDelKwParams{ - GroupDelArgs: reqArgs, - GroupDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "group_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res groupDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := groupDelKwParams{ + GroupDelArgs: reqArgs, + GroupDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "group_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res groupDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type GroupDelArgs struct { + + /* +Group name - /* - Group name - - */ - Cn []string `json:"cn,omitempty"` -} + */ + Cn []string `json:"cn,omitempty"` + } type GroupDelOptionalArgs struct { + + /* - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` -} +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } type groupDelKwParams struct { - *GroupDelArgs - *GroupDelOptionalArgs + *GroupDelArgs + *GroupDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type groupDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *GroupDelResult `json:"result"` } type GroupDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } func (t *GroupDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("GroupDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("GroupDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("GroupDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("GroupDelResult%v", string(b)) } /* Detach a managed group from a user. */ func (c *Client) GroupDetach( - reqArgs *GroupDetachArgs, - optArgs *GroupDetachOptionalArgs, // can be nil + reqArgs *GroupDetachArgs, + optArgs *GroupDetachOptionalArgs, // can be nil ) (*GroupDetachResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := groupDetachKwParams{ - GroupDetachArgs: reqArgs, - GroupDetachOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "group_detach", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res groupDetachResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := groupDetachKwParams{ + GroupDetachArgs: reqArgs, + GroupDetachOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "group_detach", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res groupDetachResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type GroupDetachArgs struct { + + /* +Group name - /* - Group name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type GroupDetachOptionalArgs struct { -} + } type groupDetachKwParams struct { - *GroupDetachArgs - *GroupDetachOptionalArgs + *GroupDetachArgs + *GroupDetachOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type groupDetachResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *GroupDetachResult `json:"result"` } type GroupDetachResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - True means the operation was successful - (required) - */ - Result bool `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *GroupDetachResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("GroupDetachResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("GroupDetachResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("GroupDetachResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("GroupDetachResult%v", string(b)) } /* Search for groups. */ func (c *Client) GroupFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *GroupFindArgs, - optArgs *GroupFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *GroupFindArgs, + optArgs *GroupFindOptionalArgs, // can be nil ) (*GroupFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := groupFindKwParams{ - GroupFindArgs: reqArgs, - GroupFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "group_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res groupFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := groupFindKwParams{ + GroupFindArgs: reqArgs, + GroupFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "group_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res groupFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type GroupFindArgs struct { -} + } type GroupFindOptionalArgs struct { - - /* - Group name - - */ - Cn *string `json:"cn,omitempty"` - - /* - Description - Group description - */ - Description *string `json:"description,omitempty"` - - /* - GID - GID (use this option to set it manually) - */ - Gidnumber *int `json:"gidnumber,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - search for private groups - */ - Private *bool `json:"private,omitempty"` - - /* - - search for POSIX groups - */ - Posix *bool `json:"posix,omitempty"` - - /* - - search for groups with support of external non-IPA members from trusted domains - */ - External *bool `json:"external,omitempty"` - - /* - - search for non-POSIX groups - */ - Nonposix *bool `json:"nonposix,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("group-name") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` - - /* - user - Search for groups with these member users. - */ - User *[]string `json:"user,omitempty"` - - /* - user - Search for groups without these member users. - */ - NoUser *[]string `json:"no_user,omitempty"` - - /* - group - Search for groups with these member groups. - */ - Group *[]string `json:"group,omitempty"` - - /* - group - Search for groups without these member groups. - */ - NoGroup *[]string `json:"no_group,omitempty"` - - /* - group - Search for groups with these member of groups. - */ - InGroup *[]string `json:"in_group,omitempty"` - - /* - group - Search for groups without these member of groups. - */ - NotInGroup *[]string `json:"not_in_group,omitempty"` - - /* - netgroup - Search for groups with these member of netgroups. - */ - InNetgroup *[]string `json:"in_netgroup,omitempty"` - - /* - netgroup - Search for groups without these member of netgroups. - */ - NotInNetgroup *[]string `json:"not_in_netgroup,omitempty"` - - /* - role - Search for groups with these member of roles. - */ - InRole *[]string `json:"in_role,omitempty"` - - /* - role - Search for groups without these member of roles. - */ - NotInRole *[]string `json:"not_in_role,omitempty"` - - /* - HBAC rule - Search for groups with these member of HBAC rules. - */ - InHbacrule *[]string `json:"in_hbacrule,omitempty"` - - /* - HBAC rule - Search for groups without these member of HBAC rules. - */ - NotInHbacrule *[]string `json:"not_in_hbacrule,omitempty"` - - /* - sudo rule - Search for groups with these member of sudo rules. - */ - InSudorule *[]string `json:"in_sudorule,omitempty"` - - /* - sudo rule - Search for groups without these member of sudo rules. - */ - NotInSudorule *[]string `json:"not_in_sudorule,omitempty"` -} + + /* +Group name + + */ + Cn *string `json:"cn,omitempty"` + + /* +Description +Group description + */ + Description *string `json:"description,omitempty"` + + /* +GID +GID (use this option to set it manually) + */ + Gidnumber *int `json:"gidnumber,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +search for private groups + */ + Private *bool `json:"private,omitempty"` + + /* + +search for POSIX groups + */ + Posix *bool `json:"posix,omitempty"` + + /* + +search for groups with support of external non-IPA members from trusted domains + */ + External *bool `json:"external,omitempty"` + + /* + +search for non-POSIX groups + */ + Nonposix *bool `json:"nonposix,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("group-name") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + + /* +user +Search for groups with these member users. + */ + User *[]string `json:"user,omitempty"` + + /* +user +Search for groups without these member users. + */ + NoUser *[]string `json:"no_user,omitempty"` + + /* +group +Search for groups with these member groups. + */ + Group *[]string `json:"group,omitempty"` + + /* +group +Search for groups without these member groups. + */ + NoGroup *[]string `json:"no_group,omitempty"` + + /* +group +Search for groups with these member of groups. + */ + InGroup *[]string `json:"in_group,omitempty"` + + /* +group +Search for groups without these member of groups. + */ + NotInGroup *[]string `json:"not_in_group,omitempty"` + + /* +netgroup +Search for groups with these member of netgroups. + */ + InNetgroup *[]string `json:"in_netgroup,omitempty"` + + /* +netgroup +Search for groups without these member of netgroups. + */ + NotInNetgroup *[]string `json:"not_in_netgroup,omitempty"` + + /* +role +Search for groups with these member of roles. + */ + InRole *[]string `json:"in_role,omitempty"` + + /* +role +Search for groups without these member of roles. + */ + NotInRole *[]string `json:"not_in_role,omitempty"` + + /* +HBAC rule +Search for groups with these member of HBAC rules. + */ + InHbacrule *[]string `json:"in_hbacrule,omitempty"` + + /* +HBAC rule +Search for groups without these member of HBAC rules. + */ + NotInHbacrule *[]string `json:"not_in_hbacrule,omitempty"` + + /* +sudo rule +Search for groups with these member of sudo rules. + */ + InSudorule *[]string `json:"in_sudorule,omitempty"` + + /* +sudo rule +Search for groups without these member of sudo rules. + */ + NotInSudorule *[]string `json:"not_in_sudorule,omitempty"` + } type groupFindKwParams struct { - *GroupFindArgs - *GroupFindOptionalArgs + *GroupFindArgs + *GroupFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type groupFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *GroupFindResult `json:"result"` } type GroupFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Group `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Group `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *GroupFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("GroupFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("GroupFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("GroupFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("GroupFindResult%v", string(b)) } /* Modify a group. */ func (c *Client) GroupMod( - reqArgs *GroupModArgs, - optArgs *GroupModOptionalArgs, // can be nil + reqArgs *GroupModArgs, + optArgs *GroupModOptionalArgs, // can be nil ) (*GroupModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := groupModKwParams{ - GroupModArgs: reqArgs, - GroupModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "group_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res groupModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := groupModKwParams{ + GroupModArgs: reqArgs, + GroupModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "group_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res groupModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type GroupModArgs struct { + + /* +Group name - /* - Group name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type GroupModOptionalArgs struct { - - /* - Description - Group description - */ - Description *string `json:"description,omitempty"` - - /* - GID - GID (use this option to set it manually) - */ - Gidnumber *int `json:"gidnumber,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - change to a POSIX group - */ - Posix *bool `json:"posix,omitempty"` - - /* - - change to support external non-IPA members from trusted domains - */ - External *bool `json:"external,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - Rename - Rename the group object - */ - Rename *string `json:"rename,omitempty"` -} + + /* +Description +Group description + */ + Description *string `json:"description,omitempty"` + + /* +GID +GID (use this option to set it manually) + */ + Gidnumber *int `json:"gidnumber,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +change to a POSIX group + */ + Posix *bool `json:"posix,omitempty"` + + /* + +change to support external non-IPA members from trusted domains + */ + External *bool `json:"external,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +Rename +Rename the group object + */ + Rename *string `json:"rename,omitempty"` + } type groupModKwParams struct { - *GroupModArgs - *GroupModOptionalArgs + *GroupModArgs + *GroupModOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type groupModResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *GroupModResult `json:"result"` } type GroupModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Group `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Group `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *GroupModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("GroupModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("GroupModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("GroupModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("GroupModResult%v", string(b)) } /* Remove members from a group. */ func (c *Client) GroupRemoveMember( - reqArgs *GroupRemoveMemberArgs, - optArgs *GroupRemoveMemberOptionalArgs, // can be nil + reqArgs *GroupRemoveMemberArgs, + optArgs *GroupRemoveMemberOptionalArgs, // can be nil ) (*GroupRemoveMemberResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := groupRemoveMemberKwParams{ - GroupRemoveMemberArgs: reqArgs, - GroupRemoveMemberOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "group_remove_member", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res groupRemoveMemberResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := groupRemoveMemberKwParams{ + GroupRemoveMemberArgs: reqArgs, + GroupRemoveMemberOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "group_remove_member", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res groupRemoveMemberResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type GroupRemoveMemberArgs struct { + + /* +Group name - /* - Group name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type GroupRemoveMemberOptionalArgs struct { - - /* - External member - Members of a trusted domain in DOM\name or name@domain form - */ - Ipaexternalmember *[]string `json:"ipaexternalmember,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member user - users to remove - */ - User *[]string `json:"user,omitempty"` - - /* - member group - groups to remove - */ - Group *[]string `json:"group,omitempty"` -} + + /* +External member +Members of a trusted domain in DOM\name or name@domain form + */ + Ipaexternalmember *[]string `json:"ipaexternalmember,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member user +users to remove + */ + User *[]string `json:"user,omitempty"` + + /* +member group +groups to remove + */ + Group *[]string `json:"group,omitempty"` + } type groupRemoveMemberKwParams struct { - *GroupRemoveMemberArgs - *GroupRemoveMemberOptionalArgs + *GroupRemoveMemberArgs + *GroupRemoveMemberOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type groupRemoveMemberResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *GroupRemoveMemberResult `json:"result"` } type GroupRemoveMemberResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *GroupRemoveMemberResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("GroupRemoveMemberResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("GroupRemoveMemberResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("GroupRemoveMemberResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("GroupRemoveMemberResult%v", string(b)) } /* Display information about a named group. */ func (c *Client) GroupShow( - reqArgs *GroupShowArgs, - optArgs *GroupShowOptionalArgs, // can be nil + reqArgs *GroupShowArgs, + optArgs *GroupShowOptionalArgs, // can be nil ) (*GroupShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := groupShowKwParams{ - GroupShowArgs: reqArgs, - GroupShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "group_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res groupShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := groupShowKwParams{ + GroupShowArgs: reqArgs, + GroupShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "group_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res groupShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type GroupShowArgs struct { + + /* +Group name - /* - Group name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type GroupShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type groupShowKwParams struct { - *GroupShowArgs - *GroupShowOptionalArgs + *GroupShowArgs + *GroupShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type groupShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *GroupShowResult `json:"result"` } type GroupShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Group `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Group `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *GroupShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("GroupShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("GroupShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("GroupShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("GroupShowResult%v", string(b)) } /* Create a new HBAC rule. */ func (c *Client) HbacruleAdd( - reqArgs *HbacruleAddArgs, - optArgs *HbacruleAddOptionalArgs, // can be nil + reqArgs *HbacruleAddArgs, + optArgs *HbacruleAddOptionalArgs, // can be nil ) (*HbacruleAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hbacruleAddKwParams{ - HbacruleAddArgs: reqArgs, - HbacruleAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "hbacrule_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hbacruleAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hbacruleAddKwParams{ + HbacruleAddArgs: reqArgs, + HbacruleAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "hbacrule_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hbacruleAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HbacruleAddArgs struct { + + /* +Rule name - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type HbacruleAddOptionalArgs struct { - - /* - Rule type - Rule type (allow) - */ - Accessruletype *string `json:"accessruletype,omitempty"` - - /* - User category - User category the rule applies to - */ - Usercategory *string `json:"usercategory,omitempty"` - - /* - Host category - Host category the rule applies to - */ - Hostcategory *string `json:"hostcategory,omitempty"` - - /* - Source host category - Source host category the rule applies to - */ - Sourcehostcategory *string `json:"sourcehostcategory,omitempty"` - - /* - Service category - Service category the rule applies to - */ - Servicecategory *string `json:"servicecategory,omitempty"` - - /* - Description - - */ - Description *string `json:"description,omitempty"` - - /* - Enabled - - */ - Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` - - /* - External host - - */ - Externalhost *[]string `json:"externalhost,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Rule type +Rule type (allow) + */ + Accessruletype *string `json:"accessruletype,omitempty"` + + /* +User category +User category the rule applies to + */ + Usercategory *string `json:"usercategory,omitempty"` + + /* +Host category +Host category the rule applies to + */ + Hostcategory *string `json:"hostcategory,omitempty"` + + /* +Source host category +Source host category the rule applies to + */ + Sourcehostcategory *string `json:"sourcehostcategory,omitempty"` + + /* +Service category +Service category the rule applies to + */ + Servicecategory *string `json:"servicecategory,omitempty"` + + /* +Description + + */ + Description *string `json:"description,omitempty"` + + /* +Enabled + + */ + Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` + + /* +External host + + */ + Externalhost *[]string `json:"externalhost,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type hbacruleAddKwParams struct { - *HbacruleAddArgs - *HbacruleAddOptionalArgs + *HbacruleAddArgs + *HbacruleAddOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hbacruleAddResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HbacruleAddResult `json:"result"` } type HbacruleAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Hbacrule `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Hbacrule `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *HbacruleAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HbacruleAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HbacruleAddResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HbacruleAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HbacruleAddResult%v", string(b)) } /* Add target hosts and hostgroups to an HBAC rule. */ func (c *Client) HbacruleAddHost( - reqArgs *HbacruleAddHostArgs, - optArgs *HbacruleAddHostOptionalArgs, // can be nil + reqArgs *HbacruleAddHostArgs, + optArgs *HbacruleAddHostOptionalArgs, // can be nil ) (*HbacruleAddHostResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hbacruleAddHostKwParams{ - HbacruleAddHostArgs: reqArgs, - HbacruleAddHostOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "hbacrule_add_host", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hbacruleAddHostResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hbacruleAddHostKwParams{ + HbacruleAddHostArgs: reqArgs, + HbacruleAddHostOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "hbacrule_add_host", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hbacruleAddHostResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HbacruleAddHostArgs struct { + + /* +Rule name - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type HbacruleAddHostOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member host - hosts to add - */ - Host *[]string `json:"host,omitempty"` - - /* - member host group - host groups to add - */ - Hostgroup *[]string `json:"hostgroup,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member host +hosts to add + */ + Host *[]string `json:"host,omitempty"` + + /* +member host group +host groups to add + */ + Hostgroup *[]string `json:"hostgroup,omitempty"` + } type hbacruleAddHostKwParams struct { - *HbacruleAddHostArgs - *HbacruleAddHostOptionalArgs + *HbacruleAddHostArgs + *HbacruleAddHostOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hbacruleAddHostResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HbacruleAddHostResult `json:"result"` } type HbacruleAddHostResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *HbacruleAddHostResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HbacruleAddHostResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HbacruleAddHostResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HbacruleAddHostResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HbacruleAddHostResult%v", string(b)) } /* Add services to an HBAC rule. */ func (c *Client) HbacruleAddService( - reqArgs *HbacruleAddServiceArgs, - optArgs *HbacruleAddServiceOptionalArgs, // can be nil + reqArgs *HbacruleAddServiceArgs, + optArgs *HbacruleAddServiceOptionalArgs, // can be nil ) (*HbacruleAddServiceResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hbacruleAddServiceKwParams{ - HbacruleAddServiceArgs: reqArgs, - HbacruleAddServiceOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "hbacrule_add_service", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hbacruleAddServiceResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hbacruleAddServiceKwParams{ + HbacruleAddServiceArgs: reqArgs, + HbacruleAddServiceOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "hbacrule_add_service", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hbacruleAddServiceResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HbacruleAddServiceArgs struct { + + /* +Rule name - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type HbacruleAddServiceOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member HBAC service - HBAC services to add - */ - Hbacsvc *[]string `json:"hbacsvc,omitempty"` - - /* - member HBAC service group - HBAC service groups to add - */ - Hbacsvcgroup *[]string `json:"hbacsvcgroup,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member HBAC service +HBAC services to add + */ + Hbacsvc *[]string `json:"hbacsvc,omitempty"` + + /* +member HBAC service group +HBAC service groups to add + */ + Hbacsvcgroup *[]string `json:"hbacsvcgroup,omitempty"` + } type hbacruleAddServiceKwParams struct { - *HbacruleAddServiceArgs - *HbacruleAddServiceOptionalArgs + *HbacruleAddServiceArgs + *HbacruleAddServiceOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hbacruleAddServiceResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HbacruleAddServiceResult `json:"result"` } type HbacruleAddServiceResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *HbacruleAddServiceResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HbacruleAddServiceResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HbacruleAddServiceResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HbacruleAddServiceResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HbacruleAddServiceResult%v", string(b)) } /* - */ +*/ func (c *Client) HbacruleAddSourcehost( - reqArgs *HbacruleAddSourcehostArgs, - optArgs *HbacruleAddSourcehostOptionalArgs, // can be nil + reqArgs *HbacruleAddSourcehostArgs, + optArgs *HbacruleAddSourcehostOptionalArgs, // can be nil ) (*HbacruleAddSourcehostResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hbacruleAddSourcehostKwParams{ - HbacruleAddSourcehostArgs: reqArgs, - HbacruleAddSourcehostOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "hbacrule_add_sourcehost", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hbacruleAddSourcehostResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hbacruleAddSourcehostKwParams{ + HbacruleAddSourcehostArgs: reqArgs, + HbacruleAddSourcehostOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "hbacrule_add_sourcehost", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hbacruleAddSourcehostResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HbacruleAddSourcehostArgs struct { + + /* +Rule name - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type HbacruleAddSourcehostOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member host - hosts to add - */ - Host *[]string `json:"host,omitempty"` - - /* - member host group - host groups to add - */ - Hostgroup *[]string `json:"hostgroup,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member host +hosts to add + */ + Host *[]string `json:"host,omitempty"` + + /* +member host group +host groups to add + */ + Hostgroup *[]string `json:"hostgroup,omitempty"` + } type hbacruleAddSourcehostKwParams struct { - *HbacruleAddSourcehostArgs - *HbacruleAddSourcehostOptionalArgs + *HbacruleAddSourcehostArgs + *HbacruleAddSourcehostOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hbacruleAddSourcehostResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HbacruleAddSourcehostResult `json:"result"` } type HbacruleAddSourcehostResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *HbacruleAddSourcehostResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HbacruleAddSourcehostResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HbacruleAddSourcehostResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HbacruleAddSourcehostResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HbacruleAddSourcehostResult%v", string(b)) } /* Add users and groups to an HBAC rule. */ func (c *Client) HbacruleAddUser( - reqArgs *HbacruleAddUserArgs, - optArgs *HbacruleAddUserOptionalArgs, // can be nil + reqArgs *HbacruleAddUserArgs, + optArgs *HbacruleAddUserOptionalArgs, // can be nil ) (*HbacruleAddUserResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hbacruleAddUserKwParams{ - HbacruleAddUserArgs: reqArgs, - HbacruleAddUserOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "hbacrule_add_user", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hbacruleAddUserResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hbacruleAddUserKwParams{ + HbacruleAddUserArgs: reqArgs, + HbacruleAddUserOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "hbacrule_add_user", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hbacruleAddUserResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HbacruleAddUserArgs struct { + + /* +Rule name - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type HbacruleAddUserOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member user - users to add - */ - User *[]string `json:"user,omitempty"` - - /* - member group - groups to add - */ - Group *[]string `json:"group,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member user +users to add + */ + User *[]string `json:"user,omitempty"` + + /* +member group +groups to add + */ + Group *[]string `json:"group,omitempty"` + } type hbacruleAddUserKwParams struct { - *HbacruleAddUserArgs - *HbacruleAddUserOptionalArgs + *HbacruleAddUserArgs + *HbacruleAddUserOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hbacruleAddUserResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HbacruleAddUserResult `json:"result"` } type HbacruleAddUserResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *HbacruleAddUserResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HbacruleAddUserResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HbacruleAddUserResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HbacruleAddUserResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HbacruleAddUserResult%v", string(b)) } /* Delete an HBAC rule. */ func (c *Client) HbacruleDel( - reqArgs *HbacruleDelArgs, - optArgs *HbacruleDelOptionalArgs, // can be nil + reqArgs *HbacruleDelArgs, + optArgs *HbacruleDelOptionalArgs, // can be nil ) (*HbacruleDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hbacruleDelKwParams{ - HbacruleDelArgs: reqArgs, - HbacruleDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "hbacrule_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hbacruleDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hbacruleDelKwParams{ + HbacruleDelArgs: reqArgs, + HbacruleDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "hbacrule_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hbacruleDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HbacruleDelArgs struct { + + /* +Rule name - /* - Rule name - - */ - Cn []string `json:"cn,omitempty"` -} + */ + Cn []string `json:"cn,omitempty"` + } type HbacruleDelOptionalArgs struct { + + /* - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` -} +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } type hbacruleDelKwParams struct { - *HbacruleDelArgs - *HbacruleDelOptionalArgs + *HbacruleDelArgs + *HbacruleDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hbacruleDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HbacruleDelResult `json:"result"` } type HbacruleDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } func (t *HbacruleDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HbacruleDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HbacruleDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HbacruleDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HbacruleDelResult%v", string(b)) } /* Disable an HBAC rule. */ func (c *Client) HbacruleDisable( - reqArgs *HbacruleDisableArgs, - optArgs *HbacruleDisableOptionalArgs, // can be nil + reqArgs *HbacruleDisableArgs, + optArgs *HbacruleDisableOptionalArgs, // can be nil ) (*HbacruleDisableResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hbacruleDisableKwParams{ - HbacruleDisableArgs: reqArgs, - HbacruleDisableOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "hbacrule_disable", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hbacruleDisableResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hbacruleDisableKwParams{ + HbacruleDisableArgs: reqArgs, + HbacruleDisableOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "hbacrule_disable", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hbacruleDisableResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HbacruleDisableArgs struct { + + /* +Rule name - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type HbacruleDisableOptionalArgs struct { -} + } type hbacruleDisableKwParams struct { - *HbacruleDisableArgs - *HbacruleDisableOptionalArgs + *HbacruleDisableArgs + *HbacruleDisableOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hbacruleDisableResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HbacruleDisableResult `json:"result"` } type HbacruleDisableResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - True means the operation was successful - (required) - */ - Result bool `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *HbacruleDisableResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HbacruleDisableResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HbacruleDisableResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HbacruleDisableResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HbacruleDisableResult%v", string(b)) } /* Enable an HBAC rule. */ func (c *Client) HbacruleEnable( - reqArgs *HbacruleEnableArgs, - optArgs *HbacruleEnableOptionalArgs, // can be nil + reqArgs *HbacruleEnableArgs, + optArgs *HbacruleEnableOptionalArgs, // can be nil ) (*HbacruleEnableResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hbacruleEnableKwParams{ - HbacruleEnableArgs: reqArgs, - HbacruleEnableOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "hbacrule_enable", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hbacruleEnableResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hbacruleEnableKwParams{ + HbacruleEnableArgs: reqArgs, + HbacruleEnableOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "hbacrule_enable", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hbacruleEnableResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HbacruleEnableArgs struct { + + /* +Rule name - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type HbacruleEnableOptionalArgs struct { -} + } type hbacruleEnableKwParams struct { - *HbacruleEnableArgs - *HbacruleEnableOptionalArgs + *HbacruleEnableArgs + *HbacruleEnableOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hbacruleEnableResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HbacruleEnableResult `json:"result"` } type HbacruleEnableResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - True means the operation was successful - (required) - */ - Result bool `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *HbacruleEnableResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HbacruleEnableResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HbacruleEnableResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HbacruleEnableResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HbacruleEnableResult%v", string(b)) } /* Search for HBAC rules. */ func (c *Client) HbacruleFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *HbacruleFindArgs, - optArgs *HbacruleFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *HbacruleFindArgs, + optArgs *HbacruleFindOptionalArgs, // can be nil ) (*HbacruleFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hbacruleFindKwParams{ - HbacruleFindArgs: reqArgs, - HbacruleFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "hbacrule_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hbacruleFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hbacruleFindKwParams{ + HbacruleFindArgs: reqArgs, + HbacruleFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "hbacrule_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hbacruleFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HbacruleFindArgs struct { -} + } type HbacruleFindOptionalArgs struct { - - /* - Rule name - - */ - Cn *string `json:"cn,omitempty"` - - /* - Rule type - Rule type (allow) - */ - Accessruletype *string `json:"accessruletype,omitempty"` - - /* - User category - User category the rule applies to - */ - Usercategory *string `json:"usercategory,omitempty"` - - /* - Host category - Host category the rule applies to - */ - Hostcategory *string `json:"hostcategory,omitempty"` - - /* - Source host category - Source host category the rule applies to - */ - Sourcehostcategory *string `json:"sourcehostcategory,omitempty"` - - /* - Service category - Service category the rule applies to - */ - Servicecategory *string `json:"servicecategory,omitempty"` - - /* - Description - - */ - Description *string `json:"description,omitempty"` - - /* - Enabled - - */ - Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` - - /* - External host - - */ - Externalhost *[]string `json:"externalhost,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("name") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} + + /* +Rule name + + */ + Cn *string `json:"cn,omitempty"` + + /* +Rule type +Rule type (allow) + */ + Accessruletype *string `json:"accessruletype,omitempty"` + + /* +User category +User category the rule applies to + */ + Usercategory *string `json:"usercategory,omitempty"` + + /* +Host category +Host category the rule applies to + */ + Hostcategory *string `json:"hostcategory,omitempty"` + + /* +Source host category +Source host category the rule applies to + */ + Sourcehostcategory *string `json:"sourcehostcategory,omitempty"` + + /* +Service category +Service category the rule applies to + */ + Servicecategory *string `json:"servicecategory,omitempty"` + + /* +Description + + */ + Description *string `json:"description,omitempty"` + + /* +Enabled + + */ + Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` + + /* +External host + + */ + Externalhost *[]string `json:"externalhost,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("name") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } type hbacruleFindKwParams struct { - *HbacruleFindArgs - *HbacruleFindOptionalArgs + *HbacruleFindArgs + *HbacruleFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hbacruleFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HbacruleFindResult `json:"result"` } type HbacruleFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Hbacrule `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Hbacrule `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *HbacruleFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HbacruleFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HbacruleFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HbacruleFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HbacruleFindResult%v", string(b)) } /* Modify an HBAC rule. */ func (c *Client) HbacruleMod( - reqArgs *HbacruleModArgs, - optArgs *HbacruleModOptionalArgs, // can be nil + reqArgs *HbacruleModArgs, + optArgs *HbacruleModOptionalArgs, // can be nil ) (*HbacruleModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hbacruleModKwParams{ - HbacruleModArgs: reqArgs, - HbacruleModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "hbacrule_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hbacruleModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hbacruleModKwParams{ + HbacruleModArgs: reqArgs, + HbacruleModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "hbacrule_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hbacruleModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HbacruleModArgs struct { + + /* +Rule name - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type HbacruleModOptionalArgs struct { - - /* - Rule type - Rule type (allow) - */ - Accessruletype *string `json:"accessruletype,omitempty"` - - /* - User category - User category the rule applies to - */ - Usercategory *string `json:"usercategory,omitempty"` - - /* - Host category - Host category the rule applies to - */ - Hostcategory *string `json:"hostcategory,omitempty"` - - /* - Source host category - Source host category the rule applies to - */ - Sourcehostcategory *string `json:"sourcehostcategory,omitempty"` - - /* - Service category - Service category the rule applies to - */ - Servicecategory *string `json:"servicecategory,omitempty"` - - /* - Description - - */ - Description *string `json:"description,omitempty"` - - /* - Enabled - - */ - Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` - - /* - External host - - */ - Externalhost *[]string `json:"externalhost,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Rule type +Rule type (allow) + */ + Accessruletype *string `json:"accessruletype,omitempty"` + + /* +User category +User category the rule applies to + */ + Usercategory *string `json:"usercategory,omitempty"` + + /* +Host category +Host category the rule applies to + */ + Hostcategory *string `json:"hostcategory,omitempty"` + + /* +Source host category +Source host category the rule applies to + */ + Sourcehostcategory *string `json:"sourcehostcategory,omitempty"` + + /* +Service category +Service category the rule applies to + */ + Servicecategory *string `json:"servicecategory,omitempty"` + + /* +Description + + */ + Description *string `json:"description,omitempty"` + + /* +Enabled + + */ + Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` + + /* +External host + + */ + Externalhost *[]string `json:"externalhost,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +Rename +Rename the HBAC rule object + */ + Rename *string `json:"rename,omitempty"` + } type hbacruleModKwParams struct { - *HbacruleModArgs - *HbacruleModOptionalArgs + *HbacruleModArgs + *HbacruleModOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hbacruleModResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HbacruleModResult `json:"result"` } type HbacruleModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Hbacrule `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Hbacrule `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *HbacruleModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HbacruleModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HbacruleModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HbacruleModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HbacruleModResult%v", string(b)) } /* Remove target hosts and hostgroups from an HBAC rule. */ func (c *Client) HbacruleRemoveHost( - reqArgs *HbacruleRemoveHostArgs, - optArgs *HbacruleRemoveHostOptionalArgs, // can be nil + reqArgs *HbacruleRemoveHostArgs, + optArgs *HbacruleRemoveHostOptionalArgs, // can be nil ) (*HbacruleRemoveHostResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hbacruleRemoveHostKwParams{ - HbacruleRemoveHostArgs: reqArgs, - HbacruleRemoveHostOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "hbacrule_remove_host", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hbacruleRemoveHostResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hbacruleRemoveHostKwParams{ + HbacruleRemoveHostArgs: reqArgs, + HbacruleRemoveHostOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "hbacrule_remove_host", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hbacruleRemoveHostResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HbacruleRemoveHostArgs struct { + + /* +Rule name - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type HbacruleRemoveHostOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member host - hosts to remove - */ - Host *[]string `json:"host,omitempty"` - - /* - member host group - host groups to remove - */ - Hostgroup *[]string `json:"hostgroup,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member host +hosts to remove + */ + Host *[]string `json:"host,omitempty"` + + /* +member host group +host groups to remove + */ + Hostgroup *[]string `json:"hostgroup,omitempty"` + } type hbacruleRemoveHostKwParams struct { - *HbacruleRemoveHostArgs - *HbacruleRemoveHostOptionalArgs + *HbacruleRemoveHostArgs + *HbacruleRemoveHostOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hbacruleRemoveHostResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HbacruleRemoveHostResult `json:"result"` } type HbacruleRemoveHostResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *HbacruleRemoveHostResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HbacruleRemoveHostResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HbacruleRemoveHostResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HbacruleRemoveHostResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HbacruleRemoveHostResult%v", string(b)) } /* Remove service and service groups from an HBAC rule. */ func (c *Client) HbacruleRemoveService( - reqArgs *HbacruleRemoveServiceArgs, - optArgs *HbacruleRemoveServiceOptionalArgs, // can be nil + reqArgs *HbacruleRemoveServiceArgs, + optArgs *HbacruleRemoveServiceOptionalArgs, // can be nil ) (*HbacruleRemoveServiceResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hbacruleRemoveServiceKwParams{ - HbacruleRemoveServiceArgs: reqArgs, - HbacruleRemoveServiceOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "hbacrule_remove_service", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hbacruleRemoveServiceResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hbacruleRemoveServiceKwParams{ + HbacruleRemoveServiceArgs: reqArgs, + HbacruleRemoveServiceOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "hbacrule_remove_service", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hbacruleRemoveServiceResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HbacruleRemoveServiceArgs struct { + + /* +Rule name - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type HbacruleRemoveServiceOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member HBAC service - HBAC services to remove - */ - Hbacsvc *[]string `json:"hbacsvc,omitempty"` - - /* - member HBAC service group - HBAC service groups to remove - */ - Hbacsvcgroup *[]string `json:"hbacsvcgroup,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member HBAC service +HBAC services to remove + */ + Hbacsvc *[]string `json:"hbacsvc,omitempty"` + + /* +member HBAC service group +HBAC service groups to remove + */ + Hbacsvcgroup *[]string `json:"hbacsvcgroup,omitempty"` + } type hbacruleRemoveServiceKwParams struct { - *HbacruleRemoveServiceArgs - *HbacruleRemoveServiceOptionalArgs + *HbacruleRemoveServiceArgs + *HbacruleRemoveServiceOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hbacruleRemoveServiceResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HbacruleRemoveServiceResult `json:"result"` } type HbacruleRemoveServiceResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *HbacruleRemoveServiceResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HbacruleRemoveServiceResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HbacruleRemoveServiceResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HbacruleRemoveServiceResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HbacruleRemoveServiceResult%v", string(b)) } /* - */ +*/ func (c *Client) HbacruleRemoveSourcehost( - reqArgs *HbacruleRemoveSourcehostArgs, - optArgs *HbacruleRemoveSourcehostOptionalArgs, // can be nil + reqArgs *HbacruleRemoveSourcehostArgs, + optArgs *HbacruleRemoveSourcehostOptionalArgs, // can be nil ) (*HbacruleRemoveSourcehostResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hbacruleRemoveSourcehostKwParams{ - HbacruleRemoveSourcehostArgs: reqArgs, - HbacruleRemoveSourcehostOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "hbacrule_remove_sourcehost", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hbacruleRemoveSourcehostResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hbacruleRemoveSourcehostKwParams{ + HbacruleRemoveSourcehostArgs: reqArgs, + HbacruleRemoveSourcehostOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "hbacrule_remove_sourcehost", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hbacruleRemoveSourcehostResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HbacruleRemoveSourcehostArgs struct { + + /* +Rule name - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type HbacruleRemoveSourcehostOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member host - hosts to remove - */ - Host *[]string `json:"host,omitempty"` - - /* - member host group - host groups to remove - */ - Hostgroup *[]string `json:"hostgroup,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member host +hosts to remove + */ + Host *[]string `json:"host,omitempty"` + + /* +member host group +host groups to remove + */ + Hostgroup *[]string `json:"hostgroup,omitempty"` + } type hbacruleRemoveSourcehostKwParams struct { - *HbacruleRemoveSourcehostArgs - *HbacruleRemoveSourcehostOptionalArgs + *HbacruleRemoveSourcehostArgs + *HbacruleRemoveSourcehostOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hbacruleRemoveSourcehostResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HbacruleRemoveSourcehostResult `json:"result"` } type HbacruleRemoveSourcehostResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *HbacruleRemoveSourcehostResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HbacruleRemoveSourcehostResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HbacruleRemoveSourcehostResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HbacruleRemoveSourcehostResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HbacruleRemoveSourcehostResult%v", string(b)) } /* Remove users and groups from an HBAC rule. */ func (c *Client) HbacruleRemoveUser( - reqArgs *HbacruleRemoveUserArgs, - optArgs *HbacruleRemoveUserOptionalArgs, // can be nil + reqArgs *HbacruleRemoveUserArgs, + optArgs *HbacruleRemoveUserOptionalArgs, // can be nil ) (*HbacruleRemoveUserResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hbacruleRemoveUserKwParams{ - HbacruleRemoveUserArgs: reqArgs, - HbacruleRemoveUserOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "hbacrule_remove_user", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hbacruleRemoveUserResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hbacruleRemoveUserKwParams{ + HbacruleRemoveUserArgs: reqArgs, + HbacruleRemoveUserOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "hbacrule_remove_user", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hbacruleRemoveUserResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HbacruleRemoveUserArgs struct { + + /* +Rule name - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type HbacruleRemoveUserOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member user - users to remove - */ - User *[]string `json:"user,omitempty"` - - /* - member group - groups to remove - */ - Group *[]string `json:"group,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member user +users to remove + */ + User *[]string `json:"user,omitempty"` + + /* +member group +groups to remove + */ + Group *[]string `json:"group,omitempty"` + } type hbacruleRemoveUserKwParams struct { - *HbacruleRemoveUserArgs - *HbacruleRemoveUserOptionalArgs + *HbacruleRemoveUserArgs + *HbacruleRemoveUserOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hbacruleRemoveUserResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HbacruleRemoveUserResult `json:"result"` } type HbacruleRemoveUserResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *HbacruleRemoveUserResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HbacruleRemoveUserResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HbacruleRemoveUserResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HbacruleRemoveUserResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HbacruleRemoveUserResult%v", string(b)) } /* Display the properties of an HBAC rule. */ func (c *Client) HbacruleShow( - reqArgs *HbacruleShowArgs, - optArgs *HbacruleShowOptionalArgs, // can be nil + reqArgs *HbacruleShowArgs, + optArgs *HbacruleShowOptionalArgs, // can be nil ) (*HbacruleShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hbacruleShowKwParams{ - HbacruleShowArgs: reqArgs, - HbacruleShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "hbacrule_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hbacruleShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hbacruleShowKwParams{ + HbacruleShowArgs: reqArgs, + HbacruleShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "hbacrule_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hbacruleShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HbacruleShowArgs struct { + + /* +Rule name - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type HbacruleShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type hbacruleShowKwParams struct { - *HbacruleShowArgs - *HbacruleShowOptionalArgs + *HbacruleShowArgs + *HbacruleShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hbacruleShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HbacruleShowResult `json:"result"` } type HbacruleShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Hbacrule `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Hbacrule `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *HbacruleShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HbacruleShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HbacruleShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HbacruleShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HbacruleShowResult%v", string(b)) } /* Add a new HBAC service. */ func (c *Client) HbacsvcAdd( - reqArgs *HbacsvcAddArgs, - optArgs *HbacsvcAddOptionalArgs, // can be nil + reqArgs *HbacsvcAddArgs, + optArgs *HbacsvcAddOptionalArgs, // can be nil ) (*HbacsvcAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hbacsvcAddKwParams{ - HbacsvcAddArgs: reqArgs, - HbacsvcAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "hbacsvc_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hbacsvcAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hbacsvcAddKwParams{ + HbacsvcAddArgs: reqArgs, + HbacsvcAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "hbacsvc_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hbacsvcAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HbacsvcAddArgs struct { - - /* - Service name - HBAC service - */ - Cn string `json:"cn,omitempty"` -} + + /* +Service name +HBAC service + */ + Cn string `json:"cn,omitempty"` + } type HbacsvcAddOptionalArgs struct { - - /* - Description - HBAC service description - */ - Description *string `json:"description,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Description +HBAC service description + */ + Description *string `json:"description,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type hbacsvcAddKwParams struct { - *HbacsvcAddArgs - *HbacsvcAddOptionalArgs + *HbacsvcAddArgs + *HbacsvcAddOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hbacsvcAddResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HbacsvcAddResult `json:"result"` } type HbacsvcAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Hbacsvc `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Hbacsvc `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *HbacsvcAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HbacsvcAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HbacsvcAddResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HbacsvcAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HbacsvcAddResult%v", string(b)) } /* Delete an existing HBAC service. */ func (c *Client) HbacsvcDel( - reqArgs *HbacsvcDelArgs, - optArgs *HbacsvcDelOptionalArgs, // can be nil + reqArgs *HbacsvcDelArgs, + optArgs *HbacsvcDelOptionalArgs, // can be nil ) (*HbacsvcDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hbacsvcDelKwParams{ - HbacsvcDelArgs: reqArgs, - HbacsvcDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "hbacsvc_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hbacsvcDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hbacsvcDelKwParams{ + HbacsvcDelArgs: reqArgs, + HbacsvcDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "hbacsvc_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hbacsvcDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HbacsvcDelArgs struct { - - /* - Service name - HBAC service - */ - Cn []string `json:"cn,omitempty"` -} + + /* +Service name +HBAC service + */ + Cn []string `json:"cn,omitempty"` + } type HbacsvcDelOptionalArgs struct { + + /* - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` -} +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } type hbacsvcDelKwParams struct { - *HbacsvcDelArgs - *HbacsvcDelOptionalArgs + *HbacsvcDelArgs + *HbacsvcDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hbacsvcDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HbacsvcDelResult `json:"result"` } type HbacsvcDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } func (t *HbacsvcDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HbacsvcDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HbacsvcDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HbacsvcDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HbacsvcDelResult%v", string(b)) } /* Search for HBAC services. */ func (c *Client) HbacsvcFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *HbacsvcFindArgs, - optArgs *HbacsvcFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *HbacsvcFindArgs, + optArgs *HbacsvcFindOptionalArgs, // can be nil ) (*HbacsvcFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hbacsvcFindKwParams{ - HbacsvcFindArgs: reqArgs, - HbacsvcFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "hbacsvc_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hbacsvcFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hbacsvcFindKwParams{ + HbacsvcFindArgs: reqArgs, + HbacsvcFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "hbacsvc_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hbacsvcFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HbacsvcFindArgs struct { -} + } type HbacsvcFindOptionalArgs struct { - - /* - Service name - HBAC service - */ - Cn *string `json:"cn,omitempty"` - - /* - Description - HBAC service description - */ - Description *string `json:"description,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("service") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} + + /* +Service name +HBAC service + */ + Cn *string `json:"cn,omitempty"` + + /* +Description +HBAC service description + */ + Description *string `json:"description,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("service") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } type hbacsvcFindKwParams struct { - *HbacsvcFindArgs - *HbacsvcFindOptionalArgs + *HbacsvcFindArgs + *HbacsvcFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hbacsvcFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HbacsvcFindResult `json:"result"` } type HbacsvcFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Hbacsvc `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Hbacsvc `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *HbacsvcFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HbacsvcFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HbacsvcFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HbacsvcFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HbacsvcFindResult%v", string(b)) } /* Modify an HBAC service. */ func (c *Client) HbacsvcMod( - reqArgs *HbacsvcModArgs, - optArgs *HbacsvcModOptionalArgs, // can be nil + reqArgs *HbacsvcModArgs, + optArgs *HbacsvcModOptionalArgs, // can be nil ) (*HbacsvcModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hbacsvcModKwParams{ - HbacsvcModArgs: reqArgs, - HbacsvcModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "hbacsvc_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hbacsvcModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hbacsvcModKwParams{ + HbacsvcModArgs: reqArgs, + HbacsvcModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "hbacsvc_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hbacsvcModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HbacsvcModArgs struct { - - /* - Service name - HBAC service - */ - Cn string `json:"cn,omitempty"` -} + + /* +Service name +HBAC service + */ + Cn string `json:"cn,omitempty"` + } type HbacsvcModOptionalArgs struct { - - /* - Description - HBAC service description - */ - Description *string `json:"description,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Description +HBAC service description + */ + Description *string `json:"description,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type hbacsvcModKwParams struct { - *HbacsvcModArgs - *HbacsvcModOptionalArgs + *HbacsvcModArgs + *HbacsvcModOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hbacsvcModResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HbacsvcModResult `json:"result"` } type HbacsvcModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Hbacsvc `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Hbacsvc `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *HbacsvcModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HbacsvcModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HbacsvcModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HbacsvcModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HbacsvcModResult%v", string(b)) } /* Display information about an HBAC service. */ func (c *Client) HbacsvcShow( - reqArgs *HbacsvcShowArgs, - optArgs *HbacsvcShowOptionalArgs, // can be nil + reqArgs *HbacsvcShowArgs, + optArgs *HbacsvcShowOptionalArgs, // can be nil ) (*HbacsvcShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hbacsvcShowKwParams{ - HbacsvcShowArgs: reqArgs, - HbacsvcShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "hbacsvc_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hbacsvcShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hbacsvcShowKwParams{ + HbacsvcShowArgs: reqArgs, + HbacsvcShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "hbacsvc_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hbacsvcShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HbacsvcShowArgs struct { - - /* - Service name - HBAC service - */ - Cn string `json:"cn,omitempty"` -} + + /* +Service name +HBAC service + */ + Cn string `json:"cn,omitempty"` + } type HbacsvcShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type hbacsvcShowKwParams struct { - *HbacsvcShowArgs - *HbacsvcShowOptionalArgs + *HbacsvcShowArgs + *HbacsvcShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hbacsvcShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HbacsvcShowResult `json:"result"` } type HbacsvcShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Hbacsvc `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Hbacsvc `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *HbacsvcShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HbacsvcShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HbacsvcShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HbacsvcShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HbacsvcShowResult%v", string(b)) } /* Add a new HBAC service group. */ func (c *Client) HbacsvcgroupAdd( - reqArgs *HbacsvcgroupAddArgs, - optArgs *HbacsvcgroupAddOptionalArgs, // can be nil + reqArgs *HbacsvcgroupAddArgs, + optArgs *HbacsvcgroupAddOptionalArgs, // can be nil ) (*HbacsvcgroupAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hbacsvcgroupAddKwParams{ - HbacsvcgroupAddArgs: reqArgs, - HbacsvcgroupAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "hbacsvcgroup_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hbacsvcgroupAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hbacsvcgroupAddKwParams{ + HbacsvcgroupAddArgs: reqArgs, + HbacsvcgroupAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "hbacsvcgroup_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hbacsvcgroupAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HbacsvcgroupAddArgs struct { + + /* +Service group name - /* - Service group name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type HbacsvcgroupAddOptionalArgs struct { - - /* - Description - HBAC service group description - */ - Description *string `json:"description,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Description +HBAC service group description + */ + Description *string `json:"description,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type hbacsvcgroupAddKwParams struct { - *HbacsvcgroupAddArgs - *HbacsvcgroupAddOptionalArgs + *HbacsvcgroupAddArgs + *HbacsvcgroupAddOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hbacsvcgroupAddResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HbacsvcgroupAddResult `json:"result"` } type HbacsvcgroupAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Hbacsvcgroup `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Hbacsvcgroup `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *HbacsvcgroupAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HbacsvcgroupAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HbacsvcgroupAddResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HbacsvcgroupAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HbacsvcgroupAddResult%v", string(b)) } /* Add members to an HBAC service group. */ func (c *Client) HbacsvcgroupAddMember( - reqArgs *HbacsvcgroupAddMemberArgs, - optArgs *HbacsvcgroupAddMemberOptionalArgs, // can be nil + reqArgs *HbacsvcgroupAddMemberArgs, + optArgs *HbacsvcgroupAddMemberOptionalArgs, // can be nil ) (*HbacsvcgroupAddMemberResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hbacsvcgroupAddMemberKwParams{ - HbacsvcgroupAddMemberArgs: reqArgs, - HbacsvcgroupAddMemberOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "hbacsvcgroup_add_member", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hbacsvcgroupAddMemberResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hbacsvcgroupAddMemberKwParams{ + HbacsvcgroupAddMemberArgs: reqArgs, + HbacsvcgroupAddMemberOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "hbacsvcgroup_add_member", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hbacsvcgroupAddMemberResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HbacsvcgroupAddMemberArgs struct { + + /* +Service group name - /* - Service group name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type HbacsvcgroupAddMemberOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member HBAC service - HBAC services to add - */ - Hbacsvc *[]string `json:"hbacsvc,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member HBAC service +HBAC services to add + */ + Hbacsvc *[]string `json:"hbacsvc,omitempty"` + } type hbacsvcgroupAddMemberKwParams struct { - *HbacsvcgroupAddMemberArgs - *HbacsvcgroupAddMemberOptionalArgs + *HbacsvcgroupAddMemberArgs + *HbacsvcgroupAddMemberOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hbacsvcgroupAddMemberResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HbacsvcgroupAddMemberResult `json:"result"` } type HbacsvcgroupAddMemberResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *HbacsvcgroupAddMemberResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HbacsvcgroupAddMemberResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HbacsvcgroupAddMemberResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HbacsvcgroupAddMemberResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HbacsvcgroupAddMemberResult%v", string(b)) } /* Delete an HBAC service group. */ func (c *Client) HbacsvcgroupDel( - reqArgs *HbacsvcgroupDelArgs, - optArgs *HbacsvcgroupDelOptionalArgs, // can be nil + reqArgs *HbacsvcgroupDelArgs, + optArgs *HbacsvcgroupDelOptionalArgs, // can be nil ) (*HbacsvcgroupDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hbacsvcgroupDelKwParams{ - HbacsvcgroupDelArgs: reqArgs, - HbacsvcgroupDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "hbacsvcgroup_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hbacsvcgroupDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hbacsvcgroupDelKwParams{ + HbacsvcgroupDelArgs: reqArgs, + HbacsvcgroupDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "hbacsvcgroup_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hbacsvcgroupDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HbacsvcgroupDelArgs struct { + + /* +Service group name - /* - Service group name - - */ - Cn []string `json:"cn,omitempty"` -} + */ + Cn []string `json:"cn,omitempty"` + } type HbacsvcgroupDelOptionalArgs struct { + + /* - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` -} +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } type hbacsvcgroupDelKwParams struct { - *HbacsvcgroupDelArgs - *HbacsvcgroupDelOptionalArgs + *HbacsvcgroupDelArgs + *HbacsvcgroupDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hbacsvcgroupDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HbacsvcgroupDelResult `json:"result"` } type HbacsvcgroupDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } func (t *HbacsvcgroupDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HbacsvcgroupDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HbacsvcgroupDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HbacsvcgroupDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HbacsvcgroupDelResult%v", string(b)) } /* Search for an HBAC service group. */ func (c *Client) HbacsvcgroupFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *HbacsvcgroupFindArgs, - optArgs *HbacsvcgroupFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *HbacsvcgroupFindArgs, + optArgs *HbacsvcgroupFindOptionalArgs, // can be nil ) (*HbacsvcgroupFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hbacsvcgroupFindKwParams{ - HbacsvcgroupFindArgs: reqArgs, - HbacsvcgroupFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "hbacsvcgroup_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hbacsvcgroupFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hbacsvcgroupFindKwParams{ + HbacsvcgroupFindArgs: reqArgs, + HbacsvcgroupFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "hbacsvcgroup_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hbacsvcgroupFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HbacsvcgroupFindArgs struct { -} + } type HbacsvcgroupFindOptionalArgs struct { + + /* +Service group name + + */ + Cn *string `json:"cn,omitempty"` + + /* +Description +HBAC service group description + */ + Description *string `json:"description,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("name") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } - /* - Service group name - - */ - Cn *string `json:"cn,omitempty"` +type hbacsvcgroupFindKwParams struct { + *HbacsvcgroupFindArgs + *HbacsvcgroupFindOptionalArgs - /* - Description - HBAC service group description - */ - Description *string `json:"description,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` +type hbacsvcgroupFindResponse struct { + Error *Error `json:"error"` + Result *HbacsvcgroupFindResult `json:"result"` +} - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("name") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} - -type hbacsvcgroupFindKwParams struct { - *HbacsvcgroupFindArgs - *HbacsvcgroupFindOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type hbacsvcgroupFindResponse struct { - Error *Error `json:"error"` - Result *HbacsvcgroupFindResult `json:"result"` -} - -type HbacsvcgroupFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Hbacsvcgroup `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} +type HbacsvcgroupFindResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Hbacsvcgroup `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *HbacsvcgroupFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HbacsvcgroupFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HbacsvcgroupFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HbacsvcgroupFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HbacsvcgroupFindResult%v", string(b)) } /* Modify an HBAC service group. */ func (c *Client) HbacsvcgroupMod( - reqArgs *HbacsvcgroupModArgs, - optArgs *HbacsvcgroupModOptionalArgs, // can be nil + reqArgs *HbacsvcgroupModArgs, + optArgs *HbacsvcgroupModOptionalArgs, // can be nil ) (*HbacsvcgroupModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hbacsvcgroupModKwParams{ - HbacsvcgroupModArgs: reqArgs, - HbacsvcgroupModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "hbacsvcgroup_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hbacsvcgroupModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hbacsvcgroupModKwParams{ + HbacsvcgroupModArgs: reqArgs, + HbacsvcgroupModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "hbacsvcgroup_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hbacsvcgroupModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HbacsvcgroupModArgs struct { + + /* +Service group name - /* - Service group name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type HbacsvcgroupModOptionalArgs struct { - - /* - Description - HBAC service group description - */ - Description *string `json:"description,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Description +HBAC service group description + */ + Description *string `json:"description,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type hbacsvcgroupModKwParams struct { - *HbacsvcgroupModArgs - *HbacsvcgroupModOptionalArgs + *HbacsvcgroupModArgs + *HbacsvcgroupModOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hbacsvcgroupModResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HbacsvcgroupModResult `json:"result"` } type HbacsvcgroupModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Hbacsvcgroup `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Hbacsvcgroup `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *HbacsvcgroupModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HbacsvcgroupModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HbacsvcgroupModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HbacsvcgroupModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HbacsvcgroupModResult%v", string(b)) } /* Remove members from an HBAC service group. */ func (c *Client) HbacsvcgroupRemoveMember( - reqArgs *HbacsvcgroupRemoveMemberArgs, - optArgs *HbacsvcgroupRemoveMemberOptionalArgs, // can be nil + reqArgs *HbacsvcgroupRemoveMemberArgs, + optArgs *HbacsvcgroupRemoveMemberOptionalArgs, // can be nil ) (*HbacsvcgroupRemoveMemberResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hbacsvcgroupRemoveMemberKwParams{ - HbacsvcgroupRemoveMemberArgs: reqArgs, - HbacsvcgroupRemoveMemberOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "hbacsvcgroup_remove_member", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hbacsvcgroupRemoveMemberResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hbacsvcgroupRemoveMemberKwParams{ + HbacsvcgroupRemoveMemberArgs: reqArgs, + HbacsvcgroupRemoveMemberOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "hbacsvcgroup_remove_member", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hbacsvcgroupRemoveMemberResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HbacsvcgroupRemoveMemberArgs struct { + + /* +Service group name - /* - Service group name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type HbacsvcgroupRemoveMemberOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member HBAC service - HBAC services to remove - */ - Hbacsvc *[]string `json:"hbacsvc,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member HBAC service +HBAC services to remove + */ + Hbacsvc *[]string `json:"hbacsvc,omitempty"` + } type hbacsvcgroupRemoveMemberKwParams struct { - *HbacsvcgroupRemoveMemberArgs - *HbacsvcgroupRemoveMemberOptionalArgs + *HbacsvcgroupRemoveMemberArgs + *HbacsvcgroupRemoveMemberOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hbacsvcgroupRemoveMemberResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HbacsvcgroupRemoveMemberResult `json:"result"` } type HbacsvcgroupRemoveMemberResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *HbacsvcgroupRemoveMemberResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HbacsvcgroupRemoveMemberResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HbacsvcgroupRemoveMemberResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HbacsvcgroupRemoveMemberResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HbacsvcgroupRemoveMemberResult%v", string(b)) } /* Display information about an HBAC service group. */ func (c *Client) HbacsvcgroupShow( - reqArgs *HbacsvcgroupShowArgs, - optArgs *HbacsvcgroupShowOptionalArgs, // can be nil + reqArgs *HbacsvcgroupShowArgs, + optArgs *HbacsvcgroupShowOptionalArgs, // can be nil ) (*HbacsvcgroupShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hbacsvcgroupShowKwParams{ - HbacsvcgroupShowArgs: reqArgs, - HbacsvcgroupShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "hbacsvcgroup_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hbacsvcgroupShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hbacsvcgroupShowKwParams{ + HbacsvcgroupShowArgs: reqArgs, + HbacsvcgroupShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "hbacsvcgroup_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hbacsvcgroupShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HbacsvcgroupShowArgs struct { + + /* +Service group name - /* - Service group name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type HbacsvcgroupShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type hbacsvcgroupShowKwParams struct { - *HbacsvcgroupShowArgs - *HbacsvcgroupShowOptionalArgs + *HbacsvcgroupShowArgs + *HbacsvcgroupShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hbacsvcgroupShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HbacsvcgroupShowResult `json:"result"` } type HbacsvcgroupShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Hbacsvcgroup `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Hbacsvcgroup `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *HbacsvcgroupShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HbacsvcgroupShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HbacsvcgroupShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HbacsvcgroupShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HbacsvcgroupShowResult%v", string(b)) } /* Simulate use of Host-based access controls */ func (c *Client) Hbactest( - reqArgs *HbactestArgs, - optArgs *HbactestOptionalArgs, // can be nil + reqArgs *HbactestArgs, + optArgs *HbactestOptionalArgs, // can be nil ) (*HbactestResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hbactestKwParams{ - HbactestArgs: reqArgs, - HbactestOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "hbactest", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hbactestResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hbactestKwParams{ + HbactestArgs: reqArgs, + HbactestOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "hbactest", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hbactestResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HbactestArgs struct { - - /* - User name - - */ - User string `json:"user,omitempty"` - - /* - Target host - - */ - Targethost string `json:"targethost,omitempty"` - - /* - Service - - */ - Service string `json:"service,omitempty"` -} + + /* +User name + + */ + User string `json:"user,omitempty"` + + /* +Target host + + */ + Targethost string `json:"targethost,omitempty"` + + /* +Service + + */ + Service string `json:"service,omitempty"` + } type HbactestOptionalArgs struct { - - /* - Source host - - */ - Sourcehost *string `json:"sourcehost,omitempty"` - - /* - Rules to test. If not specified, --enabled is assumed - - */ - Rules *[]string `json:"rules,omitempty"` - - /* - Hide details which rules are matched, not matched, or invalid - - */ - Nodetail *bool `json:"nodetail,omitempty"` - - /* - Include all enabled IPA rules into test [default] - - */ - Enabled *bool `json:"enabled,omitempty"` - - /* - Include all disabled IPA rules into test - - */ - Disabled *bool `json:"disabled,omitempty"` - - /* - Size Limit - Maximum number of rules to process when no --rules is specified - */ - Sizelimit *int `json:"sizelimit,omitempty"` -} + + /* +Source host + + */ + Sourcehost *string `json:"sourcehost,omitempty"` + + /* +Rules to test. If not specified, --enabled is assumed + + */ + Rules *[]string `json:"rules,omitempty"` + + /* +Hide details which rules are matched, not matched, or invalid + + */ + Nodetail *bool `json:"nodetail,omitempty"` + + /* +Include all enabled IPA rules into test [default] + + */ + Enabled *bool `json:"enabled,omitempty"` + + /* +Include all disabled IPA rules into test + + */ + Disabled *bool `json:"disabled,omitempty"` + + /* +Size Limit +Maximum number of rules to process when no --rules is specified + */ + Sizelimit *int `json:"sizelimit,omitempty"` + } type hbactestKwParams struct { - *HbactestArgs - *HbactestOptionalArgs + *HbactestArgs + *HbactestOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hbactestResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HbactestResult `json:"result"` } type HbactestResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - Warning - (optional) - */ - Warning *[]interface{} `json:"warning,omitempty"` - - /* - Matched rules - (optional) - */ - Matched *[]interface{} `json:"matched,omitempty"` - - /* - Not matched rules - (optional) - */ - Notmatched *[]interface{} `json:"notmatched,omitempty"` - - /* - Non-existent or invalid rules - (optional) - */ - Error *[]interface{} `json:"error,omitempty"` - - /* - Result of simulation - (required) - */ - Value bool `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +Warning + (optional) + */ + Warning *[]interface{} `json:"warning,omitempty"` + + /* +Matched rules + (optional) + */ + Matched *[]interface{} `json:"matched,omitempty"` + + /* +Not matched rules + (optional) + */ + Notmatched *[]interface{} `json:"notmatched,omitempty"` + + /* +Non-existent or invalid rules + (optional) + */ + Error *[]interface{} `json:"error,omitempty"` + + /* +Result of simulation + (required) + */ + Value bool `json:"value,omitempty"` + } func (t *HbactestResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HbactestResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HbactestResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HbactestResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HbactestResult%v", string(b)) } /* Add a new host. */ func (c *Client) HostAdd( - reqArgs *HostAddArgs, - optArgs *HostAddOptionalArgs, // can be nil + reqArgs *HostAddArgs, + optArgs *HostAddOptionalArgs, // can be nil ) (*HostAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hostAddKwParams{ - HostAddArgs: reqArgs, - HostAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "host_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hostAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hostAddKwParams{ + HostAddArgs: reqArgs, + HostAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "host_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hostAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HostAddArgs struct { + + /* +Host name - /* - Host name - - */ - Fqdn string `json:"fqdn,omitempty"` -} + */ + Fqdn string `json:"fqdn,omitempty"` + } type HostAddOptionalArgs struct { - - /* - Description - A description of this host - */ - Description *string `json:"description,omitempty"` - - /* - Locality - Host locality (e.g. "Baltimore, MD") - */ - L *string `json:"l,omitempty"` - - /* - Location - Host location (e.g. "Lab 2") - */ - Nshostlocation *string `json:"nshostlocation,omitempty"` - - /* - Platform - Host hardware platform (e.g. "Lenovo T61") - */ - Nshardwareplatform *string `json:"nshardwareplatform,omitempty"` - - /* - Operating system - Host operating system and version (e.g. "Fedora 9") - */ - Nsosversion *string `json:"nsosversion,omitempty"` - - /* - User password - Password used in bulk enrollment - */ - Userpassword *string `json:"userpassword,omitempty"` - - /* - - Generate a random password to be used in bulk enrollment - */ - Random *bool `json:"random,omitempty"` - - /* - Certificate - Base-64 encoded host certificate - */ - Usercertificate *[]string `json:"usercertificate,omitempty"` - - /* - MAC address - Hardware MAC address(es) on this host - */ - Macaddress *[]string `json:"macaddress,omitempty"` - - /* - SSH public key - - */ - Ipasshpubkey *[]string `json:"ipasshpubkey,omitempty"` - - /* - Class - Host category (semantics placed on this attribute are for local interpretation) - */ - Userclass *[]string `json:"userclass,omitempty"` - - /* - Assigned ID View - - */ - Ipaassignedidview *string `json:"ipaassignedidview,omitempty"` - - /* - Authentication Indicators - Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations. - */ - Krbprincipalauthind *[]string `json:"krbprincipalauthind,omitempty"` - - /* - Requires pre-authentication - Pre-authentication is required for the service - */ - Ipakrbrequirespreauth *bool `json:"ipakrbrequirespreauth,omitempty"` - - /* - Trusted for delegation - Client credentials may be delegated to the service - */ - Ipakrbokasdelegate *bool `json:"ipakrbokasdelegate,omitempty"` - - /* - Trusted to authenticate as user - The service is allowed to authenticate on behalf of a client - */ - Ipakrboktoauthasdelegate *bool `json:"ipakrboktoauthasdelegate,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - Force - force host name even if not in DNS - */ - Force *bool `json:"force,omitempty"` - - /* - - skip reverse DNS detection - */ - NoReverse *bool `json:"no_reverse,omitempty"` - - /* - IP Address - Add the host to DNS with this IP address - */ - IPAddress *string `json:"ip_address,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Description +A description of this host + */ + Description *string `json:"description,omitempty"` + + /* +Locality +Host locality (e.g. "Baltimore, MD") + */ + L *string `json:"l,omitempty"` + + /* +Location +Host location (e.g. "Lab 2") + */ + Nshostlocation *string `json:"nshostlocation,omitempty"` + + /* +Platform +Host hardware platform (e.g. "Lenovo T61") + */ + Nshardwareplatform *string `json:"nshardwareplatform,omitempty"` + + /* +Operating system +Host operating system and version (e.g. "Fedora 9") + */ + Nsosversion *string `json:"nsosversion,omitempty"` + + /* +User password +Password used in bulk enrollment + */ + Userpassword *string `json:"userpassword,omitempty"` + + /* + +Generate a random password to be used in bulk enrollment + */ + Random *bool `json:"random,omitempty"` + + /* +Certificate +Base-64 encoded host certificate + */ + Usercertificate *[]interface{} `json:"usercertificate,omitempty"` + + /* +MAC address +Hardware MAC address(es) on this host + */ + Macaddress *[]string `json:"macaddress,omitempty"` + + /* +SSH public key + + */ + Ipasshpubkey *[]string `json:"ipasshpubkey,omitempty"` + + /* +Class +Host category (semantics placed on this attribute are for local interpretation) + */ + Userclass *[]string `json:"userclass,omitempty"` + + /* +Assigned ID View + + */ + Ipaassignedidview *string `json:"ipaassignedidview,omitempty"` + + /* +Authentication Indicators +Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations. + */ + Krbprincipalauthind *[]string `json:"krbprincipalauthind,omitempty"` + + /* +Requires pre-authentication +Pre-authentication is required for the service + */ + Ipakrbrequirespreauth *bool `json:"ipakrbrequirespreauth,omitempty"` + + /* +Trusted for delegation +Client credentials may be delegated to the service + */ + Ipakrbokasdelegate *bool `json:"ipakrbokasdelegate,omitempty"` + + /* +Trusted to authenticate as user +The service is allowed to authenticate on behalf of a client + */ + Ipakrboktoauthasdelegate *bool `json:"ipakrboktoauthasdelegate,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* +Force +force host name even if not in DNS + */ + Force *bool `json:"force,omitempty"` + + /* + +skip reverse DNS detection + */ + NoReverse *bool `json:"no_reverse,omitempty"` + + /* +IP Address +Add the host to DNS with this IP address + */ + IPAddress *string `json:"ip_address,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type hostAddKwParams struct { - *HostAddArgs - *HostAddOptionalArgs + *HostAddArgs + *HostAddOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hostAddResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HostAddResult `json:"result"` } type HostAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Host `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Host `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *HostAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HostAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HostAddResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HostAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HostAddResult%v", string(b)) } /* Add certificates to host entry */ func (c *Client) HostAddCert( - reqArgs *HostAddCertArgs, - optArgs *HostAddCertOptionalArgs, // can be nil + reqArgs *HostAddCertArgs, + optArgs *HostAddCertOptionalArgs, // can be nil ) (*HostAddCertResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hostAddCertKwParams{ - HostAddCertArgs: reqArgs, - HostAddCertOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "host_add_cert", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hostAddCertResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hostAddCertKwParams{ + HostAddCertArgs: reqArgs, + HostAddCertOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "host_add_cert", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hostAddCertResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HostAddCertArgs struct { - - /* - Host name - - */ - Fqdn string `json:"fqdn,omitempty"` - - /* - Certificate - Base-64 encoded host certificate - */ - Usercertificate []string `json:"usercertificate,omitempty"` -} + + /* +Host name + + */ + Fqdn string `json:"fqdn,omitempty"` + + /* +Certificate +Base-64 encoded host certificate + */ + Usercertificate []interface{} `json:"usercertificate,omitempty"` + } type HostAddCertOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type hostAddCertKwParams struct { - *HostAddCertArgs - *HostAddCertOptionalArgs + *HostAddCertArgs + *HostAddCertOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hostAddCertResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HostAddCertResult `json:"result"` } type HostAddCertResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *HostAddCertResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HostAddCertResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HostAddCertResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HostAddCertResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HostAddCertResult%v", string(b)) } /* Add hosts that can manage this host. */ func (c *Client) HostAddManagedby( - reqArgs *HostAddManagedbyArgs, - optArgs *HostAddManagedbyOptionalArgs, // can be nil + reqArgs *HostAddManagedbyArgs, + optArgs *HostAddManagedbyOptionalArgs, // can be nil ) (*HostAddManagedbyResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hostAddManagedbyKwParams{ - HostAddManagedbyArgs: reqArgs, - HostAddManagedbyOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "host_add_managedby", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hostAddManagedbyResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hostAddManagedbyKwParams{ + HostAddManagedbyArgs: reqArgs, + HostAddManagedbyOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "host_add_managedby", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hostAddManagedbyResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HostAddManagedbyArgs struct { + + /* +Host name - /* - Host name - - */ - Fqdn string `json:"fqdn,omitempty"` -} + */ + Fqdn string `json:"fqdn,omitempty"` + } type HostAddManagedbyOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member host - hosts to add - */ - Host *[]string `json:"host,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member host +hosts to add + */ + Host *[]string `json:"host,omitempty"` + } type hostAddManagedbyKwParams struct { - *HostAddManagedbyArgs - *HostAddManagedbyOptionalArgs + *HostAddManagedbyArgs + *HostAddManagedbyOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hostAddManagedbyResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HostAddManagedbyResult `json:"result"` } type HostAddManagedbyResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *HostAddManagedbyResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HostAddManagedbyResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HostAddManagedbyResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HostAddManagedbyResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HostAddManagedbyResult%v", string(b)) } /* Add new principal alias to host entry */ func (c *Client) HostAddPrincipal( - reqArgs *HostAddPrincipalArgs, - optArgs *HostAddPrincipalOptionalArgs, // can be nil + reqArgs *HostAddPrincipalArgs, + optArgs *HostAddPrincipalOptionalArgs, // can be nil ) (*HostAddPrincipalResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hostAddPrincipalKwParams{ - HostAddPrincipalArgs: reqArgs, - HostAddPrincipalOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "host_add_principal", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hostAddPrincipalResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hostAddPrincipalKwParams{ + HostAddPrincipalArgs: reqArgs, + HostAddPrincipalOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "host_add_principal", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hostAddPrincipalResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HostAddPrincipalArgs struct { + + /* +Host name - /* - Host name + */ + Fqdn string `json:"fqdn,omitempty"` + + /* +Principal alias - */ - Fqdn string `json:"fqdn,omitempty"` - - /* - Principal alias - - */ - Krbprincipalname []string `json:"krbprincipalname,omitempty"` -} + */ + Krbprincipalname []string `json:"krbprincipalname,omitempty"` + } type HostAddPrincipalOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type hostAddPrincipalKwParams struct { - *HostAddPrincipalArgs - *HostAddPrincipalOptionalArgs + *HostAddPrincipalArgs + *HostAddPrincipalOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hostAddPrincipalResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HostAddPrincipalResult `json:"result"` } type HostAddPrincipalResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *HostAddPrincipalResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HostAddPrincipalResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HostAddPrincipalResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HostAddPrincipalResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HostAddPrincipalResult%v", string(b)) } /* Allow users, groups, hosts or host groups to create a keytab of this host. */ func (c *Client) HostAllowCreateKeytab( - reqArgs *HostAllowCreateKeytabArgs, - optArgs *HostAllowCreateKeytabOptionalArgs, // can be nil + reqArgs *HostAllowCreateKeytabArgs, + optArgs *HostAllowCreateKeytabOptionalArgs, // can be nil ) (*HostAllowCreateKeytabResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hostAllowCreateKeytabKwParams{ - HostAllowCreateKeytabArgs: reqArgs, - HostAllowCreateKeytabOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "host_allow_create_keytab", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hostAllowCreateKeytabResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hostAllowCreateKeytabKwParams{ + HostAllowCreateKeytabArgs: reqArgs, + HostAllowCreateKeytabOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "host_allow_create_keytab", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hostAllowCreateKeytabResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HostAllowCreateKeytabArgs struct { + + /* +Host name - /* - Host name - - */ - Fqdn string `json:"fqdn,omitempty"` -} + */ + Fqdn string `json:"fqdn,omitempty"` + } type HostAllowCreateKeytabOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member user - users to add - */ - User *[]string `json:"user,omitempty"` - - /* - member group - groups to add - */ - Group *[]string `json:"group,omitempty"` - - /* - member host - hosts to add - */ - Host *[]string `json:"host,omitempty"` - - /* - member host group - host groups to add - */ - Hostgroup *[]string `json:"hostgroup,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member user +users to add + */ + User *[]string `json:"user,omitempty"` + + /* +member group +groups to add + */ + Group *[]string `json:"group,omitempty"` + + /* +member host +hosts to add + */ + Host *[]string `json:"host,omitempty"` + + /* +member host group +host groups to add + */ + Hostgroup *[]string `json:"hostgroup,omitempty"` + } type hostAllowCreateKeytabKwParams struct { - *HostAllowCreateKeytabArgs - *HostAllowCreateKeytabOptionalArgs + *HostAllowCreateKeytabArgs + *HostAllowCreateKeytabOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hostAllowCreateKeytabResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HostAllowCreateKeytabResult `json:"result"` } type HostAllowCreateKeytabResult struct { + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` -} - -func (t *HostAllowCreateKeytabResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HostAllowCreateKeytabResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HostAllowCreateKeytabResult%v", string(b)) -} +func (t *HostAllowCreateKeytabResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HostAllowCreateKeytabResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HostAllowCreateKeytabResult%v", string(b)) +} /* Allow users, groups, hosts or host groups to retrieve a keytab of this host. */ func (c *Client) HostAllowRetrieveKeytab( - reqArgs *HostAllowRetrieveKeytabArgs, - optArgs *HostAllowRetrieveKeytabOptionalArgs, // can be nil + reqArgs *HostAllowRetrieveKeytabArgs, + optArgs *HostAllowRetrieveKeytabOptionalArgs, // can be nil ) (*HostAllowRetrieveKeytabResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hostAllowRetrieveKeytabKwParams{ - HostAllowRetrieveKeytabArgs: reqArgs, - HostAllowRetrieveKeytabOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "host_allow_retrieve_keytab", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hostAllowRetrieveKeytabResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hostAllowRetrieveKeytabKwParams{ + HostAllowRetrieveKeytabArgs: reqArgs, + HostAllowRetrieveKeytabOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "host_allow_retrieve_keytab", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hostAllowRetrieveKeytabResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HostAllowRetrieveKeytabArgs struct { + + /* +Host name - /* - Host name - - */ - Fqdn string `json:"fqdn,omitempty"` -} + */ + Fqdn string `json:"fqdn,omitempty"` + } type HostAllowRetrieveKeytabOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member user - users to add - */ - User *[]string `json:"user,omitempty"` - - /* - member group - groups to add - */ - Group *[]string `json:"group,omitempty"` - - /* - member host - hosts to add - */ - Host *[]string `json:"host,omitempty"` - - /* - member host group - host groups to add - */ - Hostgroup *[]string `json:"hostgroup,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member user +users to add + */ + User *[]string `json:"user,omitempty"` + + /* +member group +groups to add + */ + Group *[]string `json:"group,omitempty"` + + /* +member host +hosts to add + */ + Host *[]string `json:"host,omitempty"` + + /* +member host group +host groups to add + */ + Hostgroup *[]string `json:"hostgroup,omitempty"` + } type hostAllowRetrieveKeytabKwParams struct { - *HostAllowRetrieveKeytabArgs - *HostAllowRetrieveKeytabOptionalArgs + *HostAllowRetrieveKeytabArgs + *HostAllowRetrieveKeytabOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hostAllowRetrieveKeytabResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HostAllowRetrieveKeytabResult `json:"result"` } type HostAllowRetrieveKeytabResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *HostAllowRetrieveKeytabResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HostAllowRetrieveKeytabResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HostAllowRetrieveKeytabResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HostAllowRetrieveKeytabResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HostAllowRetrieveKeytabResult%v", string(b)) } /* Delete a host. */ func (c *Client) HostDel( - reqArgs *HostDelArgs, - optArgs *HostDelOptionalArgs, // can be nil + reqArgs *HostDelArgs, + optArgs *HostDelOptionalArgs, // can be nil ) (*HostDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hostDelKwParams{ - HostDelArgs: reqArgs, - HostDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "host_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hostDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hostDelKwParams{ + HostDelArgs: reqArgs, + HostDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "host_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hostDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HostDelArgs struct { + + /* +Host name - /* - Host name - - */ - Fqdn []string `json:"fqdn,omitempty"` -} + */ + Fqdn []string `json:"fqdn,omitempty"` + } type HostDelOptionalArgs struct { + + /* - /* +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + + /* - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` - - /* - - Remove A, AAAA, SSHFP and PTR records of the host(s) managed by IPA DNS - */ - Updatedns *bool `json:"updatedns,omitempty"` -} +Remove A, AAAA, SSHFP and PTR records of the host(s) managed by IPA DNS + */ + Updatedns *bool `json:"updatedns,omitempty"` + } type hostDelKwParams struct { - *HostDelArgs - *HostDelOptionalArgs + *HostDelArgs + *HostDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hostDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HostDelResult `json:"result"` } type HostDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } func (t *HostDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HostDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HostDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HostDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HostDelResult%v", string(b)) } /* Disable the Kerberos key, SSL certificate and all services of a host. */ func (c *Client) HostDisable( - reqArgs *HostDisableArgs, - optArgs *HostDisableOptionalArgs, // can be nil + reqArgs *HostDisableArgs, + optArgs *HostDisableOptionalArgs, // can be nil ) (*HostDisableResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hostDisableKwParams{ - HostDisableArgs: reqArgs, - HostDisableOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "host_disable", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hostDisableResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hostDisableKwParams{ + HostDisableArgs: reqArgs, + HostDisableOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "host_disable", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hostDisableResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HostDisableArgs struct { + + /* +Host name - /* - Host name - - */ - Fqdn string `json:"fqdn,omitempty"` -} + */ + Fqdn string `json:"fqdn,omitempty"` + } type HostDisableOptionalArgs struct { -} + } type hostDisableKwParams struct { - *HostDisableArgs - *HostDisableOptionalArgs + *HostDisableArgs + *HostDisableOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hostDisableResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HostDisableResult `json:"result"` } type HostDisableResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - True means the operation was successful - (required) - */ - Result bool `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *HostDisableResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HostDisableResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HostDisableResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HostDisableResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HostDisableResult%v", string(b)) } /* Disallow users, groups, hosts or host groups to create a keytab of this host. */ func (c *Client) HostDisallowCreateKeytab( - reqArgs *HostDisallowCreateKeytabArgs, - optArgs *HostDisallowCreateKeytabOptionalArgs, // can be nil + reqArgs *HostDisallowCreateKeytabArgs, + optArgs *HostDisallowCreateKeytabOptionalArgs, // can be nil ) (*HostDisallowCreateKeytabResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hostDisallowCreateKeytabKwParams{ - HostDisallowCreateKeytabArgs: reqArgs, - HostDisallowCreateKeytabOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "host_disallow_create_keytab", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hostDisallowCreateKeytabResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hostDisallowCreateKeytabKwParams{ + HostDisallowCreateKeytabArgs: reqArgs, + HostDisallowCreateKeytabOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "host_disallow_create_keytab", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hostDisallowCreateKeytabResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HostDisallowCreateKeytabArgs struct { + + /* +Host name - /* - Host name - - */ - Fqdn string `json:"fqdn,omitempty"` -} + */ + Fqdn string `json:"fqdn,omitempty"` + } type HostDisallowCreateKeytabOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member user - users to remove - */ - User *[]string `json:"user,omitempty"` - - /* - member group - groups to remove - */ - Group *[]string `json:"group,omitempty"` - - /* - member host - hosts to remove - */ - Host *[]string `json:"host,omitempty"` - - /* - member host group - host groups to remove - */ - Hostgroup *[]string `json:"hostgroup,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member user +users to remove + */ + User *[]string `json:"user,omitempty"` + + /* +member group +groups to remove + */ + Group *[]string `json:"group,omitempty"` + + /* +member host +hosts to remove + */ + Host *[]string `json:"host,omitempty"` + + /* +member host group +host groups to remove + */ + Hostgroup *[]string `json:"hostgroup,omitempty"` + } type hostDisallowCreateKeytabKwParams struct { - *HostDisallowCreateKeytabArgs - *HostDisallowCreateKeytabOptionalArgs + *HostDisallowCreateKeytabArgs + *HostDisallowCreateKeytabOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hostDisallowCreateKeytabResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HostDisallowCreateKeytabResult `json:"result"` } type HostDisallowCreateKeytabResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *HostDisallowCreateKeytabResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HostDisallowCreateKeytabResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HostDisallowCreateKeytabResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HostDisallowCreateKeytabResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HostDisallowCreateKeytabResult%v", string(b)) } /* Disallow users, groups, hosts or host groups to retrieve a keytab of this host. */ func (c *Client) HostDisallowRetrieveKeytab( - reqArgs *HostDisallowRetrieveKeytabArgs, - optArgs *HostDisallowRetrieveKeytabOptionalArgs, // can be nil + reqArgs *HostDisallowRetrieveKeytabArgs, + optArgs *HostDisallowRetrieveKeytabOptionalArgs, // can be nil ) (*HostDisallowRetrieveKeytabResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hostDisallowRetrieveKeytabKwParams{ - HostDisallowRetrieveKeytabArgs: reqArgs, - HostDisallowRetrieveKeytabOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "host_disallow_retrieve_keytab", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hostDisallowRetrieveKeytabResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hostDisallowRetrieveKeytabKwParams{ + HostDisallowRetrieveKeytabArgs: reqArgs, + HostDisallowRetrieveKeytabOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "host_disallow_retrieve_keytab", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hostDisallowRetrieveKeytabResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HostDisallowRetrieveKeytabArgs struct { + + /* +Host name - /* - Host name - - */ - Fqdn string `json:"fqdn,omitempty"` -} + */ + Fqdn string `json:"fqdn,omitempty"` + } type HostDisallowRetrieveKeytabOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member user - users to remove - */ - User *[]string `json:"user,omitempty"` - - /* - member group - groups to remove - */ - Group *[]string `json:"group,omitempty"` - - /* - member host - hosts to remove - */ - Host *[]string `json:"host,omitempty"` - - /* - member host group - host groups to remove - */ - Hostgroup *[]string `json:"hostgroup,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member user +users to remove + */ + User *[]string `json:"user,omitempty"` + + /* +member group +groups to remove + */ + Group *[]string `json:"group,omitempty"` + + /* +member host +hosts to remove + */ + Host *[]string `json:"host,omitempty"` + + /* +member host group +host groups to remove + */ + Hostgroup *[]string `json:"hostgroup,omitempty"` + } type hostDisallowRetrieveKeytabKwParams struct { - *HostDisallowRetrieveKeytabArgs - *HostDisallowRetrieveKeytabOptionalArgs + *HostDisallowRetrieveKeytabArgs + *HostDisallowRetrieveKeytabOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hostDisallowRetrieveKeytabResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HostDisallowRetrieveKeytabResult `json:"result"` } type HostDisallowRetrieveKeytabResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *HostDisallowRetrieveKeytabResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HostDisallowRetrieveKeytabResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HostDisallowRetrieveKeytabResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HostDisallowRetrieveKeytabResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HostDisallowRetrieveKeytabResult%v", string(b)) } /* Search for hosts. */ func (c *Client) HostFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *HostFindArgs, - optArgs *HostFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *HostFindArgs, + optArgs *HostFindOptionalArgs, // can be nil ) (*HostFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hostFindKwParams{ - HostFindArgs: reqArgs, - HostFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "host_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hostFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hostFindKwParams{ + HostFindArgs: reqArgs, + HostFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "host_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hostFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HostFindArgs struct { -} + } type HostFindOptionalArgs struct { - - /* - Host name - - */ - Fqdn *string `json:"fqdn,omitempty"` - - /* - Description - A description of this host - */ - Description *string `json:"description,omitempty"` - - /* - Locality - Host locality (e.g. "Baltimore, MD") - */ - L *string `json:"l,omitempty"` - - /* - Location - Host location (e.g. "Lab 2") - */ - Nshostlocation *string `json:"nshostlocation,omitempty"` - - /* - Platform - Host hardware platform (e.g. "Lenovo T61") - */ - Nshardwareplatform *string `json:"nshardwareplatform,omitempty"` - - /* - Operating system - Host operating system and version (e.g. "Fedora 9") - */ - Nsosversion *string `json:"nsosversion,omitempty"` - - /* - User password - Password used in bulk enrollment - */ - Userpassword *string `json:"userpassword,omitempty"` - - /* - Certificate - Base-64 encoded host certificate - */ - Usercertificate *[]string `json:"usercertificate,omitempty"` - - /* - MAC address - Hardware MAC address(es) on this host - */ - Macaddress *[]string `json:"macaddress,omitempty"` - - /* - Class - Host category (semantics placed on this attribute are for local interpretation) - */ - Userclass *[]string `json:"userclass,omitempty"` - - /* - Assigned ID View - - */ - Ipaassignedidview *string `json:"ipaassignedidview,omitempty"` - - /* - Authentication Indicators - Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations. - */ - Krbprincipalauthind *[]string `json:"krbprincipalauthind,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("hostname") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` - - /* - host group - Search for hosts with these member of host groups. - */ - InHostgroup *[]string `json:"in_hostgroup,omitempty"` - - /* - host group - Search for hosts without these member of host groups. - */ - NotInHostgroup *[]string `json:"not_in_hostgroup,omitempty"` - - /* - netgroup - Search for hosts with these member of netgroups. - */ - InNetgroup *[]string `json:"in_netgroup,omitempty"` - - /* - netgroup - Search for hosts without these member of netgroups. - */ - NotInNetgroup *[]string `json:"not_in_netgroup,omitempty"` - - /* - role - Search for hosts with these member of roles. - */ - InRole *[]string `json:"in_role,omitempty"` - - /* - role - Search for hosts without these member of roles. - */ - NotInRole *[]string `json:"not_in_role,omitempty"` - - /* - HBAC rule - Search for hosts with these member of HBAC rules. - */ - InHbacrule *[]string `json:"in_hbacrule,omitempty"` - - /* - HBAC rule - Search for hosts without these member of HBAC rules. - */ - NotInHbacrule *[]string `json:"not_in_hbacrule,omitempty"` - - /* - sudo rule - Search for hosts with these member of sudo rules. - */ - InSudorule *[]string `json:"in_sudorule,omitempty"` - - /* - sudo rule - Search for hosts without these member of sudo rules. - */ - NotInSudorule *[]string `json:"not_in_sudorule,omitempty"` - - /* - user - Search for hosts with these enrolled by users. - */ - EnrollByUser *[]string `json:"enroll_by_user,omitempty"` - - /* - user - Search for hosts without these enrolled by users. - */ - NotEnrollByUser *[]string `json:"not_enroll_by_user,omitempty"` - - /* - host - Search for hosts with these managed by hosts. - */ - ManByHost *[]string `json:"man_by_host,omitempty"` - - /* - host - Search for hosts without these managed by hosts. - */ - NotManByHost *[]string `json:"not_man_by_host,omitempty"` - - /* - host - Search for hosts with these managing hosts. - */ - ManHost *[]string `json:"man_host,omitempty"` - - /* - host - Search for hosts without these managing hosts. - */ - NotManHost *[]string `json:"not_man_host,omitempty"` -} + + /* +Host name + + */ + Fqdn *string `json:"fqdn,omitempty"` + + /* +Description +A description of this host + */ + Description *string `json:"description,omitempty"` + + /* +Locality +Host locality (e.g. "Baltimore, MD") + */ + L *string `json:"l,omitempty"` + + /* +Location +Host location (e.g. "Lab 2") + */ + Nshostlocation *string `json:"nshostlocation,omitempty"` + + /* +Platform +Host hardware platform (e.g. "Lenovo T61") + */ + Nshardwareplatform *string `json:"nshardwareplatform,omitempty"` + + /* +Operating system +Host operating system and version (e.g. "Fedora 9") + */ + Nsosversion *string `json:"nsosversion,omitempty"` + + /* +User password +Password used in bulk enrollment + */ + Userpassword *string `json:"userpassword,omitempty"` + + /* +Certificate +Base-64 encoded host certificate + */ + Usercertificate *[]interface{} `json:"usercertificate,omitempty"` + + /* +MAC address +Hardware MAC address(es) on this host + */ + Macaddress *[]string `json:"macaddress,omitempty"` + + /* +Class +Host category (semantics placed on this attribute are for local interpretation) + */ + Userclass *[]string `json:"userclass,omitempty"` + + /* +Assigned ID View + + */ + Ipaassignedidview *string `json:"ipaassignedidview,omitempty"` + + /* +Authentication Indicators +Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations. + */ + Krbprincipalauthind *[]string `json:"krbprincipalauthind,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("hostname") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + + /* +host group +Search for hosts with these member of host groups. + */ + InHostgroup *[]string `json:"in_hostgroup,omitempty"` + + /* +host group +Search for hosts without these member of host groups. + */ + NotInHostgroup *[]string `json:"not_in_hostgroup,omitempty"` + + /* +netgroup +Search for hosts with these member of netgroups. + */ + InNetgroup *[]string `json:"in_netgroup,omitempty"` + + /* +netgroup +Search for hosts without these member of netgroups. + */ + NotInNetgroup *[]string `json:"not_in_netgroup,omitempty"` + + /* +role +Search for hosts with these member of roles. + */ + InRole *[]string `json:"in_role,omitempty"` + + /* +role +Search for hosts without these member of roles. + */ + NotInRole *[]string `json:"not_in_role,omitempty"` + + /* +HBAC rule +Search for hosts with these member of HBAC rules. + */ + InHbacrule *[]string `json:"in_hbacrule,omitempty"` + + /* +HBAC rule +Search for hosts without these member of HBAC rules. + */ + NotInHbacrule *[]string `json:"not_in_hbacrule,omitempty"` + + /* +sudo rule +Search for hosts with these member of sudo rules. + */ + InSudorule *[]string `json:"in_sudorule,omitempty"` + + /* +sudo rule +Search for hosts without these member of sudo rules. + */ + NotInSudorule *[]string `json:"not_in_sudorule,omitempty"` + + /* +user +Search for hosts with these enrolled by users. + */ + EnrollByUser *[]string `json:"enroll_by_user,omitempty"` + + /* +user +Search for hosts without these enrolled by users. + */ + NotEnrollByUser *[]string `json:"not_enroll_by_user,omitempty"` + + /* +host +Search for hosts with these managed by hosts. + */ + ManByHost *[]string `json:"man_by_host,omitempty"` + + /* +host +Search for hosts without these managed by hosts. + */ + NotManByHost *[]string `json:"not_man_by_host,omitempty"` + + /* +host +Search for hosts with these managing hosts. + */ + ManHost *[]string `json:"man_host,omitempty"` + + /* +host +Search for hosts without these managing hosts. + */ + NotManHost *[]string `json:"not_man_host,omitempty"` + } type hostFindKwParams struct { - *HostFindArgs - *HostFindOptionalArgs + *HostFindArgs + *HostFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hostFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HostFindResult `json:"result"` } type HostFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Host `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Host `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *HostFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HostFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HostFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HostFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HostFindResult%v", string(b)) } /* Modify information about a host. */ func (c *Client) HostMod( - reqArgs *HostModArgs, - optArgs *HostModOptionalArgs, // can be nil + reqArgs *HostModArgs, + optArgs *HostModOptionalArgs, // can be nil ) (*HostModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hostModKwParams{ - HostModArgs: reqArgs, - HostModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "host_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hostModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hostModKwParams{ + HostModArgs: reqArgs, + HostModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "host_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hostModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HostModArgs struct { + + /* +Host name - /* - Host name - - */ - Fqdn string `json:"fqdn,omitempty"` -} + */ + Fqdn string `json:"fqdn,omitempty"` + } type HostModOptionalArgs struct { - - /* - Description - A description of this host - */ - Description *string `json:"description,omitempty"` - - /* - Locality - Host locality (e.g. "Baltimore, MD") - */ - L *string `json:"l,omitempty"` - - /* - Location - Host location (e.g. "Lab 2") - */ - Nshostlocation *string `json:"nshostlocation,omitempty"` - - /* - Platform - Host hardware platform (e.g. "Lenovo T61") - */ - Nshardwareplatform *string `json:"nshardwareplatform,omitempty"` - - /* - Operating system - Host operating system and version (e.g. "Fedora 9") - */ - Nsosversion *string `json:"nsosversion,omitempty"` - - /* - User password - Password used in bulk enrollment - */ - Userpassword *string `json:"userpassword,omitempty"` - - /* - - Generate a random password to be used in bulk enrollment - */ - Random *bool `json:"random,omitempty"` - - /* - Certificate - Base-64 encoded host certificate - */ - Usercertificate *[]string `json:"usercertificate,omitempty"` - - /* - Principal alias - - */ - Krbprincipalname *[]string `json:"krbprincipalname,omitempty"` - - /* - MAC address - Hardware MAC address(es) on this host - */ - Macaddress *[]string `json:"macaddress,omitempty"` - - /* - SSH public key - - */ - Ipasshpubkey *[]string `json:"ipasshpubkey,omitempty"` - - /* - Class - Host category (semantics placed on this attribute are for local interpretation) - */ - Userclass *[]string `json:"userclass,omitempty"` - - /* - Assigned ID View - - */ - Ipaassignedidview *string `json:"ipaassignedidview,omitempty"` - - /* - Authentication Indicators - Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations. - */ - Krbprincipalauthind *[]string `json:"krbprincipalauthind,omitempty"` - - /* - Requires pre-authentication - Pre-authentication is required for the service - */ - Ipakrbrequirespreauth *bool `json:"ipakrbrequirespreauth,omitempty"` - - /* - Trusted for delegation - Client credentials may be delegated to the service - */ - Ipakrbokasdelegate *bool `json:"ipakrbokasdelegate,omitempty"` - - /* - Trusted to authenticate as user - The service is allowed to authenticate on behalf of a client - */ - Ipakrboktoauthasdelegate *bool `json:"ipakrboktoauthasdelegate,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Update DNS entries - */ - Updatedns *bool `json:"updatedns,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Description +A description of this host + */ + Description *string `json:"description,omitempty"` + + /* +Locality +Host locality (e.g. "Baltimore, MD") + */ + L *string `json:"l,omitempty"` + + /* +Location +Host location (e.g. "Lab 2") + */ + Nshostlocation *string `json:"nshostlocation,omitempty"` + + /* +Platform +Host hardware platform (e.g. "Lenovo T61") + */ + Nshardwareplatform *string `json:"nshardwareplatform,omitempty"` + + /* +Operating system +Host operating system and version (e.g. "Fedora 9") + */ + Nsosversion *string `json:"nsosversion,omitempty"` + + /* +User password +Password used in bulk enrollment + */ + Userpassword *string `json:"userpassword,omitempty"` + + /* + +Generate a random password to be used in bulk enrollment + */ + Random *bool `json:"random,omitempty"` + + /* +Certificate +Base-64 encoded host certificate + */ + Usercertificate *[]interface{} `json:"usercertificate,omitempty"` + + /* +Principal alias + + */ + Krbprincipalname *[]string `json:"krbprincipalname,omitempty"` + + /* +MAC address +Hardware MAC address(es) on this host + */ + Macaddress *[]string `json:"macaddress,omitempty"` + + /* +SSH public key + + */ + Ipasshpubkey *[]string `json:"ipasshpubkey,omitempty"` + + /* +Class +Host category (semantics placed on this attribute are for local interpretation) + */ + Userclass *[]string `json:"userclass,omitempty"` + + /* +Assigned ID View + + */ + Ipaassignedidview *string `json:"ipaassignedidview,omitempty"` + + /* +Authentication Indicators +Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations. + */ + Krbprincipalauthind *[]string `json:"krbprincipalauthind,omitempty"` + + /* +Requires pre-authentication +Pre-authentication is required for the service + */ + Ipakrbrequirespreauth *bool `json:"ipakrbrequirespreauth,omitempty"` + + /* +Trusted for delegation +Client credentials may be delegated to the service + */ + Ipakrbokasdelegate *bool `json:"ipakrbokasdelegate,omitempty"` + + /* +Trusted to authenticate as user +The service is allowed to authenticate on behalf of a client + */ + Ipakrboktoauthasdelegate *bool `json:"ipakrboktoauthasdelegate,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Update DNS entries + */ + Updatedns *bool `json:"updatedns,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type hostModKwParams struct { - *HostModArgs - *HostModOptionalArgs + *HostModArgs + *HostModOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hostModResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HostModResult `json:"result"` } type HostModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Host `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Host `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *HostModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HostModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HostModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HostModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HostModResult%v", string(b)) } /* Remove certificates from host entry */ func (c *Client) HostRemoveCert( - reqArgs *HostRemoveCertArgs, - optArgs *HostRemoveCertOptionalArgs, // can be nil + reqArgs *HostRemoveCertArgs, + optArgs *HostRemoveCertOptionalArgs, // can be nil ) (*HostRemoveCertResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hostRemoveCertKwParams{ - HostRemoveCertArgs: reqArgs, - HostRemoveCertOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "host_remove_cert", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hostRemoveCertResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hostRemoveCertKwParams{ + HostRemoveCertArgs: reqArgs, + HostRemoveCertOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "host_remove_cert", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hostRemoveCertResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HostRemoveCertArgs struct { - - /* - Host name - - */ - Fqdn string `json:"fqdn,omitempty"` - - /* - Certificate - Base-64 encoded host certificate - */ - Usercertificate []string `json:"usercertificate,omitempty"` -} + + /* +Host name + + */ + Fqdn string `json:"fqdn,omitempty"` + + /* +Certificate +Base-64 encoded host certificate + */ + Usercertificate []interface{} `json:"usercertificate,omitempty"` + } type HostRemoveCertOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type hostRemoveCertKwParams struct { - *HostRemoveCertArgs - *HostRemoveCertOptionalArgs + *HostRemoveCertArgs + *HostRemoveCertOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hostRemoveCertResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HostRemoveCertResult `json:"result"` } type HostRemoveCertResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *HostRemoveCertResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HostRemoveCertResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HostRemoveCertResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HostRemoveCertResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HostRemoveCertResult%v", string(b)) } /* Remove hosts that can manage this host. */ func (c *Client) HostRemoveManagedby( - reqArgs *HostRemoveManagedbyArgs, - optArgs *HostRemoveManagedbyOptionalArgs, // can be nil + reqArgs *HostRemoveManagedbyArgs, + optArgs *HostRemoveManagedbyOptionalArgs, // can be nil ) (*HostRemoveManagedbyResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hostRemoveManagedbyKwParams{ - HostRemoveManagedbyArgs: reqArgs, - HostRemoveManagedbyOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "host_remove_managedby", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hostRemoveManagedbyResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hostRemoveManagedbyKwParams{ + HostRemoveManagedbyArgs: reqArgs, + HostRemoveManagedbyOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "host_remove_managedby", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hostRemoveManagedbyResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HostRemoveManagedbyArgs struct { + + /* +Host name - /* - Host name - - */ - Fqdn string `json:"fqdn,omitempty"` -} + */ + Fqdn string `json:"fqdn,omitempty"` + } type HostRemoveManagedbyOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member host - hosts to remove - */ - Host *[]string `json:"host,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member host +hosts to remove + */ + Host *[]string `json:"host,omitempty"` + } type hostRemoveManagedbyKwParams struct { - *HostRemoveManagedbyArgs - *HostRemoveManagedbyOptionalArgs + *HostRemoveManagedbyArgs + *HostRemoveManagedbyOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hostRemoveManagedbyResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HostRemoveManagedbyResult `json:"result"` } type HostRemoveManagedbyResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *HostRemoveManagedbyResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HostRemoveManagedbyResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HostRemoveManagedbyResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HostRemoveManagedbyResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HostRemoveManagedbyResult%v", string(b)) } /* Remove principal alias from a host entry */ func (c *Client) HostRemovePrincipal( - reqArgs *HostRemovePrincipalArgs, - optArgs *HostRemovePrincipalOptionalArgs, // can be nil + reqArgs *HostRemovePrincipalArgs, + optArgs *HostRemovePrincipalOptionalArgs, // can be nil ) (*HostRemovePrincipalResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hostRemovePrincipalKwParams{ - HostRemovePrincipalArgs: reqArgs, - HostRemovePrincipalOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "host_remove_principal", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hostRemovePrincipalResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hostRemovePrincipalKwParams{ + HostRemovePrincipalArgs: reqArgs, + HostRemovePrincipalOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "host_remove_principal", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hostRemovePrincipalResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HostRemovePrincipalArgs struct { + + /* +Host name - /* - Host name + */ + Fqdn string `json:"fqdn,omitempty"` + + /* +Principal alias - */ - Fqdn string `json:"fqdn,omitempty"` - - /* - Principal alias - - */ - Krbprincipalname []string `json:"krbprincipalname,omitempty"` -} + */ + Krbprincipalname []string `json:"krbprincipalname,omitempty"` + } type HostRemovePrincipalOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type hostRemovePrincipalKwParams struct { - *HostRemovePrincipalArgs - *HostRemovePrincipalOptionalArgs + *HostRemovePrincipalArgs + *HostRemovePrincipalOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hostRemovePrincipalResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HostRemovePrincipalResult `json:"result"` } type HostRemovePrincipalResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *HostRemovePrincipalResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HostRemovePrincipalResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HostRemovePrincipalResult%v", string(b)) +func (t *HostRemovePrincipalResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HostRemovePrincipalResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HostRemovePrincipalResult%v", string(b)) } /* Display information about a host. */ func (c *Client) HostShow( - reqArgs *HostShowArgs, - optArgs *HostShowOptionalArgs, // can be nil + reqArgs *HostShowArgs, + optArgs *HostShowOptionalArgs, // can be nil ) (*HostShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hostShowKwParams{ - HostShowArgs: reqArgs, - HostShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "host_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hostShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hostShowKwParams{ + HostShowArgs: reqArgs, + HostShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "host_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hostShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HostShowArgs struct { + + /* +Host name - /* - Host name - - */ - Fqdn string `json:"fqdn,omitempty"` -} + */ + Fqdn string `json:"fqdn,omitempty"` + } type HostShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - file to store certificate in - */ - Out *string `json:"out,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +file to store certificate in + */ + Out *string `json:"out,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type hostShowKwParams struct { - *HostShowArgs - *HostShowOptionalArgs + *HostShowArgs + *HostShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hostShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HostShowResult `json:"result"` } type HostShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Host `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Host `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *HostShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HostShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HostShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HostShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HostShowResult%v", string(b)) } /* Add a new hostgroup. */ func (c *Client) HostgroupAdd( - reqArgs *HostgroupAddArgs, - optArgs *HostgroupAddOptionalArgs, // can be nil + reqArgs *HostgroupAddArgs, + optArgs *HostgroupAddOptionalArgs, // can be nil ) (*HostgroupAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hostgroupAddKwParams{ - HostgroupAddArgs: reqArgs, - HostgroupAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "hostgroup_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hostgroupAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hostgroupAddKwParams{ + HostgroupAddArgs: reqArgs, + HostgroupAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "hostgroup_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hostgroupAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HostgroupAddArgs struct { - - /* - Host-group - Name of host-group - */ - Cn string `json:"cn,omitempty"` -} + + /* +Host-group +Name of host-group + */ + Cn string `json:"cn,omitempty"` + } type HostgroupAddOptionalArgs struct { - - /* - Description - A description of this host-group - */ - Description *string `json:"description,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Description +A description of this host-group + */ + Description *string `json:"description,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type hostgroupAddKwParams struct { - *HostgroupAddArgs - *HostgroupAddOptionalArgs + *HostgroupAddArgs + *HostgroupAddOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hostgroupAddResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HostgroupAddResult `json:"result"` } type HostgroupAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Hostgroup `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Hostgroup `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *HostgroupAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HostgroupAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HostgroupAddResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HostgroupAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HostgroupAddResult%v", string(b)) } /* Add members to a hostgroup. */ func (c *Client) HostgroupAddMember( - reqArgs *HostgroupAddMemberArgs, - optArgs *HostgroupAddMemberOptionalArgs, // can be nil + reqArgs *HostgroupAddMemberArgs, + optArgs *HostgroupAddMemberOptionalArgs, // can be nil ) (*HostgroupAddMemberResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hostgroupAddMemberKwParams{ - HostgroupAddMemberArgs: reqArgs, - HostgroupAddMemberOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "hostgroup_add_member", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hostgroupAddMemberResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hostgroupAddMemberKwParams{ + HostgroupAddMemberArgs: reqArgs, + HostgroupAddMemberOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "hostgroup_add_member", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hostgroupAddMemberResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HostgroupAddMemberArgs struct { - - /* - Host-group - Name of host-group - */ - Cn string `json:"cn,omitempty"` -} + + /* +Host-group +Name of host-group + */ + Cn string `json:"cn,omitempty"` + } type HostgroupAddMemberOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member host - hosts to add - */ - Host *[]string `json:"host,omitempty"` - - /* - member host group - host groups to add - */ - Hostgroup *[]string `json:"hostgroup,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member host +hosts to add + */ + Host *[]string `json:"host,omitempty"` + + /* +member host group +host groups to add + */ + Hostgroup *[]string `json:"hostgroup,omitempty"` + } type hostgroupAddMemberKwParams struct { - *HostgroupAddMemberArgs - *HostgroupAddMemberOptionalArgs + *HostgroupAddMemberArgs + *HostgroupAddMemberOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hostgroupAddMemberResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HostgroupAddMemberResult `json:"result"` } type HostgroupAddMemberResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *HostgroupAddMemberResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HostgroupAddMemberResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HostgroupAddMemberResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HostgroupAddMemberResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HostgroupAddMemberResult%v", string(b)) } /* Delete a hostgroup. */ func (c *Client) HostgroupDel( - reqArgs *HostgroupDelArgs, - optArgs *HostgroupDelOptionalArgs, // can be nil + reqArgs *HostgroupDelArgs, + optArgs *HostgroupDelOptionalArgs, // can be nil ) (*HostgroupDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hostgroupDelKwParams{ - HostgroupDelArgs: reqArgs, - HostgroupDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "hostgroup_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hostgroupDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hostgroupDelKwParams{ + HostgroupDelArgs: reqArgs, + HostgroupDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "hostgroup_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hostgroupDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HostgroupDelArgs struct { - - /* - Host-group - Name of host-group - */ - Cn []string `json:"cn,omitempty"` -} + + /* +Host-group +Name of host-group + */ + Cn []string `json:"cn,omitempty"` + } type HostgroupDelOptionalArgs struct { + + /* - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` -} +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } type hostgroupDelKwParams struct { - *HostgroupDelArgs - *HostgroupDelOptionalArgs + *HostgroupDelArgs + *HostgroupDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hostgroupDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HostgroupDelResult `json:"result"` } type HostgroupDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } func (t *HostgroupDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HostgroupDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HostgroupDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HostgroupDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HostgroupDelResult%v", string(b)) } /* Search for hostgroups. */ func (c *Client) HostgroupFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *HostgroupFindArgs, - optArgs *HostgroupFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *HostgroupFindArgs, + optArgs *HostgroupFindOptionalArgs, // can be nil ) (*HostgroupFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hostgroupFindKwParams{ - HostgroupFindArgs: reqArgs, - HostgroupFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "hostgroup_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hostgroupFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hostgroupFindKwParams{ + HostgroupFindArgs: reqArgs, + HostgroupFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "hostgroup_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hostgroupFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HostgroupFindArgs struct { -} + } type HostgroupFindOptionalArgs struct { - - /* - Host-group - Name of host-group - */ - Cn *string `json:"cn,omitempty"` - - /* - Description - A description of this host-group - */ - Description *string `json:"description,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("hostgroup-name") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` - - /* - host - Search for host groups with these member hosts. - */ - Host *[]string `json:"host,omitempty"` - - /* - host - Search for host groups without these member hosts. - */ - NoHost *[]string `json:"no_host,omitempty"` - - /* - host group - Search for host groups with these member host groups. - */ - Hostgroup *[]string `json:"hostgroup,omitempty"` - - /* - host group - Search for host groups without these member host groups. - */ - NoHostgroup *[]string `json:"no_hostgroup,omitempty"` - - /* - host group - Search for host groups with these member of host groups. - */ - InHostgroup *[]string `json:"in_hostgroup,omitempty"` - - /* - host group - Search for host groups without these member of host groups. - */ - NotInHostgroup *[]string `json:"not_in_hostgroup,omitempty"` - - /* - netgroup - Search for host groups with these member of netgroups. - */ - InNetgroup *[]string `json:"in_netgroup,omitempty"` - - /* - netgroup - Search for host groups without these member of netgroups. - */ - NotInNetgroup *[]string `json:"not_in_netgroup,omitempty"` - - /* - HBAC rule - Search for host groups with these member of HBAC rules. - */ - InHbacrule *[]string `json:"in_hbacrule,omitempty"` - - /* - HBAC rule - Search for host groups without these member of HBAC rules. - */ - NotInHbacrule *[]string `json:"not_in_hbacrule,omitempty"` - - /* - sudo rule - Search for host groups with these member of sudo rules. - */ - InSudorule *[]string `json:"in_sudorule,omitempty"` - - /* - sudo rule - Search for host groups without these member of sudo rules. - */ - NotInSudorule *[]string `json:"not_in_sudorule,omitempty"` -} + + /* +Host-group +Name of host-group + */ + Cn *string `json:"cn,omitempty"` + + /* +Description +A description of this host-group + */ + Description *string `json:"description,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("hostgroup-name") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + + /* +host +Search for host groups with these member hosts. + */ + Host *[]string `json:"host,omitempty"` + + /* +host +Search for host groups without these member hosts. + */ + NoHost *[]string `json:"no_host,omitempty"` + + /* +host group +Search for host groups with these member host groups. + */ + Hostgroup *[]string `json:"hostgroup,omitempty"` + + /* +host group +Search for host groups without these member host groups. + */ + NoHostgroup *[]string `json:"no_hostgroup,omitempty"` + + /* +host group +Search for host groups with these member of host groups. + */ + InHostgroup *[]string `json:"in_hostgroup,omitempty"` + + /* +host group +Search for host groups without these member of host groups. + */ + NotInHostgroup *[]string `json:"not_in_hostgroup,omitempty"` + + /* +netgroup +Search for host groups with these member of netgroups. + */ + InNetgroup *[]string `json:"in_netgroup,omitempty"` + + /* +netgroup +Search for host groups without these member of netgroups. + */ + NotInNetgroup *[]string `json:"not_in_netgroup,omitempty"` + + /* +HBAC rule +Search for host groups with these member of HBAC rules. + */ + InHbacrule *[]string `json:"in_hbacrule,omitempty"` + + /* +HBAC rule +Search for host groups without these member of HBAC rules. + */ + NotInHbacrule *[]string `json:"not_in_hbacrule,omitempty"` + + /* +sudo rule +Search for host groups with these member of sudo rules. + */ + InSudorule *[]string `json:"in_sudorule,omitempty"` + + /* +sudo rule +Search for host groups without these member of sudo rules. + */ + NotInSudorule *[]string `json:"not_in_sudorule,omitempty"` + } type hostgroupFindKwParams struct { - *HostgroupFindArgs - *HostgroupFindOptionalArgs + *HostgroupFindArgs + *HostgroupFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hostgroupFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HostgroupFindResult `json:"result"` } type HostgroupFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Hostgroup `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Hostgroup `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *HostgroupFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HostgroupFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HostgroupFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HostgroupFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HostgroupFindResult%v", string(b)) } /* Modify a hostgroup. */ func (c *Client) HostgroupMod( - reqArgs *HostgroupModArgs, - optArgs *HostgroupModOptionalArgs, // can be nil + reqArgs *HostgroupModArgs, + optArgs *HostgroupModOptionalArgs, // can be nil ) (*HostgroupModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hostgroupModKwParams{ - HostgroupModArgs: reqArgs, - HostgroupModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "hostgroup_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hostgroupModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hostgroupModKwParams{ + HostgroupModArgs: reqArgs, + HostgroupModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "hostgroup_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hostgroupModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HostgroupModArgs struct { - - /* - Host-group - Name of host-group - */ - Cn string `json:"cn,omitempty"` -} + + /* +Host-group +Name of host-group + */ + Cn string `json:"cn,omitempty"` + } type HostgroupModOptionalArgs struct { - - /* - Description - A description of this host-group - */ - Description *string `json:"description,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Description +A description of this host-group + */ + Description *string `json:"description,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type hostgroupModKwParams struct { - *HostgroupModArgs - *HostgroupModOptionalArgs + *HostgroupModArgs + *HostgroupModOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hostgroupModResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HostgroupModResult `json:"result"` } type HostgroupModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Hostgroup `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Hostgroup `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *HostgroupModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HostgroupModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HostgroupModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HostgroupModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HostgroupModResult%v", string(b)) } /* Remove members from a hostgroup. */ func (c *Client) HostgroupRemoveMember( - reqArgs *HostgroupRemoveMemberArgs, - optArgs *HostgroupRemoveMemberOptionalArgs, // can be nil + reqArgs *HostgroupRemoveMemberArgs, + optArgs *HostgroupRemoveMemberOptionalArgs, // can be nil ) (*HostgroupRemoveMemberResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hostgroupRemoveMemberKwParams{ - HostgroupRemoveMemberArgs: reqArgs, - HostgroupRemoveMemberOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "hostgroup_remove_member", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hostgroupRemoveMemberResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hostgroupRemoveMemberKwParams{ + HostgroupRemoveMemberArgs: reqArgs, + HostgroupRemoveMemberOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "hostgroup_remove_member", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hostgroupRemoveMemberResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HostgroupRemoveMemberArgs struct { - - /* - Host-group - Name of host-group - */ - Cn string `json:"cn,omitempty"` -} + + /* +Host-group +Name of host-group + */ + Cn string `json:"cn,omitempty"` + } type HostgroupRemoveMemberOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member host - hosts to remove - */ - Host *[]string `json:"host,omitempty"` - - /* - member host group - host groups to remove - */ - Hostgroup *[]string `json:"hostgroup,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member host +hosts to remove + */ + Host *[]string `json:"host,omitempty"` + + /* +member host group +host groups to remove + */ + Hostgroup *[]string `json:"hostgroup,omitempty"` + } type hostgroupRemoveMemberKwParams struct { - *HostgroupRemoveMemberArgs - *HostgroupRemoveMemberOptionalArgs + *HostgroupRemoveMemberArgs + *HostgroupRemoveMemberOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hostgroupRemoveMemberResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HostgroupRemoveMemberResult `json:"result"` } type HostgroupRemoveMemberResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *HostgroupRemoveMemberResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HostgroupRemoveMemberResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HostgroupRemoveMemberResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HostgroupRemoveMemberResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HostgroupRemoveMemberResult%v", string(b)) } /* Display information about a hostgroup. */ func (c *Client) HostgroupShow( - reqArgs *HostgroupShowArgs, - optArgs *HostgroupShowOptionalArgs, // can be nil + reqArgs *HostgroupShowArgs, + optArgs *HostgroupShowOptionalArgs, // can be nil ) (*HostgroupShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := hostgroupShowKwParams{ - HostgroupShowArgs: reqArgs, - HostgroupShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "hostgroup_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res hostgroupShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := hostgroupShowKwParams{ + HostgroupShowArgs: reqArgs, + HostgroupShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "hostgroup_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res hostgroupShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type HostgroupShowArgs struct { - - /* - Host-group - Name of host-group - */ - Cn string `json:"cn,omitempty"` -} + + /* +Host-group +Name of host-group + */ + Cn string `json:"cn,omitempty"` + } type HostgroupShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type hostgroupShowKwParams struct { - *HostgroupShowArgs - *HostgroupShowOptionalArgs + *HostgroupShowArgs + *HostgroupShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type hostgroupShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *HostgroupShowResult `json:"result"` } type HostgroupShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Hostgroup `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Hostgroup `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *HostgroupShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("HostgroupShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("HostgroupShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("HostgroupShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("HostgroupShowResult%v", string(b)) } /* - */ +*/ func (c *Client) I18nMessages( - reqArgs *I18nMessagesArgs, - optArgs *I18nMessagesOptionalArgs, // can be nil + reqArgs *I18nMessagesArgs, + optArgs *I18nMessagesOptionalArgs, // can be nil ) (*I18nMessagesResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := i18nMessagesKwParams{ - I18nMessagesArgs: reqArgs, - I18nMessagesOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "i18n_messages", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res i18nMessagesResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := i18nMessagesKwParams{ + I18nMessagesArgs: reqArgs, + I18nMessagesOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "i18n_messages", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res i18nMessagesResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type I18nMessagesArgs struct { -} + } type I18nMessagesOptionalArgs struct { -} + } type i18nMessagesKwParams struct { - *I18nMessagesArgs - *I18nMessagesOptionalArgs + *I18nMessagesArgs + *I18nMessagesOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type i18nMessagesResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *I18nMessagesResult `json:"result"` } type I18nMessagesResult struct { - - /* - Dict of I18N messages - (required) - */ - Texts interface{} `json:"texts,omitempty"` -} + + + /* +Dict of I18N messages + (required) + */ + Texts interface{} `json:"texts,omitempty"` + } func (t *I18nMessagesResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("I18nMessagesResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("I18nMessagesResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("I18nMessagesResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("I18nMessagesResult%v", string(b)) } /* Add a new Group ID override. */ func (c *Client) IdoverridegroupAdd( - reqArgs *IdoverridegroupAddArgs, - optArgs *IdoverridegroupAddOptionalArgs, // can be nil + reqArgs *IdoverridegroupAddArgs, + optArgs *IdoverridegroupAddOptionalArgs, // can be nil ) (*IdoverridegroupAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := idoverridegroupAddKwParams{ - IdoverridegroupAddArgs: reqArgs, - IdoverridegroupAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "idoverridegroup_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res idoverridegroupAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := idoverridegroupAddKwParams{ + IdoverridegroupAddArgs: reqArgs, + IdoverridegroupAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "idoverridegroup_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res idoverridegroupAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type IdoverridegroupAddArgs struct { + + /* +ID View Name - /* - ID View Name - - */ - Idviewcn string `json:"idviewcn,omitempty"` + */ + Idviewcn string `json:"idviewcn,omitempty"` + + /* +Anchor to override - /* - Anchor to override - - */ - Ipaanchoruuid string `json:"ipaanchoruuid,omitempty"` -} + */ + Ipaanchoruuid string `json:"ipaanchoruuid,omitempty"` + } type IdoverridegroupAddOptionalArgs struct { - - /* - Description - - */ - Description *string `json:"description,omitempty"` - - /* - Group name - - */ - Cn *string `json:"cn,omitempty"` - - /* - GID - Group ID Number - */ - Gidnumber *int `json:"gidnumber,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - Fallback to AD DC LDAP - Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only. - */ - FallbackToLdap *bool `json:"fallback_to_ldap,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Description + + */ + Description *string `json:"description,omitempty"` + + /* +Group name + + */ + Cn *string `json:"cn,omitempty"` + + /* +GID +Group ID Number + */ + Gidnumber *int `json:"gidnumber,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* +Fallback to AD DC LDAP +Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only. + */ + FallbackToLdap *bool `json:"fallback_to_ldap,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type idoverridegroupAddKwParams struct { - *IdoverridegroupAddArgs - *IdoverridegroupAddOptionalArgs + *IdoverridegroupAddArgs + *IdoverridegroupAddOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type idoverridegroupAddResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *IdoverridegroupAddResult `json:"result"` } type IdoverridegroupAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Idoverridegroup `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Idoverridegroup `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *IdoverridegroupAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("IdoverridegroupAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("IdoverridegroupAddResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("IdoverridegroupAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("IdoverridegroupAddResult%v", string(b)) } /* Delete an Group ID override. */ func (c *Client) IdoverridegroupDel( - reqArgs *IdoverridegroupDelArgs, - optArgs *IdoverridegroupDelOptionalArgs, // can be nil + reqArgs *IdoverridegroupDelArgs, + optArgs *IdoverridegroupDelOptionalArgs, // can be nil ) (*IdoverridegroupDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := idoverridegroupDelKwParams{ - IdoverridegroupDelArgs: reqArgs, - IdoverridegroupDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "idoverridegroup_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res idoverridegroupDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := idoverridegroupDelKwParams{ + IdoverridegroupDelArgs: reqArgs, + IdoverridegroupDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "idoverridegroup_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res idoverridegroupDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type IdoverridegroupDelArgs struct { + + /* +ID View Name - /* - ID View Name - - */ - Idviewcn string `json:"idviewcn,omitempty"` + */ + Idviewcn string `json:"idviewcn,omitempty"` + + /* +Anchor to override - /* - Anchor to override - - */ - Ipaanchoruuid []string `json:"ipaanchoruuid,omitempty"` -} + */ + Ipaanchoruuid []string `json:"ipaanchoruuid,omitempty"` + } type IdoverridegroupDelOptionalArgs struct { + + /* + +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + + /* +Fallback to AD DC LDAP +Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only. + */ + FallbackToLdap *bool `json:"fallback_to_ldap,omitempty"` + } - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` +type idoverridegroupDelKwParams struct { + *IdoverridegroupDelArgs + *IdoverridegroupDelOptionalArgs - /* - Fallback to AD DC LDAP - Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only. - */ - FallbackToLdap *bool `json:"fallback_to_ldap,omitempty"` -} - -type idoverridegroupDelKwParams struct { - *IdoverridegroupDelArgs - *IdoverridegroupDelOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type idoverridegroupDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *IdoverridegroupDelResult `json:"result"` } type IdoverridegroupDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } func (t *IdoverridegroupDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("IdoverridegroupDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("IdoverridegroupDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("IdoverridegroupDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("IdoverridegroupDelResult%v", string(b)) } /* Search for an Group ID override. */ func (c *Client) IdoverridegroupFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *IdoverridegroupFindArgs, - optArgs *IdoverridegroupFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *IdoverridegroupFindArgs, + optArgs *IdoverridegroupFindOptionalArgs, // can be nil ) (*IdoverridegroupFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := idoverridegroupFindKwParams{ - IdoverridegroupFindArgs: reqArgs, - IdoverridegroupFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "idoverridegroup_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res idoverridegroupFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := idoverridegroupFindKwParams{ + IdoverridegroupFindArgs: reqArgs, + IdoverridegroupFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "idoverridegroup_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res idoverridegroupFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type IdoverridegroupFindArgs struct { + + /* +ID View Name - /* - ID View Name - - */ - Idviewcn string `json:"idviewcn,omitempty"` -} + */ + Idviewcn string `json:"idviewcn,omitempty"` + } type IdoverridegroupFindOptionalArgs struct { - - /* - Anchor to override - - */ - Ipaanchoruuid *string `json:"ipaanchoruuid,omitempty"` - - /* - Description - - */ - Description *string `json:"description,omitempty"` - - /* - Group name - - */ - Cn *string `json:"cn,omitempty"` - - /* - GID - Group ID Number - */ - Gidnumber *int `json:"gidnumber,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - Fallback to AD DC LDAP - Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only. - */ - FallbackToLdap *bool `json:"fallback_to_ldap,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("anchor") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} + + /* +Anchor to override + + */ + Ipaanchoruuid *string `json:"ipaanchoruuid,omitempty"` + + /* +Description + + */ + Description *string `json:"description,omitempty"` + + /* +Group name + + */ + Cn *string `json:"cn,omitempty"` + + /* +GID +Group ID Number + */ + Gidnumber *int `json:"gidnumber,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* +Fallback to AD DC LDAP +Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only. + */ + FallbackToLdap *bool `json:"fallback_to_ldap,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("anchor") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } type idoverridegroupFindKwParams struct { - *IdoverridegroupFindArgs - *IdoverridegroupFindOptionalArgs + *IdoverridegroupFindArgs + *IdoverridegroupFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type idoverridegroupFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *IdoverridegroupFindResult `json:"result"` } type IdoverridegroupFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Idoverridegroup `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Idoverridegroup `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *IdoverridegroupFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("IdoverridegroupFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("IdoverridegroupFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("IdoverridegroupFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("IdoverridegroupFindResult%v", string(b)) } /* Modify an Group ID override. */ func (c *Client) IdoverridegroupMod( - reqArgs *IdoverridegroupModArgs, - optArgs *IdoverridegroupModOptionalArgs, // can be nil + reqArgs *IdoverridegroupModArgs, + optArgs *IdoverridegroupModOptionalArgs, // can be nil ) (*IdoverridegroupModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := idoverridegroupModKwParams{ - IdoverridegroupModArgs: reqArgs, - IdoverridegroupModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "idoverridegroup_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res idoverridegroupModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := idoverridegroupModKwParams{ + IdoverridegroupModArgs: reqArgs, + IdoverridegroupModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "idoverridegroup_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res idoverridegroupModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type IdoverridegroupModArgs struct { + + /* +ID View Name - /* - ID View Name - - */ - Idviewcn string `json:"idviewcn,omitempty"` + */ + Idviewcn string `json:"idviewcn,omitempty"` + + /* +Anchor to override - /* - Anchor to override - - */ - Ipaanchoruuid string `json:"ipaanchoruuid,omitempty"` -} + */ + Ipaanchoruuid string `json:"ipaanchoruuid,omitempty"` + } type IdoverridegroupModOptionalArgs struct { - - /* - Description - - */ - Description *string `json:"description,omitempty"` - - /* - Group name - - */ - Cn *string `json:"cn,omitempty"` - - /* - GID - Group ID Number - */ - Gidnumber *int `json:"gidnumber,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - Fallback to AD DC LDAP - Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only. - */ - FallbackToLdap *bool `json:"fallback_to_ldap,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - Rename - Rename the Group ID override object - */ - Rename *string `json:"rename,omitempty"` -} + + /* +Description + + */ + Description *string `json:"description,omitempty"` + + /* +Group name + + */ + Cn *string `json:"cn,omitempty"` + + /* +GID +Group ID Number + */ + Gidnumber *int `json:"gidnumber,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* +Fallback to AD DC LDAP +Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only. + */ + FallbackToLdap *bool `json:"fallback_to_ldap,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Rename +Rename the Group ID override object + */ + Rename *string `json:"rename,omitempty"` + } type idoverridegroupModKwParams struct { - *IdoverridegroupModArgs - *IdoverridegroupModOptionalArgs + *IdoverridegroupModArgs + *IdoverridegroupModOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type idoverridegroupModResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *IdoverridegroupModResult `json:"result"` } type IdoverridegroupModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Idoverridegroup `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Idoverridegroup `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *IdoverridegroupModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("IdoverridegroupModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("IdoverridegroupModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("IdoverridegroupModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("IdoverridegroupModResult%v", string(b)) } /* Display information about an Group ID override. */ func (c *Client) IdoverridegroupShow( - reqArgs *IdoverridegroupShowArgs, - optArgs *IdoverridegroupShowOptionalArgs, // can be nil + reqArgs *IdoverridegroupShowArgs, + optArgs *IdoverridegroupShowOptionalArgs, // can be nil ) (*IdoverridegroupShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := idoverridegroupShowKwParams{ - IdoverridegroupShowArgs: reqArgs, - IdoverridegroupShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "idoverridegroup_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res idoverridegroupShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := idoverridegroupShowKwParams{ + IdoverridegroupShowArgs: reqArgs, + IdoverridegroupShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "idoverridegroup_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res idoverridegroupShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type IdoverridegroupShowArgs struct { + + /* +ID View Name - /* - ID View Name - - */ - Idviewcn string `json:"idviewcn,omitempty"` + */ + Idviewcn string `json:"idviewcn,omitempty"` + + /* +Anchor to override - /* - Anchor to override - - */ - Ipaanchoruuid string `json:"ipaanchoruuid,omitempty"` -} + */ + Ipaanchoruuid string `json:"ipaanchoruuid,omitempty"` + } type IdoverridegroupShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - Fallback to AD DC LDAP - Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only. - */ - FallbackToLdap *bool `json:"fallback_to_ldap,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* +Fallback to AD DC LDAP +Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only. + */ + FallbackToLdap *bool `json:"fallback_to_ldap,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type idoverridegroupShowKwParams struct { - *IdoverridegroupShowArgs - *IdoverridegroupShowOptionalArgs + *IdoverridegroupShowArgs + *IdoverridegroupShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type idoverridegroupShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *IdoverridegroupShowResult `json:"result"` } type IdoverridegroupShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Idoverridegroup `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Idoverridegroup `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *IdoverridegroupShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("IdoverridegroupShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("IdoverridegroupShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("IdoverridegroupShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("IdoverridegroupShowResult%v", string(b)) } /* Add a new User ID override. */ func (c *Client) IdoverrideuserAdd( - reqArgs *IdoverrideuserAddArgs, - optArgs *IdoverrideuserAddOptionalArgs, // can be nil + reqArgs *IdoverrideuserAddArgs, + optArgs *IdoverrideuserAddOptionalArgs, // can be nil ) (*IdoverrideuserAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := idoverrideuserAddKwParams{ - IdoverrideuserAddArgs: reqArgs, - IdoverrideuserAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "idoverrideuser_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res idoverrideuserAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := idoverrideuserAddKwParams{ + IdoverrideuserAddArgs: reqArgs, + IdoverrideuserAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "idoverrideuser_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res idoverrideuserAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type IdoverrideuserAddArgs struct { + + /* +ID View Name - /* - ID View Name - - */ - Idviewcn string `json:"idviewcn,omitempty"` + */ + Idviewcn string `json:"idviewcn,omitempty"` + + /* +Anchor to override - /* - Anchor to override - - */ - Ipaanchoruuid string `json:"ipaanchoruuid,omitempty"` -} + */ + Ipaanchoruuid string `json:"ipaanchoruuid,omitempty"` + } type IdoverrideuserAddOptionalArgs struct { - - /* - Description - - */ - Description *string `json:"description,omitempty"` - - /* - User login - - */ - UID *string `json:"uid,omitempty"` - - /* - UID - User ID Number - */ - Uidnumber *int `json:"uidnumber,omitempty"` - - /* - GECOS - - */ - Gecos *string `json:"gecos,omitempty"` - - /* - GID - Group ID Number - */ - Gidnumber *int `json:"gidnumber,omitempty"` - - /* - Home directory - - */ - Homedirectory *string `json:"homedirectory,omitempty"` - - /* - Login shell - - */ - Loginshell *string `json:"loginshell,omitempty"` - - /* - - - */ - Ipaoriginaluid *string `json:"ipaoriginaluid,omitempty"` - - /* - SSH public key - - */ - Ipasshpubkey *[]string `json:"ipasshpubkey,omitempty"` - - /* - Certificate - Base-64 encoded user certificate - */ - Usercertificate *[]string `json:"usercertificate,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - Fallback to AD DC LDAP - Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only. - */ - FallbackToLdap *bool `json:"fallback_to_ldap,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Description + + */ + Description *string `json:"description,omitempty"` + + /* +User login + + */ + UID *string `json:"uid,omitempty"` + + /* +UID +User ID Number + */ + Uidnumber *int `json:"uidnumber,omitempty"` + + /* +GECOS + + */ + Gecos *string `json:"gecos,omitempty"` + + /* +GID +Group ID Number + */ + Gidnumber *int `json:"gidnumber,omitempty"` + + /* +Home directory + + */ + Homedirectory *string `json:"homedirectory,omitempty"` + + /* +Login shell + + */ + Loginshell *string `json:"loginshell,omitempty"` + + /* + + + */ + Ipaoriginaluid *string `json:"ipaoriginaluid,omitempty"` + + /* +SSH public key + + */ + Ipasshpubkey *[]string `json:"ipasshpubkey,omitempty"` + + /* +Certificate +Base-64 encoded user certificate + */ + Usercertificate *[]interface{} `json:"usercertificate,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* +Fallback to AD DC LDAP +Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only. + */ + FallbackToLdap *bool `json:"fallback_to_ldap,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type idoverrideuserAddKwParams struct { - *IdoverrideuserAddArgs - *IdoverrideuserAddOptionalArgs + *IdoverrideuserAddArgs + *IdoverrideuserAddOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type idoverrideuserAddResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *IdoverrideuserAddResult `json:"result"` } type IdoverrideuserAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Idoverrideuser `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Idoverrideuser `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *IdoverrideuserAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("IdoverrideuserAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("IdoverrideuserAddResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("IdoverrideuserAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("IdoverrideuserAddResult%v", string(b)) } /* Add one or more certificates to the idoverrideuser entry */ func (c *Client) IdoverrideuserAddCert( - reqArgs *IdoverrideuserAddCertArgs, - optArgs *IdoverrideuserAddCertOptionalArgs, // can be nil + reqArgs *IdoverrideuserAddCertArgs, + optArgs *IdoverrideuserAddCertOptionalArgs, // can be nil ) (*IdoverrideuserAddCertResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := idoverrideuserAddCertKwParams{ - IdoverrideuserAddCertArgs: reqArgs, - IdoverrideuserAddCertOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "idoverrideuser_add_cert", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res idoverrideuserAddCertResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := idoverrideuserAddCertKwParams{ + IdoverrideuserAddCertArgs: reqArgs, + IdoverrideuserAddCertOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "idoverrideuser_add_cert", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res idoverrideuserAddCertResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type IdoverrideuserAddCertArgs struct { - - /* - ID View Name - - */ - Idviewcn string `json:"idviewcn,omitempty"` - - /* - Anchor to override - - */ - Ipaanchoruuid string `json:"ipaanchoruuid,omitempty"` - - /* - Certificate - Base-64 encoded user certificate - */ - Usercertificate []string `json:"usercertificate,omitempty"` -} + + /* +ID View Name + + */ + Idviewcn string `json:"idviewcn,omitempty"` + + /* +Anchor to override + + */ + Ipaanchoruuid string `json:"ipaanchoruuid,omitempty"` + + /* +Certificate +Base-64 encoded user certificate + */ + Usercertificate []interface{} `json:"usercertificate,omitempty"` + } type IdoverrideuserAddCertOptionalArgs struct { - - /* - Fallback to AD DC LDAP - Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only. - */ - FallbackToLdap *bool `json:"fallback_to_ldap,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Fallback to AD DC LDAP +Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only. + */ + FallbackToLdap *bool `json:"fallback_to_ldap,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type idoverrideuserAddCertKwParams struct { - *IdoverrideuserAddCertArgs - *IdoverrideuserAddCertOptionalArgs + *IdoverrideuserAddCertArgs + *IdoverrideuserAddCertOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type idoverrideuserAddCertResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *IdoverrideuserAddCertResult `json:"result"` } type IdoverrideuserAddCertResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *IdoverrideuserAddCertResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("IdoverrideuserAddCertResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("IdoverrideuserAddCertResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("IdoverrideuserAddCertResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("IdoverrideuserAddCertResult%v", string(b)) } /* Delete an User ID override. */ func (c *Client) IdoverrideuserDel( - reqArgs *IdoverrideuserDelArgs, - optArgs *IdoverrideuserDelOptionalArgs, // can be nil + reqArgs *IdoverrideuserDelArgs, + optArgs *IdoverrideuserDelOptionalArgs, // can be nil ) (*IdoverrideuserDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := idoverrideuserDelKwParams{ - IdoverrideuserDelArgs: reqArgs, - IdoverrideuserDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "idoverrideuser_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res idoverrideuserDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := idoverrideuserDelKwParams{ + IdoverrideuserDelArgs: reqArgs, + IdoverrideuserDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "idoverrideuser_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res idoverrideuserDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type IdoverrideuserDelArgs struct { + + /* +ID View Name - /* - ID View Name - - */ - Idviewcn string `json:"idviewcn,omitempty"` - - /* - Anchor to override + */ + Idviewcn string `json:"idviewcn,omitempty"` + + /* +Anchor to override - */ - Ipaanchoruuid []string `json:"ipaanchoruuid,omitempty"` -} + */ + Ipaanchoruuid []string `json:"ipaanchoruuid,omitempty"` + } type IdoverrideuserDelOptionalArgs struct { - - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` - - /* - Fallback to AD DC LDAP - Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only. - */ - FallbackToLdap *bool `json:"fallback_to_ldap,omitempty"` -} + + /* + +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + + /* +Fallback to AD DC LDAP +Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only. + */ + FallbackToLdap *bool `json:"fallback_to_ldap,omitempty"` + } type idoverrideuserDelKwParams struct { - *IdoverrideuserDelArgs - *IdoverrideuserDelOptionalArgs + *IdoverrideuserDelArgs + *IdoverrideuserDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type idoverrideuserDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *IdoverrideuserDelResult `json:"result"` } type IdoverrideuserDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } func (t *IdoverrideuserDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("IdoverrideuserDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("IdoverrideuserDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("IdoverrideuserDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("IdoverrideuserDelResult%v", string(b)) } /* Search for an User ID override. */ func (c *Client) IdoverrideuserFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *IdoverrideuserFindArgs, - optArgs *IdoverrideuserFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *IdoverrideuserFindArgs, + optArgs *IdoverrideuserFindOptionalArgs, // can be nil ) (*IdoverrideuserFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := idoverrideuserFindKwParams{ - IdoverrideuserFindArgs: reqArgs, - IdoverrideuserFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "idoverrideuser_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res idoverrideuserFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := idoverrideuserFindKwParams{ + IdoverrideuserFindArgs: reqArgs, + IdoverrideuserFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "idoverrideuser_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res idoverrideuserFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type IdoverrideuserFindArgs struct { + + /* +ID View Name - /* - ID View Name - - */ - Idviewcn string `json:"idviewcn,omitempty"` -} + */ + Idviewcn string `json:"idviewcn,omitempty"` + } type IdoverrideuserFindOptionalArgs struct { - - /* - Anchor to override - - */ - Ipaanchoruuid *string `json:"ipaanchoruuid,omitempty"` - - /* - Description - - */ - Description *string `json:"description,omitempty"` - - /* - User login - - */ - UID *string `json:"uid,omitempty"` - - /* - UID - User ID Number - */ - Uidnumber *int `json:"uidnumber,omitempty"` - - /* - GECOS - - */ - Gecos *string `json:"gecos,omitempty"` - - /* - GID - Group ID Number - */ - Gidnumber *int `json:"gidnumber,omitempty"` - - /* - Home directory - - */ - Homedirectory *string `json:"homedirectory,omitempty"` - - /* - Login shell - - */ - Loginshell *string `json:"loginshell,omitempty"` - - /* - - - */ - Ipaoriginaluid *string `json:"ipaoriginaluid,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - Fallback to AD DC LDAP - Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only. - */ - FallbackToLdap *bool `json:"fallback_to_ldap,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("anchor") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} + + /* +Anchor to override + + */ + Ipaanchoruuid *string `json:"ipaanchoruuid,omitempty"` + + /* +Description + + */ + Description *string `json:"description,omitempty"` + + /* +User login + + */ + UID *string `json:"uid,omitempty"` + + /* +UID +User ID Number + */ + Uidnumber *int `json:"uidnumber,omitempty"` + + /* +GECOS + + */ + Gecos *string `json:"gecos,omitempty"` + + /* +GID +Group ID Number + */ + Gidnumber *int `json:"gidnumber,omitempty"` + + /* +Home directory + + */ + Homedirectory *string `json:"homedirectory,omitempty"` + + /* +Login shell + + */ + Loginshell *string `json:"loginshell,omitempty"` + + /* + + + */ + Ipaoriginaluid *string `json:"ipaoriginaluid,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* +Fallback to AD DC LDAP +Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only. + */ + FallbackToLdap *bool `json:"fallback_to_ldap,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("anchor") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } type idoverrideuserFindKwParams struct { - *IdoverrideuserFindArgs - *IdoverrideuserFindOptionalArgs + *IdoverrideuserFindArgs + *IdoverrideuserFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type idoverrideuserFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *IdoverrideuserFindResult `json:"result"` } type IdoverrideuserFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Idoverrideuser `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Idoverrideuser `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *IdoverrideuserFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("IdoverrideuserFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("IdoverrideuserFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("IdoverrideuserFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("IdoverrideuserFindResult%v", string(b)) } /* Modify an User ID override. */ func (c *Client) IdoverrideuserMod( - reqArgs *IdoverrideuserModArgs, - optArgs *IdoverrideuserModOptionalArgs, // can be nil + reqArgs *IdoverrideuserModArgs, + optArgs *IdoverrideuserModOptionalArgs, // can be nil ) (*IdoverrideuserModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := idoverrideuserModKwParams{ - IdoverrideuserModArgs: reqArgs, - IdoverrideuserModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "idoverrideuser_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res idoverrideuserModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := idoverrideuserModKwParams{ + IdoverrideuserModArgs: reqArgs, + IdoverrideuserModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "idoverrideuser_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res idoverrideuserModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type IdoverrideuserModArgs struct { + + /* +ID View Name - /* - ID View Name - - */ - Idviewcn string `json:"idviewcn,omitempty"` - - /* - Anchor to override + */ + Idviewcn string `json:"idviewcn,omitempty"` + + /* +Anchor to override - */ - Ipaanchoruuid string `json:"ipaanchoruuid,omitempty"` -} + */ + Ipaanchoruuid string `json:"ipaanchoruuid,omitempty"` + } type IdoverrideuserModOptionalArgs struct { + + /* +Description + + */ + Description *string `json:"description,omitempty"` + + /* +User login + + */ + UID *string `json:"uid,omitempty"` + + /* +UID +User ID Number + */ + Uidnumber *int `json:"uidnumber,omitempty"` + + /* +GECOS + + */ + Gecos *string `json:"gecos,omitempty"` + + /* +GID +Group ID Number + */ + Gidnumber *int `json:"gidnumber,omitempty"` + + /* +Home directory + + */ + Homedirectory *string `json:"homedirectory,omitempty"` + + /* +Login shell + + */ + Loginshell *string `json:"loginshell,omitempty"` + + /* + + + */ + Ipaoriginaluid *string `json:"ipaoriginaluid,omitempty"` + + /* +SSH public key + + */ + Ipasshpubkey *[]string `json:"ipasshpubkey,omitempty"` + + /* +Certificate +Base-64 encoded user certificate + */ + Usercertificate *[]interface{} `json:"usercertificate,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* +Fallback to AD DC LDAP +Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only. + */ + FallbackToLdap *bool `json:"fallback_to_ldap,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Rename +Rename the User ID override object + */ + Rename *string `json:"rename,omitempty"` + } - /* - Description +type idoverrideuserModKwParams struct { + *IdoverrideuserModArgs + *IdoverrideuserModOptionalArgs - */ - Description *string `json:"description,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - User login +type idoverrideuserModResponse struct { + Error *Error `json:"error"` + Result *IdoverrideuserModResult `json:"result"` +} - */ - UID *string `json:"uid,omitempty"` - - /* - UID - User ID Number - */ - Uidnumber *int `json:"uidnumber,omitempty"` - - /* - GECOS - - */ - Gecos *string `json:"gecos,omitempty"` - - /* - GID - Group ID Number - */ - Gidnumber *int `json:"gidnumber,omitempty"` - - /* - Home directory - - */ - Homedirectory *string `json:"homedirectory,omitempty"` - - /* - Login shell - - */ - Loginshell *string `json:"loginshell,omitempty"` - - /* - - - */ - Ipaoriginaluid *string `json:"ipaoriginaluid,omitempty"` - - /* - SSH public key - - */ - Ipasshpubkey *[]string `json:"ipasshpubkey,omitempty"` - - /* - Certificate - Base-64 encoded user certificate - */ - Usercertificate *[]string `json:"usercertificate,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - Fallback to AD DC LDAP - Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only. - */ - FallbackToLdap *bool `json:"fallback_to_ldap,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - Rename - Rename the User ID override object - */ - Rename *string `json:"rename,omitempty"` -} - -type idoverrideuserModKwParams struct { - *IdoverrideuserModArgs - *IdoverrideuserModOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type idoverrideuserModResponse struct { - Error *Error `json:"error"` - Result *IdoverrideuserModResult `json:"result"` -} - -type IdoverrideuserModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Idoverrideuser `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} +type IdoverrideuserModResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Idoverrideuser `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *IdoverrideuserModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("IdoverrideuserModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("IdoverrideuserModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("IdoverrideuserModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("IdoverrideuserModResult%v", string(b)) } /* Remove one or more certificates to the idoverrideuser entry */ func (c *Client) IdoverrideuserRemoveCert( - reqArgs *IdoverrideuserRemoveCertArgs, - optArgs *IdoverrideuserRemoveCertOptionalArgs, // can be nil + reqArgs *IdoverrideuserRemoveCertArgs, + optArgs *IdoverrideuserRemoveCertOptionalArgs, // can be nil ) (*IdoverrideuserRemoveCertResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := idoverrideuserRemoveCertKwParams{ - IdoverrideuserRemoveCertArgs: reqArgs, - IdoverrideuserRemoveCertOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "idoverrideuser_remove_cert", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res idoverrideuserRemoveCertResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := idoverrideuserRemoveCertKwParams{ + IdoverrideuserRemoveCertArgs: reqArgs, + IdoverrideuserRemoveCertOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "idoverrideuser_remove_cert", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res idoverrideuserRemoveCertResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type IdoverrideuserRemoveCertArgs struct { - - /* - ID View Name - - */ - Idviewcn string `json:"idviewcn,omitempty"` - - /* - Anchor to override - - */ - Ipaanchoruuid string `json:"ipaanchoruuid,omitempty"` - - /* - Certificate - Base-64 encoded user certificate - */ - Usercertificate []string `json:"usercertificate,omitempty"` -} + + /* +ID View Name + + */ + Idviewcn string `json:"idviewcn,omitempty"` + + /* +Anchor to override + + */ + Ipaanchoruuid string `json:"ipaanchoruuid,omitempty"` + + /* +Certificate +Base-64 encoded user certificate + */ + Usercertificate []interface{} `json:"usercertificate,omitempty"` + } type IdoverrideuserRemoveCertOptionalArgs struct { - - /* - Fallback to AD DC LDAP - Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only. - */ - FallbackToLdap *bool `json:"fallback_to_ldap,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Fallback to AD DC LDAP +Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only. + */ + FallbackToLdap *bool `json:"fallback_to_ldap,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type idoverrideuserRemoveCertKwParams struct { - *IdoverrideuserRemoveCertArgs - *IdoverrideuserRemoveCertOptionalArgs + *IdoverrideuserRemoveCertArgs + *IdoverrideuserRemoveCertOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type idoverrideuserRemoveCertResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *IdoverrideuserRemoveCertResult `json:"result"` } type IdoverrideuserRemoveCertResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *IdoverrideuserRemoveCertResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("IdoverrideuserRemoveCertResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("IdoverrideuserRemoveCertResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("IdoverrideuserRemoveCertResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("IdoverrideuserRemoveCertResult%v", string(b)) } /* Display information about an User ID override. */ func (c *Client) IdoverrideuserShow( - reqArgs *IdoverrideuserShowArgs, - optArgs *IdoverrideuserShowOptionalArgs, // can be nil + reqArgs *IdoverrideuserShowArgs, + optArgs *IdoverrideuserShowOptionalArgs, // can be nil ) (*IdoverrideuserShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := idoverrideuserShowKwParams{ - IdoverrideuserShowArgs: reqArgs, - IdoverrideuserShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "idoverrideuser_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res idoverrideuserShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := idoverrideuserShowKwParams{ + IdoverrideuserShowArgs: reqArgs, + IdoverrideuserShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "idoverrideuser_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res idoverrideuserShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type IdoverrideuserShowArgs struct { + + /* +ID View Name - /* - ID View Name - - */ - Idviewcn string `json:"idviewcn,omitempty"` + */ + Idviewcn string `json:"idviewcn,omitempty"` + + /* +Anchor to override - /* - Anchor to override - - */ - Ipaanchoruuid string `json:"ipaanchoruuid,omitempty"` -} + */ + Ipaanchoruuid string `json:"ipaanchoruuid,omitempty"` + } type IdoverrideuserShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - Fallback to AD DC LDAP - Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only. - */ - FallbackToLdap *bool `json:"fallback_to_ldap,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* +Fallback to AD DC LDAP +Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only. + */ + FallbackToLdap *bool `json:"fallback_to_ldap,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type idoverrideuserShowKwParams struct { - *IdoverrideuserShowArgs - *IdoverrideuserShowOptionalArgs + *IdoverrideuserShowArgs + *IdoverrideuserShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type idoverrideuserShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *IdoverrideuserShowResult `json:"result"` } type IdoverrideuserShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Idoverrideuser `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Idoverrideuser `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *IdoverrideuserShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("IdoverrideuserShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("IdoverrideuserShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("IdoverrideuserShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("IdoverrideuserShowResult%v", string(b)) } /* @@ -27611,441 +29336,444 @@ modified to match the new range. ======= */ func (c *Client) IdrangeAdd( - reqArgs *IdrangeAddArgs, - optArgs *IdrangeAddOptionalArgs, // can be nil + reqArgs *IdrangeAddArgs, + optArgs *IdrangeAddOptionalArgs, // can be nil ) (*IdrangeAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := idrangeAddKwParams{ - IdrangeAddArgs: reqArgs, - IdrangeAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "idrange_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res idrangeAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := idrangeAddKwParams{ + IdrangeAddArgs: reqArgs, + IdrangeAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "idrange_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res idrangeAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type IdrangeAddArgs struct { - - /* - Range name - - */ - Cn string `json:"cn,omitempty"` - - /* - First Posix ID of the range - - */ - Ipabaseid int `json:"ipabaseid,omitempty"` - - /* - Number of IDs in the range - - */ - Ipaidrangesize int `json:"ipaidrangesize,omitempty"` -} + + /* +Range name + + */ + Cn string `json:"cn,omitempty"` + + /* +First Posix ID of the range + + */ + Ipabaseid int `json:"ipabaseid,omitempty"` + + /* +Number of IDs in the range + + */ + Ipaidrangesize int `json:"ipaidrangesize,omitempty"` + } type IdrangeAddOptionalArgs struct { - - /* - First RID of the corresponding RID range - - */ - Ipabaserid *int `json:"ipabaserid,omitempty"` - - /* - First RID of the secondary RID range - - */ - Ipasecondarybaserid *int `json:"ipasecondarybaserid,omitempty"` - - /* - Domain SID of the trusted domain - - */ - Ipanttrusteddomainsid *string `json:"ipanttrusteddomainsid,omitempty"` - - /* - Name of the trusted domain - - */ - Ipanttrusteddomainname *string `json:"ipanttrusteddomainname,omitempty"` - - /* - Range type - ID range type, one of ipa-ad-trust-posix, ipa-ad-trust, ipa-local - */ - Iparangetype *string `json:"iparangetype,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +First RID of the corresponding RID range + + */ + Ipabaserid *int `json:"ipabaserid,omitempty"` + + /* +First RID of the secondary RID range + + */ + Ipasecondarybaserid *int `json:"ipasecondarybaserid,omitempty"` + + /* +Domain SID of the trusted domain + + */ + Ipanttrusteddomainsid *string `json:"ipanttrusteddomainsid,omitempty"` + + /* +Name of the trusted domain + + */ + Ipanttrusteddomainname *string `json:"ipanttrusteddomainname,omitempty"` + + /* +Range type +ID range type, one of ipa-ad-trust, ipa-ad-trust-posix, ipa-local + */ + Iparangetype *string `json:"iparangetype,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type idrangeAddKwParams struct { - *IdrangeAddArgs - *IdrangeAddOptionalArgs + *IdrangeAddArgs + *IdrangeAddOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type idrangeAddResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *IdrangeAddResult `json:"result"` } type IdrangeAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Idrange `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Idrange `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *IdrangeAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("IdrangeAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("IdrangeAddResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("IdrangeAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("IdrangeAddResult%v", string(b)) } /* Delete an ID range. */ func (c *Client) IdrangeDel( - reqArgs *IdrangeDelArgs, - optArgs *IdrangeDelOptionalArgs, // can be nil + reqArgs *IdrangeDelArgs, + optArgs *IdrangeDelOptionalArgs, // can be nil ) (*IdrangeDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := idrangeDelKwParams{ - IdrangeDelArgs: reqArgs, - IdrangeDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "idrange_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res idrangeDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := idrangeDelKwParams{ + IdrangeDelArgs: reqArgs, + IdrangeDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "idrange_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res idrangeDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type IdrangeDelArgs struct { + + /* +Range name - /* - Range name - - */ - Cn []string `json:"cn,omitempty"` -} + */ + Cn []string `json:"cn,omitempty"` + } type IdrangeDelOptionalArgs struct { + + /* - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` -} +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } type idrangeDelKwParams struct { - *IdrangeDelArgs - *IdrangeDelOptionalArgs + *IdrangeDelArgs + *IdrangeDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type idrangeDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *IdrangeDelResult `json:"result"` } type IdrangeDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } func (t *IdrangeDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("IdrangeDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("IdrangeDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("IdrangeDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("IdrangeDelResult%v", string(b)) } /* Search for ranges. */ func (c *Client) IdrangeFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *IdrangeFindArgs, - optArgs *IdrangeFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *IdrangeFindArgs, + optArgs *IdrangeFindOptionalArgs, // can be nil ) (*IdrangeFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := idrangeFindKwParams{ - IdrangeFindArgs: reqArgs, - IdrangeFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "idrange_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res idrangeFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := idrangeFindKwParams{ + IdrangeFindArgs: reqArgs, + IdrangeFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "idrange_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res idrangeFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type IdrangeFindArgs struct { -} + } type IdrangeFindOptionalArgs struct { - - /* - Range name - - */ - Cn *string `json:"cn,omitempty"` - - /* - First Posix ID of the range - - */ - Ipabaseid *int `json:"ipabaseid,omitempty"` - - /* - Number of IDs in the range - - */ - Ipaidrangesize *int `json:"ipaidrangesize,omitempty"` - - /* - First RID of the corresponding RID range - - */ - Ipabaserid *int `json:"ipabaserid,omitempty"` - - /* - First RID of the secondary RID range - - */ - Ipasecondarybaserid *int `json:"ipasecondarybaserid,omitempty"` - - /* - Domain SID of the trusted domain - - */ - Ipanttrusteddomainsid *string `json:"ipanttrusteddomainsid,omitempty"` - - /* - Range type - ID range type, one of ipa-ad-trust-posix, ipa-ad-trust, ipa-local - */ - Iparangetype *string `json:"iparangetype,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("name") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} + + /* +Range name + + */ + Cn *string `json:"cn,omitempty"` + + /* +First Posix ID of the range + + */ + Ipabaseid *int `json:"ipabaseid,omitempty"` + + /* +Number of IDs in the range + + */ + Ipaidrangesize *int `json:"ipaidrangesize,omitempty"` + + /* +First RID of the corresponding RID range + + */ + Ipabaserid *int `json:"ipabaserid,omitempty"` + + /* +First RID of the secondary RID range + + */ + Ipasecondarybaserid *int `json:"ipasecondarybaserid,omitempty"` + + /* +Domain SID of the trusted domain + + */ + Ipanttrusteddomainsid *string `json:"ipanttrusteddomainsid,omitempty"` + + /* +Range type +ID range type, one of ipa-ad-trust, ipa-ad-trust-posix, ipa-local + */ + Iparangetype *string `json:"iparangetype,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("name") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } type idrangeFindKwParams struct { - *IdrangeFindArgs - *IdrangeFindOptionalArgs + *IdrangeFindArgs + *IdrangeFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type idrangeFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *IdrangeFindResult `json:"result"` } type IdrangeFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Idrange `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Idrange `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *IdrangeFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("IdrangeFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("IdrangeFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("IdrangeFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("IdrangeFindResult%v", string(b)) } /* @@ -28065,1240 +29793,1261 @@ modified to match the new range. ======= */ func (c *Client) IdrangeMod( - reqArgs *IdrangeModArgs, - optArgs *IdrangeModOptionalArgs, // can be nil + reqArgs *IdrangeModArgs, + optArgs *IdrangeModOptionalArgs, // can be nil ) (*IdrangeModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := idrangeModKwParams{ - IdrangeModArgs: reqArgs, - IdrangeModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "idrange_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res idrangeModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := idrangeModKwParams{ + IdrangeModArgs: reqArgs, + IdrangeModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "idrange_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res idrangeModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type IdrangeModArgs struct { + + /* +Range name - /* - Range name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type IdrangeModOptionalArgs struct { - - /* - First Posix ID of the range - - */ - Ipabaseid *int `json:"ipabaseid,omitempty"` - - /* - Number of IDs in the range - - */ - Ipaidrangesize *int `json:"ipaidrangesize,omitempty"` - - /* - First RID of the corresponding RID range - - */ - Ipabaserid *int `json:"ipabaserid,omitempty"` - - /* - First RID of the secondary RID range - - */ - Ipasecondarybaserid *int `json:"ipasecondarybaserid,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - Domain SID of the trusted domain - - */ - Ipanttrusteddomainsid *string `json:"ipanttrusteddomainsid,omitempty"` - - /* - Name of the trusted domain - - */ - Ipanttrusteddomainname *string `json:"ipanttrusteddomainname,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +First Posix ID of the range + + */ + Ipabaseid *int `json:"ipabaseid,omitempty"` + + /* +Number of IDs in the range + + */ + Ipaidrangesize *int `json:"ipaidrangesize,omitempty"` + + /* +First RID of the corresponding RID range + + */ + Ipabaserid *int `json:"ipabaserid,omitempty"` + + /* +First RID of the secondary RID range + + */ + Ipasecondarybaserid *int `json:"ipasecondarybaserid,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* +Domain SID of the trusted domain + + */ + Ipanttrusteddomainsid *string `json:"ipanttrusteddomainsid,omitempty"` + + /* +Name of the trusted domain + + */ + Ipanttrusteddomainname *string `json:"ipanttrusteddomainname,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type idrangeModKwParams struct { - *IdrangeModArgs - *IdrangeModOptionalArgs + *IdrangeModArgs + *IdrangeModOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type idrangeModResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *IdrangeModResult `json:"result"` } type IdrangeModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Idrange `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Idrange `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *IdrangeModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("IdrangeModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("IdrangeModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("IdrangeModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("IdrangeModResult%v", string(b)) } /* Display information about a range. */ func (c *Client) IdrangeShow( - reqArgs *IdrangeShowArgs, - optArgs *IdrangeShowOptionalArgs, // can be nil + reqArgs *IdrangeShowArgs, + optArgs *IdrangeShowOptionalArgs, // can be nil ) (*IdrangeShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := idrangeShowKwParams{ - IdrangeShowArgs: reqArgs, - IdrangeShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "idrange_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res idrangeShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := idrangeShowKwParams{ + IdrangeShowArgs: reqArgs, + IdrangeShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "idrange_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res idrangeShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type IdrangeShowArgs struct { + + /* +Range name - /* - Range name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type IdrangeShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type idrangeShowKwParams struct { - *IdrangeShowArgs - *IdrangeShowOptionalArgs + *IdrangeShowArgs + *IdrangeShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type idrangeShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *IdrangeShowResult `json:"result"` } type IdrangeShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Idrange `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Idrange `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *IdrangeShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("IdrangeShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("IdrangeShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("IdrangeShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("IdrangeShowResult%v", string(b)) } /* Add a new ID View. */ func (c *Client) IdviewAdd( - reqArgs *IdviewAddArgs, - optArgs *IdviewAddOptionalArgs, // can be nil + reqArgs *IdviewAddArgs, + optArgs *IdviewAddOptionalArgs, // can be nil ) (*IdviewAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := idviewAddKwParams{ - IdviewAddArgs: reqArgs, - IdviewAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "idview_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res idviewAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := idviewAddKwParams{ + IdviewAddArgs: reqArgs, + IdviewAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "idview_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res idviewAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type IdviewAddArgs struct { + + /* +ID View Name - /* - ID View Name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type IdviewAddOptionalArgs struct { - - /* - Description - - */ - Description *string `json:"description,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Description + + */ + Description *string `json:"description,omitempty"` + + /* +Domain resolution order +colon-separated list of domains used for short name qualification + */ + Ipadomainresolutionorder *string `json:"ipadomainresolutionorder,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type idviewAddKwParams struct { - *IdviewAddArgs - *IdviewAddOptionalArgs + *IdviewAddArgs + *IdviewAddOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type idviewAddResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *IdviewAddResult `json:"result"` } type IdviewAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Idview `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Idview `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *IdviewAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("IdviewAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("IdviewAddResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("IdviewAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("IdviewAddResult%v", string(b)) } /* Applies ID View to specified hosts or current members of specified hostgroups. If any other ID View is applied to the host, it is overridden. */ func (c *Client) IdviewApply( - reqArgs *IdviewApplyArgs, - optArgs *IdviewApplyOptionalArgs, // can be nil + reqArgs *IdviewApplyArgs, + optArgs *IdviewApplyOptionalArgs, // can be nil ) (*IdviewApplyResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := idviewApplyKwParams{ - IdviewApplyArgs: reqArgs, - IdviewApplyOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "idview_apply", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res idviewApplyResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := idviewApplyKwParams{ + IdviewApplyArgs: reqArgs, + IdviewApplyOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "idview_apply", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res idviewApplyResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type IdviewApplyArgs struct { + + /* +ID View Name - /* - ID View Name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type IdviewApplyOptionalArgs struct { - - /* - hosts - Hosts to apply the ID View to - */ - Host *[]string `json:"host,omitempty"` - - /* - hostgroups - Hostgroups to whose hosts apply the ID View to. Please note that view is not applied automatically to any hosts added to the hostgroup after running the idview-apply command. - */ - Hostgroup *[]string `json:"hostgroup,omitempty"` -} + + /* +hosts +Hosts to apply the ID View to + */ + Host *[]string `json:"host,omitempty"` + + /* +hostgroups +Hostgroups to whose hosts apply the ID View to. Please note that view is not applied automatically to any hosts added to the hostgroup after running the idview-apply command. + */ + Hostgroup *[]string `json:"hostgroup,omitempty"` + } type idviewApplyKwParams struct { - *IdviewApplyArgs - *IdviewApplyOptionalArgs + *IdviewApplyArgs + *IdviewApplyOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type idviewApplyResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *IdviewApplyResult `json:"result"` } type IdviewApplyResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - Hosts that this ID View was applied to. - (required) - */ - Succeeded interface{} `json:"succeeded,omitempty"` - - /* - Hosts or hostgroups that this ID View could not be applied to. - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of hosts the ID View was applied to: - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +Hosts that this ID View was applied to. + (required) + */ + Succeeded interface{} `json:"succeeded,omitempty"` + + /* +Hosts or hostgroups that this ID View could not be applied to. + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of hosts the ID View was applied to: + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *IdviewApplyResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("IdviewApplyResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("IdviewApplyResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("IdviewApplyResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("IdviewApplyResult%v", string(b)) } /* Delete an ID View. */ func (c *Client) IdviewDel( - reqArgs *IdviewDelArgs, - optArgs *IdviewDelOptionalArgs, // can be nil + reqArgs *IdviewDelArgs, + optArgs *IdviewDelOptionalArgs, // can be nil ) (*IdviewDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := idviewDelKwParams{ - IdviewDelArgs: reqArgs, - IdviewDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "idview_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res idviewDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := idviewDelKwParams{ + IdviewDelArgs: reqArgs, + IdviewDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "idview_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res idviewDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type IdviewDelArgs struct { + + /* +ID View Name - /* - ID View Name - - */ - Cn []string `json:"cn,omitempty"` -} + */ + Cn []string `json:"cn,omitempty"` + } type IdviewDelOptionalArgs struct { + + /* - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` -} +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } type idviewDelKwParams struct { - *IdviewDelArgs - *IdviewDelOptionalArgs + *IdviewDelArgs + *IdviewDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type idviewDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *IdviewDelResult `json:"result"` } type IdviewDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } func (t *IdviewDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("IdviewDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("IdviewDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("IdviewDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("IdviewDelResult%v", string(b)) } /* Search for an ID View. */ func (c *Client) IdviewFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *IdviewFindArgs, - optArgs *IdviewFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *IdviewFindArgs, + optArgs *IdviewFindOptionalArgs, // can be nil ) (*IdviewFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := idviewFindKwParams{ - IdviewFindArgs: reqArgs, - IdviewFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "idview_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res idviewFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := idviewFindKwParams{ + IdviewFindArgs: reqArgs, + IdviewFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "idview_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res idviewFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type IdviewFindArgs struct { -} + } type IdviewFindOptionalArgs struct { - - /* - ID View Name - - */ - Cn *string `json:"cn,omitempty"` - - /* - Description - - */ - Description *string `json:"description,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("name") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} + + /* +ID View Name + + */ + Cn *string `json:"cn,omitempty"` + + /* +Description + + */ + Description *string `json:"description,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("name") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } type idviewFindKwParams struct { - *IdviewFindArgs - *IdviewFindOptionalArgs + *IdviewFindArgs + *IdviewFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type idviewFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *IdviewFindResult `json:"result"` } type IdviewFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Idview `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Idview `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *IdviewFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("IdviewFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("IdviewFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("IdviewFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("IdviewFindResult%v", string(b)) } /* Modify an ID View. */ func (c *Client) IdviewMod( - reqArgs *IdviewModArgs, - optArgs *IdviewModOptionalArgs, // can be nil + reqArgs *IdviewModArgs, + optArgs *IdviewModOptionalArgs, // can be nil ) (*IdviewModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := idviewModKwParams{ - IdviewModArgs: reqArgs, - IdviewModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "idview_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res idviewModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := idviewModKwParams{ + IdviewModArgs: reqArgs, + IdviewModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "idview_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res idviewModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type IdviewModArgs struct { + + /* +ID View Name - /* - ID View Name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type IdviewModOptionalArgs struct { - - /* - Description - - */ - Description *string `json:"description,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - Rename - Rename the ID View object - */ - Rename *string `json:"rename,omitempty"` -} + + /* +Description + + */ + Description *string `json:"description,omitempty"` + + /* +Domain resolution order +colon-separated list of domains used for short name qualification + */ + Ipadomainresolutionorder *string `json:"ipadomainresolutionorder,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Rename +Rename the ID View object + */ + Rename *string `json:"rename,omitempty"` + } type idviewModKwParams struct { - *IdviewModArgs - *IdviewModOptionalArgs + *IdviewModArgs + *IdviewModOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type idviewModResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *IdviewModResult `json:"result"` } type IdviewModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Idview `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Idview `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *IdviewModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("IdviewModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("IdviewModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("IdviewModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("IdviewModResult%v", string(b)) } /* Display information about an ID View. */ func (c *Client) IdviewShow( - reqArgs *IdviewShowArgs, - optArgs *IdviewShowOptionalArgs, // can be nil + reqArgs *IdviewShowArgs, + optArgs *IdviewShowOptionalArgs, // can be nil ) (*IdviewShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := idviewShowKwParams{ - IdviewShowArgs: reqArgs, - IdviewShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "idview_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res idviewShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := idviewShowKwParams{ + IdviewShowArgs: reqArgs, + IdviewShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "idview_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res idviewShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type IdviewShowArgs struct { + + /* +ID View Name - /* - ID View Name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type IdviewShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Enumerate all the hosts the view applies to. - */ - ShowHosts *bool `json:"show_hosts,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Enumerate all the hosts the view applies to. + */ + ShowHosts *bool `json:"show_hosts,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type idviewShowKwParams struct { - *IdviewShowArgs - *IdviewShowOptionalArgs + *IdviewShowArgs + *IdviewShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type idviewShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *IdviewShowResult `json:"result"` } type IdviewShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Idview `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Idview `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *IdviewShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("IdviewShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("IdviewShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("IdviewShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("IdviewShowResult%v", string(b)) } /* Clears ID View from specified hosts or current members of specified hostgroups. */ func (c *Client) IdviewUnapply( - reqArgs *IdviewUnapplyArgs, - optArgs *IdviewUnapplyOptionalArgs, // can be nil + reqArgs *IdviewUnapplyArgs, + optArgs *IdviewUnapplyOptionalArgs, // can be nil ) (*IdviewUnapplyResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := idviewUnapplyKwParams{ - IdviewUnapplyArgs: reqArgs, - IdviewUnapplyOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "idview_unapply", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res idviewUnapplyResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := idviewUnapplyKwParams{ + IdviewUnapplyArgs: reqArgs, + IdviewUnapplyOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "idview_unapply", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res idviewUnapplyResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type IdviewUnapplyArgs struct { -} + } type IdviewUnapplyOptionalArgs struct { - - /* - hosts - Hosts to clear (any) ID View from. - */ - Host *[]string `json:"host,omitempty"` - - /* - hostgroups - Hostgroups whose hosts should have ID Views cleared. Note that view is not cleared automatically from any host added to the hostgroup after running idview-unapply command. - */ - Hostgroup *[]string `json:"hostgroup,omitempty"` -} + + /* +hosts +Hosts to clear (any) ID View from. + */ + Host *[]string `json:"host,omitempty"` + + /* +hostgroups +Hostgroups whose hosts should have ID Views cleared. Note that view is not cleared automatically from any host added to the hostgroup after running idview-unapply command. + */ + Hostgroup *[]string `json:"hostgroup,omitempty"` + } type idviewUnapplyKwParams struct { - *IdviewUnapplyArgs - *IdviewUnapplyOptionalArgs + *IdviewUnapplyArgs + *IdviewUnapplyOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type idviewUnapplyResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *IdviewUnapplyResult `json:"result"` } type IdviewUnapplyResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - Hosts that ID View was cleared from. - (required) - */ - Succeeded interface{} `json:"succeeded,omitempty"` - - /* - Hosts or hostgroups that ID View could not be cleared from. - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of hosts that had a ID View was unset: - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +Hosts that ID View was cleared from. + (required) + */ + Succeeded interface{} `json:"succeeded,omitempty"` + + /* +Hosts or hostgroups that ID View could not be cleared from. + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of hosts that had a ID View was unset: + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *IdviewUnapplyResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("IdviewUnapplyResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("IdviewUnapplyResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("IdviewUnapplyResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("IdviewUnapplyResult%v", string(b)) } /* Join an IPA domain */ func (c *Client) Join( - reqArgs *JoinArgs, - optArgs *JoinOptionalArgs, // can be nil + reqArgs *JoinArgs, + optArgs *JoinOptionalArgs, // can be nil ) (*JoinResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := joinKwParams{ - JoinArgs: reqArgs, - JoinOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "join", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res joinResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := joinKwParams{ + JoinArgs: reqArgs, + JoinOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "join", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res joinResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type JoinArgs struct { + + /* - /* - - The hostname to register as - */ - Cn string `json:"cn,omitempty"` - - /* +The hostname to register as + */ + Cn string `json:"cn,omitempty"` + + /* - The IPA realm - */ - Realm string `json:"realm,omitempty"` -} +The IPA realm + */ + Realm string `json:"realm,omitempty"` + } type JoinOptionalArgs struct { + + /* - /* - - Hardware platform of the host (e.g. Lenovo T61) - */ - Nshardwareplatform *string `json:"nshardwareplatform,omitempty"` +Hardware platform of the host (e.g. Lenovo T61) + */ + Nshardwareplatform *string `json:"nshardwareplatform,omitempty"` + + /* - /* - - Operating System and version of the host (e.g. Fedora 9) - */ - Nsosversion *string `json:"nsosversion,omitempty"` -} +Operating System and version of the host (e.g. Fedora 9) + */ + Nsosversion *string `json:"nsosversion,omitempty"` + } type joinKwParams struct { - *JoinArgs - *JoinOptionalArgs + *JoinArgs + *JoinOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type joinResponse struct { @@ -29307,5908 +31056,5949 @@ type joinResponse struct { } type JoinResult struct { -} + + } func (t *JoinResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("JoinResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("JoinResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("JoinResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("JoinResult%v", string(b)) } /* Export plugin meta-data for the webUI. */ func (c *Client) JSONMetadata( - objname string, // Name of object to export - methodname string, // Name of method to export - reqArgs *JSONMetadataArgs, - optArgs *JSONMetadataOptionalArgs, // can be nil + objname string, // Name of object to export + methodname string, // Name of method to export + reqArgs *JSONMetadataArgs, + optArgs *JSONMetadataOptionalArgs, // can be nil ) (*JSONMetadataResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := jsonMetadataKwParams{ - JSONMetadataArgs: reqArgs, - JSONMetadataOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "json_metadata", - Params: []interface{}{ - []interface{}{objname, methodname}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res jsonMetadataResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := jsonMetadataKwParams{ + JSONMetadataArgs: reqArgs, + JSONMetadataOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "json_metadata", + Params: []interface{}{ + []interface{}{objname, methodname, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res jsonMetadataResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type JSONMetadataArgs struct { -} + } type JSONMetadataOptionalArgs struct { - - /* - - Name of object to export - */ - Object *string `json:"object,omitempty"` - - /* - - Name of method to export - */ - Method *string `json:"method,omitempty"` - - /* - - Name of command to export - */ - Command *string `json:"command,omitempty"` -} + + /* + +Name of object to export + */ + Object *string `json:"object,omitempty"` + + /* + +Name of method to export + */ + Method *string `json:"method,omitempty"` + + /* + +Name of command to export + */ + Command *string `json:"command,omitempty"` + } type jsonMetadataKwParams struct { - *JSONMetadataArgs - *JSONMetadataOptionalArgs + *JSONMetadataArgs + *JSONMetadataOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type jsonMetadataResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *JSONMetadataResult `json:"result"` } type JSONMetadataResult struct { - - /* - Dict of JSON encoded IPA Objects - (required) - */ - Objects interface{} `json:"objects,omitempty"` - - /* - Dict of JSON encoded IPA Methods - (required) - */ - Methods interface{} `json:"methods,omitempty"` - - /* - Dict of JSON encoded IPA Commands - (required) - */ - Commands interface{} `json:"commands,omitempty"` -} + + + /* +Dict of JSON encoded IPA Objects + (required) + */ + Objects interface{} `json:"objects,omitempty"` + + /* +Dict of JSON encoded IPA Methods + (required) + */ + Methods interface{} `json:"methods,omitempty"` + + /* +Dict of JSON encoded IPA Commands + (required) + */ + Commands interface{} `json:"commands,omitempty"` + } func (t *JSONMetadataResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("JSONMetadataResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("JSONMetadataResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("JSONMetadataResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("JSONMetadataResult%v", string(b)) } /* - */ +*/ func (c *Client) KraIsEnabled( - reqArgs *KraIsEnabledArgs, - optArgs *KraIsEnabledOptionalArgs, // can be nil + reqArgs *KraIsEnabledArgs, + optArgs *KraIsEnabledOptionalArgs, // can be nil ) (*KraIsEnabledResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := kraIsEnabledKwParams{ - KraIsEnabledArgs: reqArgs, - KraIsEnabledOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "kra_is_enabled", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res kraIsEnabledResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := kraIsEnabledKwParams{ + KraIsEnabledArgs: reqArgs, + KraIsEnabledOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "kra_is_enabled", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res kraIsEnabledResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type KraIsEnabledArgs struct { -} + } type KraIsEnabledOptionalArgs struct { -} + } type kraIsEnabledKwParams struct { - *KraIsEnabledArgs - *KraIsEnabledOptionalArgs + *KraIsEnabledArgs + *KraIsEnabledOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type kraIsEnabledResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *KraIsEnabledResult `json:"result"` } type KraIsEnabledResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - True means the operation was successful - (required) - */ - Result bool `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value interface{} `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value interface{} `json:"value,omitempty"` + } func (t *KraIsEnabledResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("KraIsEnabledResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("KraIsEnabledResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("KraIsEnabledResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("KraIsEnabledResult%v", string(b)) } /* Modify Kerberos ticket policy. */ func (c *Client) KrbtpolicyMod( - uid string, // Manage ticket policy for specific user - reqArgs *KrbtpolicyModArgs, - optArgs *KrbtpolicyModOptionalArgs, // can be nil + uid string, // Manage ticket policy for specific user + reqArgs *KrbtpolicyModArgs, + optArgs *KrbtpolicyModOptionalArgs, // can be nil ) (*KrbtpolicyModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := krbtpolicyModKwParams{ - KrbtpolicyModArgs: reqArgs, - KrbtpolicyModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "krbtpolicy_mod", - Params: []interface{}{ - []interface{}{uid}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res krbtpolicyModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := krbtpolicyModKwParams{ + KrbtpolicyModArgs: reqArgs, + KrbtpolicyModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "krbtpolicy_mod", + Params: []interface{}{ + []interface{}{uid, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res krbtpolicyModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type KrbtpolicyModArgs struct { -} + } type KrbtpolicyModOptionalArgs struct { - - /* - Max life - Maximum ticket life (seconds) - */ - Krbmaxticketlife *int `json:"krbmaxticketlife,omitempty"` - - /* - Max renew - Maximum renewable age (seconds) - */ - Krbmaxrenewableage *int `json:"krbmaxrenewableage,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Max life +Maximum ticket life (seconds) + */ + Krbmaxticketlife *int `json:"krbmaxticketlife,omitempty"` + + /* +Max renew +Maximum renewable age (seconds) + */ + Krbmaxrenewableage *int `json:"krbmaxrenewableage,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type krbtpolicyModKwParams struct { - *KrbtpolicyModArgs - *KrbtpolicyModOptionalArgs + *KrbtpolicyModArgs + *KrbtpolicyModOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type krbtpolicyModResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *KrbtpolicyModResult `json:"result"` } type KrbtpolicyModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Krbtpolicy `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Krbtpolicy `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *KrbtpolicyModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("KrbtpolicyModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("KrbtpolicyModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("KrbtpolicyModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("KrbtpolicyModResult%v", string(b)) } /* Reset Kerberos ticket policy to the default values. */ func (c *Client) KrbtpolicyReset( - uid string, // Manage ticket policy for specific user - reqArgs *KrbtpolicyResetArgs, - optArgs *KrbtpolicyResetOptionalArgs, // can be nil + uid string, // Manage ticket policy for specific user + reqArgs *KrbtpolicyResetArgs, + optArgs *KrbtpolicyResetOptionalArgs, // can be nil ) (*KrbtpolicyResetResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := krbtpolicyResetKwParams{ - KrbtpolicyResetArgs: reqArgs, - KrbtpolicyResetOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "krbtpolicy_reset", - Params: []interface{}{ - []interface{}{uid}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res krbtpolicyResetResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := krbtpolicyResetKwParams{ + KrbtpolicyResetArgs: reqArgs, + KrbtpolicyResetOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "krbtpolicy_reset", + Params: []interface{}{ + []interface{}{uid, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res krbtpolicyResetResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type KrbtpolicyResetArgs struct { -} + } type KrbtpolicyResetOptionalArgs struct { + + /* - /* +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type krbtpolicyResetKwParams struct { - *KrbtpolicyResetArgs - *KrbtpolicyResetOptionalArgs + *KrbtpolicyResetArgs + *KrbtpolicyResetOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type krbtpolicyResetResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *KrbtpolicyResetResult `json:"result"` } type KrbtpolicyResetResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *KrbtpolicyResetResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("KrbtpolicyResetResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("KrbtpolicyResetResult%v", string(b)) +func (t *KrbtpolicyResetResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("KrbtpolicyResetResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("KrbtpolicyResetResult%v", string(b)) } /* Display the current Kerberos ticket policy. */ func (c *Client) KrbtpolicyShow( - uid string, // Manage ticket policy for specific user - reqArgs *KrbtpolicyShowArgs, - optArgs *KrbtpolicyShowOptionalArgs, // can be nil + uid string, // Manage ticket policy for specific user + reqArgs *KrbtpolicyShowArgs, + optArgs *KrbtpolicyShowOptionalArgs, // can be nil ) (*KrbtpolicyShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := krbtpolicyShowKwParams{ - KrbtpolicyShowArgs: reqArgs, - KrbtpolicyShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "krbtpolicy_show", - Params: []interface{}{ - []interface{}{uid}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res krbtpolicyShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := krbtpolicyShowKwParams{ + KrbtpolicyShowArgs: reqArgs, + KrbtpolicyShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "krbtpolicy_show", + Params: []interface{}{ + []interface{}{uid, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res krbtpolicyShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type KrbtpolicyShowArgs struct { -} + } type KrbtpolicyShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type krbtpolicyShowKwParams struct { - *KrbtpolicyShowArgs - *KrbtpolicyShowOptionalArgs + *KrbtpolicyShowArgs + *KrbtpolicyShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type krbtpolicyShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *KrbtpolicyShowResult `json:"result"` } type KrbtpolicyShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Krbtpolicy `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Krbtpolicy `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *KrbtpolicyShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("KrbtpolicyShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("KrbtpolicyShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("KrbtpolicyShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("KrbtpolicyShowResult%v", string(b)) } /* Add a new IPA location. */ func (c *Client) LocationAdd( - reqArgs *LocationAddArgs, - optArgs *LocationAddOptionalArgs, // can be nil + reqArgs *LocationAddArgs, + optArgs *LocationAddOptionalArgs, // can be nil ) (*LocationAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := locationAddKwParams{ - LocationAddArgs: reqArgs, - LocationAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "location_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res locationAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := locationAddKwParams{ + LocationAddArgs: reqArgs, + LocationAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "location_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res locationAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type LocationAddArgs struct { - - /* - Location name - IPA location name - */ - Idnsname string `json:"idnsname,omitempty"` -} + + /* +Location name +IPA location name + */ + Idnsname string `json:"idnsname,omitempty"` + } type LocationAddOptionalArgs struct { - - /* - Description - IPA Location description - */ - Description *string `json:"description,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Description +IPA Location description + */ + Description *string `json:"description,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type locationAddKwParams struct { - *LocationAddArgs - *LocationAddOptionalArgs + *LocationAddArgs + *LocationAddOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type locationAddResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *LocationAddResult `json:"result"` } type LocationAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Location `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Location `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *LocationAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("LocationAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("LocationAddResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("LocationAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("LocationAddResult%v", string(b)) } /* Delete an IPA location. */ func (c *Client) LocationDel( - reqArgs *LocationDelArgs, - optArgs *LocationDelOptionalArgs, // can be nil + reqArgs *LocationDelArgs, + optArgs *LocationDelOptionalArgs, // can be nil ) (*LocationDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := locationDelKwParams{ - LocationDelArgs: reqArgs, - LocationDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "location_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res locationDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := locationDelKwParams{ + LocationDelArgs: reqArgs, + LocationDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "location_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res locationDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type LocationDelArgs struct { - - /* - Location name - IPA location name - */ - Idnsname []string `json:"idnsname,omitempty"` -} + + /* +Location name +IPA location name + */ + Idnsname []string `json:"idnsname,omitempty"` + } type LocationDelOptionalArgs struct { + + /* - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` -} +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } type locationDelKwParams struct { - *LocationDelArgs - *LocationDelOptionalArgs + *LocationDelArgs + *LocationDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type locationDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *LocationDelResult `json:"result"` } type LocationDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } func (t *LocationDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("LocationDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("LocationDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("LocationDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("LocationDelResult%v", string(b)) } /* Search for IPA locations. */ func (c *Client) LocationFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *LocationFindArgs, - optArgs *LocationFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *LocationFindArgs, + optArgs *LocationFindOptionalArgs, // can be nil ) (*LocationFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := locationFindKwParams{ - LocationFindArgs: reqArgs, - LocationFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "location_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res locationFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := locationFindKwParams{ + LocationFindArgs: reqArgs, + LocationFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "location_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res locationFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type LocationFindArgs struct { -} + } type LocationFindOptionalArgs struct { - - /* - Location name - IPA location name - */ - Idnsname *string `json:"idnsname,omitempty"` - - /* - Description - IPA Location description - */ - Description *string `json:"description,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("name") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} + + /* +Location name +IPA location name + */ + Idnsname *string `json:"idnsname,omitempty"` + + /* +Description +IPA Location description + */ + Description *string `json:"description,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("name") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } type locationFindKwParams struct { - *LocationFindArgs - *LocationFindOptionalArgs + *LocationFindArgs + *LocationFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type locationFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *LocationFindResult `json:"result"` } type LocationFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Location `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Location `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *LocationFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("LocationFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("LocationFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("LocationFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("LocationFindResult%v", string(b)) } /* Modify information about an IPA location. */ func (c *Client) LocationMod( - reqArgs *LocationModArgs, - optArgs *LocationModOptionalArgs, // can be nil + reqArgs *LocationModArgs, + optArgs *LocationModOptionalArgs, // can be nil ) (*LocationModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := locationModKwParams{ - LocationModArgs: reqArgs, - LocationModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "location_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res locationModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := locationModKwParams{ + LocationModArgs: reqArgs, + LocationModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "location_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res locationModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type LocationModArgs struct { - - /* - Location name - IPA location name - */ - Idnsname string `json:"idnsname,omitempty"` -} + + /* +Location name +IPA location name + */ + Idnsname string `json:"idnsname,omitempty"` + } type LocationModOptionalArgs struct { - - /* - Description - IPA Location description - */ - Description *string `json:"description,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Description +IPA Location description + */ + Description *string `json:"description,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type locationModKwParams struct { - *LocationModArgs - *LocationModOptionalArgs + *LocationModArgs + *LocationModOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type locationModResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *LocationModResult `json:"result"` } type LocationModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Location `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Location `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *LocationModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("LocationModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("LocationModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("LocationModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("LocationModResult%v", string(b)) } /* Display information about an IPA location. */ func (c *Client) LocationShow( - reqArgs *LocationShowArgs, - optArgs *LocationShowOptionalArgs, // can be nil + reqArgs *LocationShowArgs, + optArgs *LocationShowOptionalArgs, // can be nil ) (*LocationShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := locationShowKwParams{ - LocationShowArgs: reqArgs, - LocationShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "location_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res locationShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := locationShowKwParams{ + LocationShowArgs: reqArgs, + LocationShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "location_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res locationShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type LocationShowArgs struct { - - /* - Location name - IPA location name - */ - Idnsname string `json:"idnsname,omitempty"` -} + + /* +Location name +IPA location name + */ + Idnsname string `json:"idnsname,omitempty"` + } type LocationShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type locationShowKwParams struct { - *LocationShowArgs - *LocationShowOptionalArgs + *LocationShowArgs + *LocationShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type locationShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *LocationShowResult `json:"result"` } type LocationShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Location `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` - - /* - Servers in location - (required) - */ - Servers interface{} `json:"servers,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Location `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + + /* +Servers in location + (required) + */ + Servers interface{} `json:"servers,omitempty"` + } func (t *LocationShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("LocationShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("LocationShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("LocationShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("LocationShowResult%v", string(b)) } /* Migrate users and groups from DS to IPA. */ func (c *Client) MigrateDs( - reqArgs *MigrateDsArgs, - optArgs *MigrateDsOptionalArgs, // can be nil + reqArgs *MigrateDsArgs, + optArgs *MigrateDsOptionalArgs, // can be nil ) (*MigrateDsResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := migrateDsKwParams{ - MigrateDsArgs: reqArgs, - MigrateDsOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "migrate_ds", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res migrateDsResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := migrateDsKwParams{ + MigrateDsArgs: reqArgs, + MigrateDsOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "migrate_ds", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res migrateDsResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type MigrateDsArgs struct { - - /* - LDAP URI - LDAP URI of DS server to migrate from - */ - Ldapuri string `json:"ldapuri,omitempty"` - - /* - Password - bind password - */ - Bindpw string `json:"bindpw,omitempty"` -} + + /* +LDAP URI +LDAP URI of DS server to migrate from + */ + Ldapuri string `json:"ldapuri,omitempty"` + + /* +Password +bind password + */ + Bindpw string `json:"bindpw,omitempty"` + } type MigrateDsOptionalArgs struct { - - /* - Bind DN - - */ - Binddn *string `json:"binddn,omitempty"` - - /* - User container - DN of container for users in DS relative to base DN - */ - Usercontainer *string `json:"usercontainer,omitempty"` - - /* - Group container - DN of container for groups in DS relative to base DN - */ - Groupcontainer *string `json:"groupcontainer,omitempty"` - - /* - User object class - Objectclasses used to search for user entries in DS - */ - Userobjectclass *[]string `json:"userobjectclass,omitempty"` - - /* - Group object class - Objectclasses used to search for group entries in DS - */ - Groupobjectclass *[]string `json:"groupobjectclass,omitempty"` - - /* - Ignore user object class - Objectclasses to be ignored for user entries in DS - */ - Userignoreobjectclass *[]string `json:"userignoreobjectclass,omitempty"` - - /* - Ignore user attribute - Attributes to be ignored for user entries in DS - */ - Userignoreattribute *[]string `json:"userignoreattribute,omitempty"` - - /* - Ignore group object class - Objectclasses to be ignored for group entries in DS - */ - Groupignoreobjectclass *[]string `json:"groupignoreobjectclass,omitempty"` - - /* - Ignore group attribute - Attributes to be ignored for group entries in DS - */ - Groupignoreattribute *[]string `json:"groupignoreattribute,omitempty"` - - /* - Overwrite GID - When migrating a group already existing in IPA domain overwrite the group GID and report as success - */ - Groupoverwritegid *bool `json:"groupoverwritegid,omitempty"` - - /* - LDAP schema - The schema used on the LDAP server. Supported values are RFC2307 and RFC2307bis. The default is RFC2307bis - */ - Schema *string `json:"schema,omitempty"` - - /* - Continue - Continuous operation mode. Errors are reported but the process continues - */ - Continue *bool `json:"continue,omitempty"` - - /* - Base DN - Base DN on remote LDAP server - */ - Basedn *string `json:"basedn,omitempty"` - - /* - Ignore compat plugin - Allows migration despite the usage of compat plugin - */ - Compat *bool `json:"compat,omitempty"` - - /* - CA certificate - Load CA certificate of LDAP server from FILE - */ - Cacertfile *string `json:"cacertfile,omitempty"` - - /* - Add to default group - Add migrated users without a group to a default group (default: true) - */ - UseDefGroup *bool `json:"use_def_group,omitempty"` - - /* - Search scope - LDAP search scope for users and groups: base, onelevel, or subtree. Defaults to onelevel - */ - Scope *string `json:"scope,omitempty"` - - /* - - groups to exclude from migration - */ - ExcludeGroups *[]string `json:"exclude_groups,omitempty"` - - /* - - users to exclude from migration - */ - ExcludeUsers *[]string `json:"exclude_users,omitempty"` -} + + /* +Bind DN + + */ + Binddn *string `json:"binddn,omitempty"` + + /* +User container +DN of container for users in DS relative to base DN + */ + Usercontainer *string `json:"usercontainer,omitempty"` + + /* +Group container +DN of container for groups in DS relative to base DN + */ + Groupcontainer *string `json:"groupcontainer,omitempty"` + + /* +User object class +Objectclasses used to search for user entries in DS + */ + Userobjectclass *[]string `json:"userobjectclass,omitempty"` + + /* +Group object class +Objectclasses used to search for group entries in DS + */ + Groupobjectclass *[]string `json:"groupobjectclass,omitempty"` + + /* +Ignore user object class +Objectclasses to be ignored for user entries in DS + */ + Userignoreobjectclass *[]string `json:"userignoreobjectclass,omitempty"` + + /* +Ignore user attribute +Attributes to be ignored for user entries in DS + */ + Userignoreattribute *[]string `json:"userignoreattribute,omitempty"` + + /* +Ignore group object class +Objectclasses to be ignored for group entries in DS + */ + Groupignoreobjectclass *[]string `json:"groupignoreobjectclass,omitempty"` + + /* +Ignore group attribute +Attributes to be ignored for group entries in DS + */ + Groupignoreattribute *[]string `json:"groupignoreattribute,omitempty"` + + /* +Overwrite GID +When migrating a group already existing in IPA domain overwrite the group GID and report as success + */ + Groupoverwritegid *bool `json:"groupoverwritegid,omitempty"` + + /* +LDAP schema +The schema used on the LDAP server. Supported values are RFC2307 and RFC2307bis. The default is RFC2307bis + */ + Schema *string `json:"schema,omitempty"` + + /* +Continue +Continuous operation mode. Errors are reported but the process continues + */ + Continue *bool `json:"continue,omitempty"` + + /* +Base DN +Base DN on remote LDAP server + */ + Basedn *string `json:"basedn,omitempty"` + + /* +Ignore compat plugin +Allows migration despite the usage of compat plugin + */ + Compat *bool `json:"compat,omitempty"` + + /* +CA certificate +Load CA certificate of LDAP server from FILE + */ + Cacertfile *string `json:"cacertfile,omitempty"` + + /* +Add to default group +Add migrated users without a group to a default group (default: true) + */ + UseDefGroup *bool `json:"use_def_group,omitempty"` + + /* +Search scope +LDAP search scope for users and groups: base, onelevel, or subtree. Defaults to onelevel + */ + Scope *string `json:"scope,omitempty"` + + /* + +groups to exclude from migration + */ + ExcludeGroups *[]string `json:"exclude_groups,omitempty"` + + /* + +users to exclude from migration + */ + ExcludeUsers *[]string `json:"exclude_users,omitempty"` + } type migrateDsKwParams struct { - *MigrateDsArgs - *MigrateDsOptionalArgs + *MigrateDsArgs + *MigrateDsOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type migrateDsResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *MigrateDsResult `json:"result"` } type MigrateDsResult struct { - - /* - Lists of objects migrated; categorized by type. - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Lists of objects that could not be migrated; categorized by type. - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - False if migration mode was disabled. - (required) - */ - Enabled bool `json:"enabled,omitempty"` - - /* - False if migration fails because the compatibility plug-in is enabled. - (required) - */ - Compat bool `json:"compat,omitempty"` -} + + + /* +Lists of objects migrated; categorized by type. + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Lists of objects that could not be migrated; categorized by type. + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +False if migration mode was disabled. + (required) + */ + Enabled bool `json:"enabled,omitempty"` + + /* +False if migration fails because the compatibility plug-in is enabled. + (required) + */ + Compat bool `json:"compat,omitempty"` + } func (t *MigrateDsResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("MigrateDsResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("MigrateDsResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("MigrateDsResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("MigrateDsResult%v", string(b)) } /* Add a new netgroup. */ func (c *Client) NetgroupAdd( - reqArgs *NetgroupAddArgs, - optArgs *NetgroupAddOptionalArgs, // can be nil + reqArgs *NetgroupAddArgs, + optArgs *NetgroupAddOptionalArgs, // can be nil ) (*NetgroupAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := netgroupAddKwParams{ - NetgroupAddArgs: reqArgs, - NetgroupAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "netgroup_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res netgroupAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := netgroupAddKwParams{ + NetgroupAddArgs: reqArgs, + NetgroupAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "netgroup_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res netgroupAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type NetgroupAddArgs struct { + + /* +Netgroup name - /* - Netgroup name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type NetgroupAddOptionalArgs struct { - - /* - Description - Netgroup description - */ - Description *string `json:"description,omitempty"` - - /* - NIS domain name - - */ - Nisdomainname *string `json:"nisdomainname,omitempty"` - - /* - User category - User category the rule applies to - */ - Usercategory *string `json:"usercategory,omitempty"` - - /* - Host category - Host category the rule applies to - */ - Hostcategory *string `json:"hostcategory,omitempty"` - - /* - External host - - */ - Externalhost *[]string `json:"externalhost,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Description +Netgroup description + */ + Description *string `json:"description,omitempty"` + + /* +NIS domain name + + */ + Nisdomainname *string `json:"nisdomainname,omitempty"` + + /* +User category +User category the rule applies to + */ + Usercategory *string `json:"usercategory,omitempty"` + + /* +Host category +Host category the rule applies to + */ + Hostcategory *string `json:"hostcategory,omitempty"` + + /* +External host + + */ + Externalhost *[]string `json:"externalhost,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type netgroupAddKwParams struct { - *NetgroupAddArgs - *NetgroupAddOptionalArgs + *NetgroupAddArgs + *NetgroupAddOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type netgroupAddResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *NetgroupAddResult `json:"result"` } type NetgroupAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Netgroup `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Netgroup `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *NetgroupAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("NetgroupAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("NetgroupAddResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("NetgroupAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("NetgroupAddResult%v", string(b)) } /* Add members to a netgroup. */ func (c *Client) NetgroupAddMember( - reqArgs *NetgroupAddMemberArgs, - optArgs *NetgroupAddMemberOptionalArgs, // can be nil + reqArgs *NetgroupAddMemberArgs, + optArgs *NetgroupAddMemberOptionalArgs, // can be nil ) (*NetgroupAddMemberResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := netgroupAddMemberKwParams{ - NetgroupAddMemberArgs: reqArgs, - NetgroupAddMemberOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "netgroup_add_member", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res netgroupAddMemberResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := netgroupAddMemberKwParams{ + NetgroupAddMemberArgs: reqArgs, + NetgroupAddMemberOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "netgroup_add_member", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res netgroupAddMemberResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type NetgroupAddMemberArgs struct { + + /* +Netgroup name - /* - Netgroup name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type NetgroupAddMemberOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member user - users to add - */ - User *[]string `json:"user,omitempty"` - - /* - member group - groups to add - */ - Group *[]string `json:"group,omitempty"` - - /* - member host - hosts to add - */ - Host *[]string `json:"host,omitempty"` - - /* - member host group - host groups to add - */ - Hostgroup *[]string `json:"hostgroup,omitempty"` - - /* - member netgroup - netgroups to add - */ - Netgroup *[]string `json:"netgroup,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member user +users to add + */ + User *[]string `json:"user,omitempty"` + + /* +member group +groups to add + */ + Group *[]string `json:"group,omitempty"` + + /* +member host +hosts to add + */ + Host *[]string `json:"host,omitempty"` + + /* +member host group +host groups to add + */ + Hostgroup *[]string `json:"hostgroup,omitempty"` + + /* +member netgroup +netgroups to add + */ + Netgroup *[]string `json:"netgroup,omitempty"` + } type netgroupAddMemberKwParams struct { - *NetgroupAddMemberArgs - *NetgroupAddMemberOptionalArgs + *NetgroupAddMemberArgs + *NetgroupAddMemberOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type netgroupAddMemberResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *NetgroupAddMemberResult `json:"result"` } type NetgroupAddMemberResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *NetgroupAddMemberResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("NetgroupAddMemberResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("NetgroupAddMemberResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("NetgroupAddMemberResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("NetgroupAddMemberResult%v", string(b)) } /* Delete a netgroup. */ func (c *Client) NetgroupDel( - reqArgs *NetgroupDelArgs, - optArgs *NetgroupDelOptionalArgs, // can be nil + reqArgs *NetgroupDelArgs, + optArgs *NetgroupDelOptionalArgs, // can be nil ) (*NetgroupDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := netgroupDelKwParams{ - NetgroupDelArgs: reqArgs, - NetgroupDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "netgroup_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res netgroupDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := netgroupDelKwParams{ + NetgroupDelArgs: reqArgs, + NetgroupDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "netgroup_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res netgroupDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type NetgroupDelArgs struct { + + /* +Netgroup name - /* - Netgroup name - - */ - Cn []string `json:"cn,omitempty"` -} + */ + Cn []string `json:"cn,omitempty"` + } type NetgroupDelOptionalArgs struct { + + /* - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` -} +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } type netgroupDelKwParams struct { - *NetgroupDelArgs - *NetgroupDelOptionalArgs + *NetgroupDelArgs + *NetgroupDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type netgroupDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *NetgroupDelResult `json:"result"` } type NetgroupDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } func (t *NetgroupDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("NetgroupDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("NetgroupDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("NetgroupDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("NetgroupDelResult%v", string(b)) } /* Search for a netgroup. */ func (c *Client) NetgroupFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *NetgroupFindArgs, - optArgs *NetgroupFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *NetgroupFindArgs, + optArgs *NetgroupFindOptionalArgs, // can be nil ) (*NetgroupFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := netgroupFindKwParams{ - NetgroupFindArgs: reqArgs, - NetgroupFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "netgroup_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res netgroupFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := netgroupFindKwParams{ + NetgroupFindArgs: reqArgs, + NetgroupFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "netgroup_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res netgroupFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type NetgroupFindArgs struct { -} + } type NetgroupFindOptionalArgs struct { + + /* +Netgroup name + + */ + Cn *string `json:"cn,omitempty"` + + /* +Description +Netgroup description + */ + Description *string `json:"description,omitempty"` + + /* +NIS domain name + + */ + Nisdomainname *string `json:"nisdomainname,omitempty"` + + /* +IPA unique ID +IPA unique ID + */ + Ipauniqueid *string `json:"ipauniqueid,omitempty"` + + /* +User category +User category the rule applies to + */ + Usercategory *string `json:"usercategory,omitempty"` + + /* +Host category +Host category the rule applies to + */ + Hostcategory *string `json:"hostcategory,omitempty"` + + /* +External host + + */ + Externalhost *[]string `json:"externalhost,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + + + */ + Private *bool `json:"private,omitempty"` + + /* + +search for managed groups + */ + Managed *bool `json:"managed,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("name") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + + /* +netgroup +Search for netgroups with these member netgroups. + */ + Netgroup *[]string `json:"netgroup,omitempty"` + + /* +netgroup +Search for netgroups without these member netgroups. + */ + NoNetgroup *[]string `json:"no_netgroup,omitempty"` + + /* +user +Search for netgroups with these member users. + */ + User *[]string `json:"user,omitempty"` + + /* +user +Search for netgroups without these member users. + */ + NoUser *[]string `json:"no_user,omitempty"` + + /* +group +Search for netgroups with these member groups. + */ + Group *[]string `json:"group,omitempty"` + + /* +group +Search for netgroups without these member groups. + */ + NoGroup *[]string `json:"no_group,omitempty"` + + /* +host +Search for netgroups with these member hosts. + */ + Host *[]string `json:"host,omitempty"` + + /* +host +Search for netgroups without these member hosts. + */ + NoHost *[]string `json:"no_host,omitempty"` + + /* +host group +Search for netgroups with these member host groups. + */ + Hostgroup *[]string `json:"hostgroup,omitempty"` + + /* +host group +Search for netgroups without these member host groups. + */ + NoHostgroup *[]string `json:"no_hostgroup,omitempty"` + + /* +netgroup +Search for netgroups with these member of netgroups. + */ + InNetgroup *[]string `json:"in_netgroup,omitempty"` + + /* +netgroup +Search for netgroups without these member of netgroups. + */ + NotInNetgroup *[]string `json:"not_in_netgroup,omitempty"` + } - /* - Netgroup name +type netgroupFindKwParams struct { + *NetgroupFindArgs + *NetgroupFindOptionalArgs - */ - Cn *string `json:"cn,omitempty"` - - /* - Description - Netgroup description - */ - Description *string `json:"description,omitempty"` - - /* - NIS domain name - - */ - Nisdomainname *string `json:"nisdomainname,omitempty"` - - /* - IPA unique ID - IPA unique ID - */ - Ipauniqueid *string `json:"ipauniqueid,omitempty"` - - /* - User category - User category the rule applies to - */ - Usercategory *string `json:"usercategory,omitempty"` - - /* - Host category - Host category the rule applies to - */ - Hostcategory *string `json:"hostcategory,omitempty"` - - /* - External host - - */ - Externalhost *[]string `json:"externalhost,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - - */ - Private *bool `json:"private,omitempty"` - - /* - - search for managed groups - */ - Managed *bool `json:"managed,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("name") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` - - /* - netgroup - Search for netgroups with these member netgroups. - */ - Netgroup *[]string `json:"netgroup,omitempty"` - - /* - netgroup - Search for netgroups without these member netgroups. - */ - NoNetgroup *[]string `json:"no_netgroup,omitempty"` - - /* - user - Search for netgroups with these member users. - */ - User *[]string `json:"user,omitempty"` - - /* - user - Search for netgroups without these member users. - */ - NoUser *[]string `json:"no_user,omitempty"` - - /* - group - Search for netgroups with these member groups. - */ - Group *[]string `json:"group,omitempty"` - - /* - group - Search for netgroups without these member groups. - */ - NoGroup *[]string `json:"no_group,omitempty"` - - /* - host - Search for netgroups with these member hosts. - */ - Host *[]string `json:"host,omitempty"` - - /* - host - Search for netgroups without these member hosts. - */ - NoHost *[]string `json:"no_host,omitempty"` - - /* - host group - Search for netgroups with these member host groups. - */ - Hostgroup *[]string `json:"hostgroup,omitempty"` - - /* - host group - Search for netgroups without these member host groups. - */ - NoHostgroup *[]string `json:"no_hostgroup,omitempty"` - - /* - netgroup - Search for netgroups with these member of netgroups. - */ - InNetgroup *[]string `json:"in_netgroup,omitempty"` - - /* - netgroup - Search for netgroups without these member of netgroups. - */ - NotInNetgroup *[]string `json:"not_in_netgroup,omitempty"` -} - -type netgroupFindKwParams struct { - *NetgroupFindArgs - *NetgroupFindOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} type netgroupFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *NetgroupFindResult `json:"result"` } type NetgroupFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Netgroup `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Netgroup `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *NetgroupFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("NetgroupFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("NetgroupFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("NetgroupFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("NetgroupFindResult%v", string(b)) } /* Modify a netgroup. */ func (c *Client) NetgroupMod( - reqArgs *NetgroupModArgs, - optArgs *NetgroupModOptionalArgs, // can be nil + reqArgs *NetgroupModArgs, + optArgs *NetgroupModOptionalArgs, // can be nil ) (*NetgroupModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := netgroupModKwParams{ - NetgroupModArgs: reqArgs, - NetgroupModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "netgroup_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res netgroupModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := netgroupModKwParams{ + NetgroupModArgs: reqArgs, + NetgroupModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "netgroup_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res netgroupModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type NetgroupModArgs struct { + + /* +Netgroup name - /* - Netgroup name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type NetgroupModOptionalArgs struct { - - /* - Description - Netgroup description - */ - Description *string `json:"description,omitempty"` - - /* - NIS domain name - - */ - Nisdomainname *string `json:"nisdomainname,omitempty"` - - /* - User category - User category the rule applies to - */ - Usercategory *string `json:"usercategory,omitempty"` - - /* - Host category - Host category the rule applies to - */ - Hostcategory *string `json:"hostcategory,omitempty"` - - /* - External host - - */ - Externalhost *[]string `json:"externalhost,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Description +Netgroup description + */ + Description *string `json:"description,omitempty"` + + /* +NIS domain name + + */ + Nisdomainname *string `json:"nisdomainname,omitempty"` + + /* +User category +User category the rule applies to + */ + Usercategory *string `json:"usercategory,omitempty"` + + /* +Host category +Host category the rule applies to + */ + Hostcategory *string `json:"hostcategory,omitempty"` + + /* +External host + + */ + Externalhost *[]string `json:"externalhost,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type netgroupModKwParams struct { - *NetgroupModArgs - *NetgroupModOptionalArgs + *NetgroupModArgs + *NetgroupModOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type netgroupModResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *NetgroupModResult `json:"result"` } type NetgroupModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Netgroup `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Netgroup `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *NetgroupModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("NetgroupModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("NetgroupModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("NetgroupModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("NetgroupModResult%v", string(b)) } /* Remove members from a netgroup. */ func (c *Client) NetgroupRemoveMember( - reqArgs *NetgroupRemoveMemberArgs, - optArgs *NetgroupRemoveMemberOptionalArgs, // can be nil + reqArgs *NetgroupRemoveMemberArgs, + optArgs *NetgroupRemoveMemberOptionalArgs, // can be nil ) (*NetgroupRemoveMemberResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := netgroupRemoveMemberKwParams{ - NetgroupRemoveMemberArgs: reqArgs, - NetgroupRemoveMemberOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "netgroup_remove_member", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res netgroupRemoveMemberResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := netgroupRemoveMemberKwParams{ + NetgroupRemoveMemberArgs: reqArgs, + NetgroupRemoveMemberOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "netgroup_remove_member", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res netgroupRemoveMemberResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type NetgroupRemoveMemberArgs struct { + + /* +Netgroup name - /* - Netgroup name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type NetgroupRemoveMemberOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member user - users to remove - */ - User *[]string `json:"user,omitempty"` - - /* - member group - groups to remove - */ - Group *[]string `json:"group,omitempty"` - - /* - member host - hosts to remove - */ - Host *[]string `json:"host,omitempty"` - - /* - member host group - host groups to remove - */ - Hostgroup *[]string `json:"hostgroup,omitempty"` - - /* - member netgroup - netgroups to remove - */ - Netgroup *[]string `json:"netgroup,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member user +users to remove + */ + User *[]string `json:"user,omitempty"` + + /* +member group +groups to remove + */ + Group *[]string `json:"group,omitempty"` + + /* +member host +hosts to remove + */ + Host *[]string `json:"host,omitempty"` + + /* +member host group +host groups to remove + */ + Hostgroup *[]string `json:"hostgroup,omitempty"` + + /* +member netgroup +netgroups to remove + */ + Netgroup *[]string `json:"netgroup,omitempty"` + } type netgroupRemoveMemberKwParams struct { - *NetgroupRemoveMemberArgs - *NetgroupRemoveMemberOptionalArgs + *NetgroupRemoveMemberArgs + *NetgroupRemoveMemberOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type netgroupRemoveMemberResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *NetgroupRemoveMemberResult `json:"result"` } type NetgroupRemoveMemberResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *NetgroupRemoveMemberResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("NetgroupRemoveMemberResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("NetgroupRemoveMemberResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("NetgroupRemoveMemberResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("NetgroupRemoveMemberResult%v", string(b)) } /* Display information about a netgroup. */ func (c *Client) NetgroupShow( - reqArgs *NetgroupShowArgs, - optArgs *NetgroupShowOptionalArgs, // can be nil + reqArgs *NetgroupShowArgs, + optArgs *NetgroupShowOptionalArgs, // can be nil ) (*NetgroupShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := netgroupShowKwParams{ - NetgroupShowArgs: reqArgs, - NetgroupShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "netgroup_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res netgroupShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := netgroupShowKwParams{ + NetgroupShowArgs: reqArgs, + NetgroupShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "netgroup_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res netgroupShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type NetgroupShowArgs struct { + + /* +Netgroup name - /* - Netgroup name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type NetgroupShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type netgroupShowKwParams struct { - *NetgroupShowArgs - *NetgroupShowOptionalArgs + *NetgroupShowArgs + *NetgroupShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type netgroupShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *NetgroupShowResult `json:"result"` } type NetgroupShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Netgroup `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Netgroup `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *NetgroupShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("NetgroupShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("NetgroupShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("NetgroupShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("NetgroupShowResult%v", string(b)) } /* Modify OTP configuration options. */ func (c *Client) OtpconfigMod( - reqArgs *OtpconfigModArgs, - optArgs *OtpconfigModOptionalArgs, // can be nil + reqArgs *OtpconfigModArgs, + optArgs *OtpconfigModOptionalArgs, // can be nil ) (*OtpconfigModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := otpconfigModKwParams{ - OtpconfigModArgs: reqArgs, - OtpconfigModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "otpconfig_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res otpconfigModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := otpconfigModKwParams{ + OtpconfigModArgs: reqArgs, + OtpconfigModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "otpconfig_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res otpconfigModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type OtpconfigModArgs struct { -} + } type OtpconfigModOptionalArgs struct { - - /* - TOTP authentication Window - TOTP authentication time variance (seconds) - */ - Ipatokentotpauthwindow *int `json:"ipatokentotpauthwindow,omitempty"` - - /* - TOTP Synchronization Window - TOTP synchronization time variance (seconds) - */ - Ipatokentotpsyncwindow *int `json:"ipatokentotpsyncwindow,omitempty"` - - /* - HOTP Authentication Window - HOTP authentication skip-ahead - */ - Ipatokenhotpauthwindow *int `json:"ipatokenhotpauthwindow,omitempty"` - - /* - HOTP Synchronization Window - HOTP synchronization skip-ahead - */ - Ipatokenhotpsyncwindow *int `json:"ipatokenhotpsyncwindow,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +TOTP authentication Window +TOTP authentication time variance (seconds) + */ + Ipatokentotpauthwindow *int `json:"ipatokentotpauthwindow,omitempty"` + + /* +TOTP Synchronization Window +TOTP synchronization time variance (seconds) + */ + Ipatokentotpsyncwindow *int `json:"ipatokentotpsyncwindow,omitempty"` + + /* +HOTP Authentication Window +HOTP authentication skip-ahead + */ + Ipatokenhotpauthwindow *int `json:"ipatokenhotpauthwindow,omitempty"` + + /* +HOTP Synchronization Window +HOTP synchronization skip-ahead + */ + Ipatokenhotpsyncwindow *int `json:"ipatokenhotpsyncwindow,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type otpconfigModKwParams struct { - *OtpconfigModArgs - *OtpconfigModOptionalArgs + *OtpconfigModArgs + *OtpconfigModOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type otpconfigModResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *OtpconfigModResult `json:"result"` } type OtpconfigModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Otpconfig `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value interface{} `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Otpconfig `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value interface{} `json:"value,omitempty"` + } func (t *OtpconfigModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("OtpconfigModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("OtpconfigModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("OtpconfigModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("OtpconfigModResult%v", string(b)) } /* Show the current OTP configuration. */ func (c *Client) OtpconfigShow( - reqArgs *OtpconfigShowArgs, - optArgs *OtpconfigShowOptionalArgs, // can be nil + reqArgs *OtpconfigShowArgs, + optArgs *OtpconfigShowOptionalArgs, // can be nil ) (*OtpconfigShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := otpconfigShowKwParams{ - OtpconfigShowArgs: reqArgs, - OtpconfigShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "otpconfig_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res otpconfigShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := otpconfigShowKwParams{ + OtpconfigShowArgs: reqArgs, + OtpconfigShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "otpconfig_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res otpconfigShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type OtpconfigShowArgs struct { -} + } type OtpconfigShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type otpconfigShowKwParams struct { - *OtpconfigShowArgs - *OtpconfigShowOptionalArgs + *OtpconfigShowArgs + *OtpconfigShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type otpconfigShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *OtpconfigShowResult `json:"result"` } type OtpconfigShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Otpconfig `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value interface{} `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Otpconfig `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value interface{} `json:"value,omitempty"` + } func (t *OtpconfigShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("OtpconfigShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("OtpconfigShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("OtpconfigShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("OtpconfigShowResult%v", string(b)) } /* Add a new OTP token. */ func (c *Client) OtptokenAdd( - ipatokenuniqueid string, // - reqArgs *OtptokenAddArgs, - optArgs *OtptokenAddOptionalArgs, // can be nil + ipatokenuniqueid string, // + reqArgs *OtptokenAddArgs, + optArgs *OtptokenAddOptionalArgs, // can be nil ) (*OtptokenAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := otptokenAddKwParams{ - OtptokenAddArgs: reqArgs, - OtptokenAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "otptoken_add", - Params: []interface{}{ - []interface{}{ipatokenuniqueid}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res otptokenAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := otptokenAddKwParams{ + OtptokenAddArgs: reqArgs, + OtptokenAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "otptoken_add", + Params: []interface{}{ + []interface{}{ipatokenuniqueid, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res otptokenAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type OtptokenAddArgs struct { -} + } type OtptokenAddOptionalArgs struct { - - /* - Type - Type of the token - */ - Type *string `json:"type,omitempty"` - - /* - Description - Token description (informational only) - */ - Description *string `json:"description,omitempty"` - - /* - Owner - Assigned user of the token (default: self) - */ - Ipatokenowner *string `json:"ipatokenowner,omitempty"` - - /* - Disabled - Mark the token as disabled (default: false) - */ - Ipatokendisabled *bool `json:"ipatokendisabled,omitempty"` - - /* - Validity start - First date/time the token can be used - */ - Ipatokennotbefore *time.Time `json:"ipatokennotbefore,omitempty"` - - /* - Validity end - Last date/time the token can be used - */ - Ipatokennotafter *time.Time `json:"ipatokennotafter,omitempty"` - - /* - Vendor - Token vendor name (informational only) - */ - Ipatokenvendor *string `json:"ipatokenvendor,omitempty"` - - /* - Model - Token model (informational only) - */ - Ipatokenmodel *string `json:"ipatokenmodel,omitempty"` - - /* - Serial - Token serial (informational only) - */ - Ipatokenserial *string `json:"ipatokenserial,omitempty"` - - /* - Key - Token secret (Base32; default: random) - */ - Ipatokenotpkey *string `json:"ipatokenotpkey,omitempty"` - - /* - Algorithm - Token hash algorithm - */ - Ipatokenotpalgorithm *string `json:"ipatokenotpalgorithm,omitempty"` - - /* - Digits - Number of digits each token code will have - */ - Ipatokenotpdigits *int `json:"ipatokenotpdigits,omitempty"` - - /* - Clock offset - TOTP token / FreeIPA server time difference - */ - Ipatokentotpclockoffset *int `json:"ipatokentotpclockoffset,omitempty"` - - /* - Clock interval - Length of TOTP token code validity - */ - Ipatokentotptimestep *int `json:"ipatokentotptimestep,omitempty"` - - /* - Counter - Initial counter for the HOTP token - */ - Ipatokenhotpcounter *int `json:"ipatokenhotpcounter,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - (deprecated) - - */ - Qrcode *bool `json:"qrcode,omitempty"` - - /* - Do not display QR code - - */ - NoQrcode *bool `json:"no_qrcode,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Type +Type of the token + */ + Type *string `json:"type,omitempty"` + + /* +Description +Token description (informational only) + */ + Description *string `json:"description,omitempty"` + + /* +Owner +Assigned user of the token (default: self) + */ + Ipatokenowner *string `json:"ipatokenowner,omitempty"` + + /* +Disabled +Mark the token as disabled (default: false) + */ + Ipatokendisabled *bool `json:"ipatokendisabled,omitempty"` + + /* +Validity start +First date/time the token can be used + */ + Ipatokennotbefore *time.Time `json:"ipatokennotbefore,omitempty"` + + /* +Validity end +Last date/time the token can be used + */ + Ipatokennotafter *time.Time `json:"ipatokennotafter,omitempty"` + + /* +Vendor +Token vendor name (informational only) + */ + Ipatokenvendor *string `json:"ipatokenvendor,omitempty"` + + /* +Model +Token model (informational only) + */ + Ipatokenmodel *string `json:"ipatokenmodel,omitempty"` + + /* +Serial +Token serial (informational only) + */ + Ipatokenserial *string `json:"ipatokenserial,omitempty"` + + /* +Key +Token secret (Base32; default: random) + */ + Ipatokenotpkey *string `json:"ipatokenotpkey,omitempty"` + + /* +Algorithm +Token hash algorithm + */ + Ipatokenotpalgorithm *string `json:"ipatokenotpalgorithm,omitempty"` + + /* +Digits +Number of digits each token code will have + */ + Ipatokenotpdigits *int `json:"ipatokenotpdigits,omitempty"` + + /* +Clock offset +TOTP token / FreeIPA server time difference + */ + Ipatokentotpclockoffset *int `json:"ipatokentotpclockoffset,omitempty"` + + /* +Clock interval +Length of TOTP token code validity + */ + Ipatokentotptimestep *int `json:"ipatokentotptimestep,omitempty"` + + /* +Counter +Initial counter for the HOTP token + */ + Ipatokenhotpcounter *int `json:"ipatokenhotpcounter,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* +(deprecated) + + */ + Qrcode *bool `json:"qrcode,omitempty"` + + /* +Do not display QR code + + */ + NoQrcode *bool `json:"no_qrcode,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type otptokenAddKwParams struct { - *OtptokenAddArgs - *OtptokenAddOptionalArgs + *OtptokenAddArgs + *OtptokenAddOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type otptokenAddResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *OtptokenAddResult `json:"result"` } type OtptokenAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Otptoken `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Otptoken `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *OtptokenAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("OtptokenAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("OtptokenAddResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("OtptokenAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("OtptokenAddResult%v", string(b)) } /* Add users that can manage this token. */ func (c *Client) OtptokenAddManagedby( - reqArgs *OtptokenAddManagedbyArgs, - optArgs *OtptokenAddManagedbyOptionalArgs, // can be nil + reqArgs *OtptokenAddManagedbyArgs, + optArgs *OtptokenAddManagedbyOptionalArgs, // can be nil ) (*OtptokenAddManagedbyResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := otptokenAddManagedbyKwParams{ - OtptokenAddManagedbyArgs: reqArgs, - OtptokenAddManagedbyOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "otptoken_add_managedby", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res otptokenAddManagedbyResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := otptokenAddManagedbyKwParams{ + OtptokenAddManagedbyArgs: reqArgs, + OtptokenAddManagedbyOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "otptoken_add_managedby", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res otptokenAddManagedbyResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type OtptokenAddManagedbyArgs struct { + + /* +Unique ID - /* - Unique ID - - */ - Ipatokenuniqueid string `json:"ipatokenuniqueid,omitempty"` -} + */ + Ipatokenuniqueid string `json:"ipatokenuniqueid,omitempty"` + } type OtptokenAddManagedbyOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member user - users to add - */ - User *[]string `json:"user,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member user +users to add + */ + User *[]string `json:"user,omitempty"` + } type otptokenAddManagedbyKwParams struct { - *OtptokenAddManagedbyArgs - *OtptokenAddManagedbyOptionalArgs + *OtptokenAddManagedbyArgs + *OtptokenAddManagedbyOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type otptokenAddManagedbyResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *OtptokenAddManagedbyResult `json:"result"` } type OtptokenAddManagedbyResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *OtptokenAddManagedbyResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("OtptokenAddManagedbyResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("OtptokenAddManagedbyResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("OtptokenAddManagedbyResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("OtptokenAddManagedbyResult%v", string(b)) } /* Delete an OTP token. */ func (c *Client) OtptokenDel( - reqArgs *OtptokenDelArgs, - optArgs *OtptokenDelOptionalArgs, // can be nil + reqArgs *OtptokenDelArgs, + optArgs *OtptokenDelOptionalArgs, // can be nil ) (*OtptokenDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := otptokenDelKwParams{ - OtptokenDelArgs: reqArgs, - OtptokenDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "otptoken_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res otptokenDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := otptokenDelKwParams{ + OtptokenDelArgs: reqArgs, + OtptokenDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "otptoken_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res otptokenDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type OtptokenDelArgs struct { + + /* +Unique ID - /* - Unique ID - - */ - Ipatokenuniqueid []string `json:"ipatokenuniqueid,omitempty"` -} + */ + Ipatokenuniqueid []string `json:"ipatokenuniqueid,omitempty"` + } type OtptokenDelOptionalArgs struct { + + /* - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` -} +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } type otptokenDelKwParams struct { - *OtptokenDelArgs - *OtptokenDelOptionalArgs + *OtptokenDelArgs + *OtptokenDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type otptokenDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *OtptokenDelResult `json:"result"` } type OtptokenDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } func (t *OtptokenDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("OtptokenDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("OtptokenDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("OtptokenDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("OtptokenDelResult%v", string(b)) } /* Search for OTP token. */ func (c *Client) OtptokenFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *OtptokenFindArgs, - optArgs *OtptokenFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *OtptokenFindArgs, + optArgs *OtptokenFindOptionalArgs, // can be nil ) (*OtptokenFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := otptokenFindKwParams{ - OtptokenFindArgs: reqArgs, - OtptokenFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "otptoken_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res otptokenFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := otptokenFindKwParams{ + OtptokenFindArgs: reqArgs, + OtptokenFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "otptoken_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res otptokenFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type OtptokenFindArgs struct { -} + } type OtptokenFindOptionalArgs struct { - - /* - Unique ID - - */ - Ipatokenuniqueid *string `json:"ipatokenuniqueid,omitempty"` - - /* - Type - Type of the token - */ - Type *string `json:"type,omitempty"` - - /* - Description - Token description (informational only) - */ - Description *string `json:"description,omitempty"` - - /* - Owner - Assigned user of the token (default: self) - */ - Ipatokenowner *string `json:"ipatokenowner,omitempty"` - - /* - Disabled - Mark the token as disabled (default: false) - */ - Ipatokendisabled *bool `json:"ipatokendisabled,omitempty"` - - /* - Validity start - First date/time the token can be used - */ - Ipatokennotbefore *time.Time `json:"ipatokennotbefore,omitempty"` - - /* - Validity end - Last date/time the token can be used - */ - Ipatokennotafter *time.Time `json:"ipatokennotafter,omitempty"` - - /* - Vendor - Token vendor name (informational only) - */ - Ipatokenvendor *string `json:"ipatokenvendor,omitempty"` - - /* - Model - Token model (informational only) - */ - Ipatokenmodel *string `json:"ipatokenmodel,omitempty"` - - /* - Serial - Token serial (informational only) - */ - Ipatokenserial *string `json:"ipatokenserial,omitempty"` - - /* - Algorithm - Token hash algorithm - */ - Ipatokenotpalgorithm *string `json:"ipatokenotpalgorithm,omitempty"` - - /* - Digits - Number of digits each token code will have - */ - Ipatokenotpdigits *int `json:"ipatokenotpdigits,omitempty"` - - /* - Clock offset - TOTP token / FreeIPA server time difference - */ - Ipatokentotpclockoffset *int `json:"ipatokentotpclockoffset,omitempty"` - - /* - Clock interval - Length of TOTP token code validity - */ - Ipatokentotptimestep *int `json:"ipatokentotptimestep,omitempty"` - - /* - Counter - Initial counter for the HOTP token - */ - Ipatokenhotpcounter *int `json:"ipatokenhotpcounter,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("id") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} + + /* +Unique ID + + */ + Ipatokenuniqueid *string `json:"ipatokenuniqueid,omitempty"` + + /* +Type +Type of the token + */ + Type *string `json:"type,omitempty"` + + /* +Description +Token description (informational only) + */ + Description *string `json:"description,omitempty"` + + /* +Owner +Assigned user of the token (default: self) + */ + Ipatokenowner *string `json:"ipatokenowner,omitempty"` + + /* +Disabled +Mark the token as disabled (default: false) + */ + Ipatokendisabled *bool `json:"ipatokendisabled,omitempty"` + + /* +Validity start +First date/time the token can be used + */ + Ipatokennotbefore *time.Time `json:"ipatokennotbefore,omitempty"` + + /* +Validity end +Last date/time the token can be used + */ + Ipatokennotafter *time.Time `json:"ipatokennotafter,omitempty"` + + /* +Vendor +Token vendor name (informational only) + */ + Ipatokenvendor *string `json:"ipatokenvendor,omitempty"` + + /* +Model +Token model (informational only) + */ + Ipatokenmodel *string `json:"ipatokenmodel,omitempty"` + + /* +Serial +Token serial (informational only) + */ + Ipatokenserial *string `json:"ipatokenserial,omitempty"` + + /* +Algorithm +Token hash algorithm + */ + Ipatokenotpalgorithm *string `json:"ipatokenotpalgorithm,omitempty"` + + /* +Digits +Number of digits each token code will have + */ + Ipatokenotpdigits *int `json:"ipatokenotpdigits,omitempty"` + + /* +Clock offset +TOTP token / FreeIPA server time difference + */ + Ipatokentotpclockoffset *int `json:"ipatokentotpclockoffset,omitempty"` + + /* +Clock interval +Length of TOTP token code validity + */ + Ipatokentotptimestep *int `json:"ipatokentotptimestep,omitempty"` + + /* +Counter +Initial counter for the HOTP token + */ + Ipatokenhotpcounter *int `json:"ipatokenhotpcounter,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("id") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } type otptokenFindKwParams struct { - *OtptokenFindArgs - *OtptokenFindOptionalArgs + *OtptokenFindArgs + *OtptokenFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type otptokenFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *OtptokenFindResult `json:"result"` } type OtptokenFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Otptoken `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Otptoken `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *OtptokenFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("OtptokenFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("OtptokenFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("OtptokenFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("OtptokenFindResult%v", string(b)) } /* Modify a OTP token. */ func (c *Client) OtptokenMod( - reqArgs *OtptokenModArgs, - optArgs *OtptokenModOptionalArgs, // can be nil + reqArgs *OtptokenModArgs, + optArgs *OtptokenModOptionalArgs, // can be nil ) (*OtptokenModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := otptokenModKwParams{ - OtptokenModArgs: reqArgs, - OtptokenModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "otptoken_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res otptokenModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := otptokenModKwParams{ + OtptokenModArgs: reqArgs, + OtptokenModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "otptoken_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res otptokenModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type OtptokenModArgs struct { + + /* +Unique ID - /* - Unique ID - - */ - Ipatokenuniqueid string `json:"ipatokenuniqueid,omitempty"` -} + */ + Ipatokenuniqueid string `json:"ipatokenuniqueid,omitempty"` + } type OtptokenModOptionalArgs struct { - - /* - Description - Token description (informational only) - */ - Description *string `json:"description,omitempty"` - - /* - Owner - Assigned user of the token (default: self) - */ - Ipatokenowner *string `json:"ipatokenowner,omitempty"` - - /* - Disabled - Mark the token as disabled (default: false) - */ - Ipatokendisabled *bool `json:"ipatokendisabled,omitempty"` - - /* - Validity start - First date/time the token can be used - */ - Ipatokennotbefore *time.Time `json:"ipatokennotbefore,omitempty"` - - /* - Validity end - Last date/time the token can be used - */ - Ipatokennotafter *time.Time `json:"ipatokennotafter,omitempty"` - - /* - Vendor - Token vendor name (informational only) - */ - Ipatokenvendor *string `json:"ipatokenvendor,omitempty"` - - /* - Model - Token model (informational only) - */ - Ipatokenmodel *string `json:"ipatokenmodel,omitempty"` - - /* - Serial - Token serial (informational only) - */ - Ipatokenserial *string `json:"ipatokenserial,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - Rename - Rename the OTP token object - */ - Rename *string `json:"rename,omitempty"` -} + + /* +Description +Token description (informational only) + */ + Description *string `json:"description,omitempty"` + + /* +Owner +Assigned user of the token (default: self) + */ + Ipatokenowner *string `json:"ipatokenowner,omitempty"` + + /* +Disabled +Mark the token as disabled (default: false) + */ + Ipatokendisabled *bool `json:"ipatokendisabled,omitempty"` + + /* +Validity start +First date/time the token can be used + */ + Ipatokennotbefore *time.Time `json:"ipatokennotbefore,omitempty"` + + /* +Validity end +Last date/time the token can be used + */ + Ipatokennotafter *time.Time `json:"ipatokennotafter,omitempty"` + + /* +Vendor +Token vendor name (informational only) + */ + Ipatokenvendor *string `json:"ipatokenvendor,omitempty"` + + /* +Model +Token model (informational only) + */ + Ipatokenmodel *string `json:"ipatokenmodel,omitempty"` + + /* +Serial +Token serial (informational only) + */ + Ipatokenserial *string `json:"ipatokenserial,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +Rename +Rename the OTP token object + */ + Rename *string `json:"rename,omitempty"` + } type otptokenModKwParams struct { - *OtptokenModArgs - *OtptokenModOptionalArgs + *OtptokenModArgs + *OtptokenModOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type otptokenModResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *OtptokenModResult `json:"result"` } type OtptokenModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Otptoken `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Otptoken `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *OtptokenModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("OtptokenModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("OtptokenModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("OtptokenModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("OtptokenModResult%v", string(b)) } /* Remove users that can manage this token. */ func (c *Client) OtptokenRemoveManagedby( - reqArgs *OtptokenRemoveManagedbyArgs, - optArgs *OtptokenRemoveManagedbyOptionalArgs, // can be nil + reqArgs *OtptokenRemoveManagedbyArgs, + optArgs *OtptokenRemoveManagedbyOptionalArgs, // can be nil ) (*OtptokenRemoveManagedbyResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := otptokenRemoveManagedbyKwParams{ - OtptokenRemoveManagedbyArgs: reqArgs, - OtptokenRemoveManagedbyOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "otptoken_remove_managedby", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res otptokenRemoveManagedbyResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := otptokenRemoveManagedbyKwParams{ + OtptokenRemoveManagedbyArgs: reqArgs, + OtptokenRemoveManagedbyOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "otptoken_remove_managedby", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res otptokenRemoveManagedbyResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type OtptokenRemoveManagedbyArgs struct { + + /* +Unique ID - /* - Unique ID - - */ - Ipatokenuniqueid string `json:"ipatokenuniqueid,omitempty"` -} + */ + Ipatokenuniqueid string `json:"ipatokenuniqueid,omitempty"` + } type OtptokenRemoveManagedbyOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member user - users to remove - */ - User *[]string `json:"user,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member user +users to remove + */ + User *[]string `json:"user,omitempty"` + } type otptokenRemoveManagedbyKwParams struct { - *OtptokenRemoveManagedbyArgs - *OtptokenRemoveManagedbyOptionalArgs + *OtptokenRemoveManagedbyArgs + *OtptokenRemoveManagedbyOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type otptokenRemoveManagedbyResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *OtptokenRemoveManagedbyResult `json:"result"` } type OtptokenRemoveManagedbyResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *OtptokenRemoveManagedbyResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("OtptokenRemoveManagedbyResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("OtptokenRemoveManagedbyResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("OtptokenRemoveManagedbyResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("OtptokenRemoveManagedbyResult%v", string(b)) } /* Display information about an OTP token. */ func (c *Client) OtptokenShow( - reqArgs *OtptokenShowArgs, - optArgs *OtptokenShowOptionalArgs, // can be nil + reqArgs *OtptokenShowArgs, + optArgs *OtptokenShowOptionalArgs, // can be nil ) (*OtptokenShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := otptokenShowKwParams{ - OtptokenShowArgs: reqArgs, - OtptokenShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "otptoken_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res otptokenShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := otptokenShowKwParams{ + OtptokenShowArgs: reqArgs, + OtptokenShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "otptoken_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res otptokenShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type OtptokenShowArgs struct { + + /* +Unique ID - /* - Unique ID - - */ - Ipatokenuniqueid string `json:"ipatokenuniqueid,omitempty"` -} + */ + Ipatokenuniqueid string `json:"ipatokenuniqueid,omitempty"` + } type OtptokenShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type otptokenShowKwParams struct { - *OtptokenShowArgs - *OtptokenShowOptionalArgs + *OtptokenShowArgs + *OtptokenShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type otptokenShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *OtptokenShowResult `json:"result"` } type OtptokenShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Otptoken `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Otptoken `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *OtptokenShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("OtptokenShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("OtptokenShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("OtptokenShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("OtptokenShowResult%v", string(b)) } /* Search for command outputs. */ func (c *Client) OutputFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *OutputFindArgs, - optArgs *OutputFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *OutputFindArgs, + optArgs *OutputFindOptionalArgs, // can be nil ) (*OutputFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := outputFindKwParams{ - OutputFindArgs: reqArgs, - OutputFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "output_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res outputFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := outputFindKwParams{ + OutputFindArgs: reqArgs, + OutputFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "output_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res outputFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type OutputFindArgs struct { + + /* +Full name - /* - Full name - - */ - CommandfullName string `json:"commandfull_name,omitempty"` -} + */ + CommandfullName string `json:"commandfull_name,omitempty"` + } type OutputFindOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("name") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("name") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } type outputFindKwParams struct { - *OutputFindArgs - *OutputFindOptionalArgs + *OutputFindArgs + *OutputFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type outputFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *OutputFindResult `json:"result"` } type OutputFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Output `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Output `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *OutputFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("OutputFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("OutputFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("OutputFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("OutputFindResult%v", string(b)) } /* Display information about a command output. */ func (c *Client) OutputShow( - reqArgs *OutputShowArgs, - optArgs *OutputShowOptionalArgs, // can be nil + reqArgs *OutputShowArgs, + optArgs *OutputShowOptionalArgs, // can be nil ) (*OutputShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := outputShowKwParams{ - OutputShowArgs: reqArgs, - OutputShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "output_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res outputShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := outputShowKwParams{ + OutputShowArgs: reqArgs, + OutputShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "output_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res outputShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type OutputShowArgs struct { + + /* +Full name - /* - Full name + */ + CommandfullName string `json:"commandfull_name,omitempty"` + + /* +Name - */ - CommandfullName string `json:"commandfull_name,omitempty"` - - /* - Name - - */ - Name string `json:"name,omitempty"` -} + */ + Name string `json:"name,omitempty"` + } type OutputShowOptionalArgs struct { + + /* - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type outputShowKwParams struct { - *OutputShowArgs - *OutputShowOptionalArgs + *OutputShowArgs + *OutputShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type outputShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *OutputShowResult `json:"result"` } type OutputShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Output `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Output `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *OutputShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("OutputShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("OutputShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("OutputShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("OutputShowResult%v", string(b)) } /* Search command parameters. */ func (c *Client) ParamFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *ParamFindArgs, - optArgs *ParamFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *ParamFindArgs, + optArgs *ParamFindOptionalArgs, // can be nil ) (*ParamFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := paramFindKwParams{ - ParamFindArgs: reqArgs, - ParamFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "param_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res paramFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := paramFindKwParams{ + ParamFindArgs: reqArgs, + ParamFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "param_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res paramFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ParamFindArgs struct { + + /* +Full name - /* - Full name - - */ - MetaobjectfullName string `json:"metaobjectfull_name,omitempty"` -} + */ + MetaobjectfullName string `json:"metaobjectfull_name,omitempty"` + } type ParamFindOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("name") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("name") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } type paramFindKwParams struct { - *ParamFindArgs - *ParamFindOptionalArgs + *ParamFindArgs + *ParamFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type paramFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ParamFindResult `json:"result"` } type ParamFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Param `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Param `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *ParamFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ParamFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ParamFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ParamFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ParamFindResult%v", string(b)) } /* Display information about a command parameter. */ func (c *Client) ParamShow( - reqArgs *ParamShowArgs, - optArgs *ParamShowOptionalArgs, // can be nil + reqArgs *ParamShowArgs, + optArgs *ParamShowOptionalArgs, // can be nil ) (*ParamShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := paramShowKwParams{ - ParamShowArgs: reqArgs, - ParamShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "param_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res paramShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := paramShowKwParams{ + ParamShowArgs: reqArgs, + ParamShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "param_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res paramShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ParamShowArgs struct { + + /* +Full name - /* - Full name - - */ - MetaobjectfullName string `json:"metaobjectfull_name,omitempty"` + */ + MetaobjectfullName string `json:"metaobjectfull_name,omitempty"` + + /* +Name - /* - Name - - */ - Name string `json:"name,omitempty"` -} + */ + Name string `json:"name,omitempty"` + } type ParamShowOptionalArgs struct { + + /* - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type paramShowKwParams struct { - *ParamShowArgs - *ParamShowOptionalArgs + *ParamShowArgs + *ParamShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type paramShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ParamShowResult `json:"result"` } type ParamShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Param `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Param `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *ParamShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ParamShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ParamShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ParamShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ParamShowResult%v", string(b)) } /* Set a user's password. */ func (c *Client) Passwd( - reqArgs *PasswdArgs, - optArgs *PasswdOptionalArgs, // can be nil + reqArgs *PasswdArgs, + optArgs *PasswdOptionalArgs, // can be nil ) (*PasswdResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := passwdKwParams{ - PasswdArgs: reqArgs, - PasswdOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "passwd", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res passwdResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := passwdKwParams{ + PasswdArgs: reqArgs, + PasswdOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "passwd", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res passwdResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type PasswdArgs struct { + + /* +User name - /* - User name - - */ - Principal string `json:"principal,omitempty"` + */ + Principal string `json:"principal,omitempty"` + + /* +New Password - /* - New Password - - */ - Password string `json:"password,omitempty"` -} + */ + Password string `json:"password,omitempty"` + } type PasswdOptionalArgs struct { - - /* - Current Password - - */ - CurrentPassword *string `json:"current_password,omitempty"` - - /* - OTP - One Time Password - */ - Otp *string `json:"otp,omitempty"` -} + + /* +Current Password + + */ + CurrentPassword *string `json:"current_password,omitempty"` + + /* +OTP +One Time Password + */ + Otp *string `json:"otp,omitempty"` + } type passwdKwParams struct { - *PasswdArgs - *PasswdOptionalArgs + *PasswdArgs + *PasswdOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type passwdResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *PasswdResult `json:"result"` } type PasswdResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - True means the operation was successful - (required) - */ - Result bool `json:"result,omitempty"` - - /* - - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* + + (required) + */ + Value string `json:"value,omitempty"` + } func (t *PasswdResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("PasswdResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("PasswdResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("PasswdResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("PasswdResult%v", string(b)) } /* Add a new permission. */ func (c *Client) PermissionAdd( - reqArgs *PermissionAddArgs, - optArgs *PermissionAddOptionalArgs, // can be nil + reqArgs *PermissionAddArgs, + optArgs *PermissionAddOptionalArgs, // can be nil ) (*PermissionAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := permissionAddKwParams{ - PermissionAddArgs: reqArgs, - PermissionAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "permission_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res permissionAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := permissionAddKwParams{ + PermissionAddArgs: reqArgs, + PermissionAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "permission_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res permissionAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type PermissionAddArgs struct { + + /* +Permission name - /* - Permission name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type PermissionAddOptionalArgs struct { - - /* - Granted rights - Rights to grant (read, search, compare, write, add, delete, all) - */ - Ipapermright *[]string `json:"ipapermright,omitempty"` - - /* - Effective attributes - All attributes to which the permission applies - */ - Attrs *[]string `json:"attrs,omitempty"` - - /* - Bind rule type - Bind rule type - */ - Ipapermbindruletype *string `json:"ipapermbindruletype,omitempty"` - - /* - Subtree - Subtree to apply permissions to - */ - Ipapermlocation *string `json:"ipapermlocation,omitempty"` - - /* - Extra target filter - Extra target filter - */ - Extratargetfilter *[]string `json:"extratargetfilter,omitempty"` - - /* - Raw target filter - All target filters, including those implied by type and memberof - */ - Ipapermtargetfilter *[]string `json:"ipapermtargetfilter,omitempty"` - - /* - Target DN - Optional DN to apply the permission to (must be in the subtree, but may not yet exist) - */ - Ipapermtarget *string `json:"ipapermtarget,omitempty"` - - /* - Target DN subtree - Optional DN subtree where an entry can be moved to (must be in the subtree, but may not yet exist) - */ - Ipapermtargetto *string `json:"ipapermtargetto,omitempty"` - - /* - Origin DN subtree - Optional DN subtree from where an entry can be moved (must be in the subtree, but may not yet exist) - */ - Ipapermtargetfrom *string `json:"ipapermtargetfrom,omitempty"` - - /* - Member of group - Target members of a group (sets memberOf targetfilter) - */ - Memberof *[]string `json:"memberof,omitempty"` - - /* - Target group - User group to apply permissions to (sets target) - */ - Targetgroup *string `json:"targetgroup,omitempty"` - - /* - Type - Type of IPA object (sets subtree and objectClass targetfilter) - */ - Type *string `json:"type,omitempty"` - - /* - - Deprecated; use extratargetfilter - */ - Filter *[]string `json:"filter,omitempty"` - - /* - - Deprecated; use ipapermlocation - */ - Subtree *[]string `json:"subtree,omitempty"` - - /* - - Deprecated; use ipapermright - */ - Permissions *[]string `json:"permissions,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Granted rights +Rights to grant (read, search, compare, write, add, delete, all) + */ + Ipapermright *[]string `json:"ipapermright,omitempty"` + + /* +Effective attributes +All attributes to which the permission applies + */ + Attrs *[]string `json:"attrs,omitempty"` + + /* +Bind rule type +Bind rule type + */ + Ipapermbindruletype *string `json:"ipapermbindruletype,omitempty"` + + /* +Subtree +Subtree to apply permissions to + */ + Ipapermlocation *string `json:"ipapermlocation,omitempty"` + + /* +Extra target filter +Extra target filter + */ + Extratargetfilter *[]string `json:"extratargetfilter,omitempty"` + + /* +Raw target filter +All target filters, including those implied by type and memberof + */ + Ipapermtargetfilter *[]string `json:"ipapermtargetfilter,omitempty"` + + /* +Target DN +Optional DN to apply the permission to (must be in the subtree, but may not yet exist) + */ + Ipapermtarget *string `json:"ipapermtarget,omitempty"` + + /* +Target DN subtree +Optional DN subtree where an entry can be moved to (must be in the subtree, but may not yet exist) + */ + Ipapermtargetto *string `json:"ipapermtargetto,omitempty"` + + /* +Origin DN subtree +Optional DN subtree from where an entry can be moved (must be in the subtree, but may not yet exist) + */ + Ipapermtargetfrom *string `json:"ipapermtargetfrom,omitempty"` + + /* +Member of group +Target members of a group (sets memberOf targetfilter) + */ + Memberof *[]string `json:"memberof,omitempty"` + + /* +Target group +User group to apply permissions to (sets target) + */ + Targetgroup *string `json:"targetgroup,omitempty"` + + /* +Type +Type of IPA object (sets subtree and objectClass targetfilter) + */ + Type *string `json:"type,omitempty"` + + /* + +Deprecated; use extratargetfilter + */ + Filter *[]string `json:"filter,omitempty"` + + /* + +Deprecated; use ipapermlocation + */ + Subtree *[]string `json:"subtree,omitempty"` + + /* + +Deprecated; use ipapermright + */ + Permissions *[]string `json:"permissions,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type permissionAddKwParams struct { - *PermissionAddArgs - *PermissionAddOptionalArgs + *PermissionAddArgs + *PermissionAddOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type permissionAddResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *PermissionAddResult `json:"result"` } type PermissionAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Permission `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Permission `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *PermissionAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("PermissionAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("PermissionAddResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("PermissionAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("PermissionAddResult%v", string(b)) } /* Add members to a permission. */ func (c *Client) PermissionAddMember( - reqArgs *PermissionAddMemberArgs, - optArgs *PermissionAddMemberOptionalArgs, // can be nil + reqArgs *PermissionAddMemberArgs, + optArgs *PermissionAddMemberOptionalArgs, // can be nil ) (*PermissionAddMemberResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := permissionAddMemberKwParams{ - PermissionAddMemberArgs: reqArgs, - PermissionAddMemberOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "permission_add_member", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res permissionAddMemberResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := permissionAddMemberKwParams{ + PermissionAddMemberArgs: reqArgs, + PermissionAddMemberOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "permission_add_member", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res permissionAddMemberResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type PermissionAddMemberArgs struct { + + /* +Permission name - /* - Permission name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type PermissionAddMemberOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member privilege - privileges to add - */ - Privilege *[]string `json:"privilege,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member privilege +privileges to add + */ + Privilege *[]string `json:"privilege,omitempty"` + } type permissionAddMemberKwParams struct { - *PermissionAddMemberArgs - *PermissionAddMemberOptionalArgs + *PermissionAddMemberArgs + *PermissionAddMemberOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type permissionAddMemberResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *PermissionAddMemberResult `json:"result"` } type PermissionAddMemberResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *PermissionAddMemberResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("PermissionAddMemberResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("PermissionAddMemberResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("PermissionAddMemberResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("PermissionAddMemberResult%v", string(b)) } /* Add a system permission without an ACI (internal command) */ func (c *Client) PermissionAddNoaci( - reqArgs *PermissionAddNoaciArgs, - optArgs *PermissionAddNoaciOptionalArgs, // can be nil + reqArgs *PermissionAddNoaciArgs, + optArgs *PermissionAddNoaciOptionalArgs, // can be nil ) (*PermissionAddNoaciResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := permissionAddNoaciKwParams{ - PermissionAddNoaciArgs: reqArgs, - PermissionAddNoaciOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "permission_add_noaci", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res permissionAddNoaciResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := permissionAddNoaciKwParams{ + PermissionAddNoaciArgs: reqArgs, + PermissionAddNoaciOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "permission_add_noaci", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res permissionAddNoaciResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type PermissionAddNoaciArgs struct { + + /* +Permission name - /* - Permission name - - */ - Cn string `json:"cn,omitempty"` + */ + Cn string `json:"cn,omitempty"` + + /* +Permission flags - /* - Permission flags - - */ - Ipapermissiontype []string `json:"ipapermissiontype,omitempty"` -} + */ + Ipapermissiontype []string `json:"ipapermissiontype,omitempty"` + } type PermissionAddNoaciOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type permissionAddNoaciKwParams struct { - *PermissionAddNoaciArgs - *PermissionAddNoaciOptionalArgs + *PermissionAddNoaciArgs + *PermissionAddNoaciOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type permissionAddNoaciResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *PermissionAddNoaciResult `json:"result"` } type PermissionAddNoaciResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *PermissionAddNoaciResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("PermissionAddNoaciResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("PermissionAddNoaciResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("PermissionAddNoaciResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("PermissionAddNoaciResult%v", string(b)) } /* Delete a permission. */ func (c *Client) PermissionDel( - reqArgs *PermissionDelArgs, - optArgs *PermissionDelOptionalArgs, // can be nil + reqArgs *PermissionDelArgs, + optArgs *PermissionDelOptionalArgs, // can be nil ) (*PermissionDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := permissionDelKwParams{ - PermissionDelArgs: reqArgs, - PermissionDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "permission_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res permissionDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := permissionDelKwParams{ + PermissionDelArgs: reqArgs, + PermissionDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "permission_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res permissionDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type PermissionDelArgs struct { + + /* +Permission name - /* - Permission name - - */ - Cn []string `json:"cn,omitempty"` -} + */ + Cn []string `json:"cn,omitempty"` + } type PermissionDelOptionalArgs struct { - - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` - - /* - Force - force delete of SYSTEM permissions - */ - Force *bool `json:"force,omitempty"` -} + + /* + +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + + /* +Force +force delete of SYSTEM permissions + */ + Force *bool `json:"force,omitempty"` + } type permissionDelKwParams struct { - *PermissionDelArgs - *PermissionDelOptionalArgs + *PermissionDelArgs + *PermissionDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type permissionDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *PermissionDelResult `json:"result"` } type PermissionDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } func (t *PermissionDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("PermissionDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("PermissionDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("PermissionDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("PermissionDelResult%v", string(b)) } /* Search for permissions. */ func (c *Client) PermissionFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *PermissionFindArgs, - optArgs *PermissionFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *PermissionFindArgs, + optArgs *PermissionFindOptionalArgs, // can be nil ) (*PermissionFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := permissionFindKwParams{ - PermissionFindArgs: reqArgs, - PermissionFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "permission_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res permissionFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := permissionFindKwParams{ + PermissionFindArgs: reqArgs, + PermissionFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "permission_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res permissionFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type PermissionFindArgs struct { -} + } type PermissionFindOptionalArgs struct { - - /* - Permission name - - */ - Cn *string `json:"cn,omitempty"` - - /* - Granted rights - Rights to grant (read, search, compare, write, add, delete, all) - */ - Ipapermright *[]string `json:"ipapermright,omitempty"` - - /* - Effective attributes - All attributes to which the permission applies - */ - Attrs *[]string `json:"attrs,omitempty"` - - /* - Included attributes - User-specified attributes to which the permission applies - */ - Ipapermincludedattr *[]string `json:"ipapermincludedattr,omitempty"` - - /* - Excluded attributes - User-specified attributes to which the permission explicitly does not apply - */ - Ipapermexcludedattr *[]string `json:"ipapermexcludedattr,omitempty"` - - /* - Default attributes - Attributes to which the permission applies by default - */ - Ipapermdefaultattr *[]string `json:"ipapermdefaultattr,omitempty"` - - /* - Bind rule type - Bind rule type - */ - Ipapermbindruletype *string `json:"ipapermbindruletype,omitempty"` - - /* - Subtree - Subtree to apply permissions to - */ - Ipapermlocation *string `json:"ipapermlocation,omitempty"` - - /* - Extra target filter - Extra target filter - */ - Extratargetfilter *[]string `json:"extratargetfilter,omitempty"` - - /* - Raw target filter - All target filters, including those implied by type and memberof - */ - Ipapermtargetfilter *[]string `json:"ipapermtargetfilter,omitempty"` - - /* - Target DN - Optional DN to apply the permission to (must be in the subtree, but may not yet exist) - */ - Ipapermtarget *string `json:"ipapermtarget,omitempty"` - - /* - Target DN subtree - Optional DN subtree where an entry can be moved to (must be in the subtree, but may not yet exist) - */ - Ipapermtargetto *string `json:"ipapermtargetto,omitempty"` - - /* - Origin DN subtree - Optional DN subtree from where an entry can be moved (must be in the subtree, but may not yet exist) - */ - Ipapermtargetfrom *string `json:"ipapermtargetfrom,omitempty"` - - /* - Member of group - Target members of a group (sets memberOf targetfilter) - */ - Memberof *[]string `json:"memberof,omitempty"` - - /* - Target group - User group to apply permissions to (sets target) - */ - Targetgroup *string `json:"targetgroup,omitempty"` - - /* - Type - Type of IPA object (sets subtree and objectClass targetfilter) - */ - Type *string `json:"type,omitempty"` - - /* - - Deprecated; use extratargetfilter - */ - Filter *[]string `json:"filter,omitempty"` - - /* - - Deprecated; use ipapermlocation - */ - Subtree *[]string `json:"subtree,omitempty"` - - /* - - Deprecated; use ipapermright - */ - Permissions *[]string `json:"permissions,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("name") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} + + /* +Permission name + + */ + Cn *string `json:"cn,omitempty"` + + /* +Granted rights +Rights to grant (read, search, compare, write, add, delete, all) + */ + Ipapermright *[]string `json:"ipapermright,omitempty"` + + /* +Effective attributes +All attributes to which the permission applies + */ + Attrs *[]string `json:"attrs,omitempty"` + + /* +Included attributes +User-specified attributes to which the permission applies + */ + Ipapermincludedattr *[]string `json:"ipapermincludedattr,omitempty"` + + /* +Excluded attributes +User-specified attributes to which the permission explicitly does not apply + */ + Ipapermexcludedattr *[]string `json:"ipapermexcludedattr,omitempty"` + + /* +Default attributes +Attributes to which the permission applies by default + */ + Ipapermdefaultattr *[]string `json:"ipapermdefaultattr,omitempty"` + + /* +Bind rule type +Bind rule type + */ + Ipapermbindruletype *string `json:"ipapermbindruletype,omitempty"` + + /* +Subtree +Subtree to apply permissions to + */ + Ipapermlocation *string `json:"ipapermlocation,omitempty"` + + /* +Extra target filter +Extra target filter + */ + Extratargetfilter *[]string `json:"extratargetfilter,omitempty"` + + /* +Raw target filter +All target filters, including those implied by type and memberof + */ + Ipapermtargetfilter *[]string `json:"ipapermtargetfilter,omitempty"` + + /* +Target DN +Optional DN to apply the permission to (must be in the subtree, but may not yet exist) + */ + Ipapermtarget *string `json:"ipapermtarget,omitempty"` + + /* +Target DN subtree +Optional DN subtree where an entry can be moved to (must be in the subtree, but may not yet exist) + */ + Ipapermtargetto *string `json:"ipapermtargetto,omitempty"` + + /* +Origin DN subtree +Optional DN subtree from where an entry can be moved (must be in the subtree, but may not yet exist) + */ + Ipapermtargetfrom *string `json:"ipapermtargetfrom,omitempty"` + + /* +Member of group +Target members of a group (sets memberOf targetfilter) + */ + Memberof *[]string `json:"memberof,omitempty"` + + /* +Target group +User group to apply permissions to (sets target) + */ + Targetgroup *string `json:"targetgroup,omitempty"` + + /* +Type +Type of IPA object (sets subtree and objectClass targetfilter) + */ + Type *string `json:"type,omitempty"` + + /* + +Deprecated; use extratargetfilter + */ + Filter *[]string `json:"filter,omitempty"` + + /* + +Deprecated; use ipapermlocation + */ + Subtree *[]string `json:"subtree,omitempty"` + + /* + +Deprecated; use ipapermright + */ + Permissions *[]string `json:"permissions,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("name") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } type permissionFindKwParams struct { - *PermissionFindArgs - *PermissionFindOptionalArgs + *PermissionFindArgs + *PermissionFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type permissionFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *PermissionFindResult `json:"result"` } type PermissionFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Permission `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Permission `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *PermissionFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("PermissionFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("PermissionFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("PermissionFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("PermissionFindResult%v", string(b)) } /* Modify a permission. */ func (c *Client) PermissionMod( - reqArgs *PermissionModArgs, - optArgs *PermissionModOptionalArgs, // can be nil + reqArgs *PermissionModArgs, + optArgs *PermissionModOptionalArgs, // can be nil ) (*PermissionModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := permissionModKwParams{ - PermissionModArgs: reqArgs, - PermissionModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "permission_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res permissionModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := permissionModKwParams{ + PermissionModArgs: reqArgs, + PermissionModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "permission_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res permissionModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type PermissionModArgs struct { + + /* +Permission name - /* - Permission name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type PermissionModOptionalArgs struct { - - /* - Granted rights - Rights to grant (read, search, compare, write, add, delete, all) - */ - Ipapermright *[]string `json:"ipapermright,omitempty"` - - /* - Effective attributes - All attributes to which the permission applies - */ - Attrs *[]string `json:"attrs,omitempty"` - - /* - Included attributes - User-specified attributes to which the permission applies - */ - Ipapermincludedattr *[]string `json:"ipapermincludedattr,omitempty"` - - /* - Excluded attributes - User-specified attributes to which the permission explicitly does not apply - */ - Ipapermexcludedattr *[]string `json:"ipapermexcludedattr,omitempty"` - - /* - Bind rule type - Bind rule type - */ - Ipapermbindruletype *string `json:"ipapermbindruletype,omitempty"` - - /* - Subtree - Subtree to apply permissions to - */ - Ipapermlocation *string `json:"ipapermlocation,omitempty"` - - /* - Extra target filter - Extra target filter - */ - Extratargetfilter *[]string `json:"extratargetfilter,omitempty"` - - /* - Raw target filter - All target filters, including those implied by type and memberof - */ - Ipapermtargetfilter *[]string `json:"ipapermtargetfilter,omitempty"` - - /* - Target DN - Optional DN to apply the permission to (must be in the subtree, but may not yet exist) - */ - Ipapermtarget *string `json:"ipapermtarget,omitempty"` - - /* - Target DN subtree - Optional DN subtree where an entry can be moved to (must be in the subtree, but may not yet exist) - */ - Ipapermtargetto *string `json:"ipapermtargetto,omitempty"` - - /* - Origin DN subtree - Optional DN subtree from where an entry can be moved (must be in the subtree, but may not yet exist) - */ - Ipapermtargetfrom *string `json:"ipapermtargetfrom,omitempty"` - - /* - Member of group - Target members of a group (sets memberOf targetfilter) - */ - Memberof *[]string `json:"memberof,omitempty"` - - /* - Target group - User group to apply permissions to (sets target) - */ - Targetgroup *string `json:"targetgroup,omitempty"` - - /* - Type - Type of IPA object (sets subtree and objectClass targetfilter) - */ - Type *string `json:"type,omitempty"` - - /* - - Deprecated; use extratargetfilter - */ - Filter *[]string `json:"filter,omitempty"` - - /* - - Deprecated; use ipapermlocation - */ - Subtree *[]string `json:"subtree,omitempty"` - - /* - - Deprecated; use ipapermright - */ - Permissions *[]string `json:"permissions,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - Rename - Rename the permission object - */ - Rename *string `json:"rename,omitempty"` -} + + /* +Granted rights +Rights to grant (read, search, compare, write, add, delete, all) + */ + Ipapermright *[]string `json:"ipapermright,omitempty"` + + /* +Effective attributes +All attributes to which the permission applies + */ + Attrs *[]string `json:"attrs,omitempty"` + + /* +Included attributes +User-specified attributes to which the permission applies + */ + Ipapermincludedattr *[]string `json:"ipapermincludedattr,omitempty"` + + /* +Excluded attributes +User-specified attributes to which the permission explicitly does not apply + */ + Ipapermexcludedattr *[]string `json:"ipapermexcludedattr,omitempty"` + + /* +Bind rule type +Bind rule type + */ + Ipapermbindruletype *string `json:"ipapermbindruletype,omitempty"` + + /* +Subtree +Subtree to apply permissions to + */ + Ipapermlocation *string `json:"ipapermlocation,omitempty"` + + /* +Extra target filter +Extra target filter + */ + Extratargetfilter *[]string `json:"extratargetfilter,omitempty"` + + /* +Raw target filter +All target filters, including those implied by type and memberof + */ + Ipapermtargetfilter *[]string `json:"ipapermtargetfilter,omitempty"` + + /* +Target DN +Optional DN to apply the permission to (must be in the subtree, but may not yet exist) + */ + Ipapermtarget *string `json:"ipapermtarget,omitempty"` + + /* +Target DN subtree +Optional DN subtree where an entry can be moved to (must be in the subtree, but may not yet exist) + */ + Ipapermtargetto *string `json:"ipapermtargetto,omitempty"` + + /* +Origin DN subtree +Optional DN subtree from where an entry can be moved (must be in the subtree, but may not yet exist) + */ + Ipapermtargetfrom *string `json:"ipapermtargetfrom,omitempty"` + + /* +Member of group +Target members of a group (sets memberOf targetfilter) + */ + Memberof *[]string `json:"memberof,omitempty"` + + /* +Target group +User group to apply permissions to (sets target) + */ + Targetgroup *string `json:"targetgroup,omitempty"` + + /* +Type +Type of IPA object (sets subtree and objectClass targetfilter) + */ + Type *string `json:"type,omitempty"` + + /* + +Deprecated; use extratargetfilter + */ + Filter *[]string `json:"filter,omitempty"` + + /* + +Deprecated; use ipapermlocation + */ + Subtree *[]string `json:"subtree,omitempty"` + + /* + +Deprecated; use ipapermright + */ + Permissions *[]string `json:"permissions,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +Rename +Rename the permission object + */ + Rename *string `json:"rename,omitempty"` + } type permissionModKwParams struct { - *PermissionModArgs - *PermissionModOptionalArgs + *PermissionModArgs + *PermissionModOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type permissionModResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *PermissionModResult `json:"result"` } type PermissionModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Permission `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Permission `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *PermissionModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("PermissionModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("PermissionModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("PermissionModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("PermissionModResult%v", string(b)) } /* Remove members from a permission. */ func (c *Client) PermissionRemoveMember( - reqArgs *PermissionRemoveMemberArgs, - optArgs *PermissionRemoveMemberOptionalArgs, // can be nil + reqArgs *PermissionRemoveMemberArgs, + optArgs *PermissionRemoveMemberOptionalArgs, // can be nil ) (*PermissionRemoveMemberResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := permissionRemoveMemberKwParams{ - PermissionRemoveMemberArgs: reqArgs, - PermissionRemoveMemberOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "permission_remove_member", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res permissionRemoveMemberResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := permissionRemoveMemberKwParams{ + PermissionRemoveMemberArgs: reqArgs, + PermissionRemoveMemberOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "permission_remove_member", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res permissionRemoveMemberResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type PermissionRemoveMemberArgs struct { + + /* +Permission name - /* - Permission name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type PermissionRemoveMemberOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member privilege - privileges to remove - */ - Privilege *[]string `json:"privilege,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member privilege +privileges to remove + */ + Privilege *[]string `json:"privilege,omitempty"` + } type permissionRemoveMemberKwParams struct { - *PermissionRemoveMemberArgs - *PermissionRemoveMemberOptionalArgs + *PermissionRemoveMemberArgs + *PermissionRemoveMemberOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type permissionRemoveMemberResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *PermissionRemoveMemberResult `json:"result"` } type PermissionRemoveMemberResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *PermissionRemoveMemberResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("PermissionRemoveMemberResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("PermissionRemoveMemberResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("PermissionRemoveMemberResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("PermissionRemoveMemberResult%v", string(b)) } /* Display information about a permission. */ func (c *Client) PermissionShow( - reqArgs *PermissionShowArgs, - optArgs *PermissionShowOptionalArgs, // can be nil + reqArgs *PermissionShowArgs, + optArgs *PermissionShowOptionalArgs, // can be nil ) (*PermissionShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := permissionShowKwParams{ - PermissionShowArgs: reqArgs, - PermissionShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "permission_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res permissionShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := permissionShowKwParams{ + PermissionShowArgs: reqArgs, + PermissionShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "permission_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res permissionShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type PermissionShowArgs struct { + + /* +Permission name - /* - Permission name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type PermissionShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type permissionShowKwParams struct { - *PermissionShowArgs - *PermissionShowOptionalArgs + *PermissionShowArgs + *PermissionShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type permissionShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *PermissionShowResult `json:"result"` } type PermissionShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Permission `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Permission `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *PermissionShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("PermissionShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("PermissionShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("PermissionShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("PermissionShowResult%v", string(b)) } /* Ping a remote server. */ func (c *Client) Ping( - reqArgs *PingArgs, - optArgs *PingOptionalArgs, // can be nil + reqArgs *PingArgs, + optArgs *PingOptionalArgs, // can be nil ) (*PingResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := pingKwParams{ - PingArgs: reqArgs, - PingOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "ping", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res pingResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := pingKwParams{ + PingArgs: reqArgs, + PingOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "ping", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res pingResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type PingArgs struct { -} + } type PingOptionalArgs struct { -} + } type pingKwParams struct { - *PingArgs - *PingOptionalArgs + *PingArgs + *PingOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type pingResponse struct { @@ -35217,67904 +37007,71174 @@ type pingResponse struct { } type PingResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + } func (t *PingResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("PingResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("PingResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("PingResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("PingResult%v", string(b)) } /* -Enable or Disable Anonymous PKINIT. +Report PKINIT status on the IPA masters */ -func (c *Client) PkinitAnonymous( - reqArgs *PkinitAnonymousArgs, - optArgs *PkinitAnonymousOptionalArgs, // can be nil -) (*PkinitAnonymousResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := pkinitAnonymousKwParams{ - PkinitAnonymousArgs: reqArgs, - PkinitAnonymousOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "pkinit_anonymous", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res pkinitAnonymousResponse +func (c *Client) PkinitStatus( + criteria string, // A string searched in all relevant object attributes + reqArgs *PkinitStatusArgs, + optArgs *PkinitStatusOptionalArgs, // can be nil +) (*PkinitStatusResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := pkinitStatusKwParams{ + PkinitStatusArgs: reqArgs, + PkinitStatusOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "pkinit_status", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res pkinitStatusResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type PkinitAnonymousArgs struct { - - /* - - - */ - Action string `json:"action,omitempty"` -} - -type PkinitAnonymousOptionalArgs struct { -} - -type pkinitAnonymousKwParams struct { - *PkinitAnonymousArgs - *PkinitAnonymousOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type pkinitAnonymousResponse struct { - Error *Error `json:"error"` - Result *PkinitAnonymousResult `json:"result"` -} - -type PkinitAnonymousResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` -} - -func (t *PkinitAnonymousResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("PkinitAnonymousResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("PkinitAnonymousResult%v", string(b)) + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} + +type PkinitStatusArgs struct { + } + +type PkinitStatusOptionalArgs struct { + + /* +Server name +IPA server hostname + */ + ServerServer *string `json:"server_server,omitempty"` + + /* +PKINIT status +Whether PKINIT is enabled or disabled + */ + Status *string `json:"status,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } + +type pkinitStatusKwParams struct { + *PkinitStatusArgs + *PkinitStatusOptionalArgs + + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} + +type pkinitStatusResponse struct { + Error *Error `json:"error"` + Result *PkinitStatusResult `json:"result"` +} + +type PkinitStatusResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []interface{} `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } + +func (t *PkinitStatusResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("PkinitStatusResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("PkinitStatusResult%v", string(b)) } /* Show all loaded plugins. */ func (c *Client) Plugins( - reqArgs *PluginsArgs, - optArgs *PluginsOptionalArgs, // can be nil + reqArgs *PluginsArgs, + optArgs *PluginsOptionalArgs, // can be nil ) (*PluginsResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := pluginsKwParams{ - PluginsArgs: reqArgs, - PluginsOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "plugins", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res pluginsResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := pluginsKwParams{ + PluginsArgs: reqArgs, + PluginsOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "plugins", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res pluginsResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type PluginsArgs struct { -} + } type PluginsOptionalArgs struct { + + /* - /* - - Forward to server instead of running locally - */ - Server *bool `json:"server,omitempty"` - - /* +Forward to server instead of running locally + */ + Server *bool `json:"server,omitempty"` + + /* - retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` -} +retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + } type pluginsKwParams struct { - *PluginsArgs - *PluginsOptionalArgs + *PluginsArgs + *PluginsOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type pluginsResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *PluginsResult `json:"result"` } type PluginsResult struct { - - /* - Dictionary mapping plugin names to bases - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Number of plugins loaded - (required) - */ - Count int `json:"count,omitempty"` - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` -} + + + /* +Dictionary mapping plugin names to bases + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Number of plugins loaded + (required) + */ + Count int `json:"count,omitempty"` + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + } func (t *PluginsResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("PluginsResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("PluginsResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("PluginsResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("PluginsResult%v", string(b)) } /* Add a new privilege. */ func (c *Client) PrivilegeAdd( - reqArgs *PrivilegeAddArgs, - optArgs *PrivilegeAddOptionalArgs, // can be nil + reqArgs *PrivilegeAddArgs, + optArgs *PrivilegeAddOptionalArgs, // can be nil ) (*PrivilegeAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := privilegeAddKwParams{ - PrivilegeAddArgs: reqArgs, - PrivilegeAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "privilege_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res privilegeAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := privilegeAddKwParams{ + PrivilegeAddArgs: reqArgs, + PrivilegeAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "privilege_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res privilegeAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type PrivilegeAddArgs struct { + + /* +Privilege name - /* - Privilege name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type PrivilegeAddOptionalArgs struct { - - /* - Description - Privilege description - */ - Description *string `json:"description,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Description +Privilege description + */ + Description *string `json:"description,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type privilegeAddKwParams struct { - *PrivilegeAddArgs - *PrivilegeAddOptionalArgs + *PrivilegeAddArgs + *PrivilegeAddOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type privilegeAddResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *PrivilegeAddResult `json:"result"` } type PrivilegeAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Privilege `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Privilege `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *PrivilegeAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("PrivilegeAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("PrivilegeAddResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("PrivilegeAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("PrivilegeAddResult%v", string(b)) } /* Add members to a privilege. */ func (c *Client) PrivilegeAddMember( - reqArgs *PrivilegeAddMemberArgs, - optArgs *PrivilegeAddMemberOptionalArgs, // can be nil + reqArgs *PrivilegeAddMemberArgs, + optArgs *PrivilegeAddMemberOptionalArgs, // can be nil ) (*PrivilegeAddMemberResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := privilegeAddMemberKwParams{ - PrivilegeAddMemberArgs: reqArgs, - PrivilegeAddMemberOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "privilege_add_member", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res privilegeAddMemberResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := privilegeAddMemberKwParams{ + PrivilegeAddMemberArgs: reqArgs, + PrivilegeAddMemberOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "privilege_add_member", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res privilegeAddMemberResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type PrivilegeAddMemberArgs struct { + + /* +Privilege name - /* - Privilege name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type PrivilegeAddMemberOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member role - roles to add - */ - Role *[]string `json:"role,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member role +roles to add + */ + Role *[]string `json:"role,omitempty"` + } type privilegeAddMemberKwParams struct { - *PrivilegeAddMemberArgs - *PrivilegeAddMemberOptionalArgs + *PrivilegeAddMemberArgs + *PrivilegeAddMemberOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type privilegeAddMemberResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *PrivilegeAddMemberResult `json:"result"` } type PrivilegeAddMemberResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *PrivilegeAddMemberResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("PrivilegeAddMemberResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("PrivilegeAddMemberResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("PrivilegeAddMemberResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("PrivilegeAddMemberResult%v", string(b)) } /* Add permissions to a privilege. */ func (c *Client) PrivilegeAddPermission( - reqArgs *PrivilegeAddPermissionArgs, - optArgs *PrivilegeAddPermissionOptionalArgs, // can be nil + reqArgs *PrivilegeAddPermissionArgs, + optArgs *PrivilegeAddPermissionOptionalArgs, // can be nil ) (*PrivilegeAddPermissionResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := privilegeAddPermissionKwParams{ - PrivilegeAddPermissionArgs: reqArgs, - PrivilegeAddPermissionOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "privilege_add_permission", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res privilegeAddPermissionResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := privilegeAddPermissionKwParams{ + PrivilegeAddPermissionArgs: reqArgs, + PrivilegeAddPermissionOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "privilege_add_permission", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res privilegeAddPermissionResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type PrivilegeAddPermissionArgs struct { + + /* +Privilege name - /* - Privilege name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type PrivilegeAddPermissionOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - permission - permissions - */ - Permission *[]string `json:"permission,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +permission +permissions + */ + Permission *[]string `json:"permission,omitempty"` + } type privilegeAddPermissionKwParams struct { - *PrivilegeAddPermissionArgs - *PrivilegeAddPermissionOptionalArgs + *PrivilegeAddPermissionArgs + *PrivilegeAddPermissionOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type privilegeAddPermissionResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *PrivilegeAddPermissionResult `json:"result"` } type PrivilegeAddPermissionResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of permissions added - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of permissions added + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *PrivilegeAddPermissionResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("PrivilegeAddPermissionResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("PrivilegeAddPermissionResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("PrivilegeAddPermissionResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("PrivilegeAddPermissionResult%v", string(b)) } /* Delete a privilege. */ func (c *Client) PrivilegeDel( - reqArgs *PrivilegeDelArgs, - optArgs *PrivilegeDelOptionalArgs, // can be nil + reqArgs *PrivilegeDelArgs, + optArgs *PrivilegeDelOptionalArgs, // can be nil ) (*PrivilegeDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := privilegeDelKwParams{ - PrivilegeDelArgs: reqArgs, - PrivilegeDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "privilege_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res privilegeDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := privilegeDelKwParams{ + PrivilegeDelArgs: reqArgs, + PrivilegeDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "privilege_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res privilegeDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type PrivilegeDelArgs struct { + + /* +Privilege name - /* - Privilege name - - */ - Cn []string `json:"cn,omitempty"` -} + */ + Cn []string `json:"cn,omitempty"` + } type PrivilegeDelOptionalArgs struct { + + /* - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` -} +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } type privilegeDelKwParams struct { - *PrivilegeDelArgs - *PrivilegeDelOptionalArgs + *PrivilegeDelArgs + *PrivilegeDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type privilegeDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *PrivilegeDelResult `json:"result"` } type PrivilegeDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } func (t *PrivilegeDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("PrivilegeDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("PrivilegeDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("PrivilegeDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("PrivilegeDelResult%v", string(b)) } /* Search for privileges. */ func (c *Client) PrivilegeFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *PrivilegeFindArgs, - optArgs *PrivilegeFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *PrivilegeFindArgs, + optArgs *PrivilegeFindOptionalArgs, // can be nil ) (*PrivilegeFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := privilegeFindKwParams{ - PrivilegeFindArgs: reqArgs, - PrivilegeFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "privilege_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res privilegeFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := privilegeFindKwParams{ + PrivilegeFindArgs: reqArgs, + PrivilegeFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "privilege_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res privilegeFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type PrivilegeFindArgs struct { -} + } type PrivilegeFindOptionalArgs struct { - - /* - Privilege name - - */ - Cn *string `json:"cn,omitempty"` - - /* - Description - Privilege description - */ - Description *string `json:"description,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("name") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} + + /* +Privilege name + + */ + Cn *string `json:"cn,omitempty"` + + /* +Description +Privilege description + */ + Description *string `json:"description,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("name") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } type privilegeFindKwParams struct { - *PrivilegeFindArgs - *PrivilegeFindOptionalArgs + *PrivilegeFindArgs + *PrivilegeFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type privilegeFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *PrivilegeFindResult `json:"result"` } type PrivilegeFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Privilege `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Privilege `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *PrivilegeFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("PrivilegeFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("PrivilegeFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("PrivilegeFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("PrivilegeFindResult%v", string(b)) } /* Modify a privilege. */ func (c *Client) PrivilegeMod( - reqArgs *PrivilegeModArgs, - optArgs *PrivilegeModOptionalArgs, // can be nil + reqArgs *PrivilegeModArgs, + optArgs *PrivilegeModOptionalArgs, // can be nil ) (*PrivilegeModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := privilegeModKwParams{ - PrivilegeModArgs: reqArgs, - PrivilegeModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "privilege_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res privilegeModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := privilegeModKwParams{ + PrivilegeModArgs: reqArgs, + PrivilegeModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "privilege_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res privilegeModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type PrivilegeModArgs struct { + + /* +Privilege name - /* - Privilege name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type PrivilegeModOptionalArgs struct { - - /* - Description - Privilege description - */ - Description *string `json:"description,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - Rename - Rename the privilege object - */ - Rename *string `json:"rename,omitempty"` -} + + /* +Description +Privilege description + */ + Description *string `json:"description,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +Rename +Rename the privilege object + */ + Rename *string `json:"rename,omitempty"` + } type privilegeModKwParams struct { - *PrivilegeModArgs - *PrivilegeModOptionalArgs + *PrivilegeModArgs + *PrivilegeModOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type privilegeModResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *PrivilegeModResult `json:"result"` } type PrivilegeModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Privilege `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Privilege `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *PrivilegeModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("PrivilegeModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("PrivilegeModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("PrivilegeModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("PrivilegeModResult%v", string(b)) } /* Remove members from a privilege */ func (c *Client) PrivilegeRemoveMember( - reqArgs *PrivilegeRemoveMemberArgs, - optArgs *PrivilegeRemoveMemberOptionalArgs, // can be nil + reqArgs *PrivilegeRemoveMemberArgs, + optArgs *PrivilegeRemoveMemberOptionalArgs, // can be nil ) (*PrivilegeRemoveMemberResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := privilegeRemoveMemberKwParams{ - PrivilegeRemoveMemberArgs: reqArgs, - PrivilegeRemoveMemberOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "privilege_remove_member", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res privilegeRemoveMemberResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := privilegeRemoveMemberKwParams{ + PrivilegeRemoveMemberArgs: reqArgs, + PrivilegeRemoveMemberOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "privilege_remove_member", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res privilegeRemoveMemberResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type PrivilegeRemoveMemberArgs struct { + + /* +Privilege name - /* - Privilege name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type PrivilegeRemoveMemberOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member role - roles to remove - */ - Role *[]string `json:"role,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member role +roles to remove + */ + Role *[]string `json:"role,omitempty"` + } type privilegeRemoveMemberKwParams struct { - *PrivilegeRemoveMemberArgs - *PrivilegeRemoveMemberOptionalArgs + *PrivilegeRemoveMemberArgs + *PrivilegeRemoveMemberOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type privilegeRemoveMemberResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *PrivilegeRemoveMemberResult `json:"result"` } type PrivilegeRemoveMemberResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *PrivilegeRemoveMemberResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("PrivilegeRemoveMemberResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("PrivilegeRemoveMemberResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("PrivilegeRemoveMemberResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("PrivilegeRemoveMemberResult%v", string(b)) } /* Remove permissions from a privilege. */ func (c *Client) PrivilegeRemovePermission( - reqArgs *PrivilegeRemovePermissionArgs, - optArgs *PrivilegeRemovePermissionOptionalArgs, // can be nil + reqArgs *PrivilegeRemovePermissionArgs, + optArgs *PrivilegeRemovePermissionOptionalArgs, // can be nil ) (*PrivilegeRemovePermissionResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := privilegeRemovePermissionKwParams{ - PrivilegeRemovePermissionArgs: reqArgs, - PrivilegeRemovePermissionOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "privilege_remove_permission", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res privilegeRemovePermissionResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := privilegeRemovePermissionKwParams{ + PrivilegeRemovePermissionArgs: reqArgs, + PrivilegeRemovePermissionOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "privilege_remove_permission", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res privilegeRemovePermissionResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type PrivilegeRemovePermissionArgs struct { + + /* +Privilege name - /* - Privilege name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type PrivilegeRemovePermissionOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - permission - permissions - */ - Permission *[]string `json:"permission,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +permission +permissions + */ + Permission *[]string `json:"permission,omitempty"` + } type privilegeRemovePermissionKwParams struct { - *PrivilegeRemovePermissionArgs - *PrivilegeRemovePermissionOptionalArgs + *PrivilegeRemovePermissionArgs + *PrivilegeRemovePermissionOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type privilegeRemovePermissionResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *PrivilegeRemovePermissionResult `json:"result"` } type PrivilegeRemovePermissionResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of permissions removed - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of permissions removed + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *PrivilegeRemovePermissionResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("PrivilegeRemovePermissionResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("PrivilegeRemovePermissionResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("PrivilegeRemovePermissionResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("PrivilegeRemovePermissionResult%v", string(b)) } /* Display information about a privilege. */ func (c *Client) PrivilegeShow( - reqArgs *PrivilegeShowArgs, - optArgs *PrivilegeShowOptionalArgs, // can be nil + reqArgs *PrivilegeShowArgs, + optArgs *PrivilegeShowOptionalArgs, // can be nil ) (*PrivilegeShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := privilegeShowKwParams{ - PrivilegeShowArgs: reqArgs, - PrivilegeShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "privilege_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res privilegeShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := privilegeShowKwParams{ + PrivilegeShowArgs: reqArgs, + PrivilegeShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "privilege_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res privilegeShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type PrivilegeShowArgs struct { + + /* +Privilege name - /* - Privilege name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type PrivilegeShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type privilegeShowKwParams struct { - *PrivilegeShowArgs - *PrivilegeShowOptionalArgs + *PrivilegeShowArgs + *PrivilegeShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type privilegeShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *PrivilegeShowResult `json:"result"` } type PrivilegeShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Privilege `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Privilege `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *PrivilegeShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("PrivilegeShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("PrivilegeShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("PrivilegeShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("PrivilegeShowResult%v", string(b)) } /* Add a new group password policy. */ func (c *Client) PwpolicyAdd( - reqArgs *PwpolicyAddArgs, - optArgs *PwpolicyAddOptionalArgs, // can be nil + reqArgs *PwpolicyAddArgs, + optArgs *PwpolicyAddOptionalArgs, // can be nil ) (*PwpolicyAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := pwpolicyAddKwParams{ - PwpolicyAddArgs: reqArgs, - PwpolicyAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "pwpolicy_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res pwpolicyAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := pwpolicyAddKwParams{ + PwpolicyAddArgs: reqArgs, + PwpolicyAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "pwpolicy_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res pwpolicyAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type PwpolicyAddArgs struct { - - /* - Group - Manage password policy for specific group - */ - Cn string `json:"cn,omitempty"` - - /* - Priority - Priority of the policy (higher number means lower priority - */ - Cospriority int `json:"cospriority,omitempty"` -} + + /* +Group +Manage password policy for specific group + */ + Cn string `json:"cn,omitempty"` + + /* +Priority +Priority of the policy (higher number means lower priority + */ + Cospriority int `json:"cospriority,omitempty"` + } type PwpolicyAddOptionalArgs struct { - - /* - Max lifetime (days) - Maximum password lifetime (in days) - */ - Krbmaxpwdlife *int `json:"krbmaxpwdlife,omitempty"` - - /* - Min lifetime (hours) - Minimum password lifetime (in hours) - */ - Krbminpwdlife *int `json:"krbminpwdlife,omitempty"` - - /* - History size - Password history size - */ - Krbpwdhistorylength *int `json:"krbpwdhistorylength,omitempty"` - - /* - Character classes - Minimum number of character classes - */ - Krbpwdmindiffchars *int `json:"krbpwdmindiffchars,omitempty"` - - /* - Min length - Minimum length of password - */ - Krbpwdminlength *int `json:"krbpwdminlength,omitempty"` - - /* - Max failures - Consecutive failures before lockout - */ - Krbpwdmaxfailure *int `json:"krbpwdmaxfailure,omitempty"` - - /* - Failure reset interval - Period after which failure count will be reset (seconds) - */ - Krbpwdfailurecountinterval *int `json:"krbpwdfailurecountinterval,omitempty"` - - /* - Lockout duration - Period for which lockout is enforced (seconds) - */ - Krbpwdlockoutduration *int `json:"krbpwdlockoutduration,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Max lifetime (days) +Maximum password lifetime (in days) + */ + Krbmaxpwdlife *int `json:"krbmaxpwdlife,omitempty"` + + /* +Min lifetime (hours) +Minimum password lifetime (in hours) + */ + Krbminpwdlife *int `json:"krbminpwdlife,omitempty"` + + /* +History size +Password history size + */ + Krbpwdhistorylength *int `json:"krbpwdhistorylength,omitempty"` + + /* +Character classes +Minimum number of character classes + */ + Krbpwdmindiffchars *int `json:"krbpwdmindiffchars,omitempty"` + + /* +Min length +Minimum length of password + */ + Krbpwdminlength *int `json:"krbpwdminlength,omitempty"` + + /* +Max failures +Consecutive failures before lockout + */ + Krbpwdmaxfailure *int `json:"krbpwdmaxfailure,omitempty"` + + /* +Failure reset interval +Period after which failure count will be reset (seconds) + */ + Krbpwdfailurecountinterval *int `json:"krbpwdfailurecountinterval,omitempty"` + + /* +Lockout duration +Period for which lockout is enforced (seconds) + */ + Krbpwdlockoutduration *int `json:"krbpwdlockoutduration,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type pwpolicyAddKwParams struct { - *PwpolicyAddArgs - *PwpolicyAddOptionalArgs + *PwpolicyAddArgs + *PwpolicyAddOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type pwpolicyAddResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *PwpolicyAddResult `json:"result"` } type PwpolicyAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Pwpolicy `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Pwpolicy `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *PwpolicyAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("PwpolicyAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("PwpolicyAddResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("PwpolicyAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("PwpolicyAddResult%v", string(b)) } /* Delete a group password policy. */ func (c *Client) PwpolicyDel( - reqArgs *PwpolicyDelArgs, - optArgs *PwpolicyDelOptionalArgs, // can be nil + reqArgs *PwpolicyDelArgs, + optArgs *PwpolicyDelOptionalArgs, // can be nil ) (*PwpolicyDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := pwpolicyDelKwParams{ - PwpolicyDelArgs: reqArgs, - PwpolicyDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "pwpolicy_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res pwpolicyDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := pwpolicyDelKwParams{ + PwpolicyDelArgs: reqArgs, + PwpolicyDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "pwpolicy_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res pwpolicyDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type PwpolicyDelArgs struct { - - /* - Group - Manage password policy for specific group - */ - Cn []string `json:"cn,omitempty"` -} + + /* +Group +Manage password policy for specific group + */ + Cn []string `json:"cn,omitempty"` + } type PwpolicyDelOptionalArgs struct { + + /* - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` -} +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } type pwpolicyDelKwParams struct { - *PwpolicyDelArgs - *PwpolicyDelOptionalArgs + *PwpolicyDelArgs + *PwpolicyDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type pwpolicyDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *PwpolicyDelResult `json:"result"` } type PwpolicyDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } func (t *PwpolicyDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("PwpolicyDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("PwpolicyDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("PwpolicyDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("PwpolicyDelResult%v", string(b)) } /* Search for group password policies. */ func (c *Client) PwpolicyFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *PwpolicyFindArgs, - optArgs *PwpolicyFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *PwpolicyFindArgs, + optArgs *PwpolicyFindOptionalArgs, // can be nil ) (*PwpolicyFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := pwpolicyFindKwParams{ - PwpolicyFindArgs: reqArgs, - PwpolicyFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "pwpolicy_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res pwpolicyFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := pwpolicyFindKwParams{ + PwpolicyFindArgs: reqArgs, + PwpolicyFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "pwpolicy_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res pwpolicyFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type PwpolicyFindArgs struct { -} + } type PwpolicyFindOptionalArgs struct { - - /* - Group - Manage password policy for specific group - */ - Cn *string `json:"cn,omitempty"` - - /* - Max lifetime (days) - Maximum password lifetime (in days) - */ - Krbmaxpwdlife *int `json:"krbmaxpwdlife,omitempty"` - - /* - Min lifetime (hours) - Minimum password lifetime (in hours) - */ - Krbminpwdlife *int `json:"krbminpwdlife,omitempty"` - - /* - History size - Password history size - */ - Krbpwdhistorylength *int `json:"krbpwdhistorylength,omitempty"` - - /* - Character classes - Minimum number of character classes - */ - Krbpwdmindiffchars *int `json:"krbpwdmindiffchars,omitempty"` - - /* - Min length - Minimum length of password - */ - Krbpwdminlength *int `json:"krbpwdminlength,omitempty"` - - /* - Priority - Priority of the policy (higher number means lower priority - */ - Cospriority *int `json:"cospriority,omitempty"` - - /* - Max failures - Consecutive failures before lockout - */ - Krbpwdmaxfailure *int `json:"krbpwdmaxfailure,omitempty"` - - /* - Failure reset interval - Period after which failure count will be reset (seconds) - */ - Krbpwdfailurecountinterval *int `json:"krbpwdfailurecountinterval,omitempty"` - - /* - Lockout duration - Period for which lockout is enforced (seconds) - */ - Krbpwdlockoutduration *int `json:"krbpwdlockoutduration,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("group") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} + + /* +Group +Manage password policy for specific group + */ + Cn *string `json:"cn,omitempty"` + + /* +Max lifetime (days) +Maximum password lifetime (in days) + */ + Krbmaxpwdlife *int `json:"krbmaxpwdlife,omitempty"` + + /* +Min lifetime (hours) +Minimum password lifetime (in hours) + */ + Krbminpwdlife *int `json:"krbminpwdlife,omitempty"` + + /* +History size +Password history size + */ + Krbpwdhistorylength *int `json:"krbpwdhistorylength,omitempty"` + + /* +Character classes +Minimum number of character classes + */ + Krbpwdmindiffchars *int `json:"krbpwdmindiffchars,omitempty"` + + /* +Min length +Minimum length of password + */ + Krbpwdminlength *int `json:"krbpwdminlength,omitempty"` + + /* +Priority +Priority of the policy (higher number means lower priority + */ + Cospriority *int `json:"cospriority,omitempty"` + + /* +Max failures +Consecutive failures before lockout + */ + Krbpwdmaxfailure *int `json:"krbpwdmaxfailure,omitempty"` + + /* +Failure reset interval +Period after which failure count will be reset (seconds) + */ + Krbpwdfailurecountinterval *int `json:"krbpwdfailurecountinterval,omitempty"` + + /* +Lockout duration +Period for which lockout is enforced (seconds) + */ + Krbpwdlockoutduration *int `json:"krbpwdlockoutduration,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("group") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } type pwpolicyFindKwParams struct { - *PwpolicyFindArgs - *PwpolicyFindOptionalArgs + *PwpolicyFindArgs + *PwpolicyFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type pwpolicyFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *PwpolicyFindResult `json:"result"` } type PwpolicyFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Pwpolicy `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Pwpolicy `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *PwpolicyFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("PwpolicyFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("PwpolicyFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("PwpolicyFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("PwpolicyFindResult%v", string(b)) } /* Modify a group password policy. */ func (c *Client) PwpolicyMod( - cn string, // Manage password policy for specific group - reqArgs *PwpolicyModArgs, - optArgs *PwpolicyModOptionalArgs, // can be nil + cn string, // Manage password policy for specific group + reqArgs *PwpolicyModArgs, + optArgs *PwpolicyModOptionalArgs, // can be nil ) (*PwpolicyModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := pwpolicyModKwParams{ - PwpolicyModArgs: reqArgs, - PwpolicyModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "pwpolicy_mod", - Params: []interface{}{ - []interface{}{cn}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res pwpolicyModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := pwpolicyModKwParams{ + PwpolicyModArgs: reqArgs, + PwpolicyModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "pwpolicy_mod", + Params: []interface{}{ + []interface{}{cn, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res pwpolicyModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type PwpolicyModArgs struct { -} + } type PwpolicyModOptionalArgs struct { - - /* - Max lifetime (days) - Maximum password lifetime (in days) - */ - Krbmaxpwdlife *int `json:"krbmaxpwdlife,omitempty"` - - /* - Min lifetime (hours) - Minimum password lifetime (in hours) - */ - Krbminpwdlife *int `json:"krbminpwdlife,omitempty"` - - /* - History size - Password history size - */ - Krbpwdhistorylength *int `json:"krbpwdhistorylength,omitempty"` - - /* - Character classes - Minimum number of character classes - */ - Krbpwdmindiffchars *int `json:"krbpwdmindiffchars,omitempty"` - - /* - Min length - Minimum length of password - */ - Krbpwdminlength *int `json:"krbpwdminlength,omitempty"` - - /* - Priority - Priority of the policy (higher number means lower priority - */ - Cospriority *int `json:"cospriority,omitempty"` - - /* - Max failures - Consecutive failures before lockout - */ - Krbpwdmaxfailure *int `json:"krbpwdmaxfailure,omitempty"` - - /* - Failure reset interval - Period after which failure count will be reset (seconds) - */ - Krbpwdfailurecountinterval *int `json:"krbpwdfailurecountinterval,omitempty"` - - /* - Lockout duration - Period for which lockout is enforced (seconds) - */ - Krbpwdlockoutduration *int `json:"krbpwdlockoutduration,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Max lifetime (days) +Maximum password lifetime (in days) + */ + Krbmaxpwdlife *int `json:"krbmaxpwdlife,omitempty"` + + /* +Min lifetime (hours) +Minimum password lifetime (in hours) + */ + Krbminpwdlife *int `json:"krbminpwdlife,omitempty"` + + /* +History size +Password history size + */ + Krbpwdhistorylength *int `json:"krbpwdhistorylength,omitempty"` + + /* +Character classes +Minimum number of character classes + */ + Krbpwdmindiffchars *int `json:"krbpwdmindiffchars,omitempty"` + + /* +Min length +Minimum length of password + */ + Krbpwdminlength *int `json:"krbpwdminlength,omitempty"` + + /* +Priority +Priority of the policy (higher number means lower priority + */ + Cospriority *int `json:"cospriority,omitempty"` + + /* +Max failures +Consecutive failures before lockout + */ + Krbpwdmaxfailure *int `json:"krbpwdmaxfailure,omitempty"` + + /* +Failure reset interval +Period after which failure count will be reset (seconds) + */ + Krbpwdfailurecountinterval *int `json:"krbpwdfailurecountinterval,omitempty"` + + /* +Lockout duration +Period for which lockout is enforced (seconds) + */ + Krbpwdlockoutduration *int `json:"krbpwdlockoutduration,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type pwpolicyModKwParams struct { - *PwpolicyModArgs - *PwpolicyModOptionalArgs + *PwpolicyModArgs + *PwpolicyModOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type pwpolicyModResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *PwpolicyModResult `json:"result"` } type PwpolicyModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Pwpolicy `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Pwpolicy `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *PwpolicyModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("PwpolicyModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("PwpolicyModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("PwpolicyModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("PwpolicyModResult%v", string(b)) } /* Display information about password policy. */ func (c *Client) PwpolicyShow( - cn string, // Manage password policy for specific group - reqArgs *PwpolicyShowArgs, - optArgs *PwpolicyShowOptionalArgs, // can be nil + cn string, // Manage password policy for specific group + reqArgs *PwpolicyShowArgs, + optArgs *PwpolicyShowOptionalArgs, // can be nil ) (*PwpolicyShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := pwpolicyShowKwParams{ - PwpolicyShowArgs: reqArgs, - PwpolicyShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "pwpolicy_show", - Params: []interface{}{ - []interface{}{cn}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res pwpolicyShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := pwpolicyShowKwParams{ + PwpolicyShowArgs: reqArgs, + PwpolicyShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "pwpolicy_show", + Params: []interface{}{ + []interface{}{cn, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res pwpolicyShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type PwpolicyShowArgs struct { -} + } type PwpolicyShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - User - Display effective policy for a specific user - */ - User *string `json:"user,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* +User +Display effective policy for a specific user + */ + User *string `json:"user,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type pwpolicyShowKwParams struct { - *PwpolicyShowArgs - *PwpolicyShowOptionalArgs + *PwpolicyShowArgs + *PwpolicyShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type pwpolicyShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *PwpolicyShowResult `json:"result"` } type PwpolicyShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Pwpolicy `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Pwpolicy `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *PwpolicyShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("PwpolicyShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("PwpolicyShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("PwpolicyShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("PwpolicyShowResult%v", string(b)) } /* Add a new RADIUS proxy server. */ func (c *Client) RadiusproxyAdd( - reqArgs *RadiusproxyAddArgs, - optArgs *RadiusproxyAddOptionalArgs, // can be nil + reqArgs *RadiusproxyAddArgs, + optArgs *RadiusproxyAddOptionalArgs, // can be nil ) (*RadiusproxyAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := radiusproxyAddKwParams{ - RadiusproxyAddArgs: reqArgs, - RadiusproxyAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "radiusproxy_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res radiusproxyAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := radiusproxyAddKwParams{ + RadiusproxyAddArgs: reqArgs, + RadiusproxyAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "radiusproxy_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res radiusproxyAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type RadiusproxyAddArgs struct { - - /* - RADIUS proxy server name - - */ - Cn string `json:"cn,omitempty"` - - /* - Server - The hostname or IP (with or without port) - */ - Ipatokenradiusserver []string `json:"ipatokenradiusserver,omitempty"` - - /* - Secret - The secret used to encrypt data - */ - Ipatokenradiussecret string `json:"ipatokenradiussecret,omitempty"` -} + + /* +RADIUS proxy server name + + */ + Cn string `json:"cn,omitempty"` + + /* +Server +The hostname or IP (with or without port) + */ + Ipatokenradiusserver string `json:"ipatokenradiusserver,omitempty"` + + /* +Secret +The secret used to encrypt data + */ + Ipatokenradiussecret string `json:"ipatokenradiussecret,omitempty"` + } type RadiusproxyAddOptionalArgs struct { - - /* - Description - A description of this RADIUS proxy server - */ - Description *string `json:"description,omitempty"` - - /* - Timeout - The total timeout across all retries (in seconds) - */ - Ipatokenradiustimeout *int `json:"ipatokenradiustimeout,omitempty"` - - /* - Retries - The number of times to retry authentication - */ - Ipatokenradiusretries *int `json:"ipatokenradiusretries,omitempty"` - - /* - User attribute - The username attribute on the user object - */ - Ipatokenusermapattribute *string `json:"ipatokenusermapattribute,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Description +A description of this RADIUS proxy server + */ + Description *string `json:"description,omitempty"` + + /* +Timeout +The total timeout across all retries (in seconds) + */ + Ipatokenradiustimeout *int `json:"ipatokenradiustimeout,omitempty"` + + /* +Retries +The number of times to retry authentication + */ + Ipatokenradiusretries *int `json:"ipatokenradiusretries,omitempty"` + + /* +User attribute +The username attribute on the user object + */ + Ipatokenusermapattribute *string `json:"ipatokenusermapattribute,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type radiusproxyAddKwParams struct { - *RadiusproxyAddArgs - *RadiusproxyAddOptionalArgs + *RadiusproxyAddArgs + *RadiusproxyAddOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type radiusproxyAddResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *RadiusproxyAddResult `json:"result"` } type RadiusproxyAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Radiusproxy `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Radiusproxy `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *RadiusproxyAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("RadiusproxyAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("RadiusproxyAddResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("RadiusproxyAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("RadiusproxyAddResult%v", string(b)) } /* Delete a RADIUS proxy server. */ func (c *Client) RadiusproxyDel( - reqArgs *RadiusproxyDelArgs, - optArgs *RadiusproxyDelOptionalArgs, // can be nil + reqArgs *RadiusproxyDelArgs, + optArgs *RadiusproxyDelOptionalArgs, // can be nil ) (*RadiusproxyDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := radiusproxyDelKwParams{ - RadiusproxyDelArgs: reqArgs, - RadiusproxyDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "radiusproxy_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res radiusproxyDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := radiusproxyDelKwParams{ + RadiusproxyDelArgs: reqArgs, + RadiusproxyDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "radiusproxy_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res radiusproxyDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type RadiusproxyDelArgs struct { + + /* +RADIUS proxy server name - /* - RADIUS proxy server name - - */ - Cn []string `json:"cn,omitempty"` -} + */ + Cn []string `json:"cn,omitempty"` + } type RadiusproxyDelOptionalArgs struct { + + /* - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` -} +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } type radiusproxyDelKwParams struct { - *RadiusproxyDelArgs - *RadiusproxyDelOptionalArgs + *RadiusproxyDelArgs + *RadiusproxyDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type radiusproxyDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *RadiusproxyDelResult `json:"result"` } type RadiusproxyDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } func (t *RadiusproxyDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("RadiusproxyDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("RadiusproxyDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("RadiusproxyDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("RadiusproxyDelResult%v", string(b)) } /* Search for RADIUS proxy servers. */ func (c *Client) RadiusproxyFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *RadiusproxyFindArgs, - optArgs *RadiusproxyFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *RadiusproxyFindArgs, + optArgs *RadiusproxyFindOptionalArgs, // can be nil ) (*RadiusproxyFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := radiusproxyFindKwParams{ - RadiusproxyFindArgs: reqArgs, - RadiusproxyFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "radiusproxy_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res radiusproxyFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := radiusproxyFindKwParams{ + RadiusproxyFindArgs: reqArgs, + RadiusproxyFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "radiusproxy_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res radiusproxyFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type RadiusproxyFindArgs struct { -} + } type RadiusproxyFindOptionalArgs struct { - - /* - RADIUS proxy server name - - */ - Cn *string `json:"cn,omitempty"` - - /* - Description - A description of this RADIUS proxy server - */ - Description *string `json:"description,omitempty"` - - /* - Server - The hostname or IP (with or without port) - */ - Ipatokenradiusserver *[]string `json:"ipatokenradiusserver,omitempty"` - - /* - Secret - The secret used to encrypt data - */ - Ipatokenradiussecret *string `json:"ipatokenradiussecret,omitempty"` - - /* - Timeout - The total timeout across all retries (in seconds) - */ - Ipatokenradiustimeout *int `json:"ipatokenradiustimeout,omitempty"` - - /* - Retries - The number of times to retry authentication - */ - Ipatokenradiusretries *int `json:"ipatokenradiusretries,omitempty"` - - /* - User attribute - The username attribute on the user object - */ - Ipatokenusermapattribute *string `json:"ipatokenusermapattribute,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("name") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} + + /* +RADIUS proxy server name + + */ + Cn *string `json:"cn,omitempty"` + + /* +Description +A description of this RADIUS proxy server + */ + Description *string `json:"description,omitempty"` + + /* +Server +The hostname or IP (with or without port) + */ + Ipatokenradiusserver *string `json:"ipatokenradiusserver,omitempty"` + + /* +Secret +The secret used to encrypt data + */ + Ipatokenradiussecret *string `json:"ipatokenradiussecret,omitempty"` + + /* +Timeout +The total timeout across all retries (in seconds) + */ + Ipatokenradiustimeout *int `json:"ipatokenradiustimeout,omitempty"` + + /* +Retries +The number of times to retry authentication + */ + Ipatokenradiusretries *int `json:"ipatokenradiusretries,omitempty"` + + /* +User attribute +The username attribute on the user object + */ + Ipatokenusermapattribute *string `json:"ipatokenusermapattribute,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("name") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } type radiusproxyFindKwParams struct { - *RadiusproxyFindArgs - *RadiusproxyFindOptionalArgs + *RadiusproxyFindArgs + *RadiusproxyFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type radiusproxyFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *RadiusproxyFindResult `json:"result"` } type RadiusproxyFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Radiusproxy `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Radiusproxy `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *RadiusproxyFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("RadiusproxyFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("RadiusproxyFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("RadiusproxyFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("RadiusproxyFindResult%v", string(b)) } /* Modify a RADIUS proxy server. */ func (c *Client) RadiusproxyMod( - reqArgs *RadiusproxyModArgs, - optArgs *RadiusproxyModOptionalArgs, // can be nil + reqArgs *RadiusproxyModArgs, + optArgs *RadiusproxyModOptionalArgs, // can be nil ) (*RadiusproxyModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := radiusproxyModKwParams{ - RadiusproxyModArgs: reqArgs, - RadiusproxyModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "radiusproxy_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res radiusproxyModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := radiusproxyModKwParams{ + RadiusproxyModArgs: reqArgs, + RadiusproxyModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "radiusproxy_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res radiusproxyModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type RadiusproxyModArgs struct { + + /* +RADIUS proxy server name - /* - RADIUS proxy server name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type RadiusproxyModOptionalArgs struct { - - /* - Description - A description of this RADIUS proxy server - */ - Description *string `json:"description,omitempty"` - - /* - Server - The hostname or IP (with or without port) - */ - Ipatokenradiusserver *[]string `json:"ipatokenradiusserver,omitempty"` - - /* - Secret - The secret used to encrypt data - */ - Ipatokenradiussecret *string `json:"ipatokenradiussecret,omitempty"` - - /* - Timeout - The total timeout across all retries (in seconds) - */ - Ipatokenradiustimeout *int `json:"ipatokenradiustimeout,omitempty"` - - /* - Retries - The number of times to retry authentication - */ - Ipatokenradiusretries *int `json:"ipatokenradiusretries,omitempty"` - - /* - User attribute - The username attribute on the user object - */ - Ipatokenusermapattribute *string `json:"ipatokenusermapattribute,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - Rename - Rename the RADIUS proxy server object - */ - Rename *string `json:"rename,omitempty"` -} + + /* +Description +A description of this RADIUS proxy server + */ + Description *string `json:"description,omitempty"` + + /* +Server +The hostname or IP (with or without port) + */ + Ipatokenradiusserver *string `json:"ipatokenradiusserver,omitempty"` + + /* +Secret +The secret used to encrypt data + */ + Ipatokenradiussecret *string `json:"ipatokenradiussecret,omitempty"` + + /* +Timeout +The total timeout across all retries (in seconds) + */ + Ipatokenradiustimeout *int `json:"ipatokenradiustimeout,omitempty"` + + /* +Retries +The number of times to retry authentication + */ + Ipatokenradiusretries *int `json:"ipatokenradiusretries,omitempty"` + + /* +User attribute +The username attribute on the user object + */ + Ipatokenusermapattribute *string `json:"ipatokenusermapattribute,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Rename +Rename the RADIUS proxy server object + */ + Rename *string `json:"rename,omitempty"` + } type radiusproxyModKwParams struct { - *RadiusproxyModArgs - *RadiusproxyModOptionalArgs + *RadiusproxyModArgs + *RadiusproxyModOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type radiusproxyModResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *RadiusproxyModResult `json:"result"` } type RadiusproxyModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Radiusproxy `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Radiusproxy `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *RadiusproxyModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("RadiusproxyModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("RadiusproxyModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("RadiusproxyModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("RadiusproxyModResult%v", string(b)) } /* Display information about a RADIUS proxy server. */ func (c *Client) RadiusproxyShow( - reqArgs *RadiusproxyShowArgs, - optArgs *RadiusproxyShowOptionalArgs, // can be nil + reqArgs *RadiusproxyShowArgs, + optArgs *RadiusproxyShowOptionalArgs, // can be nil ) (*RadiusproxyShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := radiusproxyShowKwParams{ - RadiusproxyShowArgs: reqArgs, - RadiusproxyShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "radiusproxy_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res radiusproxyShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := radiusproxyShowKwParams{ + RadiusproxyShowArgs: reqArgs, + RadiusproxyShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "radiusproxy_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res radiusproxyShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type RadiusproxyShowArgs struct { + + /* +RADIUS proxy server name - /* - RADIUS proxy server name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type RadiusproxyShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type radiusproxyShowKwParams struct { - *RadiusproxyShowArgs - *RadiusproxyShowOptionalArgs + *RadiusproxyShowArgs + *RadiusproxyShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type radiusproxyShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *RadiusproxyShowResult `json:"result"` } type RadiusproxyShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Radiusproxy `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Radiusproxy `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *RadiusproxyShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("RadiusproxyShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("RadiusproxyShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("RadiusproxyShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("RadiusproxyShowResult%v", string(b)) } /* Modify realm domains. */ func (c *Client) RealmdomainsMod( - reqArgs *RealmdomainsModArgs, - optArgs *RealmdomainsModOptionalArgs, // can be nil + reqArgs *RealmdomainsModArgs, + optArgs *RealmdomainsModOptionalArgs, // can be nil ) (*RealmdomainsModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := realmdomainsModKwParams{ - RealmdomainsModArgs: reqArgs, - RealmdomainsModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "realmdomains_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res realmdomainsModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := realmdomainsModKwParams{ + RealmdomainsModArgs: reqArgs, + RealmdomainsModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "realmdomains_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res realmdomainsModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type RealmdomainsModArgs struct { -} + } type RealmdomainsModOptionalArgs struct { - - /* - Domain - - */ - Associateddomain *[]string `json:"associateddomain,omitempty"` - - /* - Add domain - - */ - AddDomain *string `json:"add_domain,omitempty"` - - /* - Delete domain - - */ - DelDomain *string `json:"del_domain,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - Force - Force adding domain even if not in DNS - */ - Force *bool `json:"force,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Domain + + */ + Associateddomain *[]string `json:"associateddomain,omitempty"` + + /* +Add domain + + */ + AddDomain *string `json:"add_domain,omitempty"` + + /* +Delete domain + + */ + DelDomain *string `json:"del_domain,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* +Force +Force adding domain even if not in DNS + */ + Force *bool `json:"force,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type realmdomainsModKwParams struct { - *RealmdomainsModArgs - *RealmdomainsModOptionalArgs + *RealmdomainsModArgs + *RealmdomainsModOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type realmdomainsModResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *RealmdomainsModResult `json:"result"` } type RealmdomainsModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Realmdomains `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value interface{} `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Realmdomains `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value interface{} `json:"value,omitempty"` + } func (t *RealmdomainsModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("RealmdomainsModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("RealmdomainsModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("RealmdomainsModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("RealmdomainsModResult%v", string(b)) } /* Display the list of realm domains. */ func (c *Client) RealmdomainsShow( - reqArgs *RealmdomainsShowArgs, - optArgs *RealmdomainsShowOptionalArgs, // can be nil + reqArgs *RealmdomainsShowArgs, + optArgs *RealmdomainsShowOptionalArgs, // can be nil ) (*RealmdomainsShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := realmdomainsShowKwParams{ - RealmdomainsShowArgs: reqArgs, - RealmdomainsShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "realmdomains_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res realmdomainsShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := realmdomainsShowKwParams{ + RealmdomainsShowArgs: reqArgs, + RealmdomainsShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "realmdomains_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res realmdomainsShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type RealmdomainsShowArgs struct { -} + } type RealmdomainsShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type realmdomainsShowKwParams struct { - *RealmdomainsShowArgs - *RealmdomainsShowOptionalArgs + *RealmdomainsShowArgs + *RealmdomainsShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type realmdomainsShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *RealmdomainsShowResult `json:"result"` } type RealmdomainsShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Realmdomains `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value interface{} `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Realmdomains `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value interface{} `json:"value,omitempty"` + } func (t *RealmdomainsShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("RealmdomainsShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("RealmdomainsShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("RealmdomainsShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("RealmdomainsShowResult%v", string(b)) } /* Add a new role. */ func (c *Client) RoleAdd( - reqArgs *RoleAddArgs, - optArgs *RoleAddOptionalArgs, // can be nil + reqArgs *RoleAddArgs, + optArgs *RoleAddOptionalArgs, // can be nil ) (*RoleAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := roleAddKwParams{ - RoleAddArgs: reqArgs, - RoleAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "role_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res roleAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := roleAddKwParams{ + RoleAddArgs: reqArgs, + RoleAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "role_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res roleAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type RoleAddArgs struct { + + /* +Role name - /* - Role name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type RoleAddOptionalArgs struct { - - /* - Description - A description of this role-group - */ - Description *string `json:"description,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Description +A description of this role-group + */ + Description *string `json:"description,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type roleAddKwParams struct { - *RoleAddArgs - *RoleAddOptionalArgs + *RoleAddArgs + *RoleAddOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type roleAddResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *RoleAddResult `json:"result"` } type RoleAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Role `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Role `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *RoleAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("RoleAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("RoleAddResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("RoleAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("RoleAddResult%v", string(b)) } /* Add members to a role. */ func (c *Client) RoleAddMember( - reqArgs *RoleAddMemberArgs, - optArgs *RoleAddMemberOptionalArgs, // can be nil + reqArgs *RoleAddMemberArgs, + optArgs *RoleAddMemberOptionalArgs, // can be nil ) (*RoleAddMemberResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := roleAddMemberKwParams{ - RoleAddMemberArgs: reqArgs, - RoleAddMemberOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "role_add_member", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res roleAddMemberResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := roleAddMemberKwParams{ + RoleAddMemberArgs: reqArgs, + RoleAddMemberOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "role_add_member", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res roleAddMemberResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type RoleAddMemberArgs struct { + + /* +Role name - /* - Role name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type RoleAddMemberOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member user - users to add - */ - User *[]string `json:"user,omitempty"` - - /* - member group - groups to add - */ - Group *[]string `json:"group,omitempty"` - - /* - member host - hosts to add - */ - Host *[]string `json:"host,omitempty"` - - /* - member host group - host groups to add - */ - Hostgroup *[]string `json:"hostgroup,omitempty"` - - /* - member service - services to add - */ - Service *[]string `json:"service,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member user +users to add + */ + User *[]string `json:"user,omitempty"` + + /* +member group +groups to add + */ + Group *[]string `json:"group,omitempty"` + + /* +member host +hosts to add + */ + Host *[]string `json:"host,omitempty"` + + /* +member host group +host groups to add + */ + Hostgroup *[]string `json:"hostgroup,omitempty"` + + /* +member service +services to add + */ + Service *[]string `json:"service,omitempty"` + } type roleAddMemberKwParams struct { - *RoleAddMemberArgs - *RoleAddMemberOptionalArgs + *RoleAddMemberArgs + *RoleAddMemberOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type roleAddMemberResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *RoleAddMemberResult `json:"result"` } type RoleAddMemberResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *RoleAddMemberResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("RoleAddMemberResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("RoleAddMemberResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("RoleAddMemberResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("RoleAddMemberResult%v", string(b)) } /* Add privileges to a role. */ func (c *Client) RoleAddPrivilege( - reqArgs *RoleAddPrivilegeArgs, - optArgs *RoleAddPrivilegeOptionalArgs, // can be nil + reqArgs *RoleAddPrivilegeArgs, + optArgs *RoleAddPrivilegeOptionalArgs, // can be nil ) (*RoleAddPrivilegeResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := roleAddPrivilegeKwParams{ - RoleAddPrivilegeArgs: reqArgs, - RoleAddPrivilegeOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "role_add_privilege", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res roleAddPrivilegeResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := roleAddPrivilegeKwParams{ + RoleAddPrivilegeArgs: reqArgs, + RoleAddPrivilegeOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "role_add_privilege", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res roleAddPrivilegeResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type RoleAddPrivilegeArgs struct { + + /* +Role name - /* - Role name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type RoleAddPrivilegeOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - privilege - privileges - */ - Privilege *[]string `json:"privilege,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +privilege +privileges + */ + Privilege *[]string `json:"privilege,omitempty"` + } type roleAddPrivilegeKwParams struct { - *RoleAddPrivilegeArgs - *RoleAddPrivilegeOptionalArgs + *RoleAddPrivilegeArgs + *RoleAddPrivilegeOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type roleAddPrivilegeResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *RoleAddPrivilegeResult `json:"result"` } type RoleAddPrivilegeResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of privileges added - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of privileges added + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *RoleAddPrivilegeResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("RoleAddPrivilegeResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("RoleAddPrivilegeResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("RoleAddPrivilegeResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("RoleAddPrivilegeResult%v", string(b)) } /* Delete a role. */ func (c *Client) RoleDel( - reqArgs *RoleDelArgs, - optArgs *RoleDelOptionalArgs, // can be nil + reqArgs *RoleDelArgs, + optArgs *RoleDelOptionalArgs, // can be nil ) (*RoleDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := roleDelKwParams{ - RoleDelArgs: reqArgs, - RoleDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "role_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res roleDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := roleDelKwParams{ + RoleDelArgs: reqArgs, + RoleDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "role_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res roleDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type RoleDelArgs struct { + + /* +Role name - /* - Role name - - */ - Cn []string `json:"cn,omitempty"` -} + */ + Cn []string `json:"cn,omitempty"` + } type RoleDelOptionalArgs struct { + + /* - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` -} +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } type roleDelKwParams struct { - *RoleDelArgs - *RoleDelOptionalArgs + *RoleDelArgs + *RoleDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type roleDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *RoleDelResult `json:"result"` } type RoleDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } func (t *RoleDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("RoleDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("RoleDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("RoleDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("RoleDelResult%v", string(b)) } /* Search for roles. */ func (c *Client) RoleFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *RoleFindArgs, - optArgs *RoleFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *RoleFindArgs, + optArgs *RoleFindOptionalArgs, // can be nil ) (*RoleFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := roleFindKwParams{ - RoleFindArgs: reqArgs, - RoleFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "role_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res roleFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := roleFindKwParams{ + RoleFindArgs: reqArgs, + RoleFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "role_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res roleFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type RoleFindArgs struct { -} + } type RoleFindOptionalArgs struct { - - /* - Role name - - */ - Cn *string `json:"cn,omitempty"` - - /* - Description - A description of this role-group - */ - Description *string `json:"description,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("name") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} + + /* +Role name + + */ + Cn *string `json:"cn,omitempty"` + + /* +Description +A description of this role-group + */ + Description *string `json:"description,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("name") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } type roleFindKwParams struct { - *RoleFindArgs - *RoleFindOptionalArgs + *RoleFindArgs + *RoleFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type roleFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *RoleFindResult `json:"result"` } type RoleFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Role `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Role `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *RoleFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("RoleFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("RoleFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("RoleFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("RoleFindResult%v", string(b)) } /* Modify a role. */ func (c *Client) RoleMod( - reqArgs *RoleModArgs, - optArgs *RoleModOptionalArgs, // can be nil + reqArgs *RoleModArgs, + optArgs *RoleModOptionalArgs, // can be nil ) (*RoleModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := roleModKwParams{ - RoleModArgs: reqArgs, - RoleModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "role_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res roleModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := roleModKwParams{ + RoleModArgs: reqArgs, + RoleModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "role_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res roleModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type RoleModArgs struct { + + /* +Role name - /* - Role name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type RoleModOptionalArgs struct { - - /* - Description - A description of this role-group - */ - Description *string `json:"description,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - Rename - Rename the role object - */ - Rename *string `json:"rename,omitempty"` -} + + /* +Description +A description of this role-group + */ + Description *string `json:"description,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +Rename +Rename the role object + */ + Rename *string `json:"rename,omitempty"` + } type roleModKwParams struct { - *RoleModArgs - *RoleModOptionalArgs + *RoleModArgs + *RoleModOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type roleModResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *RoleModResult `json:"result"` } type RoleModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Role `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Role `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *RoleModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("RoleModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("RoleModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("RoleModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("RoleModResult%v", string(b)) } /* Remove members from a role. */ func (c *Client) RoleRemoveMember( - reqArgs *RoleRemoveMemberArgs, - optArgs *RoleRemoveMemberOptionalArgs, // can be nil + reqArgs *RoleRemoveMemberArgs, + optArgs *RoleRemoveMemberOptionalArgs, // can be nil ) (*RoleRemoveMemberResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := roleRemoveMemberKwParams{ - RoleRemoveMemberArgs: reqArgs, - RoleRemoveMemberOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "role_remove_member", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res roleRemoveMemberResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := roleRemoveMemberKwParams{ + RoleRemoveMemberArgs: reqArgs, + RoleRemoveMemberOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "role_remove_member", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res roleRemoveMemberResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type RoleRemoveMemberArgs struct { + + /* +Role name - /* - Role name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type RoleRemoveMemberOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member user - users to remove - */ - User *[]string `json:"user,omitempty"` - - /* - member group - groups to remove - */ - Group *[]string `json:"group,omitempty"` - - /* - member host - hosts to remove - */ - Host *[]string `json:"host,omitempty"` - - /* - member host group - host groups to remove - */ - Hostgroup *[]string `json:"hostgroup,omitempty"` - - /* - member service - services to remove - */ - Service *[]string `json:"service,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member user +users to remove + */ + User *[]string `json:"user,omitempty"` + + /* +member group +groups to remove + */ + Group *[]string `json:"group,omitempty"` + + /* +member host +hosts to remove + */ + Host *[]string `json:"host,omitempty"` + + /* +member host group +host groups to remove + */ + Hostgroup *[]string `json:"hostgroup,omitempty"` + + /* +member service +services to remove + */ + Service *[]string `json:"service,omitempty"` + } type roleRemoveMemberKwParams struct { - *RoleRemoveMemberArgs - *RoleRemoveMemberOptionalArgs + *RoleRemoveMemberArgs + *RoleRemoveMemberOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type roleRemoveMemberResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *RoleRemoveMemberResult `json:"result"` } type RoleRemoveMemberResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *RoleRemoveMemberResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("RoleRemoveMemberResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("RoleRemoveMemberResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("RoleRemoveMemberResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("RoleRemoveMemberResult%v", string(b)) } /* Remove privileges from a role. */ func (c *Client) RoleRemovePrivilege( - reqArgs *RoleRemovePrivilegeArgs, - optArgs *RoleRemovePrivilegeOptionalArgs, // can be nil + reqArgs *RoleRemovePrivilegeArgs, + optArgs *RoleRemovePrivilegeOptionalArgs, // can be nil ) (*RoleRemovePrivilegeResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := roleRemovePrivilegeKwParams{ - RoleRemovePrivilegeArgs: reqArgs, - RoleRemovePrivilegeOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "role_remove_privilege", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res roleRemovePrivilegeResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := roleRemovePrivilegeKwParams{ + RoleRemovePrivilegeArgs: reqArgs, + RoleRemovePrivilegeOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "role_remove_privilege", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res roleRemovePrivilegeResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type RoleRemovePrivilegeArgs struct { + + /* +Role name - /* - Role name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type RoleRemovePrivilegeOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - privilege - privileges - */ - Privilege *[]string `json:"privilege,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +privilege +privileges + */ + Privilege *[]string `json:"privilege,omitempty"` + } type roleRemovePrivilegeKwParams struct { - *RoleRemovePrivilegeArgs - *RoleRemovePrivilegeOptionalArgs + *RoleRemovePrivilegeArgs + *RoleRemovePrivilegeOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type roleRemovePrivilegeResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *RoleRemovePrivilegeResult `json:"result"` } type RoleRemovePrivilegeResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of privileges removed - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of privileges removed + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *RoleRemovePrivilegeResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("RoleRemovePrivilegeResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("RoleRemovePrivilegeResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("RoleRemovePrivilegeResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("RoleRemovePrivilegeResult%v", string(b)) } /* Display information about a role. */ func (c *Client) RoleShow( - reqArgs *RoleShowArgs, - optArgs *RoleShowOptionalArgs, // can be nil + reqArgs *RoleShowArgs, + optArgs *RoleShowOptionalArgs, // can be nil ) (*RoleShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := roleShowKwParams{ - RoleShowArgs: reqArgs, - RoleShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "role_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res roleShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := roleShowKwParams{ + RoleShowArgs: reqArgs, + RoleShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "role_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res roleShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type RoleShowArgs struct { + + /* +Role name - /* - Role name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type RoleShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type roleShowKwParams struct { - *RoleShowArgs - *RoleShowOptionalArgs + *RoleShowArgs + *RoleShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type roleShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *RoleShowResult `json:"result"` } type RoleShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Role `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Role `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *RoleShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("RoleShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("RoleShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("RoleShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("RoleShowResult%v", string(b)) } /* - */ +*/ func (c *Client) Schema( - reqArgs *SchemaArgs, - optArgs *SchemaOptionalArgs, // can be nil + reqArgs *SchemaArgs, + optArgs *SchemaOptionalArgs, // can be nil ) (*SchemaResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := schemaKwParams{ - SchemaArgs: reqArgs, - SchemaOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "schema", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res schemaResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := schemaKwParams{ + SchemaArgs: reqArgs, + SchemaOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "schema", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res schemaResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type SchemaArgs struct { -} + } type SchemaOptionalArgs struct { + + /* +Fingerprint of schema cached by client - /* - Fingerprint of schema cached by client - - */ - KnownFingerprints *[]string `json:"known_fingerprints,omitempty"` -} + */ + KnownFingerprints *[]string `json:"known_fingerprints,omitempty"` + } type schemaKwParams struct { - *SchemaArgs - *SchemaOptionalArgs + *SchemaArgs + *SchemaOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type schemaResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *SchemaResult `json:"result"` } type SchemaResult struct { + + + /* - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` -} + (required) + */ + Result interface{} `json:"result,omitempty"` + } func (t *SchemaResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SchemaResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SchemaResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SchemaResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SchemaResult%v", string(b)) } /* Add a new self-service permission. */ func (c *Client) SelfserviceAdd( - reqArgs *SelfserviceAddArgs, - optArgs *SelfserviceAddOptionalArgs, // can be nil + reqArgs *SelfserviceAddArgs, + optArgs *SelfserviceAddOptionalArgs, // can be nil ) (*SelfserviceAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := selfserviceAddKwParams{ - SelfserviceAddArgs: reqArgs, - SelfserviceAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "selfservice_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res selfserviceAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := selfserviceAddKwParams{ + SelfserviceAddArgs: reqArgs, + SelfserviceAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "selfservice_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res selfserviceAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type SelfserviceAddArgs struct { - - /* - Self-service name - Self-service name - */ - Aciname string `json:"aciname,omitempty"` - - /* - Attributes - Attributes to which the permission applies. - */ - Attrs []string `json:"attrs,omitempty"` -} + + /* +Self-service name +Self-service name + */ + Aciname string `json:"aciname,omitempty"` + + /* +Attributes +Attributes to which the permission applies. + */ + Attrs []string `json:"attrs,omitempty"` + } type SelfserviceAddOptionalArgs struct { - - /* - Permissions - Permissions to grant (read, write). Default is write. - */ - Permissions *[]string `json:"permissions,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Permissions +Permissions to grant (read, write). Default is write. + */ + Permissions *[]string `json:"permissions,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type selfserviceAddKwParams struct { - *SelfserviceAddArgs - *SelfserviceAddOptionalArgs + *SelfserviceAddArgs + *SelfserviceAddOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type selfserviceAddResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *SelfserviceAddResult `json:"result"` } type SelfserviceAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Selfservice `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Selfservice `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *SelfserviceAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SelfserviceAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SelfserviceAddResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SelfserviceAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SelfserviceAddResult%v", string(b)) } /* Delete a self-service permission. */ func (c *Client) SelfserviceDel( - reqArgs *SelfserviceDelArgs, - optArgs *SelfserviceDelOptionalArgs, // can be nil + reqArgs *SelfserviceDelArgs, + optArgs *SelfserviceDelOptionalArgs, // can be nil ) (*SelfserviceDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := selfserviceDelKwParams{ - SelfserviceDelArgs: reqArgs, - SelfserviceDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "selfservice_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res selfserviceDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := selfserviceDelKwParams{ + SelfserviceDelArgs: reqArgs, + SelfserviceDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "selfservice_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res selfserviceDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type SelfserviceDelArgs struct { - - /* - Self-service name - Self-service name - */ - Aciname string `json:"aciname,omitempty"` -} + + /* +Self-service name +Self-service name + */ + Aciname string `json:"aciname,omitempty"` + } type SelfserviceDelOptionalArgs struct { -} + } type selfserviceDelKwParams struct { - *SelfserviceDelArgs - *SelfserviceDelOptionalArgs + *SelfserviceDelArgs + *SelfserviceDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type selfserviceDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *SelfserviceDelResult `json:"result"` } type SelfserviceDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - True means the operation was successful - (required) - */ - Result bool `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *SelfserviceDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SelfserviceDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SelfserviceDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SelfserviceDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SelfserviceDelResult%v", string(b)) } /* Search for a self-service permission. */ func (c *Client) SelfserviceFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *SelfserviceFindArgs, - optArgs *SelfserviceFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *SelfserviceFindArgs, + optArgs *SelfserviceFindOptionalArgs, // can be nil ) (*SelfserviceFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := selfserviceFindKwParams{ - SelfserviceFindArgs: reqArgs, - SelfserviceFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "selfservice_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res selfserviceFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := selfserviceFindKwParams{ + SelfserviceFindArgs: reqArgs, + SelfserviceFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "selfservice_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res selfserviceFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type SelfserviceFindArgs struct { -} + } type SelfserviceFindOptionalArgs struct { - - /* - Self-service name - Self-service name - */ - Aciname *string `json:"aciname,omitempty"` - - /* - Permissions - Permissions to grant (read, write). Default is write. - */ - Permissions *[]string `json:"permissions,omitempty"` - - /* - Attributes - Attributes to which the permission applies. - */ - Attrs *[]string `json:"attrs,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("name") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Self-service name +Self-service name + */ + Aciname *string `json:"aciname,omitempty"` + + /* +Permissions +Permissions to grant (read, write). Default is write. + */ + Permissions *[]string `json:"permissions,omitempty"` + + /* +Attributes +Attributes to which the permission applies. + */ + Attrs *[]string `json:"attrs,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("name") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type selfserviceFindKwParams struct { - *SelfserviceFindArgs - *SelfserviceFindOptionalArgs + *SelfserviceFindArgs + *SelfserviceFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type selfserviceFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *SelfserviceFindResult `json:"result"` } type SelfserviceFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Selfservice `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Selfservice `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *SelfserviceFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SelfserviceFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SelfserviceFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SelfserviceFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SelfserviceFindResult%v", string(b)) } /* Modify a self-service permission. */ func (c *Client) SelfserviceMod( - reqArgs *SelfserviceModArgs, - optArgs *SelfserviceModOptionalArgs, // can be nil + reqArgs *SelfserviceModArgs, + optArgs *SelfserviceModOptionalArgs, // can be nil ) (*SelfserviceModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := selfserviceModKwParams{ - SelfserviceModArgs: reqArgs, - SelfserviceModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "selfservice_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res selfserviceModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := selfserviceModKwParams{ + SelfserviceModArgs: reqArgs, + SelfserviceModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "selfservice_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res selfserviceModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type SelfserviceModArgs struct { - - /* - Self-service name - Self-service name - */ - Aciname string `json:"aciname,omitempty"` -} + + /* +Self-service name +Self-service name + */ + Aciname string `json:"aciname,omitempty"` + } type SelfserviceModOptionalArgs struct { - - /* - Permissions - Permissions to grant (read, write). Default is write. - */ - Permissions *[]string `json:"permissions,omitempty"` - - /* - Attributes - Attributes to which the permission applies. - */ - Attrs *[]string `json:"attrs,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Permissions +Permissions to grant (read, write). Default is write. + */ + Permissions *[]string `json:"permissions,omitempty"` + + /* +Attributes +Attributes to which the permission applies. + */ + Attrs *[]string `json:"attrs,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type selfserviceModKwParams struct { - *SelfserviceModArgs - *SelfserviceModOptionalArgs + *SelfserviceModArgs + *SelfserviceModOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type selfserviceModResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *SelfserviceModResult `json:"result"` } type SelfserviceModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Selfservice `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Selfservice `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *SelfserviceModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SelfserviceModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SelfserviceModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SelfserviceModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SelfserviceModResult%v", string(b)) } /* Display information about a self-service permission. */ func (c *Client) SelfserviceShow( - reqArgs *SelfserviceShowArgs, - optArgs *SelfserviceShowOptionalArgs, // can be nil + reqArgs *SelfserviceShowArgs, + optArgs *SelfserviceShowOptionalArgs, // can be nil ) (*SelfserviceShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := selfserviceShowKwParams{ - SelfserviceShowArgs: reqArgs, - SelfserviceShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "selfservice_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res selfserviceShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := selfserviceShowKwParams{ + SelfserviceShowArgs: reqArgs, + SelfserviceShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "selfservice_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res selfserviceShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type SelfserviceShowArgs struct { - - /* - Self-service name - Self-service name - */ - Aciname string `json:"aciname,omitempty"` -} + + /* +Self-service name +Self-service name + */ + Aciname string `json:"aciname,omitempty"` + } type SelfserviceShowOptionalArgs struct { + + /* - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type selfserviceShowKwParams struct { - *SelfserviceShowArgs - *SelfserviceShowOptionalArgs + *SelfserviceShowArgs + *SelfserviceShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type selfserviceShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *SelfserviceShowResult `json:"result"` } type SelfserviceShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Selfservice `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Selfservice `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *SelfserviceShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SelfserviceShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SelfserviceShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SelfserviceShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SelfserviceShowResult%v", string(b)) } /* Create a new SELinux User Map. */ func (c *Client) SelinuxusermapAdd( - reqArgs *SelinuxusermapAddArgs, - optArgs *SelinuxusermapAddOptionalArgs, // can be nil + reqArgs *SelinuxusermapAddArgs, + optArgs *SelinuxusermapAddOptionalArgs, // can be nil ) (*SelinuxusermapAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := selinuxusermapAddKwParams{ - SelinuxusermapAddArgs: reqArgs, - SelinuxusermapAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "selinuxusermap_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res selinuxusermapAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := selinuxusermapAddKwParams{ + SelinuxusermapAddArgs: reqArgs, + SelinuxusermapAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "selinuxusermap_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res selinuxusermapAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type SelinuxusermapAddArgs struct { + + /* +Rule name - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` + */ + Cn string `json:"cn,omitempty"` + + /* +SELinux User - /* - SELinux User - - */ - Ipaselinuxuser string `json:"ipaselinuxuser,omitempty"` -} + */ + Ipaselinuxuser string `json:"ipaselinuxuser,omitempty"` + } type SelinuxusermapAddOptionalArgs struct { - - /* - HBAC Rule - HBAC Rule that defines the users, groups and hostgroups - */ - Seealso *string `json:"seealso,omitempty"` - - /* - User category - User category the rule applies to - */ - Usercategory *string `json:"usercategory,omitempty"` - - /* - Host category - Host category the rule applies to - */ - Hostcategory *string `json:"hostcategory,omitempty"` - - /* - Description - - */ - Description *string `json:"description,omitempty"` - - /* - Enabled - - */ - Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +HBAC Rule +HBAC Rule that defines the users, groups and hostgroups + */ + Seealso *string `json:"seealso,omitempty"` + + /* +User category +User category the rule applies to + */ + Usercategory *string `json:"usercategory,omitempty"` + + /* +Host category +Host category the rule applies to + */ + Hostcategory *string `json:"hostcategory,omitempty"` + + /* +Description + + */ + Description *string `json:"description,omitempty"` + + /* +Enabled + + */ + Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type selinuxusermapAddKwParams struct { - *SelinuxusermapAddArgs - *SelinuxusermapAddOptionalArgs + *SelinuxusermapAddArgs + *SelinuxusermapAddOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type selinuxusermapAddResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *SelinuxusermapAddResult `json:"result"` } type SelinuxusermapAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Selinuxusermap `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Selinuxusermap `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *SelinuxusermapAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SelinuxusermapAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SelinuxusermapAddResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SelinuxusermapAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SelinuxusermapAddResult%v", string(b)) } /* Add target hosts and hostgroups to an SELinux User Map rule. */ func (c *Client) SelinuxusermapAddHost( - reqArgs *SelinuxusermapAddHostArgs, - optArgs *SelinuxusermapAddHostOptionalArgs, // can be nil + reqArgs *SelinuxusermapAddHostArgs, + optArgs *SelinuxusermapAddHostOptionalArgs, // can be nil ) (*SelinuxusermapAddHostResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := selinuxusermapAddHostKwParams{ - SelinuxusermapAddHostArgs: reqArgs, - SelinuxusermapAddHostOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "selinuxusermap_add_host", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res selinuxusermapAddHostResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := selinuxusermapAddHostKwParams{ + SelinuxusermapAddHostArgs: reqArgs, + SelinuxusermapAddHostOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "selinuxusermap_add_host", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res selinuxusermapAddHostResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type SelinuxusermapAddHostArgs struct { + + /* +Rule name - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type SelinuxusermapAddHostOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member host - hosts to add - */ - Host *[]string `json:"host,omitempty"` - - /* - member host group - host groups to add - */ - Hostgroup *[]string `json:"hostgroup,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member host +hosts to add + */ + Host *[]string `json:"host,omitempty"` + + /* +member host group +host groups to add + */ + Hostgroup *[]string `json:"hostgroup,omitempty"` + } type selinuxusermapAddHostKwParams struct { - *SelinuxusermapAddHostArgs - *SelinuxusermapAddHostOptionalArgs + *SelinuxusermapAddHostArgs + *SelinuxusermapAddHostOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type selinuxusermapAddHostResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *SelinuxusermapAddHostResult `json:"result"` } type SelinuxusermapAddHostResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *SelinuxusermapAddHostResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SelinuxusermapAddHostResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SelinuxusermapAddHostResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SelinuxusermapAddHostResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SelinuxusermapAddHostResult%v", string(b)) } /* Add users and groups to an SELinux User Map rule. */ func (c *Client) SelinuxusermapAddUser( - reqArgs *SelinuxusermapAddUserArgs, - optArgs *SelinuxusermapAddUserOptionalArgs, // can be nil + reqArgs *SelinuxusermapAddUserArgs, + optArgs *SelinuxusermapAddUserOptionalArgs, // can be nil ) (*SelinuxusermapAddUserResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := selinuxusermapAddUserKwParams{ - SelinuxusermapAddUserArgs: reqArgs, - SelinuxusermapAddUserOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "selinuxusermap_add_user", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res selinuxusermapAddUserResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := selinuxusermapAddUserKwParams{ + SelinuxusermapAddUserArgs: reqArgs, + SelinuxusermapAddUserOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "selinuxusermap_add_user", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res selinuxusermapAddUserResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type SelinuxusermapAddUserArgs struct { + + /* +Rule name - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type SelinuxusermapAddUserOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member user - users to add - */ - User *[]string `json:"user,omitempty"` - - /* - member group - groups to add - */ - Group *[]string `json:"group,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member user +users to add + */ + User *[]string `json:"user,omitempty"` + + /* +member group +groups to add + */ + Group *[]string `json:"group,omitempty"` + } type selinuxusermapAddUserKwParams struct { - *SelinuxusermapAddUserArgs - *SelinuxusermapAddUserOptionalArgs + *SelinuxusermapAddUserArgs + *SelinuxusermapAddUserOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type selinuxusermapAddUserResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *SelinuxusermapAddUserResult `json:"result"` } type SelinuxusermapAddUserResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *SelinuxusermapAddUserResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SelinuxusermapAddUserResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SelinuxusermapAddUserResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SelinuxusermapAddUserResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SelinuxusermapAddUserResult%v", string(b)) } /* Delete a SELinux User Map. */ func (c *Client) SelinuxusermapDel( - reqArgs *SelinuxusermapDelArgs, - optArgs *SelinuxusermapDelOptionalArgs, // can be nil + reqArgs *SelinuxusermapDelArgs, + optArgs *SelinuxusermapDelOptionalArgs, // can be nil ) (*SelinuxusermapDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := selinuxusermapDelKwParams{ - SelinuxusermapDelArgs: reqArgs, - SelinuxusermapDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "selinuxusermap_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res selinuxusermapDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := selinuxusermapDelKwParams{ + SelinuxusermapDelArgs: reqArgs, + SelinuxusermapDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "selinuxusermap_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res selinuxusermapDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type SelinuxusermapDelArgs struct { + + /* +Rule name - /* - Rule name - - */ - Cn []string `json:"cn,omitempty"` -} + */ + Cn []string `json:"cn,omitempty"` + } type SelinuxusermapDelOptionalArgs struct { + + /* - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` -} +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } type selinuxusermapDelKwParams struct { - *SelinuxusermapDelArgs - *SelinuxusermapDelOptionalArgs + *SelinuxusermapDelArgs + *SelinuxusermapDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type selinuxusermapDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *SelinuxusermapDelResult `json:"result"` } type SelinuxusermapDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } func (t *SelinuxusermapDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SelinuxusermapDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SelinuxusermapDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SelinuxusermapDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SelinuxusermapDelResult%v", string(b)) } /* Disable an SELinux User Map rule. */ func (c *Client) SelinuxusermapDisable( - reqArgs *SelinuxusermapDisableArgs, - optArgs *SelinuxusermapDisableOptionalArgs, // can be nil + reqArgs *SelinuxusermapDisableArgs, + optArgs *SelinuxusermapDisableOptionalArgs, // can be nil ) (*SelinuxusermapDisableResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := selinuxusermapDisableKwParams{ - SelinuxusermapDisableArgs: reqArgs, - SelinuxusermapDisableOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "selinuxusermap_disable", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res selinuxusermapDisableResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := selinuxusermapDisableKwParams{ + SelinuxusermapDisableArgs: reqArgs, + SelinuxusermapDisableOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "selinuxusermap_disable", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res selinuxusermapDisableResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type SelinuxusermapDisableArgs struct { + + /* +Rule name - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type SelinuxusermapDisableOptionalArgs struct { -} + } type selinuxusermapDisableKwParams struct { - *SelinuxusermapDisableArgs - *SelinuxusermapDisableOptionalArgs + *SelinuxusermapDisableArgs + *SelinuxusermapDisableOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type selinuxusermapDisableResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *SelinuxusermapDisableResult `json:"result"` } type SelinuxusermapDisableResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - True means the operation was successful - (required) - */ - Result bool `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *SelinuxusermapDisableResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SelinuxusermapDisableResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SelinuxusermapDisableResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SelinuxusermapDisableResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SelinuxusermapDisableResult%v", string(b)) } /* Enable an SELinux User Map rule. */ func (c *Client) SelinuxusermapEnable( - reqArgs *SelinuxusermapEnableArgs, - optArgs *SelinuxusermapEnableOptionalArgs, // can be nil + reqArgs *SelinuxusermapEnableArgs, + optArgs *SelinuxusermapEnableOptionalArgs, // can be nil ) (*SelinuxusermapEnableResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := selinuxusermapEnableKwParams{ - SelinuxusermapEnableArgs: reqArgs, - SelinuxusermapEnableOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "selinuxusermap_enable", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res selinuxusermapEnableResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := selinuxusermapEnableKwParams{ + SelinuxusermapEnableArgs: reqArgs, + SelinuxusermapEnableOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "selinuxusermap_enable", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res selinuxusermapEnableResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type SelinuxusermapEnableArgs struct { + + /* +Rule name - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type SelinuxusermapEnableOptionalArgs struct { -} + } type selinuxusermapEnableKwParams struct { - *SelinuxusermapEnableArgs - *SelinuxusermapEnableOptionalArgs + *SelinuxusermapEnableArgs + *SelinuxusermapEnableOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type selinuxusermapEnableResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *SelinuxusermapEnableResult `json:"result"` } type SelinuxusermapEnableResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - True means the operation was successful - (required) - */ - Result bool `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *SelinuxusermapEnableResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SelinuxusermapEnableResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SelinuxusermapEnableResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SelinuxusermapEnableResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SelinuxusermapEnableResult%v", string(b)) } /* Search for SELinux User Maps. */ func (c *Client) SelinuxusermapFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *SelinuxusermapFindArgs, - optArgs *SelinuxusermapFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *SelinuxusermapFindArgs, + optArgs *SelinuxusermapFindOptionalArgs, // can be nil ) (*SelinuxusermapFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := selinuxusermapFindKwParams{ - SelinuxusermapFindArgs: reqArgs, - SelinuxusermapFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "selinuxusermap_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res selinuxusermapFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := selinuxusermapFindKwParams{ + SelinuxusermapFindArgs: reqArgs, + SelinuxusermapFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "selinuxusermap_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res selinuxusermapFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type SelinuxusermapFindArgs struct { -} + } type SelinuxusermapFindOptionalArgs struct { - - /* - Rule name - - */ - Cn *string `json:"cn,omitempty"` - - /* - SELinux User - - */ - Ipaselinuxuser *string `json:"ipaselinuxuser,omitempty"` - - /* - HBAC Rule - HBAC Rule that defines the users, groups and hostgroups - */ - Seealso *string `json:"seealso,omitempty"` - - /* - User category - User category the rule applies to - */ - Usercategory *string `json:"usercategory,omitempty"` - - /* - Host category - Host category the rule applies to - */ - Hostcategory *string `json:"hostcategory,omitempty"` - - /* - Description - - */ - Description *string `json:"description,omitempty"` - - /* - Enabled - - */ - Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("name") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} + + /* +Rule name + + */ + Cn *string `json:"cn,omitempty"` + + /* +SELinux User + + */ + Ipaselinuxuser *string `json:"ipaselinuxuser,omitempty"` + + /* +HBAC Rule +HBAC Rule that defines the users, groups and hostgroups + */ + Seealso *string `json:"seealso,omitempty"` + + /* +User category +User category the rule applies to + */ + Usercategory *string `json:"usercategory,omitempty"` + + /* +Host category +Host category the rule applies to + */ + Hostcategory *string `json:"hostcategory,omitempty"` + + /* +Description + + */ + Description *string `json:"description,omitempty"` + + /* +Enabled + + */ + Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("name") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } type selinuxusermapFindKwParams struct { - *SelinuxusermapFindArgs - *SelinuxusermapFindOptionalArgs + *SelinuxusermapFindArgs + *SelinuxusermapFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type selinuxusermapFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *SelinuxusermapFindResult `json:"result"` } type SelinuxusermapFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Selinuxusermap `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Selinuxusermap `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *SelinuxusermapFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SelinuxusermapFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SelinuxusermapFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SelinuxusermapFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SelinuxusermapFindResult%v", string(b)) } /* Modify a SELinux User Map. */ func (c *Client) SelinuxusermapMod( - reqArgs *SelinuxusermapModArgs, - optArgs *SelinuxusermapModOptionalArgs, // can be nil + reqArgs *SelinuxusermapModArgs, + optArgs *SelinuxusermapModOptionalArgs, // can be nil ) (*SelinuxusermapModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := selinuxusermapModKwParams{ - SelinuxusermapModArgs: reqArgs, - SelinuxusermapModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "selinuxusermap_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res selinuxusermapModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := selinuxusermapModKwParams{ + SelinuxusermapModArgs: reqArgs, + SelinuxusermapModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "selinuxusermap_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res selinuxusermapModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type SelinuxusermapModArgs struct { + + /* +Rule name - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type SelinuxusermapModOptionalArgs struct { - - /* - SELinux User - - */ - Ipaselinuxuser *string `json:"ipaselinuxuser,omitempty"` - - /* - HBAC Rule - HBAC Rule that defines the users, groups and hostgroups - */ - Seealso *string `json:"seealso,omitempty"` - - /* - User category - User category the rule applies to - */ - Usercategory *string `json:"usercategory,omitempty"` - - /* - Host category - Host category the rule applies to - */ - Hostcategory *string `json:"hostcategory,omitempty"` - - /* - Description - - */ - Description *string `json:"description,omitempty"` - - /* - Enabled - - */ - Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +SELinux User + + */ + Ipaselinuxuser *string `json:"ipaselinuxuser,omitempty"` + + /* +HBAC Rule +HBAC Rule that defines the users, groups and hostgroups + */ + Seealso *string `json:"seealso,omitempty"` + + /* +User category +User category the rule applies to + */ + Usercategory *string `json:"usercategory,omitempty"` + + /* +Host category +Host category the rule applies to + */ + Hostcategory *string `json:"hostcategory,omitempty"` + + /* +Description + + */ + Description *string `json:"description,omitempty"` + + /* +Enabled + + */ + Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type selinuxusermapModKwParams struct { - *SelinuxusermapModArgs - *SelinuxusermapModOptionalArgs + *SelinuxusermapModArgs + *SelinuxusermapModOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type selinuxusermapModResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *SelinuxusermapModResult `json:"result"` } type SelinuxusermapModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Selinuxusermap `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Selinuxusermap `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *SelinuxusermapModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SelinuxusermapModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SelinuxusermapModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SelinuxusermapModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SelinuxusermapModResult%v", string(b)) } /* Remove target hosts and hostgroups from an SELinux User Map rule. */ func (c *Client) SelinuxusermapRemoveHost( - reqArgs *SelinuxusermapRemoveHostArgs, - optArgs *SelinuxusermapRemoveHostOptionalArgs, // can be nil + reqArgs *SelinuxusermapRemoveHostArgs, + optArgs *SelinuxusermapRemoveHostOptionalArgs, // can be nil ) (*SelinuxusermapRemoveHostResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := selinuxusermapRemoveHostKwParams{ - SelinuxusermapRemoveHostArgs: reqArgs, - SelinuxusermapRemoveHostOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "selinuxusermap_remove_host", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res selinuxusermapRemoveHostResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := selinuxusermapRemoveHostKwParams{ + SelinuxusermapRemoveHostArgs: reqArgs, + SelinuxusermapRemoveHostOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "selinuxusermap_remove_host", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res selinuxusermapRemoveHostResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type SelinuxusermapRemoveHostArgs struct { + + /* +Rule name - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type SelinuxusermapRemoveHostOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member host - hosts to remove - */ - Host *[]string `json:"host,omitempty"` - - /* - member host group - host groups to remove - */ - Hostgroup *[]string `json:"hostgroup,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member host +hosts to remove + */ + Host *[]string `json:"host,omitempty"` + + /* +member host group +host groups to remove + */ + Hostgroup *[]string `json:"hostgroup,omitempty"` + } type selinuxusermapRemoveHostKwParams struct { - *SelinuxusermapRemoveHostArgs - *SelinuxusermapRemoveHostOptionalArgs + *SelinuxusermapRemoveHostArgs + *SelinuxusermapRemoveHostOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type selinuxusermapRemoveHostResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *SelinuxusermapRemoveHostResult `json:"result"` } type SelinuxusermapRemoveHostResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *SelinuxusermapRemoveHostResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SelinuxusermapRemoveHostResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SelinuxusermapRemoveHostResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SelinuxusermapRemoveHostResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SelinuxusermapRemoveHostResult%v", string(b)) } /* Remove users and groups from an SELinux User Map rule. */ func (c *Client) SelinuxusermapRemoveUser( - reqArgs *SelinuxusermapRemoveUserArgs, - optArgs *SelinuxusermapRemoveUserOptionalArgs, // can be nil + reqArgs *SelinuxusermapRemoveUserArgs, + optArgs *SelinuxusermapRemoveUserOptionalArgs, // can be nil ) (*SelinuxusermapRemoveUserResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := selinuxusermapRemoveUserKwParams{ - SelinuxusermapRemoveUserArgs: reqArgs, - SelinuxusermapRemoveUserOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "selinuxusermap_remove_user", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res selinuxusermapRemoveUserResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := selinuxusermapRemoveUserKwParams{ + SelinuxusermapRemoveUserArgs: reqArgs, + SelinuxusermapRemoveUserOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "selinuxusermap_remove_user", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res selinuxusermapRemoveUserResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type SelinuxusermapRemoveUserArgs struct { + + /* +Rule name - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type SelinuxusermapRemoveUserOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member user - users to remove - */ - User *[]string `json:"user,omitempty"` - - /* - member group - groups to remove - */ - Group *[]string `json:"group,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member user +users to remove + */ + User *[]string `json:"user,omitempty"` + + /* +member group +groups to remove + */ + Group *[]string `json:"group,omitempty"` + } type selinuxusermapRemoveUserKwParams struct { - *SelinuxusermapRemoveUserArgs - *SelinuxusermapRemoveUserOptionalArgs + *SelinuxusermapRemoveUserArgs + *SelinuxusermapRemoveUserOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type selinuxusermapRemoveUserResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *SelinuxusermapRemoveUserResult `json:"result"` } type SelinuxusermapRemoveUserResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *SelinuxusermapRemoveUserResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SelinuxusermapRemoveUserResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SelinuxusermapRemoveUserResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SelinuxusermapRemoveUserResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SelinuxusermapRemoveUserResult%v", string(b)) } /* Display the properties of a SELinux User Map rule. */ func (c *Client) SelinuxusermapShow( - reqArgs *SelinuxusermapShowArgs, - optArgs *SelinuxusermapShowOptionalArgs, // can be nil + reqArgs *SelinuxusermapShowArgs, + optArgs *SelinuxusermapShowOptionalArgs, // can be nil ) (*SelinuxusermapShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := selinuxusermapShowKwParams{ - SelinuxusermapShowArgs: reqArgs, - SelinuxusermapShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "selinuxusermap_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res selinuxusermapShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := selinuxusermapShowKwParams{ + SelinuxusermapShowArgs: reqArgs, + SelinuxusermapShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "selinuxusermap_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res selinuxusermapShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type SelinuxusermapShowArgs struct { + + /* +Rule name - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type SelinuxusermapShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type selinuxusermapShowKwParams struct { - *SelinuxusermapShowArgs - *SelinuxusermapShowOptionalArgs + *SelinuxusermapShowArgs + *SelinuxusermapShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type selinuxusermapShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *SelinuxusermapShowResult `json:"result"` } type SelinuxusermapShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Selinuxusermap `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Selinuxusermap `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *SelinuxusermapShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SelinuxusermapShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SelinuxusermapShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SelinuxusermapShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SelinuxusermapShowResult%v", string(b)) } /* Check connection to remote IPA server. */ func (c *Client) ServerConncheck( - reqArgs *ServerConncheckArgs, - optArgs *ServerConncheckOptionalArgs, // can be nil + reqArgs *ServerConncheckArgs, + optArgs *ServerConncheckOptionalArgs, // can be nil ) (*ServerConncheckResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := serverConncheckKwParams{ - ServerConncheckArgs: reqArgs, - ServerConncheckOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "server_conncheck", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res serverConncheckResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := serverConncheckKwParams{ + ServerConncheckArgs: reqArgs, + ServerConncheckOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "server_conncheck", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res serverConncheckResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServerConncheckArgs struct { - - /* - Server name - IPA server hostname - */ - Cn string `json:"cn,omitempty"` - - /* - Remote server name - Remote IPA server hostname - */ - RemoteCn string `json:"remote_cn,omitempty"` -} + + /* +Server name +IPA server hostname + */ + Cn string `json:"cn,omitempty"` + + /* +Remote server name +Remote IPA server hostname + */ + RemoteCn string `json:"remote_cn,omitempty"` + } type ServerConncheckOptionalArgs struct { -} + } type serverConncheckKwParams struct { - *ServerConncheckArgs - *ServerConncheckOptionalArgs + *ServerConncheckArgs + *ServerConncheckOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type serverConncheckResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServerConncheckResult `json:"result"` } type ServerConncheckResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - True means the operation was successful - (required) - */ - Result bool `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *ServerConncheckResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServerConncheckResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServerConncheckResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServerConncheckResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServerConncheckResult%v", string(b)) } /* Delete IPA server. */ func (c *Client) ServerDel( - reqArgs *ServerDelArgs, - optArgs *ServerDelOptionalArgs, // can be nil + reqArgs *ServerDelArgs, + optArgs *ServerDelOptionalArgs, // can be nil ) (*ServerDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := serverDelKwParams{ - ServerDelArgs: reqArgs, - ServerDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "server_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res serverDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := serverDelKwParams{ + ServerDelArgs: reqArgs, + ServerDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "server_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res serverDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServerDelArgs struct { - - /* - Server name - IPA server hostname - */ - Cn []string `json:"cn,omitempty"` -} + + /* +Server name +IPA server hostname + */ + Cn []string `json:"cn,omitempty"` + } type ServerDelOptionalArgs struct { - - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` - - /* - Ignore topology errors - Ignore topology connectivity problems after removal - */ - IgnoreTopologyDisconnect *bool `json:"ignore_topology_disconnect,omitempty"` - - /* - Ignore check for last remaining CA or DNS server - Skip a check whether the last CA master or DNS server is removed - */ - IgnoreLastOfRole *bool `json:"ignore_last_of_role,omitempty"` - - /* - Force server removal - Force server removal even if it does not exist - */ - Force *bool `json:"force,omitempty"` -} + + /* + +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + + /* +Ignore topology errors +Ignore topology connectivity problems after removal + */ + IgnoreTopologyDisconnect *bool `json:"ignore_topology_disconnect,omitempty"` + + /* +Ignore check for last remaining CA or DNS server +Skip a check whether the last CA master or DNS server is removed + */ + IgnoreLastOfRole *bool `json:"ignore_last_of_role,omitempty"` + + /* +Force server removal +Force server removal even if it does not exist + */ + Force *bool `json:"force,omitempty"` + } type serverDelKwParams struct { - *ServerDelArgs - *ServerDelOptionalArgs + *ServerDelArgs + *ServerDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type serverDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServerDelResult `json:"result"` } type ServerDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } func (t *ServerDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServerDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServerDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServerDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServerDelResult%v", string(b)) } /* Search for IPA servers. */ func (c *Client) ServerFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *ServerFindArgs, - optArgs *ServerFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *ServerFindArgs, + optArgs *ServerFindOptionalArgs, // can be nil ) (*ServerFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := serverFindKwParams{ - ServerFindArgs: reqArgs, - ServerFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "server_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res serverFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := serverFindKwParams{ + ServerFindArgs: reqArgs, + ServerFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "server_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res serverFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServerFindArgs struct { -} + } type ServerFindOptionalArgs struct { - - /* - Server name - IPA server hostname - */ - Cn *string `json:"cn,omitempty"` - - /* - Min domain level - Minimum domain level - */ - Ipamindomainlevel *int `json:"ipamindomainlevel,omitempty"` - - /* - Max domain level - Maximum domain level - */ - Ipamaxdomainlevel *int `json:"ipamaxdomainlevel,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("name") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` - - /* - suffix - Search for servers with these managed suffixes. - */ - Topologysuffix *[]string `json:"topologysuffix,omitempty"` - - /* - suffix - Search for servers without these managed suffixes. - */ - NoTopologysuffix *[]string `json:"no_topologysuffix,omitempty"` - - /* - location - Search for servers with these ipa locations. - */ - InLocation *[]string `json:"in_location,omitempty"` - - /* - location - Search for servers without these ipa locations. - */ - NotInLocation *[]string `json:"not_in_location,omitempty"` - - /* - role - Search for servers with these enabled roles. - */ - Servrole *[]string `json:"servrole,omitempty"` -} + + /* +Server name +IPA server hostname + */ + Cn *string `json:"cn,omitempty"` + + /* +Min domain level +Minimum domain level + */ + Ipamindomainlevel *int `json:"ipamindomainlevel,omitempty"` + + /* +Max domain level +Maximum domain level + */ + Ipamaxdomainlevel *int `json:"ipamaxdomainlevel,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("name") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + + /* +suffix +Search for servers with these managed suffixes. + */ + Topologysuffix *[]string `json:"topologysuffix,omitempty"` + + /* +suffix +Search for servers without these managed suffixes. + */ + NoTopologysuffix *[]string `json:"no_topologysuffix,omitempty"` + + /* +location +Search for servers with these ipa locations. + */ + InLocation *[]string `json:"in_location,omitempty"` + + /* +location +Search for servers without these ipa locations. + */ + NotInLocation *[]string `json:"not_in_location,omitempty"` + + /* +role +Search for servers with these enabled roles. + */ + Servrole *[]string `json:"servrole,omitempty"` + } type serverFindKwParams struct { - *ServerFindArgs - *ServerFindOptionalArgs + *ServerFindArgs + *ServerFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type serverFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServerFindResult `json:"result"` } type ServerFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Server `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Server `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *ServerFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServerFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServerFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServerFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServerFindResult%v", string(b)) } /* Modify information about an IPA server. */ func (c *Client) ServerMod( - reqArgs *ServerModArgs, - optArgs *ServerModOptionalArgs, // can be nil + reqArgs *ServerModArgs, + optArgs *ServerModOptionalArgs, // can be nil ) (*ServerModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := serverModKwParams{ - ServerModArgs: reqArgs, - ServerModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "server_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res serverModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := serverModKwParams{ + ServerModArgs: reqArgs, + ServerModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "server_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res serverModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServerModArgs struct { - - /* - Server name - IPA server hostname - */ - Cn string `json:"cn,omitempty"` -} + + /* +Server name +IPA server hostname + */ + Cn string `json:"cn,omitempty"` + } type ServerModOptionalArgs struct { - - /* - Location - Server location - */ - IpalocationLocation *string `json:"ipalocation_location,omitempty"` - - /* - Service weight - Weight for server services - */ - Ipaserviceweight *int `json:"ipaserviceweight,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Location +Server location + */ + IpalocationLocation *string `json:"ipalocation_location,omitempty"` + + /* +Service weight +Weight for server services + */ + Ipaserviceweight *int `json:"ipaserviceweight,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type serverModKwParams struct { - *ServerModArgs - *ServerModOptionalArgs + *ServerModArgs + *ServerModOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type serverModResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServerModResult `json:"result"` } type ServerModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Server `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Server `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *ServerModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServerModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServerModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServerModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServerModResult%v", string(b)) } /* Find a server role on a server(s) */ func (c *Client) ServerRoleFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *ServerRoleFindArgs, - optArgs *ServerRoleFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *ServerRoleFindArgs, + optArgs *ServerRoleFindOptionalArgs, // can be nil ) (*ServerRoleFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := serverRoleFindKwParams{ - ServerRoleFindArgs: reqArgs, - ServerRoleFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "server_role_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res serverRoleFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := serverRoleFindKwParams{ + ServerRoleFindArgs: reqArgs, + ServerRoleFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "server_role_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res serverRoleFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServerRoleFindArgs struct { -} + } type ServerRoleFindOptionalArgs struct { - - /* - Server name - IPA server hostname - */ - ServerServer *string `json:"server_server,omitempty"` - - /* - Role name - IPA server role name - */ - RoleServrole *string `json:"role_servrole,omitempty"` - - /* - Role status - Status of the role - */ - Status *string `json:"status,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Server name +IPA server hostname + */ + ServerServer *string `json:"server_server,omitempty"` + + /* +Role name +IPA server role name + */ + RoleServrole *string `json:"role_servrole,omitempty"` + + /* +Role status +Status of the role + */ + Status *string `json:"status,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Include IPA master entries + */ + IncludeMaster *bool `json:"include_master,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type serverRoleFindKwParams struct { - *ServerRoleFindArgs - *ServerRoleFindOptionalArgs + *ServerRoleFindArgs + *ServerRoleFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type serverRoleFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServerRoleFindResult `json:"result"` } type ServerRoleFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []ServerRole `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []ServerRole `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *ServerRoleFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServerRoleFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServerRoleFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServerRoleFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServerRoleFindResult%v", string(b)) } /* Show role status on a server */ func (c *Client) ServerRoleShow( - reqArgs *ServerRoleShowArgs, - optArgs *ServerRoleShowOptionalArgs, // can be nil + reqArgs *ServerRoleShowArgs, + optArgs *ServerRoleShowOptionalArgs, // can be nil ) (*ServerRoleShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := serverRoleShowKwParams{ - ServerRoleShowArgs: reqArgs, - ServerRoleShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "server_role_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res serverRoleShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := serverRoleShowKwParams{ + ServerRoleShowArgs: reqArgs, + ServerRoleShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "server_role_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res serverRoleShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServerRoleShowArgs struct { - - /* - Server name - IPA server hostname - */ - ServerServer string `json:"server_server,omitempty"` - - /* - Role name - IPA server role name - */ - RoleServrole string `json:"role_servrole,omitempty"` -} + + /* +Server name +IPA server hostname + */ + ServerServer string `json:"server_server,omitempty"` + + /* +Role name +IPA server role name + */ + RoleServrole string `json:"role_servrole,omitempty"` + } type ServerRoleShowOptionalArgs struct { + + /* - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type serverRoleShowKwParams struct { - *ServerRoleShowArgs - *ServerRoleShowOptionalArgs + *ServerRoleShowArgs + *ServerRoleShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type serverRoleShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServerRoleShowResult `json:"result"` } type ServerRoleShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result ServerRole `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value interface{} `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result ServerRole `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value interface{} `json:"value,omitempty"` + } func (t *ServerRoleShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServerRoleShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServerRoleShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServerRoleShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServerRoleShowResult%v", string(b)) } /* Show IPA server. */ func (c *Client) ServerShow( - reqArgs *ServerShowArgs, - optArgs *ServerShowOptionalArgs, // can be nil + reqArgs *ServerShowArgs, + optArgs *ServerShowOptionalArgs, // can be nil ) (*ServerShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := serverShowKwParams{ - ServerShowArgs: reqArgs, - ServerShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "server_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res serverShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := serverShowKwParams{ + ServerShowArgs: reqArgs, + ServerShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "server_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res serverShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServerShowArgs struct { - - /* - Server name - IPA server hostname - */ - Cn string `json:"cn,omitempty"` -} + + /* +Server name +IPA server hostname + */ + Cn string `json:"cn,omitempty"` + } type ServerShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type serverShowKwParams struct { - *ServerShowArgs - *ServerShowOptionalArgs + *ServerShowArgs + *ServerShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type serverShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServerShowResult `json:"result"` } type ServerShowResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Server `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Server `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` +func (t *ServerShowResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServerShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServerShowResult%v", string(b)) } -func (t *ServerShowResult) String() string { - if t == nil { - return "" +/* +Set enabled/hidden state of a server. +*/ +func (c *Client) ServerState( + reqArgs *ServerStateArgs, + optArgs *ServerStateOptionalArgs, // can be nil +) (*ServerStateResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := serverStateKwParams{ + ServerStateArgs: reqArgs, + ServerStateOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "server_state", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res serverStateResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServerShowResult[failed json.Marshal: %v]", e) + if res.Error != nil { + return nil, res.Error } - return fmt.Sprintf("ServerShowResult%v", string(b)) + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} + +type ServerStateArgs struct { + + /* +Server name +IPA server hostname + */ + Cn string `json:"cn,omitempty"` + + /* +State +Server state + */ + State string `json:"state,omitempty"` + } + +type ServerStateOptionalArgs struct { + } + +type serverStateKwParams struct { + *ServerStateArgs + *ServerStateOptionalArgs + + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} + +type serverStateResponse struct { + Error *Error `json:"error"` + Result *ServerStateResult `json:"result"` +} + +type ServerStateResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } + +func (t *ServerStateResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServerStateResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServerStateResult%v", string(b)) } /* Add a new IPA service. */ func (c *Client) ServiceAdd( - reqArgs *ServiceAddArgs, - optArgs *ServiceAddOptionalArgs, // can be nil + reqArgs *ServiceAddArgs, + optArgs *ServiceAddOptionalArgs, // can be nil ) (*ServiceAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := serviceAddKwParams{ - ServiceAddArgs: reqArgs, - ServiceAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "service_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res serviceAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := serviceAddKwParams{ + ServiceAddArgs: reqArgs, + ServiceAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "service_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res serviceAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServiceAddArgs struct { - - /* - Principal name - Service principal - */ - Krbcanonicalname string `json:"krbcanonicalname,omitempty"` -} + + /* +Principal name +Service principal + */ + Krbcanonicalname string `json:"krbcanonicalname,omitempty"` + } type ServiceAddOptionalArgs struct { - - /* - Certificate - Base-64 encoded service certificate - */ - Usercertificate *[]string `json:"usercertificate,omitempty"` - - /* - PAC type - Override default list of supported PAC types. Use 'NONE' to disable PAC support for this service, e.g. this might be necessary for NFS services. - */ - Ipakrbauthzdata *[]string `json:"ipakrbauthzdata,omitempty"` - - /* - Authentication Indicators - Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations. - */ - Krbprincipalauthind *[]string `json:"krbprincipalauthind,omitempty"` - - /* - Requires pre-authentication - Pre-authentication is required for the service - */ - Ipakrbrequirespreauth *bool `json:"ipakrbrequirespreauth,omitempty"` - - /* - Trusted for delegation - Client credentials may be delegated to the service - */ - Ipakrbokasdelegate *bool `json:"ipakrbokasdelegate,omitempty"` - - /* - Trusted to authenticate as user - The service is allowed to authenticate on behalf of a client - */ - Ipakrboktoauthasdelegate *bool `json:"ipakrboktoauthasdelegate,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - Force - force principal name even if not in DNS - */ - Force *bool `json:"force,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Certificate +Base-64 encoded service certificate + */ + Usercertificate *[]interface{} `json:"usercertificate,omitempty"` + + /* +PAC type +Override default list of supported PAC types. Use 'NONE' to disable PAC support for this service, e.g. this might be necessary for NFS services. + */ + Ipakrbauthzdata *[]string `json:"ipakrbauthzdata,omitempty"` + + /* +Authentication Indicators +Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations. + */ + Krbprincipalauthind *[]string `json:"krbprincipalauthind,omitempty"` + + /* +Requires pre-authentication +Pre-authentication is required for the service + */ + Ipakrbrequirespreauth *bool `json:"ipakrbrequirespreauth,omitempty"` + + /* +Trusted for delegation +Client credentials may be delegated to the service + */ + Ipakrbokasdelegate *bool `json:"ipakrbokasdelegate,omitempty"` + + /* +Trusted to authenticate as user +The service is allowed to authenticate on behalf of a client + */ + Ipakrboktoauthasdelegate *bool `json:"ipakrboktoauthasdelegate,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* +Force +force principal name even if not in DNS + */ + Force *bool `json:"force,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type serviceAddKwParams struct { - *ServiceAddArgs - *ServiceAddOptionalArgs + *ServiceAddArgs + *ServiceAddOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type serviceAddResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServiceAddResult `json:"result"` } type ServiceAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Service `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Service `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *ServiceAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServiceAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServiceAddResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServiceAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServiceAddResult%v", string(b)) } /* Add new certificates to a service */ func (c *Client) ServiceAddCert( - reqArgs *ServiceAddCertArgs, - optArgs *ServiceAddCertOptionalArgs, // can be nil + reqArgs *ServiceAddCertArgs, + optArgs *ServiceAddCertOptionalArgs, // can be nil ) (*ServiceAddCertResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := serviceAddCertKwParams{ - ServiceAddCertArgs: reqArgs, - ServiceAddCertOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "service_add_cert", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res serviceAddCertResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := serviceAddCertKwParams{ + ServiceAddCertArgs: reqArgs, + ServiceAddCertOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "service_add_cert", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res serviceAddCertResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServiceAddCertArgs struct { - - /* - Principal name - Service principal - */ - Krbcanonicalname string `json:"krbcanonicalname,omitempty"` - - /* - Certificate - Base-64 encoded service certificate - */ - Usercertificate []string `json:"usercertificate,omitempty"` -} + + /* +Principal name +Service principal + */ + Krbcanonicalname string `json:"krbcanonicalname,omitempty"` + + /* +Certificate +Base-64 encoded service certificate + */ + Usercertificate []interface{} `json:"usercertificate,omitempty"` + } type ServiceAddCertOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type serviceAddCertKwParams struct { - *ServiceAddCertArgs - *ServiceAddCertOptionalArgs + *ServiceAddCertArgs + *ServiceAddCertOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type serviceAddCertResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServiceAddCertResult `json:"result"` } type ServiceAddCertResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *ServiceAddCertResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServiceAddCertResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServiceAddCertResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServiceAddCertResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServiceAddCertResult%v", string(b)) } /* Add hosts that can manage this service. */ func (c *Client) ServiceAddHost( - reqArgs *ServiceAddHostArgs, - optArgs *ServiceAddHostOptionalArgs, // can be nil + reqArgs *ServiceAddHostArgs, + optArgs *ServiceAddHostOptionalArgs, // can be nil ) (*ServiceAddHostResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := serviceAddHostKwParams{ - ServiceAddHostArgs: reqArgs, - ServiceAddHostOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "service_add_host", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res serviceAddHostResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := serviceAddHostKwParams{ + ServiceAddHostArgs: reqArgs, + ServiceAddHostOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "service_add_host", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res serviceAddHostResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServiceAddHostArgs struct { - - /* - Principal name - Service principal - */ - Krbcanonicalname string `json:"krbcanonicalname,omitempty"` -} + + /* +Principal name +Service principal + */ + Krbcanonicalname string `json:"krbcanonicalname,omitempty"` + } type ServiceAddHostOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member host - hosts to add - */ - Host *[]string `json:"host,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member host +hosts to add + */ + Host *[]string `json:"host,omitempty"` + } type serviceAddHostKwParams struct { - *ServiceAddHostArgs - *ServiceAddHostOptionalArgs + *ServiceAddHostArgs + *ServiceAddHostOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type serviceAddHostResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServiceAddHostResult `json:"result"` } type ServiceAddHostResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *ServiceAddHostResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServiceAddHostResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServiceAddHostResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServiceAddHostResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServiceAddHostResult%v", string(b)) } /* Add new principal alias to a service */ func (c *Client) ServiceAddPrincipal( - reqArgs *ServiceAddPrincipalArgs, - optArgs *ServiceAddPrincipalOptionalArgs, // can be nil + reqArgs *ServiceAddPrincipalArgs, + optArgs *ServiceAddPrincipalOptionalArgs, // can be nil ) (*ServiceAddPrincipalResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := serviceAddPrincipalKwParams{ - ServiceAddPrincipalArgs: reqArgs, - ServiceAddPrincipalOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "service_add_principal", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res serviceAddPrincipalResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := serviceAddPrincipalKwParams{ + ServiceAddPrincipalArgs: reqArgs, + ServiceAddPrincipalOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "service_add_principal", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res serviceAddPrincipalResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServiceAddPrincipalArgs struct { - - /* - Principal name - Service principal - */ - Krbcanonicalname string `json:"krbcanonicalname,omitempty"` - - /* - Principal alias - Service principal alias - */ - Krbprincipalname []string `json:"krbprincipalname,omitempty"` -} + + /* +Principal name +Service principal + */ + Krbcanonicalname string `json:"krbcanonicalname,omitempty"` + + /* +Principal alias +Service principal alias + */ + Krbprincipalname []string `json:"krbprincipalname,omitempty"` + } type ServiceAddPrincipalOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type serviceAddPrincipalKwParams struct { - *ServiceAddPrincipalArgs - *ServiceAddPrincipalOptionalArgs + *ServiceAddPrincipalArgs + *ServiceAddPrincipalOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type serviceAddPrincipalResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServiceAddPrincipalResult `json:"result"` } type ServiceAddPrincipalResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *ServiceAddPrincipalResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServiceAddPrincipalResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServiceAddPrincipalResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServiceAddPrincipalResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServiceAddPrincipalResult%v", string(b)) } /* Allow users, groups, hosts or host groups to create a keytab of this service. */ func (c *Client) ServiceAllowCreateKeytab( - reqArgs *ServiceAllowCreateKeytabArgs, - optArgs *ServiceAllowCreateKeytabOptionalArgs, // can be nil + reqArgs *ServiceAllowCreateKeytabArgs, + optArgs *ServiceAllowCreateKeytabOptionalArgs, // can be nil ) (*ServiceAllowCreateKeytabResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := serviceAllowCreateKeytabKwParams{ - ServiceAllowCreateKeytabArgs: reqArgs, - ServiceAllowCreateKeytabOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "service_allow_create_keytab", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res serviceAllowCreateKeytabResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := serviceAllowCreateKeytabKwParams{ + ServiceAllowCreateKeytabArgs: reqArgs, + ServiceAllowCreateKeytabOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "service_allow_create_keytab", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res serviceAllowCreateKeytabResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServiceAllowCreateKeytabArgs struct { - - /* - Principal name - Service principal - */ - Krbcanonicalname string `json:"krbcanonicalname,omitempty"` -} + + /* +Principal name +Service principal + */ + Krbcanonicalname string `json:"krbcanonicalname,omitempty"` + } type ServiceAllowCreateKeytabOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member user - users to add - */ - User *[]string `json:"user,omitempty"` - - /* - member group - groups to add - */ - Group *[]string `json:"group,omitempty"` - - /* - member host - hosts to add - */ - Host *[]string `json:"host,omitempty"` - - /* - member host group - host groups to add - */ - Hostgroup *[]string `json:"hostgroup,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member user +users to add + */ + User *[]string `json:"user,omitempty"` + + /* +member group +groups to add + */ + Group *[]string `json:"group,omitempty"` + + /* +member host +hosts to add + */ + Host *[]string `json:"host,omitempty"` + + /* +member host group +host groups to add + */ + Hostgroup *[]string `json:"hostgroup,omitempty"` + } type serviceAllowCreateKeytabKwParams struct { - *ServiceAllowCreateKeytabArgs - *ServiceAllowCreateKeytabOptionalArgs + *ServiceAllowCreateKeytabArgs + *ServiceAllowCreateKeytabOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type serviceAllowCreateKeytabResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServiceAllowCreateKeytabResult `json:"result"` } type ServiceAllowCreateKeytabResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *ServiceAllowCreateKeytabResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServiceAllowCreateKeytabResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServiceAllowCreateKeytabResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServiceAllowCreateKeytabResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServiceAllowCreateKeytabResult%v", string(b)) } /* Allow users, groups, hosts or host groups to retrieve a keytab of this service. */ func (c *Client) ServiceAllowRetrieveKeytab( - reqArgs *ServiceAllowRetrieveKeytabArgs, - optArgs *ServiceAllowRetrieveKeytabOptionalArgs, // can be nil + reqArgs *ServiceAllowRetrieveKeytabArgs, + optArgs *ServiceAllowRetrieveKeytabOptionalArgs, // can be nil ) (*ServiceAllowRetrieveKeytabResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := serviceAllowRetrieveKeytabKwParams{ - ServiceAllowRetrieveKeytabArgs: reqArgs, - ServiceAllowRetrieveKeytabOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "service_allow_retrieve_keytab", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res serviceAllowRetrieveKeytabResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := serviceAllowRetrieveKeytabKwParams{ + ServiceAllowRetrieveKeytabArgs: reqArgs, + ServiceAllowRetrieveKeytabOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "service_allow_retrieve_keytab", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res serviceAllowRetrieveKeytabResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServiceAllowRetrieveKeytabArgs struct { - - /* - Principal name - Service principal - */ - Krbcanonicalname string `json:"krbcanonicalname,omitempty"` -} + + /* +Principal name +Service principal + */ + Krbcanonicalname string `json:"krbcanonicalname,omitempty"` + } type ServiceAllowRetrieveKeytabOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member user - users to add - */ - User *[]string `json:"user,omitempty"` - - /* - member group - groups to add - */ - Group *[]string `json:"group,omitempty"` - - /* - member host - hosts to add - */ - Host *[]string `json:"host,omitempty"` - - /* - member host group - host groups to add - */ - Hostgroup *[]string `json:"hostgroup,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member user +users to add + */ + User *[]string `json:"user,omitempty"` + + /* +member group +groups to add + */ + Group *[]string `json:"group,omitempty"` + + /* +member host +hosts to add + */ + Host *[]string `json:"host,omitempty"` + + /* +member host group +host groups to add + */ + Hostgroup *[]string `json:"hostgroup,omitempty"` + } type serviceAllowRetrieveKeytabKwParams struct { - *ServiceAllowRetrieveKeytabArgs - *ServiceAllowRetrieveKeytabOptionalArgs + *ServiceAllowRetrieveKeytabArgs + *ServiceAllowRetrieveKeytabOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type serviceAllowRetrieveKeytabResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServiceAllowRetrieveKeytabResult `json:"result"` } type ServiceAllowRetrieveKeytabResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *ServiceAllowRetrieveKeytabResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServiceAllowRetrieveKeytabResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServiceAllowRetrieveKeytabResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServiceAllowRetrieveKeytabResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServiceAllowRetrieveKeytabResult%v", string(b)) } /* Delete an IPA service. */ func (c *Client) ServiceDel( - reqArgs *ServiceDelArgs, - optArgs *ServiceDelOptionalArgs, // can be nil + reqArgs *ServiceDelArgs, + optArgs *ServiceDelOptionalArgs, // can be nil ) (*ServiceDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := serviceDelKwParams{ - ServiceDelArgs: reqArgs, - ServiceDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "service_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res serviceDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := serviceDelKwParams{ + ServiceDelArgs: reqArgs, + ServiceDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "service_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res serviceDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServiceDelArgs struct { - - /* - Principal name - Service principal - */ - Krbcanonicalname []string `json:"krbcanonicalname,omitempty"` -} + + /* +Principal name +Service principal + */ + Krbcanonicalname []string `json:"krbcanonicalname,omitempty"` + } type ServiceDelOptionalArgs struct { + + /* - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` -} +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } type serviceDelKwParams struct { - *ServiceDelArgs - *ServiceDelOptionalArgs + *ServiceDelArgs + *ServiceDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type serviceDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServiceDelResult `json:"result"` } type ServiceDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } func (t *ServiceDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServiceDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServiceDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServiceDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServiceDelResult%v", string(b)) } /* Disable the Kerberos key and SSL certificate of a service. */ func (c *Client) ServiceDisable( - reqArgs *ServiceDisableArgs, - optArgs *ServiceDisableOptionalArgs, // can be nil + reqArgs *ServiceDisableArgs, + optArgs *ServiceDisableOptionalArgs, // can be nil ) (*ServiceDisableResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := serviceDisableKwParams{ - ServiceDisableArgs: reqArgs, - ServiceDisableOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "service_disable", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res serviceDisableResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := serviceDisableKwParams{ + ServiceDisableArgs: reqArgs, + ServiceDisableOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "service_disable", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res serviceDisableResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServiceDisableArgs struct { - - /* - Principal name - Service principal - */ - Krbcanonicalname string `json:"krbcanonicalname,omitempty"` -} + + /* +Principal name +Service principal + */ + Krbcanonicalname string `json:"krbcanonicalname,omitempty"` + } type ServiceDisableOptionalArgs struct { -} + } type serviceDisableKwParams struct { - *ServiceDisableArgs - *ServiceDisableOptionalArgs + *ServiceDisableArgs + *ServiceDisableOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type serviceDisableResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServiceDisableResult `json:"result"` } type ServiceDisableResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - True means the operation was successful - (required) - */ - Result bool `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *ServiceDisableResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServiceDisableResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServiceDisableResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServiceDisableResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServiceDisableResult%v", string(b)) } /* Disallow users, groups, hosts or host groups to create a keytab of this service. */ func (c *Client) ServiceDisallowCreateKeytab( - reqArgs *ServiceDisallowCreateKeytabArgs, - optArgs *ServiceDisallowCreateKeytabOptionalArgs, // can be nil + reqArgs *ServiceDisallowCreateKeytabArgs, + optArgs *ServiceDisallowCreateKeytabOptionalArgs, // can be nil ) (*ServiceDisallowCreateKeytabResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := serviceDisallowCreateKeytabKwParams{ - ServiceDisallowCreateKeytabArgs: reqArgs, - ServiceDisallowCreateKeytabOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "service_disallow_create_keytab", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res serviceDisallowCreateKeytabResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := serviceDisallowCreateKeytabKwParams{ + ServiceDisallowCreateKeytabArgs: reqArgs, + ServiceDisallowCreateKeytabOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "service_disallow_create_keytab", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res serviceDisallowCreateKeytabResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServiceDisallowCreateKeytabArgs struct { - - /* - Principal name - Service principal - */ - Krbcanonicalname string `json:"krbcanonicalname,omitempty"` -} + + /* +Principal name +Service principal + */ + Krbcanonicalname string `json:"krbcanonicalname,omitempty"` + } type ServiceDisallowCreateKeytabOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member user - users to remove - */ - User *[]string `json:"user,omitempty"` - - /* - member group - groups to remove - */ - Group *[]string `json:"group,omitempty"` - - /* - member host - hosts to remove - */ - Host *[]string `json:"host,omitempty"` - - /* - member host group - host groups to remove - */ - Hostgroup *[]string `json:"hostgroup,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member user +users to remove + */ + User *[]string `json:"user,omitempty"` + + /* +member group +groups to remove + */ + Group *[]string `json:"group,omitempty"` + + /* +member host +hosts to remove + */ + Host *[]string `json:"host,omitempty"` + + /* +member host group +host groups to remove + */ + Hostgroup *[]string `json:"hostgroup,omitempty"` + } type serviceDisallowCreateKeytabKwParams struct { - *ServiceDisallowCreateKeytabArgs - *ServiceDisallowCreateKeytabOptionalArgs + *ServiceDisallowCreateKeytabArgs + *ServiceDisallowCreateKeytabOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type serviceDisallowCreateKeytabResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServiceDisallowCreateKeytabResult `json:"result"` } type ServiceDisallowCreateKeytabResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *ServiceDisallowCreateKeytabResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServiceDisallowCreateKeytabResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServiceDisallowCreateKeytabResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServiceDisallowCreateKeytabResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServiceDisallowCreateKeytabResult%v", string(b)) } /* Disallow users, groups, hosts or host groups to retrieve a keytab of this service. */ func (c *Client) ServiceDisallowRetrieveKeytab( - reqArgs *ServiceDisallowRetrieveKeytabArgs, - optArgs *ServiceDisallowRetrieveKeytabOptionalArgs, // can be nil + reqArgs *ServiceDisallowRetrieveKeytabArgs, + optArgs *ServiceDisallowRetrieveKeytabOptionalArgs, // can be nil ) (*ServiceDisallowRetrieveKeytabResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := serviceDisallowRetrieveKeytabKwParams{ - ServiceDisallowRetrieveKeytabArgs: reqArgs, - ServiceDisallowRetrieveKeytabOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "service_disallow_retrieve_keytab", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res serviceDisallowRetrieveKeytabResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := serviceDisallowRetrieveKeytabKwParams{ + ServiceDisallowRetrieveKeytabArgs: reqArgs, + ServiceDisallowRetrieveKeytabOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "service_disallow_retrieve_keytab", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res serviceDisallowRetrieveKeytabResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServiceDisallowRetrieveKeytabArgs struct { - - /* - Principal name - Service principal - */ - Krbcanonicalname string `json:"krbcanonicalname,omitempty"` -} + + /* +Principal name +Service principal + */ + Krbcanonicalname string `json:"krbcanonicalname,omitempty"` + } type ServiceDisallowRetrieveKeytabOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member user - users to remove - */ - User *[]string `json:"user,omitempty"` - - /* - member group - groups to remove - */ - Group *[]string `json:"group,omitempty"` - - /* - member host - hosts to remove - */ - Host *[]string `json:"host,omitempty"` - - /* - member host group - host groups to remove - */ - Hostgroup *[]string `json:"hostgroup,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member user +users to remove + */ + User *[]string `json:"user,omitempty"` + + /* +member group +groups to remove + */ + Group *[]string `json:"group,omitempty"` + + /* +member host +hosts to remove + */ + Host *[]string `json:"host,omitempty"` + + /* +member host group +host groups to remove + */ + Hostgroup *[]string `json:"hostgroup,omitempty"` + } type serviceDisallowRetrieveKeytabKwParams struct { - *ServiceDisallowRetrieveKeytabArgs - *ServiceDisallowRetrieveKeytabOptionalArgs + *ServiceDisallowRetrieveKeytabArgs + *ServiceDisallowRetrieveKeytabOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type serviceDisallowRetrieveKeytabResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServiceDisallowRetrieveKeytabResult `json:"result"` } type ServiceDisallowRetrieveKeytabResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *ServiceDisallowRetrieveKeytabResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServiceDisallowRetrieveKeytabResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServiceDisallowRetrieveKeytabResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServiceDisallowRetrieveKeytabResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServiceDisallowRetrieveKeytabResult%v", string(b)) } /* Search for IPA services. */ func (c *Client) ServiceFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *ServiceFindArgs, - optArgs *ServiceFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *ServiceFindArgs, + optArgs *ServiceFindOptionalArgs, // can be nil ) (*ServiceFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := serviceFindKwParams{ - ServiceFindArgs: reqArgs, - ServiceFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "service_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res serviceFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := serviceFindKwParams{ + ServiceFindArgs: reqArgs, + ServiceFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "service_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res serviceFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServiceFindArgs struct { -} + } type ServiceFindOptionalArgs struct { - - /* - Principal name - Service principal - */ - Krbcanonicalname *string `json:"krbcanonicalname,omitempty"` - - /* - Principal alias - Service principal alias - */ - Krbprincipalname *[]string `json:"krbprincipalname,omitempty"` - - /* - PAC type - Override default list of supported PAC types. Use 'NONE' to disable PAC support for this service, e.g. this might be necessary for NFS services. - */ - Ipakrbauthzdata *[]string `json:"ipakrbauthzdata,omitempty"` - - /* - Authentication Indicators - Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations. - */ - Krbprincipalauthind *[]string `json:"krbprincipalauthind,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("canonical-principal") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` - - /* - host - Search for services with these managed by hosts. - */ - ManByHost *[]string `json:"man_by_host,omitempty"` - - /* - host - Search for services without these managed by hosts. - */ - NotManByHost *[]string `json:"not_man_by_host,omitempty"` -} + + /* +Principal name +Service principal + */ + Krbcanonicalname *string `json:"krbcanonicalname,omitempty"` + + /* +Principal alias +Service principal alias + */ + Krbprincipalname *[]string `json:"krbprincipalname,omitempty"` + + /* +PAC type +Override default list of supported PAC types. Use 'NONE' to disable PAC support for this service, e.g. this might be necessary for NFS services. + */ + Ipakrbauthzdata *[]string `json:"ipakrbauthzdata,omitempty"` + + /* +Authentication Indicators +Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations. + */ + Krbprincipalauthind *[]string `json:"krbprincipalauthind,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("canonical-principal") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + + /* +host +Search for services with these managed by hosts. + */ + ManByHost *[]string `json:"man_by_host,omitempty"` + + /* +host +Search for services without these managed by hosts. + */ + NotManByHost *[]string `json:"not_man_by_host,omitempty"` + } type serviceFindKwParams struct { - *ServiceFindArgs - *ServiceFindOptionalArgs + *ServiceFindArgs + *ServiceFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type serviceFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServiceFindResult `json:"result"` } type ServiceFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Service `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Service `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *ServiceFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServiceFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServiceFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServiceFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServiceFindResult%v", string(b)) } /* Modify an existing IPA service. */ func (c *Client) ServiceMod( - reqArgs *ServiceModArgs, - optArgs *ServiceModOptionalArgs, // can be nil + reqArgs *ServiceModArgs, + optArgs *ServiceModOptionalArgs, // can be nil ) (*ServiceModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := serviceModKwParams{ - ServiceModArgs: reqArgs, - ServiceModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "service_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res serviceModResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := serviceModKwParams{ + ServiceModArgs: reqArgs, + ServiceModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "service_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res serviceModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServiceModArgs struct { - - /* - Principal name - Service principal - */ - Krbcanonicalname string `json:"krbcanonicalname,omitempty"` -} + + /* +Principal name +Service principal + */ + Krbcanonicalname string `json:"krbcanonicalname,omitempty"` + } type ServiceModOptionalArgs struct { - - /* - Principal alias - Service principal alias - */ - Krbprincipalname *[]string `json:"krbprincipalname,omitempty"` - - /* - Certificate - Base-64 encoded service certificate - */ - Usercertificate *[]string `json:"usercertificate,omitempty"` - - /* - PAC type - Override default list of supported PAC types. Use 'NONE' to disable PAC support for this service, e.g. this might be necessary for NFS services. - */ - Ipakrbauthzdata *[]string `json:"ipakrbauthzdata,omitempty"` - - /* - Authentication Indicators - Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations. - */ - Krbprincipalauthind *[]string `json:"krbprincipalauthind,omitempty"` - - /* - Requires pre-authentication - Pre-authentication is required for the service - */ - Ipakrbrequirespreauth *bool `json:"ipakrbrequirespreauth,omitempty"` - - /* - Trusted for delegation - Client credentials may be delegated to the service - */ - Ipakrbokasdelegate *bool `json:"ipakrbokasdelegate,omitempty"` - - /* - Trusted to authenticate as user - The service is allowed to authenticate on behalf of a client - */ - Ipakrboktoauthasdelegate *bool `json:"ipakrboktoauthasdelegate,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Principal alias +Service principal alias + */ + Krbprincipalname *[]string `json:"krbprincipalname,omitempty"` + + /* +Certificate +Base-64 encoded service certificate + */ + Usercertificate *[]interface{} `json:"usercertificate,omitempty"` + + /* +PAC type +Override default list of supported PAC types. Use 'NONE' to disable PAC support for this service, e.g. this might be necessary for NFS services. + */ + Ipakrbauthzdata *[]string `json:"ipakrbauthzdata,omitempty"` + + /* +Authentication Indicators +Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations. + */ + Krbprincipalauthind *[]string `json:"krbprincipalauthind,omitempty"` + + /* +Requires pre-authentication +Pre-authentication is required for the service + */ + Ipakrbrequirespreauth *bool `json:"ipakrbrequirespreauth,omitempty"` + + /* +Trusted for delegation +Client credentials may be delegated to the service + */ + Ipakrbokasdelegate *bool `json:"ipakrbokasdelegate,omitempty"` + + /* +Trusted to authenticate as user +The service is allowed to authenticate on behalf of a client + */ + Ipakrboktoauthasdelegate *bool `json:"ipakrboktoauthasdelegate,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type serviceModKwParams struct { - *ServiceModArgs - *ServiceModOptionalArgs + *ServiceModArgs + *ServiceModOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type serviceModResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServiceModResult `json:"result"` } type ServiceModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Service `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Service `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *ServiceModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServiceModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServiceModResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServiceModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServiceModResult%v", string(b)) } /* Remove certificates from a service */ func (c *Client) ServiceRemoveCert( - reqArgs *ServiceRemoveCertArgs, - optArgs *ServiceRemoveCertOptionalArgs, // can be nil + reqArgs *ServiceRemoveCertArgs, + optArgs *ServiceRemoveCertOptionalArgs, // can be nil ) (*ServiceRemoveCertResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := serviceRemoveCertKwParams{ - ServiceRemoveCertArgs: reqArgs, - ServiceRemoveCertOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "service_remove_cert", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res serviceRemoveCertResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := serviceRemoveCertKwParams{ + ServiceRemoveCertArgs: reqArgs, + ServiceRemoveCertOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "service_remove_cert", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res serviceRemoveCertResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServiceRemoveCertArgs struct { - - /* - Principal name - Service principal - */ - Krbcanonicalname string `json:"krbcanonicalname,omitempty"` - - /* - Certificate - Base-64 encoded service certificate - */ - Usercertificate []string `json:"usercertificate,omitempty"` -} + + /* +Principal name +Service principal + */ + Krbcanonicalname string `json:"krbcanonicalname,omitempty"` + + /* +Certificate +Base-64 encoded service certificate + */ + Usercertificate []interface{} `json:"usercertificate,omitempty"` + } type ServiceRemoveCertOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type serviceRemoveCertKwParams struct { - *ServiceRemoveCertArgs - *ServiceRemoveCertOptionalArgs + *ServiceRemoveCertArgs + *ServiceRemoveCertOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type serviceRemoveCertResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServiceRemoveCertResult `json:"result"` } type ServiceRemoveCertResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *ServiceRemoveCertResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServiceRemoveCertResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServiceRemoveCertResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServiceRemoveCertResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServiceRemoveCertResult%v", string(b)) } /* Remove hosts that can manage this service. */ func (c *Client) ServiceRemoveHost( - reqArgs *ServiceRemoveHostArgs, - optArgs *ServiceRemoveHostOptionalArgs, // can be nil + reqArgs *ServiceRemoveHostArgs, + optArgs *ServiceRemoveHostOptionalArgs, // can be nil ) (*ServiceRemoveHostResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := serviceRemoveHostKwParams{ - ServiceRemoveHostArgs: reqArgs, - ServiceRemoveHostOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "service_remove_host", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res serviceRemoveHostResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := serviceRemoveHostKwParams{ + ServiceRemoveHostArgs: reqArgs, + ServiceRemoveHostOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "service_remove_host", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res serviceRemoveHostResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServiceRemoveHostArgs struct { - - /* - Principal name - Service principal - */ - Krbcanonicalname string `json:"krbcanonicalname,omitempty"` -} + + /* +Principal name +Service principal + */ + Krbcanonicalname string `json:"krbcanonicalname,omitempty"` + } type ServiceRemoveHostOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member host - hosts to remove - */ - Host *[]string `json:"host,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member host +hosts to remove + */ + Host *[]string `json:"host,omitempty"` + } type serviceRemoveHostKwParams struct { - *ServiceRemoveHostArgs - *ServiceRemoveHostOptionalArgs + *ServiceRemoveHostArgs + *ServiceRemoveHostOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type serviceRemoveHostResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServiceRemoveHostResult `json:"result"` } type ServiceRemoveHostResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *ServiceRemoveHostResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServiceRemoveHostResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServiceRemoveHostResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServiceRemoveHostResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServiceRemoveHostResult%v", string(b)) } /* Remove principal alias from a service */ func (c *Client) ServiceRemovePrincipal( - reqArgs *ServiceRemovePrincipalArgs, - optArgs *ServiceRemovePrincipalOptionalArgs, // can be nil + reqArgs *ServiceRemovePrincipalArgs, + optArgs *ServiceRemovePrincipalOptionalArgs, // can be nil ) (*ServiceRemovePrincipalResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := serviceRemovePrincipalKwParams{ - ServiceRemovePrincipalArgs: reqArgs, - ServiceRemovePrincipalOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "service_remove_principal", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res serviceRemovePrincipalResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := serviceRemovePrincipalKwParams{ + ServiceRemovePrincipalArgs: reqArgs, + ServiceRemovePrincipalOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "service_remove_principal", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res serviceRemovePrincipalResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServiceRemovePrincipalArgs struct { - - /* - Principal name - Service principal - */ - Krbcanonicalname string `json:"krbcanonicalname,omitempty"` - - /* - Principal alias - Service principal alias - */ - Krbprincipalname []string `json:"krbprincipalname,omitempty"` -} + + /* +Principal name +Service principal + */ + Krbcanonicalname string `json:"krbcanonicalname,omitempty"` + + /* +Principal alias +Service principal alias + */ + Krbprincipalname []string `json:"krbprincipalname,omitempty"` + } type ServiceRemovePrincipalOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type serviceRemovePrincipalKwParams struct { - *ServiceRemovePrincipalArgs - *ServiceRemovePrincipalOptionalArgs + *ServiceRemovePrincipalArgs + *ServiceRemovePrincipalOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type serviceRemovePrincipalResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServiceRemovePrincipalResult `json:"result"` } type ServiceRemovePrincipalResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *ServiceRemovePrincipalResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServiceRemovePrincipalResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServiceRemovePrincipalResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServiceRemovePrincipalResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServiceRemovePrincipalResult%v", string(b)) } /* Display information about an IPA service. */ func (c *Client) ServiceShow( - reqArgs *ServiceShowArgs, - optArgs *ServiceShowOptionalArgs, // can be nil + reqArgs *ServiceShowArgs, + optArgs *ServiceShowOptionalArgs, // can be nil ) (*ServiceShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := serviceShowKwParams{ - ServiceShowArgs: reqArgs, - ServiceShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "service_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res serviceShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := serviceShowKwParams{ + ServiceShowArgs: reqArgs, + ServiceShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "service_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res serviceShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServiceShowArgs struct { - - /* - Principal name - Service principal - */ - Krbcanonicalname string `json:"krbcanonicalname,omitempty"` -} + + /* +Principal name +Service principal + */ + Krbcanonicalname string `json:"krbcanonicalname,omitempty"` + } type ServiceShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - file to store certificate in - */ - Out *string `json:"out,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +file to store certificate in + */ + Out *string `json:"out,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type serviceShowKwParams struct { - *ServiceShowArgs - *ServiceShowOptionalArgs + *ServiceShowArgs + *ServiceShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type serviceShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServiceShowResult `json:"result"` } type ServiceShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Service `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Service `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *ServiceShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServiceShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServiceShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServiceShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServiceShowResult%v", string(b)) } /* Create a new service delegation rule. */ func (c *Client) ServicedelegationruleAdd( - reqArgs *ServicedelegationruleAddArgs, - optArgs *ServicedelegationruleAddOptionalArgs, // can be nil + reqArgs *ServicedelegationruleAddArgs, + optArgs *ServicedelegationruleAddOptionalArgs, // can be nil ) (*ServicedelegationruleAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := servicedelegationruleAddKwParams{ - ServicedelegationruleAddArgs: reqArgs, - ServicedelegationruleAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "servicedelegationrule_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res servicedelegationruleAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := servicedelegationruleAddKwParams{ + ServicedelegationruleAddArgs: reqArgs, + ServicedelegationruleAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "servicedelegationrule_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res servicedelegationruleAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServicedelegationruleAddArgs struct { + + /* +Delegation name - /* - Delegation name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type ServicedelegationruleAddOptionalArgs struct { - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type servicedelegationruleAddKwParams struct { - *ServicedelegationruleAddArgs - *ServicedelegationruleAddOptionalArgs + *ServicedelegationruleAddArgs + *ServicedelegationruleAddOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type servicedelegationruleAddResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServicedelegationruleAddResult `json:"result"` } type ServicedelegationruleAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Servicedelegationrule `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Servicedelegationrule `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *ServicedelegationruleAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServicedelegationruleAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServicedelegationruleAddResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServicedelegationruleAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServicedelegationruleAddResult%v", string(b)) } /* Add member to a named service delegation rule. */ func (c *Client) ServicedelegationruleAddMember( - reqArgs *ServicedelegationruleAddMemberArgs, - optArgs *ServicedelegationruleAddMemberOptionalArgs, // can be nil + reqArgs *ServicedelegationruleAddMemberArgs, + optArgs *ServicedelegationruleAddMemberOptionalArgs, // can be nil ) (*ServicedelegationruleAddMemberResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := servicedelegationruleAddMemberKwParams{ - ServicedelegationruleAddMemberArgs: reqArgs, - ServicedelegationruleAddMemberOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "servicedelegationrule_add_member", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res servicedelegationruleAddMemberResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := servicedelegationruleAddMemberKwParams{ + ServicedelegationruleAddMemberArgs: reqArgs, + ServicedelegationruleAddMemberOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "servicedelegationrule_add_member", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res servicedelegationruleAddMemberResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServicedelegationruleAddMemberArgs struct { + + /* +Delegation name - /* - Delegation name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type ServicedelegationruleAddMemberOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member principal - principal to add - */ - Principal *[]string `json:"principal,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member principal +principal to add + */ + Principal *[]string `json:"principal,omitempty"` + } type servicedelegationruleAddMemberKwParams struct { - *ServicedelegationruleAddMemberArgs - *ServicedelegationruleAddMemberOptionalArgs + *ServicedelegationruleAddMemberArgs + *ServicedelegationruleAddMemberOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type servicedelegationruleAddMemberResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServicedelegationruleAddMemberResult `json:"result"` } type ServicedelegationruleAddMemberResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *ServicedelegationruleAddMemberResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServicedelegationruleAddMemberResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServicedelegationruleAddMemberResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServicedelegationruleAddMemberResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServicedelegationruleAddMemberResult%v", string(b)) } /* Add target to a named service delegation rule. */ func (c *Client) ServicedelegationruleAddTarget( - reqArgs *ServicedelegationruleAddTargetArgs, - optArgs *ServicedelegationruleAddTargetOptionalArgs, // can be nil + reqArgs *ServicedelegationruleAddTargetArgs, + optArgs *ServicedelegationruleAddTargetOptionalArgs, // can be nil ) (*ServicedelegationruleAddTargetResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := servicedelegationruleAddTargetKwParams{ - ServicedelegationruleAddTargetArgs: reqArgs, - ServicedelegationruleAddTargetOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "servicedelegationrule_add_target", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res servicedelegationruleAddTargetResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := servicedelegationruleAddTargetKwParams{ + ServicedelegationruleAddTargetArgs: reqArgs, + ServicedelegationruleAddTargetOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "servicedelegationrule_add_target", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res servicedelegationruleAddTargetResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServicedelegationruleAddTargetArgs struct { + + /* +Delegation name - /* - Delegation name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type ServicedelegationruleAddTargetOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member service delegation target - service delegation targets to add - */ - Servicedelegationtarget *[]string `json:"servicedelegationtarget,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member service delegation target +service delegation targets to add + */ + Servicedelegationtarget *[]string `json:"servicedelegationtarget,omitempty"` + } type servicedelegationruleAddTargetKwParams struct { - *ServicedelegationruleAddTargetArgs - *ServicedelegationruleAddTargetOptionalArgs + *ServicedelegationruleAddTargetArgs + *ServicedelegationruleAddTargetOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type servicedelegationruleAddTargetResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServicedelegationruleAddTargetResult `json:"result"` } type ServicedelegationruleAddTargetResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *ServicedelegationruleAddTargetResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServicedelegationruleAddTargetResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServicedelegationruleAddTargetResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServicedelegationruleAddTargetResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServicedelegationruleAddTargetResult%v", string(b)) } /* Delete service delegation. */ func (c *Client) ServicedelegationruleDel( - reqArgs *ServicedelegationruleDelArgs, - optArgs *ServicedelegationruleDelOptionalArgs, // can be nil + reqArgs *ServicedelegationruleDelArgs, + optArgs *ServicedelegationruleDelOptionalArgs, // can be nil ) (*ServicedelegationruleDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := servicedelegationruleDelKwParams{ - ServicedelegationruleDelArgs: reqArgs, - ServicedelegationruleDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "servicedelegationrule_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res servicedelegationruleDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := servicedelegationruleDelKwParams{ + ServicedelegationruleDelArgs: reqArgs, + ServicedelegationruleDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "servicedelegationrule_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res servicedelegationruleDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServicedelegationruleDelArgs struct { + + /* +Delegation name - /* - Delegation name - - */ - Cn []string `json:"cn,omitempty"` -} + */ + Cn []string `json:"cn,omitempty"` + } type ServicedelegationruleDelOptionalArgs struct { + + /* - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` -} +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } type servicedelegationruleDelKwParams struct { - *ServicedelegationruleDelArgs - *ServicedelegationruleDelOptionalArgs + *ServicedelegationruleDelArgs + *ServicedelegationruleDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type servicedelegationruleDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServicedelegationruleDelResult `json:"result"` } type ServicedelegationruleDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } func (t *ServicedelegationruleDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServicedelegationruleDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServicedelegationruleDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServicedelegationruleDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServicedelegationruleDelResult%v", string(b)) } /* Search for service delegations rule. */ func (c *Client) ServicedelegationruleFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *ServicedelegationruleFindArgs, - optArgs *ServicedelegationruleFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *ServicedelegationruleFindArgs, + optArgs *ServicedelegationruleFindOptionalArgs, // can be nil ) (*ServicedelegationruleFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := servicedelegationruleFindKwParams{ - ServicedelegationruleFindArgs: reqArgs, - ServicedelegationruleFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "servicedelegationrule_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res servicedelegationruleFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := servicedelegationruleFindKwParams{ + ServicedelegationruleFindArgs: reqArgs, + ServicedelegationruleFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "servicedelegationrule_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res servicedelegationruleFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServicedelegationruleFindArgs struct { -} + } type ServicedelegationruleFindOptionalArgs struct { - - /* - Delegation name - - */ - Cn *string `json:"cn,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("delegation-name") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} + + /* +Delegation name + + */ + Cn *string `json:"cn,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("delegation-name") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } type servicedelegationruleFindKwParams struct { - *ServicedelegationruleFindArgs - *ServicedelegationruleFindOptionalArgs + *ServicedelegationruleFindArgs + *ServicedelegationruleFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type servicedelegationruleFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServicedelegationruleFindResult `json:"result"` } type ServicedelegationruleFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Servicedelegationrule `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Servicedelegationrule `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *ServicedelegationruleFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServicedelegationruleFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServicedelegationruleFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServicedelegationruleFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServicedelegationruleFindResult%v", string(b)) } /* Remove member from a named service delegation rule. */ func (c *Client) ServicedelegationruleRemoveMember( - reqArgs *ServicedelegationruleRemoveMemberArgs, - optArgs *ServicedelegationruleRemoveMemberOptionalArgs, // can be nil + reqArgs *ServicedelegationruleRemoveMemberArgs, + optArgs *ServicedelegationruleRemoveMemberOptionalArgs, // can be nil ) (*ServicedelegationruleRemoveMemberResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := servicedelegationruleRemoveMemberKwParams{ - ServicedelegationruleRemoveMemberArgs: reqArgs, - ServicedelegationruleRemoveMemberOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "servicedelegationrule_remove_member", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res servicedelegationruleRemoveMemberResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := servicedelegationruleRemoveMemberKwParams{ + ServicedelegationruleRemoveMemberArgs: reqArgs, + ServicedelegationruleRemoveMemberOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "servicedelegationrule_remove_member", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res servicedelegationruleRemoveMemberResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServicedelegationruleRemoveMemberArgs struct { + + /* +Delegation name - /* - Delegation name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type ServicedelegationruleRemoveMemberOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member principal - principal to remove - */ - Principal *[]string `json:"principal,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member principal +principal to remove + */ + Principal *[]string `json:"principal,omitempty"` + } type servicedelegationruleRemoveMemberKwParams struct { - *ServicedelegationruleRemoveMemberArgs - *ServicedelegationruleRemoveMemberOptionalArgs + *ServicedelegationruleRemoveMemberArgs + *ServicedelegationruleRemoveMemberOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type servicedelegationruleRemoveMemberResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServicedelegationruleRemoveMemberResult `json:"result"` } type ServicedelegationruleRemoveMemberResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *ServicedelegationruleRemoveMemberResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServicedelegationruleRemoveMemberResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServicedelegationruleRemoveMemberResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServicedelegationruleRemoveMemberResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServicedelegationruleRemoveMemberResult%v", string(b)) } /* Remove target from a named service delegation rule. */ func (c *Client) ServicedelegationruleRemoveTarget( - reqArgs *ServicedelegationruleRemoveTargetArgs, - optArgs *ServicedelegationruleRemoveTargetOptionalArgs, // can be nil + reqArgs *ServicedelegationruleRemoveTargetArgs, + optArgs *ServicedelegationruleRemoveTargetOptionalArgs, // can be nil ) (*ServicedelegationruleRemoveTargetResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := servicedelegationruleRemoveTargetKwParams{ - ServicedelegationruleRemoveTargetArgs: reqArgs, - ServicedelegationruleRemoveTargetOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "servicedelegationrule_remove_target", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res servicedelegationruleRemoveTargetResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := servicedelegationruleRemoveTargetKwParams{ + ServicedelegationruleRemoveTargetArgs: reqArgs, + ServicedelegationruleRemoveTargetOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "servicedelegationrule_remove_target", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res servicedelegationruleRemoveTargetResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServicedelegationruleRemoveTargetArgs struct { + + /* +Delegation name - /* - Delegation name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type ServicedelegationruleRemoveTargetOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member service delegation target - service delegation targets to remove - */ - Servicedelegationtarget *[]string `json:"servicedelegationtarget,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member service delegation target +service delegation targets to remove + */ + Servicedelegationtarget *[]string `json:"servicedelegationtarget,omitempty"` + } type servicedelegationruleRemoveTargetKwParams struct { - *ServicedelegationruleRemoveTargetArgs - *ServicedelegationruleRemoveTargetOptionalArgs + *ServicedelegationruleRemoveTargetArgs + *ServicedelegationruleRemoveTargetOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type servicedelegationruleRemoveTargetResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServicedelegationruleRemoveTargetResult `json:"result"` } type ServicedelegationruleRemoveTargetResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *ServicedelegationruleRemoveTargetResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServicedelegationruleRemoveTargetResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServicedelegationruleRemoveTargetResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServicedelegationruleRemoveTargetResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServicedelegationruleRemoveTargetResult%v", string(b)) } /* Display information about a named service delegation rule. */ func (c *Client) ServicedelegationruleShow( - reqArgs *ServicedelegationruleShowArgs, - optArgs *ServicedelegationruleShowOptionalArgs, // can be nil + reqArgs *ServicedelegationruleShowArgs, + optArgs *ServicedelegationruleShowOptionalArgs, // can be nil ) (*ServicedelegationruleShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := servicedelegationruleShowKwParams{ - ServicedelegationruleShowArgs: reqArgs, - ServicedelegationruleShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "servicedelegationrule_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res servicedelegationruleShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := servicedelegationruleShowKwParams{ + ServicedelegationruleShowArgs: reqArgs, + ServicedelegationruleShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "servicedelegationrule_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res servicedelegationruleShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServicedelegationruleShowArgs struct { + + /* +Delegation name - /* - Delegation name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type ServicedelegationruleShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type servicedelegationruleShowKwParams struct { - *ServicedelegationruleShowArgs - *ServicedelegationruleShowOptionalArgs + *ServicedelegationruleShowArgs + *ServicedelegationruleShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type servicedelegationruleShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServicedelegationruleShowResult `json:"result"` } type ServicedelegationruleShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Servicedelegationrule `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Servicedelegationrule `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *ServicedelegationruleShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServicedelegationruleShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServicedelegationruleShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServicedelegationruleShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServicedelegationruleShowResult%v", string(b)) } /* Create a new service delegation target. */ func (c *Client) ServicedelegationtargetAdd( - reqArgs *ServicedelegationtargetAddArgs, - optArgs *ServicedelegationtargetAddOptionalArgs, // can be nil + reqArgs *ServicedelegationtargetAddArgs, + optArgs *ServicedelegationtargetAddOptionalArgs, // can be nil ) (*ServicedelegationtargetAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := servicedelegationtargetAddKwParams{ - ServicedelegationtargetAddArgs: reqArgs, - ServicedelegationtargetAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "servicedelegationtarget_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res servicedelegationtargetAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := servicedelegationtargetAddKwParams{ + ServicedelegationtargetAddArgs: reqArgs, + ServicedelegationtargetAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "servicedelegationtarget_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res servicedelegationtargetAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServicedelegationtargetAddArgs struct { + + /* +Delegation name - /* - Delegation name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type ServicedelegationtargetAddOptionalArgs struct { + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* +type servicedelegationtargetAddKwParams struct { + *ServicedelegationtargetAddArgs + *ServicedelegationtargetAddOptionalArgs - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} - -type servicedelegationtargetAddKwParams struct { - *ServicedelegationtargetAddArgs - *ServicedelegationtargetAddOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} type servicedelegationtargetAddResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServicedelegationtargetAddResult `json:"result"` } type ServicedelegationtargetAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Servicedelegationtarget `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Servicedelegationtarget `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *ServicedelegationtargetAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServicedelegationtargetAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServicedelegationtargetAddResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServicedelegationtargetAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServicedelegationtargetAddResult%v", string(b)) } /* Add member to a named service delegation target. */ func (c *Client) ServicedelegationtargetAddMember( - reqArgs *ServicedelegationtargetAddMemberArgs, - optArgs *ServicedelegationtargetAddMemberOptionalArgs, // can be nil + reqArgs *ServicedelegationtargetAddMemberArgs, + optArgs *ServicedelegationtargetAddMemberOptionalArgs, // can be nil ) (*ServicedelegationtargetAddMemberResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := servicedelegationtargetAddMemberKwParams{ - ServicedelegationtargetAddMemberArgs: reqArgs, - ServicedelegationtargetAddMemberOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "servicedelegationtarget_add_member", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res servicedelegationtargetAddMemberResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := servicedelegationtargetAddMemberKwParams{ + ServicedelegationtargetAddMemberArgs: reqArgs, + ServicedelegationtargetAddMemberOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "servicedelegationtarget_add_member", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res servicedelegationtargetAddMemberResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServicedelegationtargetAddMemberArgs struct { + + /* +Delegation name - /* - Delegation name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type ServicedelegationtargetAddMemberOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - member principal - principal to add - */ - Principal *[]string `json:"principal,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +member principal +principal to add + */ + Principal *[]string `json:"principal,omitempty"` + } type servicedelegationtargetAddMemberKwParams struct { - *ServicedelegationtargetAddMemberArgs - *ServicedelegationtargetAddMemberOptionalArgs + *ServicedelegationtargetAddMemberArgs + *ServicedelegationtargetAddMemberOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type servicedelegationtargetAddMemberResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServicedelegationtargetAddMemberResult `json:"result"` } type ServicedelegationtargetAddMemberResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *ServicedelegationtargetAddMemberResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServicedelegationtargetAddMemberResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServicedelegationtargetAddMemberResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServicedelegationtargetAddMemberResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServicedelegationtargetAddMemberResult%v", string(b)) } /* Delete service delegation target. */ func (c *Client) ServicedelegationtargetDel( - reqArgs *ServicedelegationtargetDelArgs, - optArgs *ServicedelegationtargetDelOptionalArgs, // can be nil + reqArgs *ServicedelegationtargetDelArgs, + optArgs *ServicedelegationtargetDelOptionalArgs, // can be nil ) (*ServicedelegationtargetDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := servicedelegationtargetDelKwParams{ - ServicedelegationtargetDelArgs: reqArgs, - ServicedelegationtargetDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "servicedelegationtarget_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res servicedelegationtargetDelResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := servicedelegationtargetDelKwParams{ + ServicedelegationtargetDelArgs: reqArgs, + ServicedelegationtargetDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "servicedelegationtarget_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res servicedelegationtargetDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServicedelegationtargetDelArgs struct { + + /* +Delegation name - /* - Delegation name - - */ - Cn []string `json:"cn,omitempty"` -} + */ + Cn []string `json:"cn,omitempty"` + } type ServicedelegationtargetDelOptionalArgs struct { + + /* - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` -} +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } type servicedelegationtargetDelKwParams struct { - *ServicedelegationtargetDelArgs - *ServicedelegationtargetDelOptionalArgs + *ServicedelegationtargetDelArgs + *ServicedelegationtargetDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type servicedelegationtargetDelResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServicedelegationtargetDelResult `json:"result"` } type ServicedelegationtargetDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } func (t *ServicedelegationtargetDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServicedelegationtargetDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServicedelegationtargetDelResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServicedelegationtargetDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServicedelegationtargetDelResult%v", string(b)) } /* Search for service delegation target. */ func (c *Client) ServicedelegationtargetFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *ServicedelegationtargetFindArgs, - optArgs *ServicedelegationtargetFindOptionalArgs, // can be nil + criteria string, // A string searched in all relevant object attributes + reqArgs *ServicedelegationtargetFindArgs, + optArgs *ServicedelegationtargetFindOptionalArgs, // can be nil ) (*ServicedelegationtargetFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := servicedelegationtargetFindKwParams{ - ServicedelegationtargetFindArgs: reqArgs, - ServicedelegationtargetFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "servicedelegationtarget_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res servicedelegationtargetFindResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := servicedelegationtargetFindKwParams{ + ServicedelegationtargetFindArgs: reqArgs, + ServicedelegationtargetFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "servicedelegationtarget_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res servicedelegationtargetFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServicedelegationtargetFindArgs struct { -} + } type ServicedelegationtargetFindOptionalArgs struct { - - /* - Delegation name - - */ - Cn *string `json:"cn,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("delegation-name") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} + + /* +Delegation name + + */ + Cn *string `json:"cn,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("delegation-name") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } type servicedelegationtargetFindKwParams struct { - *ServicedelegationtargetFindArgs - *ServicedelegationtargetFindOptionalArgs + *ServicedelegationtargetFindArgs + *ServicedelegationtargetFindOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type servicedelegationtargetFindResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServicedelegationtargetFindResult `json:"result"` } type ServicedelegationtargetFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Servicedelegationtarget `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Servicedelegationtarget `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } func (t *ServicedelegationtargetFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServicedelegationtargetFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServicedelegationtargetFindResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServicedelegationtargetFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServicedelegationtargetFindResult%v", string(b)) } /* Remove member from a named service delegation target. */ func (c *Client) ServicedelegationtargetRemoveMember( - reqArgs *ServicedelegationtargetRemoveMemberArgs, - optArgs *ServicedelegationtargetRemoveMemberOptionalArgs, // can be nil + reqArgs *ServicedelegationtargetRemoveMemberArgs, + optArgs *ServicedelegationtargetRemoveMemberOptionalArgs, // can be nil ) (*ServicedelegationtargetRemoveMemberResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := servicedelegationtargetRemoveMemberKwParams{ - ServicedelegationtargetRemoveMemberArgs: reqArgs, - ServicedelegationtargetRemoveMemberOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "servicedelegationtarget_remove_member", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res servicedelegationtargetRemoveMemberResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := servicedelegationtargetRemoveMemberKwParams{ + ServicedelegationtargetRemoveMemberArgs: reqArgs, + ServicedelegationtargetRemoveMemberOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "servicedelegationtarget_remove_member", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res servicedelegationtargetRemoveMemberResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServicedelegationtargetRemoveMemberArgs struct { + + /* +Delegation name - /* - Delegation name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type ServicedelegationtargetRemoveMemberOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - member principal - principal to remove - */ - Principal *[]string `json:"principal,omitempty"` -} + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +member principal +principal to remove + */ + Principal *[]string `json:"principal,omitempty"` + } type servicedelegationtargetRemoveMemberKwParams struct { - *ServicedelegationtargetRemoveMemberArgs - *ServicedelegationtargetRemoveMemberOptionalArgs + *ServicedelegationtargetRemoveMemberArgs + *ServicedelegationtargetRemoveMemberOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type servicedelegationtargetRemoveMemberResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServicedelegationtargetRemoveMemberResult `json:"result"` } type ServicedelegationtargetRemoveMemberResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } func (t *ServicedelegationtargetRemoveMemberResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServicedelegationtargetRemoveMemberResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServicedelegationtargetRemoveMemberResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServicedelegationtargetRemoveMemberResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServicedelegationtargetRemoveMemberResult%v", string(b)) } /* Display information about a named service delegation target. */ func (c *Client) ServicedelegationtargetShow( - reqArgs *ServicedelegationtargetShowArgs, - optArgs *ServicedelegationtargetShowOptionalArgs, // can be nil + reqArgs *ServicedelegationtargetShowArgs, + optArgs *ServicedelegationtargetShowOptionalArgs, // can be nil ) (*ServicedelegationtargetShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := servicedelegationtargetShowKwParams{ - ServicedelegationtargetShowArgs: reqArgs, - ServicedelegationtargetShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "servicedelegationtarget_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res servicedelegationtargetShowResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := servicedelegationtargetShowKwParams{ + ServicedelegationtargetShowArgs: reqArgs, + ServicedelegationtargetShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "servicedelegationtarget_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res servicedelegationtargetShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type ServicedelegationtargetShowArgs struct { + + /* +Delegation name - /* - Delegation name - - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } type ServicedelegationtargetShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } type servicedelegationtargetShowKwParams struct { - *ServicedelegationtargetShowArgs - *ServicedelegationtargetShowOptionalArgs + *ServicedelegationtargetShowArgs + *ServicedelegationtargetShowOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type servicedelegationtargetShowResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *ServicedelegationtargetShowResult `json:"result"` } type ServicedelegationtargetShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Servicedelegationtarget `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Servicedelegationtarget `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *ServicedelegationtargetShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServicedelegationtargetShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServicedelegationtargetShowResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServicedelegationtargetShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServicedelegationtargetShowResult%v", string(b)) } /* RPC command used to log the current user out of their session. */ func (c *Client) SessionLogout( - reqArgs *SessionLogoutArgs, - optArgs *SessionLogoutOptionalArgs, // can be nil + reqArgs *SessionLogoutArgs, + optArgs *SessionLogoutOptionalArgs, // can be nil ) (*SessionLogoutResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := sessionLogoutKwParams{ - SessionLogoutArgs: reqArgs, - SessionLogoutOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "session_logout", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res sessionLogoutResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := sessionLogoutKwParams{ + SessionLogoutArgs: reqArgs, + SessionLogoutOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "session_logout", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res sessionLogoutResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type SessionLogoutArgs struct { -} + } type SessionLogoutOptionalArgs struct { -} + } type sessionLogoutKwParams struct { - *SessionLogoutArgs - *SessionLogoutOptionalArgs + *SessionLogoutArgs + *SessionLogoutOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type sessionLogoutResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *SessionLogoutResult `json:"result"` } type SessionLogoutResult struct { + + + /* - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` -} + (required) + */ + Result interface{} `json:"result,omitempty"` + } func (t *SessionLogoutResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SessionLogoutResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SessionLogoutResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SessionLogoutResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SessionLogoutResult%v", string(b)) } /* Determine whether ipa-adtrust-install has been run with sidgen task */ func (c *Client) SidgenWasRun( - reqArgs *SidgenWasRunArgs, - optArgs *SidgenWasRunOptionalArgs, // can be nil + reqArgs *SidgenWasRunArgs, + optArgs *SidgenWasRunOptionalArgs, // can be nil ) (*SidgenWasRunResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := sidgenWasRunKwParams{ - SidgenWasRunArgs: reqArgs, - SidgenWasRunOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "sidgen_was_run", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res sidgenWasRunResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := sidgenWasRunKwParams{ + SidgenWasRunArgs: reqArgs, + SidgenWasRunOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "sidgen_was_run", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res sidgenWasRunResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type SidgenWasRunArgs struct { -} + } type SidgenWasRunOptionalArgs struct { -} + } type sidgenWasRunKwParams struct { - *SidgenWasRunArgs - *SidgenWasRunOptionalArgs + *SidgenWasRunArgs + *SidgenWasRunOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type sidgenWasRunResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *SidgenWasRunResult `json:"result"` } type SidgenWasRunResult struct { + + + /* - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` -} + (required) + */ + Result interface{} `json:"result,omitempty"` + } func (t *SidgenWasRunResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SidgenWasRunResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SidgenWasRunResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SidgenWasRunResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SidgenWasRunResult%v", string(b)) } /* Activate a stage user. */ func (c *Client) StageuserActivate( - reqArgs *StageuserActivateArgs, - optArgs *StageuserActivateOptionalArgs, // can be nil + reqArgs *StageuserActivateArgs, + optArgs *StageuserActivateOptionalArgs, // can be nil ) (*StageuserActivateResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := stageuserActivateKwParams{ - StageuserActivateArgs: reqArgs, - StageuserActivateOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "stageuser_activate", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res stageuserActivateResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := stageuserActivateKwParams{ + StageuserActivateArgs: reqArgs, + StageuserActivateOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "stageuser_activate", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res stageuserActivateResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type StageuserActivateArgs struct { -} + } type StageuserActivateOptionalArgs struct { - - /* - User login - - */ - UID *string `json:"uid,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + + /* +User login + + */ + UID *string `json:"uid,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } type stageuserActivateKwParams struct { - *StageuserActivateArgs - *StageuserActivateOptionalArgs + *StageuserActivateArgs + *StageuserActivateOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } type stageuserActivateResponse struct { - Error *Error `json:"error"` + Error *Error `json:"error"` Result *StageuserActivateResult `json:"result"` } type StageuserActivateResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } func (t *StageuserActivateResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("StageuserActivateResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("StageuserActivateResult%v", string(b)) + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("StageuserActivateResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("StageuserActivateResult%v", string(b)) } /* Add a new stage user. */ func (c *Client) StageuserAdd( - reqArgs *StageuserAddArgs, - optArgs *StageuserAddOptionalArgs, // can be nil + reqArgs *StageuserAddArgs, + optArgs *StageuserAddOptionalArgs, // can be nil ) (*StageuserAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := stageuserAddKwParams{ - StageuserAddArgs: reqArgs, - StageuserAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "stageuser_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res stageuserAddResponse + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := stageuserAddKwParams{ + StageuserAddArgs: reqArgs, + StageuserAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "stageuser_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res stageuserAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } type StageuserAddArgs struct { + + /* +First name - /* - First name - - */ - Givenname string `json:"givenname,omitempty"` + */ + Givenname string `json:"givenname,omitempty"` + + /* +Last name - /* - Last name - - */ - Sn string `json:"sn,omitempty"` -} + */ + Sn string `json:"sn,omitempty"` + } type StageuserAddOptionalArgs struct { + + /* +User login + + */ + UID *string `json:"uid,omitempty"` + + /* +Full name + + */ + Cn *string `json:"cn,omitempty"` + + /* +Display name + + */ + Displayname *string `json:"displayname,omitempty"` + + /* +Initials + + */ + Initials *string `json:"initials,omitempty"` + + /* +Home directory + + */ + Homedirectory *string `json:"homedirectory,omitempty"` + + /* +GECOS + + */ + Gecos *string `json:"gecos,omitempty"` + + /* +Login shell + + */ + Loginshell *string `json:"loginshell,omitempty"` + + /* +Principal alias + + */ + Krbprincipalname *[]string `json:"krbprincipalname,omitempty"` + + /* +Kerberos principal expiration + + */ + Krbprincipalexpiration *time.Time `json:"krbprincipalexpiration,omitempty"` + + /* +User password expiration + + */ + Krbpasswordexpiration *time.Time `json:"krbpasswordexpiration,omitempty"` + + /* +Email address + + */ + Mail *[]string `json:"mail,omitempty"` + + /* +Password +Prompt to set the user password + */ + Userpassword *string `json:"userpassword,omitempty"` + + /* + +Generate a random user password + */ + Random *bool `json:"random,omitempty"` + + /* +UID +User ID Number (system will assign one if not provided) + */ + Uidnumber *int `json:"uidnumber,omitempty"` + + /* +GID +Group ID Number + */ + Gidnumber *int `json:"gidnumber,omitempty"` + + /* +Street address + + */ + Street *string `json:"street,omitempty"` + + /* +City + + */ + L *string `json:"l,omitempty"` + + /* +State/Province + + */ + St *string `json:"st,omitempty"` + + /* +ZIP + + */ + Postalcode *string `json:"postalcode,omitempty"` + + /* +Telephone Number + + */ + Telephonenumber *[]string `json:"telephonenumber,omitempty"` + + /* +Mobile Telephone Number + + */ + Mobile *[]string `json:"mobile,omitempty"` + + /* +Pager Number + + */ + Pager *[]string `json:"pager,omitempty"` + + /* +Fax Number + + */ + Facsimiletelephonenumber *[]string `json:"facsimiletelephonenumber,omitempty"` + + /* +Org. Unit + + */ + Ou *string `json:"ou,omitempty"` + + /* +Job Title + + */ + Title *string `json:"title,omitempty"` + + /* +Manager + + */ + Manager *string `json:"manager,omitempty"` + + /* +Car License + + */ + Carlicense *[]string `json:"carlicense,omitempty"` + + /* +SSH public key + + */ + Ipasshpubkey *[]string `json:"ipasshpubkey,omitempty"` + + /* +User authentication types +Types of supported user authentication + */ + Ipauserauthtype *[]string `json:"ipauserauthtype,omitempty"` + + /* +Class +User category (semantics placed on this attribute are for local interpretation) + */ + Userclass *[]string `json:"userclass,omitempty"` + + /* +RADIUS proxy configuration + + */ + Ipatokenradiusconfiglink *string `json:"ipatokenradiusconfiglink,omitempty"` + + /* +RADIUS proxy username + + */ + Ipatokenradiususername *string `json:"ipatokenradiususername,omitempty"` + + /* +Department Number + + */ + Departmentnumber *[]string `json:"departmentnumber,omitempty"` + + /* +Employee Number + + */ + Employeenumber *string `json:"employeenumber,omitempty"` + + /* +Employee Type + + */ + Employeetype *string `json:"employeetype,omitempty"` + + /* +Preferred Language + + */ + Preferredlanguage *string `json:"preferredlanguage,omitempty"` + + /* +Certificate +Base-64 encoded user certificate + */ + Usercertificate *[]interface{} `json:"usercertificate,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Create Stage user in from a delete user + */ + FromDelete *bool `json:"from_delete,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } - /* - User login - - */ - UID *string `json:"uid,omitempty"` - - /* - Full name - - */ - Cn *string `json:"cn,omitempty"` - - /* - Display name - - */ - Displayname *string `json:"displayname,omitempty"` - - /* - Initials +type stageuserAddKwParams struct { + *StageuserAddArgs + *StageuserAddOptionalArgs - */ - Initials *string `json:"initials,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - Home directory +type stageuserAddResponse struct { + Error *Error `json:"error"` + Result *StageuserAddResult `json:"result"` +} - */ - Homedirectory *string `json:"homedirectory,omitempty"` +type StageuserAddResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Stageuser `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } - /* - GECOS +func (t *StageuserAddResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("StageuserAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("StageuserAddResult%v", string(b)) +} - */ - Gecos *string `json:"gecos,omitempty"` +/* +Add one or more certificates to the stageuser entry +*/ +func (c *Client) StageuserAddCert( + reqArgs *StageuserAddCertArgs, + optArgs *StageuserAddCertOptionalArgs, // can be nil +) (*StageuserAddCertResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := stageuserAddCertKwParams{ + StageuserAddCertArgs: reqArgs, + StageuserAddCertOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "stageuser_add_cert", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res stageuserAddCertResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} + +type StageuserAddCertArgs struct { + + /* +Certificate +Base-64 encoded user certificate + */ + Usercertificate []interface{} `json:"usercertificate,omitempty"` + } + +type StageuserAddCertOptionalArgs struct { + + /* +User login + + */ + UID *string `json:"uid,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } + +type stageuserAddCertKwParams struct { + *StageuserAddCertArgs + *StageuserAddCertOptionalArgs + + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} + +type stageuserAddCertResponse struct { + Error *Error `json:"error"` + Result *StageuserAddCertResult `json:"result"` +} + +type StageuserAddCertResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } + +func (t *StageuserAddCertResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("StageuserAddCertResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("StageuserAddCertResult%v", string(b)) +} - /* - Login shell +/* +Add one or more certificate mappings to the stage user entry. +*/ +func (c *Client) StageuserAddCertmapdata( + ipacertmapdata string, // Certificate mapping data + reqArgs *StageuserAddCertmapdataArgs, + optArgs *StageuserAddCertmapdataOptionalArgs, // can be nil +) (*StageuserAddCertmapdataResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := stageuserAddCertmapdataKwParams{ + StageuserAddCertmapdataArgs: reqArgs, + StageuserAddCertmapdataOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "stageuser_add_certmapdata", + Params: []interface{}{ + []interface{}{ipacertmapdata, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res stageuserAddCertmapdataResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} + +type StageuserAddCertmapdataArgs struct { + } + +type StageuserAddCertmapdataOptionalArgs struct { + + /* +User login + + */ + UID *string `json:"uid,omitempty"` + + /* +Issuer +Issuer of the certificate + */ + Issuer *string `json:"issuer,omitempty"` + + /* +Subject +Subject of the certificate + */ + Subject *string `json:"subject,omitempty"` + + /* +Certificate +Base-64 encoded user certificate + */ + Certificate *[]interface{} `json:"certificate,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } + +type stageuserAddCertmapdataKwParams struct { + *StageuserAddCertmapdataArgs + *StageuserAddCertmapdataOptionalArgs + + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} + +type stageuserAddCertmapdataResponse struct { + Error *Error `json:"error"` + Result *StageuserAddCertmapdataResult `json:"result"` +} + +type StageuserAddCertmapdataResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } + +func (t *StageuserAddCertmapdataResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("StageuserAddCertmapdataResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("StageuserAddCertmapdataResult%v", string(b)) +} - */ - Loginshell *string `json:"loginshell,omitempty"` +/* +Add a manager to the stage user entry +*/ +func (c *Client) StageuserAddManager( + reqArgs *StageuserAddManagerArgs, + optArgs *StageuserAddManagerOptionalArgs, // can be nil +) (*StageuserAddManagerResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := stageuserAddManagerKwParams{ + StageuserAddManagerArgs: reqArgs, + StageuserAddManagerOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "stageuser_add_manager", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res stageuserAddManagerResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - /* - Principal alias +type StageuserAddManagerArgs struct { + } - */ - Krbprincipalname *[]string `json:"krbprincipalname,omitempty"` +type StageuserAddManagerOptionalArgs struct { + + /* +User login + + */ + UID *string `json:"uid,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member user +users to add + */ + User *[]string `json:"user,omitempty"` + } - /* - Kerberos principal expiration +type stageuserAddManagerKwParams struct { + *StageuserAddManagerArgs + *StageuserAddManagerOptionalArgs - */ - Krbprincipalexpiration *time.Time `json:"krbprincipalexpiration,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - Email address +type stageuserAddManagerResponse struct { + Error *Error `json:"error"` + Result *StageuserAddManagerResult `json:"result"` +} - */ - Mail *[]string `json:"mail,omitempty"` +type StageuserAddManagerResult struct { + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } - /* - Password - Prompt to set the user password - */ - Userpassword *string `json:"userpassword,omitempty"` +func (t *StageuserAddManagerResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("StageuserAddManagerResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("StageuserAddManagerResult%v", string(b)) +} - /* +/* +Add new principal alias to the stageuser entry +*/ +func (c *Client) StageuserAddPrincipal( + reqArgs *StageuserAddPrincipalArgs, + optArgs *StageuserAddPrincipalOptionalArgs, // can be nil +) (*StageuserAddPrincipalResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := stageuserAddPrincipalKwParams{ + StageuserAddPrincipalArgs: reqArgs, + StageuserAddPrincipalOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "stageuser_add_principal", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res stageuserAddPrincipalResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - Generate a random user password - */ - Random *bool `json:"random,omitempty"` +type StageuserAddPrincipalArgs struct { + } - /* - UID - User ID Number (system will assign one if not provided) - */ - Uidnumber *int `json:"uidnumber,omitempty"` +type StageuserAddPrincipalOptionalArgs struct { + + /* +User login - /* - GID - Group ID Number - */ - Gidnumber *int `json:"gidnumber,omitempty"` + */ + UID *string `json:"uid,omitempty"` + + /* +Principal alias - /* - Street address + */ + Krbprincipalname *[]string `json:"krbprincipalname,omitempty"` + + /* - */ - Street *string `json:"street,omitempty"` +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* - /* - City +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* - */ - L *string `json:"l,omitempty"` +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } - /* - State/Province +type stageuserAddPrincipalKwParams struct { + *StageuserAddPrincipalArgs + *StageuserAddPrincipalOptionalArgs - */ - St *string `json:"st,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - ZIP +type stageuserAddPrincipalResponse struct { + Error *Error `json:"error"` + Result *StageuserAddPrincipalResult `json:"result"` +} + +type StageuserAddPrincipalResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } + +func (t *StageuserAddPrincipalResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("StageuserAddPrincipalResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("StageuserAddPrincipalResult%v", string(b)) +} - */ - Postalcode *string `json:"postalcode,omitempty"` - - /* - Telephone Number - - */ - Telephonenumber *[]string `json:"telephonenumber,omitempty"` - - /* - Mobile Telephone Number - - */ - Mobile *[]string `json:"mobile,omitempty"` - - /* - Pager Number - - */ - Pager *[]string `json:"pager,omitempty"` - - /* - Fax Number - - */ - Facsimiletelephonenumber *[]string `json:"facsimiletelephonenumber,omitempty"` - - /* - Org. Unit - - */ - Ou *string `json:"ou,omitempty"` - - /* - Job Title - - */ - Title *string `json:"title,omitempty"` - - /* - Manager - - */ - Manager *string `json:"manager,omitempty"` - - /* - Car License - - */ - Carlicense *[]string `json:"carlicense,omitempty"` - - /* - SSH public key - - */ - Ipasshpubkey *[]string `json:"ipasshpubkey,omitempty"` - - /* - User authentication types - Types of supported user authentication - */ - Ipauserauthtype *[]string `json:"ipauserauthtype,omitempty"` - - /* - Class - User category (semantics placed on this attribute are for local interpretation) - */ - Userclass *[]string `json:"userclass,omitempty"` +/* +Delete a stage user. +*/ +func (c *Client) StageuserDel( + reqArgs *StageuserDelArgs, + optArgs *StageuserDelOptionalArgs, // can be nil +) (*StageuserDelResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := stageuserDelKwParams{ + StageuserDelArgs: reqArgs, + StageuserDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "stageuser_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res stageuserDelResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - /* - RADIUS proxy configuration +type StageuserDelArgs struct { + } - */ - Ipatokenradiusconfiglink *string `json:"ipatokenradiusconfiglink,omitempty"` +type StageuserDelOptionalArgs struct { + + /* +User login - /* - RADIUS proxy username + */ + UID *[]string `json:"uid,omitempty"` + + /* - */ - Ipatokenradiususername *string `json:"ipatokenradiususername,omitempty"` +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } - /* - Department Number +type stageuserDelKwParams struct { + *StageuserDelArgs + *StageuserDelOptionalArgs - */ - Departmentnumber *[]string `json:"departmentnumber,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - Employee Number +type stageuserDelResponse struct { + Error *Error `json:"error"` + Result *StageuserDelResult `json:"result"` +} - */ - Employeenumber *string `json:"employeenumber,omitempty"` +type StageuserDelResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } - /* - Employee Type +func (t *StageuserDelResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("StageuserDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("StageuserDelResult%v", string(b)) +} - */ - Employeetype *string `json:"employeetype,omitempty"` +/* +Search for stage users. +*/ +func (c *Client) StageuserFind( + criteria string, // A string searched in all relevant object attributes + reqArgs *StageuserFindArgs, + optArgs *StageuserFindOptionalArgs, // can be nil +) (*StageuserFindResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := stageuserFindKwParams{ + StageuserFindArgs: reqArgs, + StageuserFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "stageuser_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res stageuserFindResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - /* - Preferred Language +type StageuserFindArgs struct { + } - */ - Preferredlanguage *string `json:"preferredlanguage,omitempty"` +type StageuserFindOptionalArgs struct { + + /* +User login + + */ + UID *string `json:"uid,omitempty"` + + /* +First name + + */ + Givenname *string `json:"givenname,omitempty"` + + /* +Last name + + */ + Sn *string `json:"sn,omitempty"` + + /* +Full name + + */ + Cn *string `json:"cn,omitempty"` + + /* +Display name + + */ + Displayname *string `json:"displayname,omitempty"` + + /* +Initials + + */ + Initials *string `json:"initials,omitempty"` + + /* +Home directory + + */ + Homedirectory *string `json:"homedirectory,omitempty"` + + /* +GECOS + + */ + Gecos *string `json:"gecos,omitempty"` + + /* +Login shell + + */ + Loginshell *string `json:"loginshell,omitempty"` + + /* +Principal alias + + */ + Krbprincipalname *[]string `json:"krbprincipalname,omitempty"` + + /* +Kerberos principal expiration + + */ + Krbprincipalexpiration *time.Time `json:"krbprincipalexpiration,omitempty"` + + /* +User password expiration + + */ + Krbpasswordexpiration *time.Time `json:"krbpasswordexpiration,omitempty"` + + /* +Email address + + */ + Mail *[]string `json:"mail,omitempty"` + + /* +Password +Prompt to set the user password + */ + Userpassword *string `json:"userpassword,omitempty"` + + /* +UID +User ID Number (system will assign one if not provided) + */ + Uidnumber *int `json:"uidnumber,omitempty"` + + /* +GID +Group ID Number + */ + Gidnumber *int `json:"gidnumber,omitempty"` + + /* +Street address + + */ + Street *string `json:"street,omitempty"` + + /* +City + + */ + L *string `json:"l,omitempty"` + + /* +State/Province + + */ + St *string `json:"st,omitempty"` + + /* +ZIP + + */ + Postalcode *string `json:"postalcode,omitempty"` + + /* +Telephone Number + + */ + Telephonenumber *[]string `json:"telephonenumber,omitempty"` + + /* +Mobile Telephone Number + + */ + Mobile *[]string `json:"mobile,omitempty"` + + /* +Pager Number + + */ + Pager *[]string `json:"pager,omitempty"` + + /* +Fax Number + + */ + Facsimiletelephonenumber *[]string `json:"facsimiletelephonenumber,omitempty"` + + /* +Org. Unit + + */ + Ou *string `json:"ou,omitempty"` + + /* +Job Title + + */ + Title *string `json:"title,omitempty"` + + /* +Manager + + */ + Manager *string `json:"manager,omitempty"` + + /* +Car License + + */ + Carlicense *[]string `json:"carlicense,omitempty"` + + /* +User authentication types +Types of supported user authentication + */ + Ipauserauthtype *[]string `json:"ipauserauthtype,omitempty"` + + /* +Class +User category (semantics placed on this attribute are for local interpretation) + */ + Userclass *[]string `json:"userclass,omitempty"` + + /* +RADIUS proxy configuration + + */ + Ipatokenradiusconfiglink *string `json:"ipatokenradiusconfiglink,omitempty"` + + /* +RADIUS proxy username + + */ + Ipatokenradiususername *string `json:"ipatokenradiususername,omitempty"` + + /* +Department Number + + */ + Departmentnumber *[]string `json:"departmentnumber,omitempty"` + + /* +Employee Number + + */ + Employeenumber *string `json:"employeenumber,omitempty"` + + /* +Employee Type + + */ + Employeetype *string `json:"employeetype,omitempty"` + + /* +Preferred Language + + */ + Preferredlanguage *string `json:"preferredlanguage,omitempty"` + + /* +Certificate +Base-64 encoded user certificate + */ + Usercertificate *[]interface{} `json:"usercertificate,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("login") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + + /* +group +Search for stage users with these member of groups. + */ + InGroup *[]string `json:"in_group,omitempty"` + + /* +group +Search for stage users without these member of groups. + */ + NotInGroup *[]string `json:"not_in_group,omitempty"` + + /* +netgroup +Search for stage users with these member of netgroups. + */ + InNetgroup *[]string `json:"in_netgroup,omitempty"` + + /* +netgroup +Search for stage users without these member of netgroups. + */ + NotInNetgroup *[]string `json:"not_in_netgroup,omitempty"` + + /* +role +Search for stage users with these member of roles. + */ + InRole *[]string `json:"in_role,omitempty"` + + /* +role +Search for stage users without these member of roles. + */ + NotInRole *[]string `json:"not_in_role,omitempty"` + + /* +HBAC rule +Search for stage users with these member of HBAC rules. + */ + InHbacrule *[]string `json:"in_hbacrule,omitempty"` + + /* +HBAC rule +Search for stage users without these member of HBAC rules. + */ + NotInHbacrule *[]string `json:"not_in_hbacrule,omitempty"` + + /* +sudo rule +Search for stage users with these member of sudo rules. + */ + InSudorule *[]string `json:"in_sudorule,omitempty"` + + /* +sudo rule +Search for stage users without these member of sudo rules. + */ + NotInSudorule *[]string `json:"not_in_sudorule,omitempty"` + } - /* - Certificate - Base-64 encoded user certificate - */ - Usercertificate *[]string `json:"usercertificate,omitempty"` +type stageuserFindKwParams struct { + *StageuserFindArgs + *StageuserFindOptionalArgs - /* + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` +type stageuserFindResponse struct { + Error *Error `json:"error"` + Result *StageuserFindResult `json:"result"` +} - /* +type StageuserFindResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Stageuser `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` +func (t *StageuserFindResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("StageuserFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("StageuserFindResult%v", string(b)) +} - /* +/* +Modify a stage user. +*/ +func (c *Client) StageuserMod( + reqArgs *StageuserModArgs, + optArgs *StageuserModOptionalArgs, // can be nil +) (*StageuserModResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := stageuserModKwParams{ + StageuserModArgs: reqArgs, + StageuserModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "stageuser_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res stageuserModResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - Create Stage user in from a delete user - */ - FromDelete *bool `json:"from_delete,omitempty"` +type StageuserModArgs struct { + } - /* +type StageuserModOptionalArgs struct { + + /* +User login + + */ + UID *string `json:"uid,omitempty"` + + /* +First name + + */ + Givenname *string `json:"givenname,omitempty"` + + /* +Last name + + */ + Sn *string `json:"sn,omitempty"` + + /* +Full name + + */ + Cn *string `json:"cn,omitempty"` + + /* +Display name + + */ + Displayname *string `json:"displayname,omitempty"` + + /* +Initials + + */ + Initials *string `json:"initials,omitempty"` + + /* +Home directory + + */ + Homedirectory *string `json:"homedirectory,omitempty"` + + /* +GECOS + + */ + Gecos *string `json:"gecos,omitempty"` + + /* +Login shell + + */ + Loginshell *string `json:"loginshell,omitempty"` + + /* +Principal alias + + */ + Krbprincipalname *[]string `json:"krbprincipalname,omitempty"` + + /* +Kerberos principal expiration + + */ + Krbprincipalexpiration *time.Time `json:"krbprincipalexpiration,omitempty"` + + /* +User password expiration + + */ + Krbpasswordexpiration *time.Time `json:"krbpasswordexpiration,omitempty"` + + /* +Email address + + */ + Mail *[]string `json:"mail,omitempty"` + + /* +Password +Prompt to set the user password + */ + Userpassword *string `json:"userpassword,omitempty"` + + /* + +Generate a random user password + */ + Random *bool `json:"random,omitempty"` + + /* +UID +User ID Number (system will assign one if not provided) + */ + Uidnumber *int `json:"uidnumber,omitempty"` + + /* +GID +Group ID Number + */ + Gidnumber *int `json:"gidnumber,omitempty"` + + /* +Street address + + */ + Street *string `json:"street,omitempty"` + + /* +City + + */ + L *string `json:"l,omitempty"` + + /* +State/Province + + */ + St *string `json:"st,omitempty"` + + /* +ZIP + + */ + Postalcode *string `json:"postalcode,omitempty"` + + /* +Telephone Number + + */ + Telephonenumber *[]string `json:"telephonenumber,omitempty"` + + /* +Mobile Telephone Number + + */ + Mobile *[]string `json:"mobile,omitempty"` + + /* +Pager Number + + */ + Pager *[]string `json:"pager,omitempty"` + + /* +Fax Number + + */ + Facsimiletelephonenumber *[]string `json:"facsimiletelephonenumber,omitempty"` + + /* +Org. Unit + + */ + Ou *string `json:"ou,omitempty"` + + /* +Job Title + + */ + Title *string `json:"title,omitempty"` + + /* +Manager + + */ + Manager *string `json:"manager,omitempty"` + + /* +Car License + + */ + Carlicense *[]string `json:"carlicense,omitempty"` + + /* +SSH public key + + */ + Ipasshpubkey *[]string `json:"ipasshpubkey,omitempty"` + + /* +User authentication types +Types of supported user authentication + */ + Ipauserauthtype *[]string `json:"ipauserauthtype,omitempty"` + + /* +Class +User category (semantics placed on this attribute are for local interpretation) + */ + Userclass *[]string `json:"userclass,omitempty"` + + /* +RADIUS proxy configuration + + */ + Ipatokenradiusconfiglink *string `json:"ipatokenradiusconfiglink,omitempty"` + + /* +RADIUS proxy username + + */ + Ipatokenradiususername *string `json:"ipatokenradiususername,omitempty"` + + /* +Department Number + + */ + Departmentnumber *[]string `json:"departmentnumber,omitempty"` + + /* +Employee Number + + */ + Employeenumber *string `json:"employeenumber,omitempty"` + + /* +Employee Type + + */ + Employeetype *string `json:"employeetype,omitempty"` + + /* +Preferred Language + + */ + Preferredlanguage *string `json:"preferredlanguage,omitempty"` + + /* +Certificate +Base-64 encoded user certificate + */ + Usercertificate *[]interface{} `json:"usercertificate,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +Rename +Rename the stage user object + */ + Rename *string `json:"rename,omitempty"` + } - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` +type stageuserModKwParams struct { + *StageuserModArgs + *StageuserModOptionalArgs - /* + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` +type stageuserModResponse struct { + Error *Error `json:"error"` + Result *StageuserModResult `json:"result"` +} - /* +type StageuserModResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Stageuser `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` +func (t *StageuserModResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("StageuserModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("StageuserModResult%v", string(b)) } -type stageuserAddKwParams struct { - *StageuserAddArgs - *StageuserAddOptionalArgs +/* +Remove one or more certificates to the stageuser entry +*/ +func (c *Client) StageuserRemoveCert( + reqArgs *StageuserRemoveCertArgs, + optArgs *StageuserRemoveCertOptionalArgs, // can be nil +) (*StageuserRemoveCertResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := stageuserRemoveCertKwParams{ + StageuserRemoveCertArgs: reqArgs, + StageuserRemoveCertOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "stageuser_remove_cert", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res stageuserRemoveCertResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} + +type StageuserRemoveCertArgs struct { + + /* +Certificate +Base-64 encoded user certificate + */ + Usercertificate []interface{} `json:"usercertificate,omitempty"` + } + +type StageuserRemoveCertOptionalArgs struct { + + /* +User login + + */ + UID *string `json:"uid,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } + +type stageuserRemoveCertKwParams struct { + *StageuserRemoveCertArgs + *StageuserRemoveCertOptionalArgs + + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} + +type stageuserRemoveCertResponse struct { + Error *Error `json:"error"` + Result *StageuserRemoveCertResult `json:"result"` +} + +type StageuserRemoveCertResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } + +func (t *StageuserRemoveCertResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("StageuserRemoveCertResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("StageuserRemoveCertResult%v", string(b)) +} - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` +/* +Remove one or more certificate mappings from the stage user entry. +*/ +func (c *Client) StageuserRemoveCertmapdata( + ipacertmapdata string, // Certificate mapping data + reqArgs *StageuserRemoveCertmapdataArgs, + optArgs *StageuserRemoveCertmapdataOptionalArgs, // can be nil +) (*StageuserRemoveCertmapdataResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := stageuserRemoveCertmapdataKwParams{ + StageuserRemoveCertmapdataArgs: reqArgs, + StageuserRemoveCertmapdataOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "stageuser_remove_certmapdata", + Params: []interface{}{ + []interface{}{ipacertmapdata, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res stageuserRemoveCertmapdataResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} + +type StageuserRemoveCertmapdataArgs struct { + } + +type StageuserRemoveCertmapdataOptionalArgs struct { + + /* +User login + + */ + UID *string `json:"uid,omitempty"` + + /* +Issuer +Issuer of the certificate + */ + Issuer *string `json:"issuer,omitempty"` + + /* +Subject +Subject of the certificate + */ + Subject *string `json:"subject,omitempty"` + + /* +Certificate +Base-64 encoded user certificate + */ + Certificate *[]interface{} `json:"certificate,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } + +type stageuserRemoveCertmapdataKwParams struct { + *StageuserRemoveCertmapdataArgs + *StageuserRemoveCertmapdataOptionalArgs + + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} + +type stageuserRemoveCertmapdataResponse struct { + Error *Error `json:"error"` + Result *StageuserRemoveCertmapdataResult `json:"result"` +} + +type StageuserRemoveCertmapdataResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } + +func (t *StageuserRemoveCertmapdataResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("StageuserRemoveCertmapdataResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("StageuserRemoveCertmapdataResult%v", string(b)) } -type stageuserAddResponse struct { - Error *Error `json:"error"` - Result *StageuserAddResult `json:"result"` +/* +Remove a manager to the stage user entry +*/ +func (c *Client) StageuserRemoveManager( + reqArgs *StageuserRemoveManagerArgs, + optArgs *StageuserRemoveManagerOptionalArgs, // can be nil +) (*StageuserRemoveManagerResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := stageuserRemoveManagerKwParams{ + StageuserRemoveManagerArgs: reqArgs, + StageuserRemoveManagerOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "stageuser_remove_manager", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res stageuserRemoveManagerResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type StageuserAddResult struct { +type StageuserRemoveManagerArgs struct { + } - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` +type StageuserRemoveManagerOptionalArgs struct { + + /* +User login + + */ + UID *string `json:"uid,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member user +users to remove + */ + User *[]string `json:"user,omitempty"` + } - /* +type stageuserRemoveManagerKwParams struct { + *StageuserRemoveManagerArgs + *StageuserRemoveManagerOptionalArgs - (required) - */ - Result Stageuser `json:"result,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` +type stageuserRemoveManagerResponse struct { + Error *Error `json:"error"` + Result *StageuserRemoveManagerResult `json:"result"` } -func (t *StageuserAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("StageuserAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("StageuserAddResult%v", string(b)) +type StageuserRemoveManagerResult struct { + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } + +func (t *StageuserRemoveManagerResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("StageuserRemoveManagerResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("StageuserRemoveManagerResult%v", string(b)) } /* -Add a manager to the stage user entry +Remove principal alias from the stageuser entry */ -func (c *Client) StageuserAddManager( - reqArgs *StageuserAddManagerArgs, - optArgs *StageuserAddManagerOptionalArgs, // can be nil -) (*StageuserAddManagerResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := stageuserAddManagerKwParams{ - StageuserAddManagerArgs: reqArgs, - StageuserAddManagerOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "stageuser_add_manager", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res stageuserAddManagerResponse +func (c *Client) StageuserRemovePrincipal( + reqArgs *StageuserRemovePrincipalArgs, + optArgs *StageuserRemovePrincipalOptionalArgs, // can be nil +) (*StageuserRemovePrincipalResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := stageuserRemovePrincipalKwParams{ + StageuserRemovePrincipalArgs: reqArgs, + StageuserRemovePrincipalOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "stageuser_remove_principal", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res stageuserRemovePrincipalResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type StageuserAddManagerArgs struct { -} - -type StageuserAddManagerOptionalArgs struct { +type StageuserRemovePrincipalArgs struct { + } - /* - User login +type StageuserRemovePrincipalOptionalArgs struct { + + /* +User login - */ - UID *string `json:"uid,omitempty"` + */ + UID *string `json:"uid,omitempty"` + + /* +Principal alias - /* + */ + Krbprincipalname *[]string `json:"krbprincipalname,omitempty"` + + /* - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* - /* +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } - /* +type stageuserRemovePrincipalKwParams struct { + *StageuserRemovePrincipalArgs + *StageuserRemovePrincipalOptionalArgs - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member user - users to add - */ - User *[]string `json:"user,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } -type stageuserAddManagerKwParams struct { - *StageuserAddManagerArgs - *StageuserAddManagerOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` +type stageuserRemovePrincipalResponse struct { + Error *Error `json:"error"` + Result *StageuserRemovePrincipalResult `json:"result"` +} + +type StageuserRemovePrincipalResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } + +func (t *StageuserRemovePrincipalResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("StageuserRemovePrincipalResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("StageuserRemovePrincipalResult%v", string(b)) } -type stageuserAddManagerResponse struct { - Error *Error `json:"error"` - Result *StageuserAddManagerResult `json:"result"` +/* +Display information about a stage user. +*/ +func (c *Client) StageuserShow( + reqArgs *StageuserShowArgs, + optArgs *StageuserShowOptionalArgs, // can be nil +) (*StageuserShowResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := stageuserShowKwParams{ + StageuserShowArgs: reqArgs, + StageuserShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "stageuser_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res stageuserShowResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type StageuserAddManagerResult struct { +type StageuserShowArgs struct { + } - /* +type StageuserShowOptionalArgs struct { + + /* +User login + + */ + UID *string `json:"uid,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } - (required) - */ - Result interface{} `json:"result,omitempty"` +type stageuserShowKwParams struct { + *StageuserShowArgs + *StageuserShowOptionalArgs - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` +type stageuserShowResponse struct { + Error *Error `json:"error"` + Result *StageuserShowResult `json:"result"` } -func (t *StageuserAddManagerResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("StageuserAddManagerResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("StageuserAddManagerResult%v", string(b)) +type StageuserShowResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Stageuser `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } + +func (t *StageuserShowResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("StageuserShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("StageuserShowResult%v", string(b)) } /* -Delete a stage user. +Create new Sudo Command. */ -func (c *Client) StageuserDel( - reqArgs *StageuserDelArgs, - optArgs *StageuserDelOptionalArgs, // can be nil -) (*StageuserDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := stageuserDelKwParams{ - StageuserDelArgs: reqArgs, - StageuserDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "stageuser_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res stageuserDelResponse +func (c *Client) SudocmdAdd( + reqArgs *SudocmdAddArgs, + optArgs *SudocmdAddOptionalArgs, // can be nil +) (*SudocmdAddResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := sudocmdAddKwParams{ + SudocmdAddArgs: reqArgs, + SudocmdAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "sudocmd_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res sudocmdAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type StageuserDelArgs struct { -} +type SudocmdAddArgs struct { + + /* +Sudo Command -type StageuserDelOptionalArgs struct { + */ + Sudocmd string `json:"sudocmd,omitempty"` + } - /* - User login +type SudocmdAddOptionalArgs struct { + + /* +Description +A description of this command + */ + Description *string `json:"description,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } - */ - UID *[]string `json:"uid,omitempty"` +type sudocmdAddKwParams struct { + *SudocmdAddArgs + *SudocmdAddOptionalArgs - /* + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` +type sudocmdAddResponse struct { + Error *Error `json:"error"` + Result *SudocmdAddResult `json:"result"` } -type stageuserDelKwParams struct { - *StageuserDelArgs - *StageuserDelOptionalArgs +type SudocmdAddResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Sudocmd `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` +func (t *SudocmdAddResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SudocmdAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SudocmdAddResult%v", string(b)) } -type stageuserDelResponse struct { - Error *Error `json:"error"` - Result *StageuserDelResult `json:"result"` +/* +Delete Sudo Command. +*/ +func (c *Client) SudocmdDel( + reqArgs *SudocmdDelArgs, + optArgs *SudocmdDelOptionalArgs, // can be nil +) (*SudocmdDelResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := sudocmdDelKwParams{ + SudocmdDelArgs: reqArgs, + SudocmdDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "sudocmd_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res sudocmdDelResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type StageuserDelResult struct { +type SudocmdDelArgs struct { + + /* +Sudo Command + + */ + Sudocmd []string `json:"sudocmd,omitempty"` + } - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` +type SudocmdDelOptionalArgs struct { + + /* - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } - /* +type sudocmdDelKwParams struct { + *SudocmdDelArgs + *SudocmdDelOptionalArgs - (required) - */ - Value []string `json:"value,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } -func (t *StageuserDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("StageuserDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("StageuserDelResult%v", string(b)) +type sudocmdDelResponse struct { + Error *Error `json:"error"` + Result *SudocmdDelResult `json:"result"` +} + +type SudocmdDelResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } + +func (t *SudocmdDelResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SudocmdDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SudocmdDelResult%v", string(b)) } /* -Search for stage users. +Search for Sudo Commands. */ -func (c *Client) StageuserFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *StageuserFindArgs, - optArgs *StageuserFindOptionalArgs, // can be nil -) (*StageuserFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := stageuserFindKwParams{ - StageuserFindArgs: reqArgs, - StageuserFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "stageuser_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res stageuserFindResponse +func (c *Client) SudocmdFind( + criteria string, // A string searched in all relevant object attributes + reqArgs *SudocmdFindArgs, + optArgs *SudocmdFindOptionalArgs, // can be nil +) (*SudocmdFindResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := sudocmdFindKwParams{ + SudocmdFindArgs: reqArgs, + SudocmdFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "sudocmd_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res sudocmdFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type StageuserFindArgs struct { -} +type SudocmdFindArgs struct { + } -type StageuserFindOptionalArgs struct { +type SudocmdFindOptionalArgs struct { + + /* +Sudo Command + + */ + Sudocmd *string `json:"sudocmd,omitempty"` + + /* +Description +A description of this command + */ + Description *string `json:"description,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("command") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } - /* - User login +type sudocmdFindKwParams struct { + *SudocmdFindArgs + *SudocmdFindOptionalArgs - */ - UID *string `json:"uid,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - First name +type sudocmdFindResponse struct { + Error *Error `json:"error"` + Result *SudocmdFindResult `json:"result"` +} - */ - Givenname *string `json:"givenname,omitempty"` +type SudocmdFindResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Sudocmd `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } + +func (t *SudocmdFindResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SudocmdFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SudocmdFindResult%v", string(b)) +} + +/* +Modify Sudo Command. +*/ +func (c *Client) SudocmdMod( + reqArgs *SudocmdModArgs, + optArgs *SudocmdModOptionalArgs, // can be nil +) (*SudocmdModResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := sudocmdModKwParams{ + SudocmdModArgs: reqArgs, + SudocmdModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "sudocmd_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res sudocmdModResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - /* - Last name +type SudocmdModArgs struct { + + /* +Sudo Command - */ - Sn *string `json:"sn,omitempty"` + */ + Sudocmd string `json:"sudocmd,omitempty"` + } - /* - Full name +type SudocmdModOptionalArgs struct { + + /* +Description +A description of this command + */ + Description *string `json:"description,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } - */ - Cn *string `json:"cn,omitempty"` +type sudocmdModKwParams struct { + *SudocmdModArgs + *SudocmdModOptionalArgs - /* - Display name + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - */ - Displayname *string `json:"displayname,omitempty"` +type sudocmdModResponse struct { + Error *Error `json:"error"` + Result *SudocmdModResult `json:"result"` +} - /* - Initials +type SudocmdModResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Sudocmd `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } - */ - Initials *string `json:"initials,omitempty"` +func (t *SudocmdModResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SudocmdModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SudocmdModResult%v", string(b)) +} - /* - Home directory +/* +Display Sudo Command. +*/ +func (c *Client) SudocmdShow( + reqArgs *SudocmdShowArgs, + optArgs *SudocmdShowOptionalArgs, // can be nil +) (*SudocmdShowResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := sudocmdShowKwParams{ + SudocmdShowArgs: reqArgs, + SudocmdShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "sudocmd_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res sudocmdShowResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - */ - Homedirectory *string `json:"homedirectory,omitempty"` +type SudocmdShowArgs struct { + + /* +Sudo Command - /* - GECOS + */ + Sudocmd string `json:"sudocmd,omitempty"` + } - */ - Gecos *string `json:"gecos,omitempty"` +type SudocmdShowOptionalArgs struct { + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } - /* - Login shell +type sudocmdShowKwParams struct { + *SudocmdShowArgs + *SudocmdShowOptionalArgs - */ - Loginshell *string `json:"loginshell,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - Principal alias +type sudocmdShowResponse struct { + Error *Error `json:"error"` + Result *SudocmdShowResult `json:"result"` +} - */ - Krbprincipalname *[]string `json:"krbprincipalname,omitempty"` +type SudocmdShowResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Sudocmd `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } - /* - Kerberos principal expiration +func (t *SudocmdShowResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SudocmdShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SudocmdShowResult%v", string(b)) +} - */ - Krbprincipalexpiration *time.Time `json:"krbprincipalexpiration,omitempty"` +/* +Create new Sudo Command Group. +*/ +func (c *Client) SudocmdgroupAdd( + reqArgs *SudocmdgroupAddArgs, + optArgs *SudocmdgroupAddOptionalArgs, // can be nil +) (*SudocmdgroupAddResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := sudocmdgroupAddKwParams{ + SudocmdgroupAddArgs: reqArgs, + SudocmdgroupAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "sudocmdgroup_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res sudocmdgroupAddResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - /* - Email address +type SudocmdgroupAddArgs struct { + + /* +Sudo Command Group - */ - Mail *[]string `json:"mail,omitempty"` + */ + Cn string `json:"cn,omitempty"` + } - /* - Password - Prompt to set the user password - */ - Userpassword *string `json:"userpassword,omitempty"` +type SudocmdgroupAddOptionalArgs struct { + + /* +Description +Group description + */ + Description *string `json:"description,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } - /* - UID - User ID Number (system will assign one if not provided) - */ - Uidnumber *int `json:"uidnumber,omitempty"` +type sudocmdgroupAddKwParams struct { + *SudocmdgroupAddArgs + *SudocmdgroupAddOptionalArgs - /* - GID - Group ID Number - */ - Gidnumber *int `json:"gidnumber,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - Street address +type sudocmdgroupAddResponse struct { + Error *Error `json:"error"` + Result *SudocmdgroupAddResult `json:"result"` +} - */ - Street *string `json:"street,omitempty"` +type SudocmdgroupAddResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Sudocmdgroup `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } - /* - City +func (t *SudocmdgroupAddResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SudocmdgroupAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SudocmdgroupAddResult%v", string(b)) +} - */ - L *string `json:"l,omitempty"` +/* +Add members to Sudo Command Group. +*/ +func (c *Client) SudocmdgroupAddMember( + reqArgs *SudocmdgroupAddMemberArgs, + optArgs *SudocmdgroupAddMemberOptionalArgs, // can be nil +) (*SudocmdgroupAddMemberResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := sudocmdgroupAddMemberKwParams{ + SudocmdgroupAddMemberArgs: reqArgs, + SudocmdgroupAddMemberOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "sudocmdgroup_add_member", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res sudocmdgroupAddMemberResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - /* - State/Province +type SudocmdgroupAddMemberArgs struct { + + /* +Sudo Command Group - */ - St *string `json:"st,omitempty"` + */ + Cn string `json:"cn,omitempty"` + } - /* - ZIP +type SudocmdgroupAddMemberOptionalArgs struct { + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member sudo command +sudo commands to add + */ + Sudocmd *[]string `json:"sudocmd,omitempty"` + } - */ - Postalcode *string `json:"postalcode,omitempty"` +type sudocmdgroupAddMemberKwParams struct { + *SudocmdgroupAddMemberArgs + *SudocmdgroupAddMemberOptionalArgs - /* - Telephone Number + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - */ - Telephonenumber *[]string `json:"telephonenumber,omitempty"` +type sudocmdgroupAddMemberResponse struct { + Error *Error `json:"error"` + Result *SudocmdgroupAddMemberResult `json:"result"` +} - /* - Mobile Telephone Number +type SudocmdgroupAddMemberResult struct { + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } - */ - Mobile *[]string `json:"mobile,omitempty"` +func (t *SudocmdgroupAddMemberResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SudocmdgroupAddMemberResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SudocmdgroupAddMemberResult%v", string(b)) +} - /* - Pager Number +/* +Delete Sudo Command Group. +*/ +func (c *Client) SudocmdgroupDel( + reqArgs *SudocmdgroupDelArgs, + optArgs *SudocmdgroupDelOptionalArgs, // can be nil +) (*SudocmdgroupDelResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := sudocmdgroupDelKwParams{ + SudocmdgroupDelArgs: reqArgs, + SudocmdgroupDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "sudocmdgroup_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res sudocmdgroupDelResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - */ - Pager *[]string `json:"pager,omitempty"` +type SudocmdgroupDelArgs struct { + + /* +Sudo Command Group - /* - Fax Number + */ + Cn []string `json:"cn,omitempty"` + } - */ - Facsimiletelephonenumber *[]string `json:"facsimiletelephonenumber,omitempty"` +type SudocmdgroupDelOptionalArgs struct { + + /* - /* - Org. Unit +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } - */ - Ou *string `json:"ou,omitempty"` +type sudocmdgroupDelKwParams struct { + *SudocmdgroupDelArgs + *SudocmdgroupDelOptionalArgs - /* - Job Title + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - */ - Title *string `json:"title,omitempty"` +type sudocmdgroupDelResponse struct { + Error *Error `json:"error"` + Result *SudocmdgroupDelResult `json:"result"` +} - /* - Manager +type SudocmdgroupDelResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } - */ - Manager *string `json:"manager,omitempty"` +func (t *SudocmdgroupDelResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SudocmdgroupDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SudocmdgroupDelResult%v", string(b)) +} - /* - Car License +/* +Search for Sudo Command Groups. +*/ +func (c *Client) SudocmdgroupFind( + criteria string, // A string searched in all relevant object attributes + reqArgs *SudocmdgroupFindArgs, + optArgs *SudocmdgroupFindOptionalArgs, // can be nil +) (*SudocmdgroupFindResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := sudocmdgroupFindKwParams{ + SudocmdgroupFindArgs: reqArgs, + SudocmdgroupFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "sudocmdgroup_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res sudocmdgroupFindResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - */ - Carlicense *[]string `json:"carlicense,omitempty"` +type SudocmdgroupFindArgs struct { + } - /* - User authentication types - Types of supported user authentication - */ - Ipauserauthtype *[]string `json:"ipauserauthtype,omitempty"` +type SudocmdgroupFindOptionalArgs struct { + + /* +Sudo Command Group + + */ + Cn *string `json:"cn,omitempty"` + + /* +Description +Group description + */ + Description *string `json:"description,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("sudocmdgroup-name") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } - /* - Class - User category (semantics placed on this attribute are for local interpretation) - */ - Userclass *[]string `json:"userclass,omitempty"` +type sudocmdgroupFindKwParams struct { + *SudocmdgroupFindArgs + *SudocmdgroupFindOptionalArgs - /* - RADIUS proxy configuration + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - */ - Ipatokenradiusconfiglink *string `json:"ipatokenradiusconfiglink,omitempty"` +type sudocmdgroupFindResponse struct { + Error *Error `json:"error"` + Result *SudocmdgroupFindResult `json:"result"` +} - /* - RADIUS proxy username +type SudocmdgroupFindResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Sudocmdgroup `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } - */ - Ipatokenradiususername *string `json:"ipatokenradiususername,omitempty"` +func (t *SudocmdgroupFindResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SudocmdgroupFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SudocmdgroupFindResult%v", string(b)) +} - /* - Department Number +/* +Modify Sudo Command Group. +*/ +func (c *Client) SudocmdgroupMod( + reqArgs *SudocmdgroupModArgs, + optArgs *SudocmdgroupModOptionalArgs, // can be nil +) (*SudocmdgroupModResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := sudocmdgroupModKwParams{ + SudocmdgroupModArgs: reqArgs, + SudocmdgroupModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "sudocmdgroup_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res sudocmdgroupModResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - */ - Departmentnumber *[]string `json:"departmentnumber,omitempty"` +type SudocmdgroupModArgs struct { + + /* +Sudo Command Group - /* - Employee Number + */ + Cn string `json:"cn,omitempty"` + } - */ - Employeenumber *string `json:"employeenumber,omitempty"` +type SudocmdgroupModOptionalArgs struct { + + /* +Description +Group description + */ + Description *string `json:"description,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } - /* - Employee Type +type sudocmdgroupModKwParams struct { + *SudocmdgroupModArgs + *SudocmdgroupModOptionalArgs - */ - Employeetype *string `json:"employeetype,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - Preferred Language +type sudocmdgroupModResponse struct { + Error *Error `json:"error"` + Result *SudocmdgroupModResult `json:"result"` +} - */ - Preferredlanguage *string `json:"preferredlanguage,omitempty"` +type SudocmdgroupModResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Sudocmdgroup `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } - /* - Certificate - Base-64 encoded user certificate - */ - Usercertificate *[]string `json:"usercertificate,omitempty"` +func (t *SudocmdgroupModResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SudocmdgroupModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SudocmdgroupModResult%v", string(b)) +} - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` +/* +Remove members from Sudo Command Group. +*/ +func (c *Client) SudocmdgroupRemoveMember( + reqArgs *SudocmdgroupRemoveMemberArgs, + optArgs *SudocmdgroupRemoveMemberOptionalArgs, // can be nil +) (*SudocmdgroupRemoveMemberResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := sudocmdgroupRemoveMemberKwParams{ + SudocmdgroupRemoveMemberArgs: reqArgs, + SudocmdgroupRemoveMemberOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "sudocmdgroup_remove_member", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res sudocmdgroupRemoveMemberResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` +type SudocmdgroupRemoveMemberArgs struct { + + /* +Sudo Command Group - /* + */ + Cn string `json:"cn,omitempty"` + } - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` +type SudocmdgroupRemoveMemberOptionalArgs struct { + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member sudo command +sudo commands to remove + */ + Sudocmd *[]string `json:"sudocmd,omitempty"` + } - /* +type sudocmdgroupRemoveMemberKwParams struct { + *SudocmdgroupRemoveMemberArgs + *SudocmdgroupRemoveMemberOptionalArgs - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("login") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` - - /* - group - Search for stage users with these member of groups. - */ - InGroup *[]string `json:"in_group,omitempty"` - - /* - group - Search for stage users without these member of groups. - */ - NotInGroup *[]string `json:"not_in_group,omitempty"` - - /* - netgroup - Search for stage users with these member of netgroups. - */ - InNetgroup *[]string `json:"in_netgroup,omitempty"` - - /* - netgroup - Search for stage users without these member of netgroups. - */ - NotInNetgroup *[]string `json:"not_in_netgroup,omitempty"` - - /* - role - Search for stage users with these member of roles. - */ - InRole *[]string `json:"in_role,omitempty"` - - /* - role - Search for stage users without these member of roles. - */ - NotInRole *[]string `json:"not_in_role,omitempty"` - - /* - HBAC rule - Search for stage users with these member of HBAC rules. - */ - InHbacrule *[]string `json:"in_hbacrule,omitempty"` - - /* - HBAC rule - Search for stage users without these member of HBAC rules. - */ - NotInHbacrule *[]string `json:"not_in_hbacrule,omitempty"` - - /* - sudo rule - Search for stage users with these member of sudo rules. - */ - InSudorule *[]string `json:"in_sudorule,omitempty"` - - /* - sudo rule - Search for stage users without these member of sudo rules. - */ - NotInSudorule *[]string `json:"not_in_sudorule,omitempty"` +type sudocmdgroupRemoveMemberResponse struct { + Error *Error `json:"error"` + Result *SudocmdgroupRemoveMemberResult `json:"result"` } -type stageuserFindKwParams struct { - *StageuserFindArgs - *StageuserFindOptionalArgs +type SudocmdgroupRemoveMemberResult struct { + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` +func (t *SudocmdgroupRemoveMemberResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SudocmdgroupRemoveMemberResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SudocmdgroupRemoveMemberResult%v", string(b)) } -type stageuserFindResponse struct { - Error *Error `json:"error"` - Result *StageuserFindResult `json:"result"` +/* +Display Sudo Command Group. +*/ +func (c *Client) SudocmdgroupShow( + reqArgs *SudocmdgroupShowArgs, + optArgs *SudocmdgroupShowOptionalArgs, // can be nil +) (*SudocmdgroupShowResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := sudocmdgroupShowKwParams{ + SudocmdgroupShowArgs: reqArgs, + SudocmdgroupShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "sudocmdgroup_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res sudocmdgroupShowResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type StageuserFindResult struct { +type SudocmdgroupShowArgs struct { + + /* +Sudo Command Group - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` + */ + Cn string `json:"cn,omitempty"` + } - /* +type SudocmdgroupShowOptionalArgs struct { + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } - (required) - */ - Result []Stageuser `json:"result,omitempty"` +type sudocmdgroupShowKwParams struct { + *SudocmdgroupShowArgs + *SudocmdgroupShowOptionalArgs - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` +type sudocmdgroupShowResponse struct { + Error *Error `json:"error"` + Result *SudocmdgroupShowResult `json:"result"` } -func (t *StageuserFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("StageuserFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("StageuserFindResult%v", string(b)) +type SudocmdgroupShowResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Sudocmdgroup `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } + +func (t *SudocmdgroupShowResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SudocmdgroupShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SudocmdgroupShowResult%v", string(b)) } /* -Modify a stage user. +Create new Sudo Rule. */ -func (c *Client) StageuserMod( - reqArgs *StageuserModArgs, - optArgs *StageuserModOptionalArgs, // can be nil -) (*StageuserModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := stageuserModKwParams{ - StageuserModArgs: reqArgs, - StageuserModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "stageuser_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res stageuserModResponse +func (c *Client) SudoruleAdd( + reqArgs *SudoruleAddArgs, + optArgs *SudoruleAddOptionalArgs, // can be nil +) (*SudoruleAddResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := sudoruleAddKwParams{ + SudoruleAddArgs: reqArgs, + SudoruleAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "sudorule_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res sudoruleAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type StageuserModArgs struct { -} +type SudoruleAddArgs struct { + + /* +Rule name -type StageuserModOptionalArgs struct { + */ + Cn string `json:"cn,omitempty"` + } - /* - User login +type SudoruleAddOptionalArgs struct { + + /* +Description + + */ + Description *string `json:"description,omitempty"` + + /* +Enabled + + */ + Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` + + /* +User category +User category the rule applies to + */ + Usercategory *string `json:"usercategory,omitempty"` + + /* +Host category +Host category the rule applies to + */ + Hostcategory *string `json:"hostcategory,omitempty"` + + /* +Command category +Command category the rule applies to + */ + Cmdcategory *string `json:"cmdcategory,omitempty"` + + /* +RunAs User category +RunAs User category the rule applies to + */ + Ipasudorunasusercategory *string `json:"ipasudorunasusercategory,omitempty"` + + /* +RunAs Group category +RunAs Group category the rule applies to + */ + Ipasudorunasgroupcategory *string `json:"ipasudorunasgroupcategory,omitempty"` + + /* +Sudo order +integer to order the Sudo rules + */ + Sudoorder *int `json:"sudoorder,omitempty"` + + /* +External User +External User the rule applies to (sudorule-find only) + */ + Externaluser *string `json:"externaluser,omitempty"` + + /* +External host + + */ + Externalhost *[]string `json:"externalhost,omitempty"` + + /* +RunAs External User +External User the commands can run as (sudorule-find only) + */ + Ipasudorunasextuser *string `json:"ipasudorunasextuser,omitempty"` + + /* +RunAs External Group +External Group the commands can run as (sudorule-find only) + */ + Ipasudorunasextgroup *string `json:"ipasudorunasextgroup,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } - */ - UID *string `json:"uid,omitempty"` +type sudoruleAddKwParams struct { + *SudoruleAddArgs + *SudoruleAddOptionalArgs - /* - First name + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - */ - Givenname *string `json:"givenname,omitempty"` +type sudoruleAddResponse struct { + Error *Error `json:"error"` + Result *SudoruleAddResult `json:"result"` +} - /* - Last name +type SudoruleAddResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Sudorule `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } - */ - Sn *string `json:"sn,omitempty"` +func (t *SudoruleAddResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SudoruleAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SudoruleAddResult%v", string(b)) +} - /* - Full name +/* +Add commands and sudo command groups affected by Sudo Rule. +*/ +func (c *Client) SudoruleAddAllowCommand( + reqArgs *SudoruleAddAllowCommandArgs, + optArgs *SudoruleAddAllowCommandOptionalArgs, // can be nil +) (*SudoruleAddAllowCommandResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := sudoruleAddAllowCommandKwParams{ + SudoruleAddAllowCommandArgs: reqArgs, + SudoruleAddAllowCommandOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "sudorule_add_allow_command", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res sudoruleAddAllowCommandResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - */ - Cn *string `json:"cn,omitempty"` +type SudoruleAddAllowCommandArgs struct { + + /* +Rule name - /* - Display name + */ + Cn string `json:"cn,omitempty"` + } - */ - Displayname *string `json:"displayname,omitempty"` +type SudoruleAddAllowCommandOptionalArgs struct { + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member sudo command +sudo commands to add + */ + Sudocmd *[]string `json:"sudocmd,omitempty"` + + /* +member sudo command group +sudo command groups to add + */ + Sudocmdgroup *[]string `json:"sudocmdgroup,omitempty"` + } - /* - Initials +type sudoruleAddAllowCommandKwParams struct { + *SudoruleAddAllowCommandArgs + *SudoruleAddAllowCommandOptionalArgs - */ - Initials *string `json:"initials,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - Home directory +type sudoruleAddAllowCommandResponse struct { + Error *Error `json:"error"` + Result *SudoruleAddAllowCommandResult `json:"result"` +} - */ - Homedirectory *string `json:"homedirectory,omitempty"` +type SudoruleAddAllowCommandResult struct { + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } - /* - GECOS +func (t *SudoruleAddAllowCommandResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SudoruleAddAllowCommandResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SudoruleAddAllowCommandResult%v", string(b)) +} - */ - Gecos *string `json:"gecos,omitempty"` +/* +Add commands and sudo command groups affected by Sudo Rule. +*/ +func (c *Client) SudoruleAddDenyCommand( + reqArgs *SudoruleAddDenyCommandArgs, + optArgs *SudoruleAddDenyCommandOptionalArgs, // can be nil +) (*SudoruleAddDenyCommandResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := sudoruleAddDenyCommandKwParams{ + SudoruleAddDenyCommandArgs: reqArgs, + SudoruleAddDenyCommandOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "sudorule_add_deny_command", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res sudoruleAddDenyCommandResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - /* - Login shell +type SudoruleAddDenyCommandArgs struct { + + /* +Rule name - */ - Loginshell *string `json:"loginshell,omitempty"` + */ + Cn string `json:"cn,omitempty"` + } - /* - Principal alias +type SudoruleAddDenyCommandOptionalArgs struct { + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member sudo command +sudo commands to add + */ + Sudocmd *[]string `json:"sudocmd,omitempty"` + + /* +member sudo command group +sudo command groups to add + */ + Sudocmdgroup *[]string `json:"sudocmdgroup,omitempty"` + } - */ - Krbprincipalname *[]string `json:"krbprincipalname,omitempty"` +type sudoruleAddDenyCommandKwParams struct { + *SudoruleAddDenyCommandArgs + *SudoruleAddDenyCommandOptionalArgs - /* - Kerberos principal expiration + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - */ - Krbprincipalexpiration *time.Time `json:"krbprincipalexpiration,omitempty"` +type sudoruleAddDenyCommandResponse struct { + Error *Error `json:"error"` + Result *SudoruleAddDenyCommandResult `json:"result"` +} - /* - Email address +type SudoruleAddDenyCommandResult struct { + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } - */ - Mail *[]string `json:"mail,omitempty"` +func (t *SudoruleAddDenyCommandResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SudoruleAddDenyCommandResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SudoruleAddDenyCommandResult%v", string(b)) +} - /* - Password - Prompt to set the user password - */ - Userpassword *string `json:"userpassword,omitempty"` +/* +Add hosts and hostgroups affected by Sudo Rule. +*/ +func (c *Client) SudoruleAddHost( + reqArgs *SudoruleAddHostArgs, + optArgs *SudoruleAddHostOptionalArgs, // can be nil +) (*SudoruleAddHostResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := sudoruleAddHostKwParams{ + SudoruleAddHostArgs: reqArgs, + SudoruleAddHostOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "sudorule_add_host", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res sudoruleAddHostResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - /* +type SudoruleAddHostArgs struct { + + /* +Rule name - Generate a random user password - */ - Random *bool `json:"random,omitempty"` + */ + Cn string `json:"cn,omitempty"` + } - /* - UID - User ID Number (system will assign one if not provided) - */ - Uidnumber *int `json:"uidnumber,omitempty"` +type SudoruleAddHostOptionalArgs struct { + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member host +hosts to add + */ + Host *[]string `json:"host,omitempty"` + + /* +member host group +host groups to add + */ + Hostgroup *[]string `json:"hostgroup,omitempty"` + + /* +host masks of allowed hosts + + */ + Hostmask *[]string `json:"hostmask,omitempty"` + } - /* - GID - Group ID Number - */ - Gidnumber *int `json:"gidnumber,omitempty"` +type sudoruleAddHostKwParams struct { + *SudoruleAddHostArgs + *SudoruleAddHostOptionalArgs - /* - Street address + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - */ - Street *string `json:"street,omitempty"` +type sudoruleAddHostResponse struct { + Error *Error `json:"error"` + Result *SudoruleAddHostResult `json:"result"` +} - /* - City +type SudoruleAddHostResult struct { + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } - */ - L *string `json:"l,omitempty"` +func (t *SudoruleAddHostResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SudoruleAddHostResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SudoruleAddHostResult%v", string(b)) +} - /* - State/Province +/* +Add an option to the Sudo Rule. +*/ +func (c *Client) SudoruleAddOption( + reqArgs *SudoruleAddOptionArgs, + optArgs *SudoruleAddOptionOptionalArgs, // can be nil +) (*SudoruleAddOptionResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := sudoruleAddOptionKwParams{ + SudoruleAddOptionArgs: reqArgs, + SudoruleAddOptionOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "sudorule_add_option", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res sudoruleAddOptionResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - */ - St *string `json:"st,omitempty"` +type SudoruleAddOptionArgs struct { + + /* +Rule name - /* - ZIP + */ + Cn string `json:"cn,omitempty"` + + /* +Sudo Option - */ - Postalcode *string `json:"postalcode,omitempty"` + */ + Ipasudoopt string `json:"ipasudoopt,omitempty"` + } - /* - Telephone Number +type SudoruleAddOptionOptionalArgs struct { + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } - */ - Telephonenumber *[]string `json:"telephonenumber,omitempty"` +type sudoruleAddOptionKwParams struct { + *SudoruleAddOptionArgs + *SudoruleAddOptionOptionalArgs - /* - Mobile Telephone Number + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - */ - Mobile *[]string `json:"mobile,omitempty"` +type sudoruleAddOptionResponse struct { + Error *Error `json:"error"` + Result *SudoruleAddOptionResult `json:"result"` +} - /* - Pager Number +type SudoruleAddOptionResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } - */ - Pager *[]string `json:"pager,omitempty"` +func (t *SudoruleAddOptionResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SudoruleAddOptionResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SudoruleAddOptionResult%v", string(b)) +} - /* - Fax Number +/* +Add group for Sudo to execute as. +*/ +func (c *Client) SudoruleAddRunasgroup( + reqArgs *SudoruleAddRunasgroupArgs, + optArgs *SudoruleAddRunasgroupOptionalArgs, // can be nil +) (*SudoruleAddRunasgroupResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := sudoruleAddRunasgroupKwParams{ + SudoruleAddRunasgroupArgs: reqArgs, + SudoruleAddRunasgroupOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "sudorule_add_runasgroup", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res sudoruleAddRunasgroupResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - */ - Facsimiletelephonenumber *[]string `json:"facsimiletelephonenumber,omitempty"` +type SudoruleAddRunasgroupArgs struct { + + /* +Rule name - /* - Org. Unit + */ + Cn string `json:"cn,omitempty"` + } - */ - Ou *string `json:"ou,omitempty"` +type SudoruleAddRunasgroupOptionalArgs struct { + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member group +groups to add + */ + Group *[]string `json:"group,omitempty"` + } - /* - Job Title +type sudoruleAddRunasgroupKwParams struct { + *SudoruleAddRunasgroupArgs + *SudoruleAddRunasgroupOptionalArgs - */ - Title *string `json:"title,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - Manager +type sudoruleAddRunasgroupResponse struct { + Error *Error `json:"error"` + Result *SudoruleAddRunasgroupResult `json:"result"` +} - */ - Manager *string `json:"manager,omitempty"` +type SudoruleAddRunasgroupResult struct { + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } - /* - Car License +func (t *SudoruleAddRunasgroupResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SudoruleAddRunasgroupResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SudoruleAddRunasgroupResult%v", string(b)) +} - */ - Carlicense *[]string `json:"carlicense,omitempty"` +/* +Add users and groups for Sudo to execute as. +*/ +func (c *Client) SudoruleAddRunasuser( + reqArgs *SudoruleAddRunasuserArgs, + optArgs *SudoruleAddRunasuserOptionalArgs, // can be nil +) (*SudoruleAddRunasuserResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := sudoruleAddRunasuserKwParams{ + SudoruleAddRunasuserArgs: reqArgs, + SudoruleAddRunasuserOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "sudorule_add_runasuser", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res sudoruleAddRunasuserResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - /* - SSH public key +type SudoruleAddRunasuserArgs struct { + + /* +Rule name - */ - Ipasshpubkey *[]string `json:"ipasshpubkey,omitempty"` + */ + Cn string `json:"cn,omitempty"` + } - /* - User authentication types - Types of supported user authentication - */ - Ipauserauthtype *[]string `json:"ipauserauthtype,omitempty"` +type SudoruleAddRunasuserOptionalArgs struct { + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member user +users to add + */ + User *[]string `json:"user,omitempty"` + + /* +member group +groups to add + */ + Group *[]string `json:"group,omitempty"` + } - /* - Class - User category (semantics placed on this attribute are for local interpretation) - */ - Userclass *[]string `json:"userclass,omitempty"` +type sudoruleAddRunasuserKwParams struct { + *SudoruleAddRunasuserArgs + *SudoruleAddRunasuserOptionalArgs - /* - RADIUS proxy configuration + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - */ - Ipatokenradiusconfiglink *string `json:"ipatokenradiusconfiglink,omitempty"` +type sudoruleAddRunasuserResponse struct { + Error *Error `json:"error"` + Result *SudoruleAddRunasuserResult `json:"result"` +} - /* - RADIUS proxy username +type SudoruleAddRunasuserResult struct { + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } - */ - Ipatokenradiususername *string `json:"ipatokenradiususername,omitempty"` +func (t *SudoruleAddRunasuserResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SudoruleAddRunasuserResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SudoruleAddRunasuserResult%v", string(b)) +} - /* - Department Number +/* +Add users and groups affected by Sudo Rule. +*/ +func (c *Client) SudoruleAddUser( + reqArgs *SudoruleAddUserArgs, + optArgs *SudoruleAddUserOptionalArgs, // can be nil +) (*SudoruleAddUserResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := sudoruleAddUserKwParams{ + SudoruleAddUserArgs: reqArgs, + SudoruleAddUserOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "sudorule_add_user", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res sudoruleAddUserResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - */ - Departmentnumber *[]string `json:"departmentnumber,omitempty"` +type SudoruleAddUserArgs struct { + + /* +Rule name - /* - Employee Number + */ + Cn string `json:"cn,omitempty"` + } - */ - Employeenumber *string `json:"employeenumber,omitempty"` +type SudoruleAddUserOptionalArgs struct { + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member user +users to add + */ + User *[]string `json:"user,omitempty"` + + /* +member group +groups to add + */ + Group *[]string `json:"group,omitempty"` + } - /* - Employee Type +type sudoruleAddUserKwParams struct { + *SudoruleAddUserArgs + *SudoruleAddUserOptionalArgs - */ - Employeetype *string `json:"employeetype,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - Preferred Language +type sudoruleAddUserResponse struct { + Error *Error `json:"error"` + Result *SudoruleAddUserResult `json:"result"` +} - */ - Preferredlanguage *string `json:"preferredlanguage,omitempty"` +type SudoruleAddUserResult struct { + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } - /* - Certificate - Base-64 encoded user certificate - */ - Usercertificate *[]string `json:"usercertificate,omitempty"` +func (t *SudoruleAddUserResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SudoruleAddUserResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SudoruleAddUserResult%v", string(b)) +} - /* +/* +Delete Sudo Rule. +*/ +func (c *Client) SudoruleDel( + reqArgs *SudoruleDelArgs, + optArgs *SudoruleDelOptionalArgs, // can be nil +) (*SudoruleDelResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := sudoruleDelKwParams{ + SudoruleDelArgs: reqArgs, + SudoruleDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "sudorule_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res sudoruleDelResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` +type SudoruleDelArgs struct { + + /* +Rule name - /* + */ + Cn []string `json:"cn,omitempty"` + } - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` +type SudoruleDelOptionalArgs struct { + + /* - /* +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` +type sudoruleDelKwParams struct { + *SudoruleDelArgs + *SudoruleDelOptionalArgs - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* +type sudoruleDelResponse struct { + Error *Error `json:"error"` + Result *SudoruleDelResult `json:"result"` +} - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` +type SudoruleDelResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } - /* +func (t *SudoruleDelResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SudoruleDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SudoruleDelResult%v", string(b)) +} - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` +/* +Disable a Sudo Rule. +*/ +func (c *Client) SudoruleDisable( + reqArgs *SudoruleDisableArgs, + optArgs *SudoruleDisableOptionalArgs, // can be nil +) (*SudoruleDisableResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := sudoruleDisableKwParams{ + SudoruleDisableArgs: reqArgs, + SudoruleDisableOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "sudorule_disable", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res sudoruleDisableResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - /* +type SudoruleDisableArgs struct { + + /* +Rule name - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` + */ + Cn string `json:"cn,omitempty"` + } - /* - Rename - Rename the stage user object - */ - Rename *string `json:"rename,omitempty"` -} +type SudoruleDisableOptionalArgs struct { + } -type stageuserModKwParams struct { - *StageuserModArgs - *StageuserModOptionalArgs +type sudoruleDisableKwParams struct { + *SudoruleDisableArgs + *SudoruleDisableOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } -type stageuserModResponse struct { - Error *Error `json:"error"` - Result *StageuserModResult `json:"result"` +type sudoruleDisableResponse struct { + Error *Error `json:"error"` + Result *SudoruleDisableResult `json:"result"` } -type StageuserModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Stageuser `json:"result,omitempty"` +type SudoruleDisableResult struct { + + + /* - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} + (required) + */ + Result interface{} `json:"result,omitempty"` + } -func (t *StageuserModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("StageuserModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("StageuserModResult%v", string(b)) +func (t *SudoruleDisableResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SudoruleDisableResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SudoruleDisableResult%v", string(b)) } /* -Remove a manager to the stage user entry +Enable a Sudo Rule. */ -func (c *Client) StageuserRemoveManager( - reqArgs *StageuserRemoveManagerArgs, - optArgs *StageuserRemoveManagerOptionalArgs, // can be nil -) (*StageuserRemoveManagerResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := stageuserRemoveManagerKwParams{ - StageuserRemoveManagerArgs: reqArgs, - StageuserRemoveManagerOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "stageuser_remove_manager", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res stageuserRemoveManagerResponse +func (c *Client) SudoruleEnable( + reqArgs *SudoruleEnableArgs, + optArgs *SudoruleEnableOptionalArgs, // can be nil +) (*SudoruleEnableResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := sudoruleEnableKwParams{ + SudoruleEnableArgs: reqArgs, + SudoruleEnableOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "sudorule_enable", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res sudoruleEnableResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type StageuserRemoveManagerArgs struct { + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type StageuserRemoveManagerOptionalArgs struct { - - /* - User login - - */ - UID *string `json:"uid,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* +type SudoruleEnableArgs struct { + + /* +Rule name - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` + */ + Cn string `json:"cn,omitempty"` + } - /* - member user - users to remove - */ - User *[]string `json:"user,omitempty"` -} +type SudoruleEnableOptionalArgs struct { + } -type stageuserRemoveManagerKwParams struct { - *StageuserRemoveManagerArgs - *StageuserRemoveManagerOptionalArgs +type sudoruleEnableKwParams struct { + *SudoruleEnableArgs + *SudoruleEnableOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } -type stageuserRemoveManagerResponse struct { - Error *Error `json:"error"` - Result *StageuserRemoveManagerResult `json:"result"` +type sudoruleEnableResponse struct { + Error *Error `json:"error"` + Result *SudoruleEnableResult `json:"result"` } -type StageuserRemoveManagerResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` +type SudoruleEnableResult struct { + + + /* - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} + (required) + */ + Result interface{} `json:"result,omitempty"` + } -func (t *StageuserRemoveManagerResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("StageuserRemoveManagerResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("StageuserRemoveManagerResult%v", string(b)) +func (t *SudoruleEnableResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SudoruleEnableResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SudoruleEnableResult%v", string(b)) } /* -Display information about a stage user. +Search for Sudo Rule. */ -func (c *Client) StageuserShow( - reqArgs *StageuserShowArgs, - optArgs *StageuserShowOptionalArgs, // can be nil -) (*StageuserShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := stageuserShowKwParams{ - StageuserShowArgs: reqArgs, - StageuserShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "stageuser_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res stageuserShowResponse +func (c *Client) SudoruleFind( + criteria string, // A string searched in all relevant object attributes + reqArgs *SudoruleFindArgs, + optArgs *SudoruleFindOptionalArgs, // can be nil +) (*SudoruleFindResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := sudoruleFindKwParams{ + SudoruleFindArgs: reqArgs, + SudoruleFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "sudorule_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res sudoruleFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type StageuserShowArgs struct { -} - -type StageuserShowOptionalArgs struct { - - /* - User login - - */ - UID *string `json:"uid,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` +type SudoruleFindArgs struct { + } - /* +type SudoruleFindOptionalArgs struct { + + /* +Rule name + + */ + Cn *string `json:"cn,omitempty"` + + /* +Description + + */ + Description *string `json:"description,omitempty"` + + /* +Enabled + + */ + Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` + + /* +User category +User category the rule applies to + */ + Usercategory *string `json:"usercategory,omitempty"` + + /* +Host category +Host category the rule applies to + */ + Hostcategory *string `json:"hostcategory,omitempty"` + + /* +Command category +Command category the rule applies to + */ + Cmdcategory *string `json:"cmdcategory,omitempty"` + + /* +RunAs User category +RunAs User category the rule applies to + */ + Ipasudorunasusercategory *string `json:"ipasudorunasusercategory,omitempty"` + + /* +RunAs Group category +RunAs Group category the rule applies to + */ + Ipasudorunasgroupcategory *string `json:"ipasudorunasgroupcategory,omitempty"` + + /* +Sudo order +integer to order the Sudo rules + */ + Sudoorder *int `json:"sudoorder,omitempty"` + + /* +External User +External User the rule applies to (sudorule-find only) + */ + Externaluser *string `json:"externaluser,omitempty"` + + /* +External host + + */ + Externalhost *[]string `json:"externalhost,omitempty"` + + /* +RunAs External User +External User the commands can run as (sudorule-find only) + */ + Ipasudorunasextuser *string `json:"ipasudorunasextuser,omitempty"` + + /* +RunAs External Group +External Group the commands can run as (sudorule-find only) + */ + Ipasudorunasextgroup *string `json:"ipasudorunasextgroup,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("sudorule-name") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` +type sudoruleFindKwParams struct { + *SudoruleFindArgs + *SudoruleFindOptionalArgs - /* + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` +type sudoruleFindResponse struct { + Error *Error `json:"error"` + Result *SudoruleFindResult `json:"result"` } -type stageuserShowKwParams struct { - *StageuserShowArgs - *StageuserShowOptionalArgs +type SudoruleFindResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Sudorule `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` +func (t *SudoruleFindResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SudoruleFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SudoruleFindResult%v", string(b)) } -type stageuserShowResponse struct { - Error *Error `json:"error"` - Result *StageuserShowResult `json:"result"` +/* +Modify Sudo Rule. +*/ +func (c *Client) SudoruleMod( + reqArgs *SudoruleModArgs, + optArgs *SudoruleModOptionalArgs, // can be nil +) (*SudoruleModResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := sudoruleModKwParams{ + SudoruleModArgs: reqArgs, + SudoruleModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "sudorule_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res sudoruleModResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type StageuserShowResult struct { +type SudoruleModArgs struct { + + /* +Rule name - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` + */ + Cn string `json:"cn,omitempty"` + } - /* +type SudoruleModOptionalArgs struct { + + /* +Description + + */ + Description *string `json:"description,omitempty"` + + /* +Enabled + + */ + Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` + + /* +User category +User category the rule applies to + */ + Usercategory *string `json:"usercategory,omitempty"` + + /* +Host category +Host category the rule applies to + */ + Hostcategory *string `json:"hostcategory,omitempty"` + + /* +Command category +Command category the rule applies to + */ + Cmdcategory *string `json:"cmdcategory,omitempty"` + + /* +RunAs User category +RunAs User category the rule applies to + */ + Ipasudorunasusercategory *string `json:"ipasudorunasusercategory,omitempty"` + + /* +RunAs Group category +RunAs Group category the rule applies to + */ + Ipasudorunasgroupcategory *string `json:"ipasudorunasgroupcategory,omitempty"` + + /* +Sudo order +integer to order the Sudo rules + */ + Sudoorder *int `json:"sudoorder,omitempty"` + + /* +External User +External User the rule applies to (sudorule-find only) + */ + Externaluser *string `json:"externaluser,omitempty"` + + /* +External host + + */ + Externalhost *[]string `json:"externalhost,omitempty"` + + /* +RunAs External User +External User the commands can run as (sudorule-find only) + */ + Ipasudorunasextuser *string `json:"ipasudorunasextuser,omitempty"` + + /* +RunAs External Group +External Group the commands can run as (sudorule-find only) + */ + Ipasudorunasextgroup *string `json:"ipasudorunasextgroup,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +Rename +Rename the sudo rule object + */ + Rename *string `json:"rename,omitempty"` + } - (required) - */ - Result Stageuser `json:"result,omitempty"` +type sudoruleModKwParams struct { + *SudoruleModArgs + *SudoruleModOptionalArgs - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } -func (t *StageuserShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("StageuserShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("StageuserShowResult%v", string(b)) +type sudoruleModResponse struct { + Error *Error `json:"error"` + Result *SudoruleModResult `json:"result"` +} + +type SudoruleModResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Sudorule `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } + +func (t *SudoruleModResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SudoruleModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SudoruleModResult%v", string(b)) } /* -Create new Sudo Command. +Remove commands and sudo command groups affected by Sudo Rule. */ -func (c *Client) SudocmdAdd( - reqArgs *SudocmdAddArgs, - optArgs *SudocmdAddOptionalArgs, // can be nil -) (*SudocmdAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := sudocmdAddKwParams{ - SudocmdAddArgs: reqArgs, - SudocmdAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "sudocmd_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res sudocmdAddResponse +func (c *Client) SudoruleRemoveAllowCommand( + reqArgs *SudoruleRemoveAllowCommandArgs, + optArgs *SudoruleRemoveAllowCommandOptionalArgs, // can be nil +) (*SudoruleRemoveAllowCommandResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := sudoruleRemoveAllowCommandKwParams{ + SudoruleRemoveAllowCommandArgs: reqArgs, + SudoruleRemoveAllowCommandOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "sudorule_remove_allow_command", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res sudoruleRemoveAllowCommandResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudocmdAddArgs struct { +type SudoruleRemoveAllowCommandArgs struct { + + /* +Rule name - /* - Sudo Command + */ + Cn string `json:"cn,omitempty"` + } - */ - Sudocmd string `json:"sudocmd,omitempty"` -} +type SudoruleRemoveAllowCommandOptionalArgs struct { + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member sudo command +sudo commands to remove + */ + Sudocmd *[]string `json:"sudocmd,omitempty"` + + /* +member sudo command group +sudo command groups to remove + */ + Sudocmdgroup *[]string `json:"sudocmdgroup,omitempty"` + } -type SudocmdAddOptionalArgs struct { +type sudoruleRemoveAllowCommandKwParams struct { + *SudoruleRemoveAllowCommandArgs + *SudoruleRemoveAllowCommandOptionalArgs - /* - Description - A description of this command - */ - Description *string `json:"description,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* +type sudoruleRemoveAllowCommandResponse struct { + Error *Error `json:"error"` + Result *SudoruleRemoveAllowCommandResult `json:"result"` +} - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` +type SudoruleRemoveAllowCommandResult struct { + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } - /* +func (t *SudoruleRemoveAllowCommandResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SudoruleRemoveAllowCommandResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SudoruleRemoveAllowCommandResult%v", string(b)) +} - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` +/* +Remove commands and sudo command groups affected by Sudo Rule. +*/ +func (c *Client) SudoruleRemoveDenyCommand( + reqArgs *SudoruleRemoveDenyCommandArgs, + optArgs *SudoruleRemoveDenyCommandOptionalArgs, // can be nil +) (*SudoruleRemoveDenyCommandResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := sudoruleRemoveDenyCommandKwParams{ + SudoruleRemoveDenyCommandArgs: reqArgs, + SudoruleRemoveDenyCommandOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "sudorule_remove_deny_command", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res sudoruleRemoveDenyCommandResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - /* +type SudoruleRemoveDenyCommandArgs struct { + + /* +Rule name - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` + */ + Cn string `json:"cn,omitempty"` + } - /* +type SudoruleRemoveDenyCommandOptionalArgs struct { + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member sudo command +sudo commands to remove + */ + Sudocmd *[]string `json:"sudocmd,omitempty"` + + /* +member sudo command group +sudo command groups to remove + */ + Sudocmdgroup *[]string `json:"sudocmdgroup,omitempty"` + } - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` +type sudoruleRemoveDenyCommandKwParams struct { + *SudoruleRemoveDenyCommandArgs + *SudoruleRemoveDenyCommandOptionalArgs - /* + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` +type sudoruleRemoveDenyCommandResponse struct { + Error *Error `json:"error"` + Result *SudoruleRemoveDenyCommandResult `json:"result"` } -type sudocmdAddKwParams struct { - *SudocmdAddArgs - *SudocmdAddOptionalArgs +type SudoruleRemoveDenyCommandResult struct { + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` +func (t *SudoruleRemoveDenyCommandResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SudoruleRemoveDenyCommandResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SudoruleRemoveDenyCommandResult%v", string(b)) } -type sudocmdAddResponse struct { - Error *Error `json:"error"` - Result *SudocmdAddResult `json:"result"` +/* +Remove hosts and hostgroups affected by Sudo Rule. +*/ +func (c *Client) SudoruleRemoveHost( + reqArgs *SudoruleRemoveHostArgs, + optArgs *SudoruleRemoveHostOptionalArgs, // can be nil +) (*SudoruleRemoveHostResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := sudoruleRemoveHostKwParams{ + SudoruleRemoveHostArgs: reqArgs, + SudoruleRemoveHostOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "sudorule_remove_host", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res sudoruleRemoveHostResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudocmdAddResult struct { +type SudoruleRemoveHostArgs struct { + + /* +Rule name - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` + */ + Cn string `json:"cn,omitempty"` + } + +type SudoruleRemoveHostOptionalArgs struct { + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member host +hosts to remove + */ + Host *[]string `json:"host,omitempty"` + + /* +member host group +host groups to remove + */ + Hostgroup *[]string `json:"hostgroup,omitempty"` + + /* +host masks of allowed hosts + + */ + Hostmask *[]string `json:"hostmask,omitempty"` + } - /* +type sudoruleRemoveHostKwParams struct { + *SudoruleRemoveHostArgs + *SudoruleRemoveHostOptionalArgs - (required) - */ - Result Sudocmd `json:"result,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` +type sudoruleRemoveHostResponse struct { + Error *Error `json:"error"` + Result *SudoruleRemoveHostResult `json:"result"` } -func (t *SudocmdAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SudocmdAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SudocmdAddResult%v", string(b)) +type SudoruleRemoveHostResult struct { + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } + +func (t *SudoruleRemoveHostResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SudoruleRemoveHostResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SudoruleRemoveHostResult%v", string(b)) } /* -Delete Sudo Command. +Remove an option from Sudo Rule. */ -func (c *Client) SudocmdDel( - reqArgs *SudocmdDelArgs, - optArgs *SudocmdDelOptionalArgs, // can be nil -) (*SudocmdDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := sudocmdDelKwParams{ - SudocmdDelArgs: reqArgs, - SudocmdDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "sudocmd_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res sudocmdDelResponse +func (c *Client) SudoruleRemoveOption( + reqArgs *SudoruleRemoveOptionArgs, + optArgs *SudoruleRemoveOptionOptionalArgs, // can be nil +) (*SudoruleRemoveOptionResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := sudoruleRemoveOptionKwParams{ + SudoruleRemoveOptionArgs: reqArgs, + SudoruleRemoveOptionOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "sudorule_remove_option", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res sudoruleRemoveOptionResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudocmdDelArgs struct { - - /* - Sudo Command - - */ - Sudocmd []string `json:"sudocmd,omitempty"` -} +type SudoruleRemoveOptionArgs struct { + + /* +Rule name -type SudocmdDelOptionalArgs struct { + */ + Cn string `json:"cn,omitempty"` + + /* +Sudo Option - /* + */ + Ipasudoopt string `json:"ipasudoopt,omitempty"` + } - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` -} +type SudoruleRemoveOptionOptionalArgs struct { + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } -type sudocmdDelKwParams struct { - *SudocmdDelArgs - *SudocmdDelOptionalArgs +type sudoruleRemoveOptionKwParams struct { + *SudoruleRemoveOptionArgs + *SudoruleRemoveOptionOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } -type sudocmdDelResponse struct { - Error *Error `json:"error"` - Result *SudocmdDelResult `json:"result"` +type sudoruleRemoveOptionResponse struct { + Error *Error `json:"error"` + Result *SudoruleRemoveOptionResult `json:"result"` } -type SudocmdDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} +type SudoruleRemoveOptionResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } -func (t *SudocmdDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SudocmdDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SudocmdDelResult%v", string(b)) +func (t *SudoruleRemoveOptionResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SudoruleRemoveOptionResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SudoruleRemoveOptionResult%v", string(b)) } /* -Search for Sudo Commands. +Remove group for Sudo to execute as. */ -func (c *Client) SudocmdFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *SudocmdFindArgs, - optArgs *SudocmdFindOptionalArgs, // can be nil -) (*SudocmdFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := sudocmdFindKwParams{ - SudocmdFindArgs: reqArgs, - SudocmdFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "sudocmd_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res sudocmdFindResponse +func (c *Client) SudoruleRemoveRunasgroup( + reqArgs *SudoruleRemoveRunasgroupArgs, + optArgs *SudoruleRemoveRunasgroupOptionalArgs, // can be nil +) (*SudoruleRemoveRunasgroupResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := sudoruleRemoveRunasgroupKwParams{ + SudoruleRemoveRunasgroupArgs: reqArgs, + SudoruleRemoveRunasgroupOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "sudorule_remove_runasgroup", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res sudoruleRemoveRunasgroupResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudocmdFindArgs struct { -} +type SudoruleRemoveRunasgroupArgs struct { + + /* +Rule name -type SudocmdFindOptionalArgs struct { + */ + Cn string `json:"cn,omitempty"` + } + +type SudoruleRemoveRunasgroupOptionalArgs struct { + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member group +groups to remove + */ + Group *[]string `json:"group,omitempty"` + } - /* - Sudo Command +type sudoruleRemoveRunasgroupKwParams struct { + *SudoruleRemoveRunasgroupArgs + *SudoruleRemoveRunasgroupOptionalArgs - */ - Sudocmd *string `json:"sudocmd,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - Description - A description of this command - */ - Description *string `json:"description,omitempty"` +type sudoruleRemoveRunasgroupResponse struct { + Error *Error `json:"error"` + Result *SudoruleRemoveRunasgroupResult `json:"result"` +} - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` +type SudoruleRemoveRunasgroupResult struct { + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` +func (t *SudoruleRemoveRunasgroupResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SudoruleRemoveRunasgroupResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SudoruleRemoveRunasgroupResult%v", string(b)) +} - /* +/* +Remove users and groups for Sudo to execute as. +*/ +func (c *Client) SudoruleRemoveRunasuser( + reqArgs *SudoruleRemoveRunasuserArgs, + optArgs *SudoruleRemoveRunasuserOptionalArgs, // can be nil +) (*SudoruleRemoveRunasuserResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := sudoruleRemoveRunasuserKwParams{ + SudoruleRemoveRunasuserArgs: reqArgs, + SudoruleRemoveRunasuserOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "sudorule_remove_runasuser", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res sudoruleRemoveRunasuserResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` +type SudoruleRemoveRunasuserArgs struct { + + /* +Rule name - /* + */ + Cn string `json:"cn,omitempty"` + } - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` +type SudoruleRemoveRunasuserOptionalArgs struct { + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member user +users to remove + */ + User *[]string `json:"user,omitempty"` + + /* +member group +groups to remove + */ + Group *[]string `json:"group,omitempty"` + } - /* +type sudoruleRemoveRunasuserKwParams struct { + *SudoruleRemoveRunasuserArgs + *SudoruleRemoveRunasuserOptionalArgs - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - Primary key only - Results should contain primary key attribute only ("command") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` +type sudoruleRemoveRunasuserResponse struct { + Error *Error `json:"error"` + Result *SudoruleRemoveRunasuserResult `json:"result"` } -type sudocmdFindKwParams struct { - *SudocmdFindArgs - *SudocmdFindOptionalArgs +type SudoruleRemoveRunasuserResult struct { + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` +func (t *SudoruleRemoveRunasuserResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SudoruleRemoveRunasuserResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SudoruleRemoveRunasuserResult%v", string(b)) } -type sudocmdFindResponse struct { - Error *Error `json:"error"` - Result *SudocmdFindResult `json:"result"` +/* +Remove users and groups affected by Sudo Rule. +*/ +func (c *Client) SudoruleRemoveUser( + reqArgs *SudoruleRemoveUserArgs, + optArgs *SudoruleRemoveUserOptionalArgs, // can be nil +) (*SudoruleRemoveUserResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := sudoruleRemoveUserKwParams{ + SudoruleRemoveUserArgs: reqArgs, + SudoruleRemoveUserOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "sudorule_remove_user", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res sudoruleRemoveUserResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudocmdFindResult struct { +type SudoruleRemoveUserArgs struct { + + /* +Rule name - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` + */ + Cn string `json:"cn,omitempty"` + } - /* +type SudoruleRemoveUserOptionalArgs struct { + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member user +users to remove + */ + User *[]string `json:"user,omitempty"` + + /* +member group +groups to remove + */ + Group *[]string `json:"group,omitempty"` + } - (required) - */ - Result []Sudocmd `json:"result,omitempty"` +type sudoruleRemoveUserKwParams struct { + *SudoruleRemoveUserArgs + *SudoruleRemoveUserOptionalArgs - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` +type sudoruleRemoveUserResponse struct { + Error *Error `json:"error"` + Result *SudoruleRemoveUserResult `json:"result"` } -func (t *SudocmdFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SudocmdFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SudocmdFindResult%v", string(b)) +type SudoruleRemoveUserResult struct { + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } + +func (t *SudoruleRemoveUserResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SudoruleRemoveUserResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SudoruleRemoveUserResult%v", string(b)) } /* -Modify Sudo Command. +Display Sudo Rule. */ -func (c *Client) SudocmdMod( - reqArgs *SudocmdModArgs, - optArgs *SudocmdModOptionalArgs, // can be nil -) (*SudocmdModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := sudocmdModKwParams{ - SudocmdModArgs: reqArgs, - SudocmdModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "sudocmd_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res sudocmdModResponse +func (c *Client) SudoruleShow( + reqArgs *SudoruleShowArgs, + optArgs *SudoruleShowOptionalArgs, // can be nil +) (*SudoruleShowResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := sudoruleShowKwParams{ + SudoruleShowArgs: reqArgs, + SudoruleShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "sudorule_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res sudoruleShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudocmdModArgs struct { +type SudoruleShowArgs struct { + + /* +Rule name - /* - Sudo Command + */ + Cn string `json:"cn,omitempty"` + } - */ - Sudocmd string `json:"sudocmd,omitempty"` -} +type SudoruleShowOptionalArgs struct { + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } -type SudocmdModOptionalArgs struct { +type sudoruleShowKwParams struct { + *SudoruleShowArgs + *SudoruleShowOptionalArgs - /* - Description - A description of this command - */ - Description *string `json:"description,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` +type sudoruleShowResponse struct { + Error *Error `json:"error"` + Result *SudoruleShowResult `json:"result"` } -type sudocmdModKwParams struct { - *SudocmdModArgs - *SudocmdModOptionalArgs +type SudoruleShowResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Sudorule `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` +func (t *SudoruleShowResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("SudoruleShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("SudoruleShowResult%v", string(b)) } -type sudocmdModResponse struct { - Error *Error `json:"error"` - Result *SudocmdModResult `json:"result"` +/* +Search for help topics. +*/ +func (c *Client) TopicFind( + criteria string, // A string searched in all relevant object attributes + reqArgs *TopicFindArgs, + optArgs *TopicFindOptionalArgs, // can be nil +) (*TopicFindResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := topicFindKwParams{ + TopicFindArgs: reqArgs, + TopicFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "topic_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res topicFindResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudocmdModResult struct { +type TopicFindArgs struct { + } - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` +type TopicFindOptionalArgs struct { + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("name") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } - /* +type topicFindKwParams struct { + *TopicFindArgs + *TopicFindOptionalArgs - (required) - */ - Result Sudocmd `json:"result,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` +type topicFindResponse struct { + Error *Error `json:"error"` + Result *TopicFindResult `json:"result"` } -func (t *SudocmdModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SudocmdModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SudocmdModResult%v", string(b)) +type TopicFindResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Topic `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } + +func (t *TopicFindResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("TopicFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("TopicFindResult%v", string(b)) } /* -Display Sudo Command. +Display information about a help topic. */ -func (c *Client) SudocmdShow( - reqArgs *SudocmdShowArgs, - optArgs *SudocmdShowOptionalArgs, // can be nil -) (*SudocmdShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := sudocmdShowKwParams{ - SudocmdShowArgs: reqArgs, - SudocmdShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "sudocmd_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res sudocmdShowResponse +func (c *Client) TopicShow( + reqArgs *TopicShowArgs, + optArgs *TopicShowOptionalArgs, // can be nil +) (*TopicShowResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := topicShowKwParams{ + TopicShowArgs: reqArgs, + TopicShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "topic_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res topicShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type SudocmdShowArgs struct { - - /* - Sudo Command - - */ - Sudocmd string `json:"sudocmd,omitempty"` + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudocmdShowOptionalArgs struct { +type TopicShowArgs struct { + + /* +Full name - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` + */ + FullName string `json:"full_name,omitempty"` + } - /* +type TopicShowOptionalArgs struct { + + /* - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* - /* +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` +type topicShowKwParams struct { + *TopicShowArgs + *TopicShowOptionalArgs - /* + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` +type topicShowResponse struct { + Error *Error `json:"error"` + Result *TopicShowResult `json:"result"` } -type sudocmdShowKwParams struct { - *SudocmdShowArgs - *SudocmdShowOptionalArgs +type TopicShowResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Topic `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` +func (t *TopicShowResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("TopicShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("TopicShowResult%v", string(b)) } -type sudocmdShowResponse struct { - Error *Error `json:"error"` - Result *SudocmdShowResult `json:"result"` +/* +Add a new segment. +*/ +func (c *Client) TopologysegmentAdd( + reqArgs *TopologysegmentAddArgs, + optArgs *TopologysegmentAddOptionalArgs, // can be nil +) (*TopologysegmentAddResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := topologysegmentAddKwParams{ + TopologysegmentAddArgs: reqArgs, + TopologysegmentAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "topologysegment_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res topologysegmentAddResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudocmdShowResult struct { +type TopologysegmentAddArgs struct { + + /* +Suffix name + + */ + Topologysuffixcn string `json:"topologysuffixcn,omitempty"` + + /* +Left node +Left replication node - an IPA server + */ + Iparepltoposegmentleftnode string `json:"iparepltoposegmentleftnode,omitempty"` + + /* +Right node +Right replication node - an IPA server + */ + Iparepltoposegmentrightnode string `json:"iparepltoposegmentrightnode,omitempty"` + } - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` +type TopologysegmentAddOptionalArgs struct { + + /* +Segment name +Arbitrary string identifying the segment + */ + Cn *string `json:"cn,omitempty"` + + /* +Connectivity +Direction of replication between left and right replication node + */ + Iparepltoposegmentdirection *string `json:"iparepltoposegmentdirection,omitempty"` + + /* +Attributes to strip +A space separated list of attributes which are removed from replication updates. + */ + Nsds5replicastripattrs *string `json:"nsds5replicastripattrs,omitempty"` + + /* +Attributes to replicate +Attributes that are not replicated to a consumer server during a fractional update. E.g., `(objectclass=*) $ EXCLUDE accountlockout memberof + */ + Nsds5replicatedattributelist *string `json:"nsds5replicatedattributelist,omitempty"` + + /* +Attributes for total update +Attributes that are not replicated to a consumer server during a total update. E.g. (objectclass=*) $ EXCLUDE accountlockout + */ + Nsds5replicatedattributelisttotal *string `json:"nsds5replicatedattributelisttotal,omitempty"` + + /* +Session timeout +Number of seconds outbound LDAP operations waits for a response from the remote replica before timing out and failing + */ + Nsds5replicatimeout *int `json:"nsds5replicatimeout,omitempty"` + + /* +Replication agreement enabled +Whether a replication agreement is active, meaning whether replication is occurring per that agreement + */ + Nsds5replicaenabled *string `json:"nsds5replicaenabled,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } - /* +type topologysegmentAddKwParams struct { + *TopologysegmentAddArgs + *TopologysegmentAddOptionalArgs - (required) - */ - Result Sudocmd `json:"result,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` +type topologysegmentAddResponse struct { + Error *Error `json:"error"` + Result *TopologysegmentAddResult `json:"result"` } -func (t *SudocmdShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SudocmdShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SudocmdShowResult%v", string(b)) +type TopologysegmentAddResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Topologysegment `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } + +func (t *TopologysegmentAddResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("TopologysegmentAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("TopologysegmentAddResult%v", string(b)) } /* -Create new Sudo Command Group. +Delete a segment. */ -func (c *Client) SudocmdgroupAdd( - reqArgs *SudocmdgroupAddArgs, - optArgs *SudocmdgroupAddOptionalArgs, // can be nil -) (*SudocmdgroupAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := sudocmdgroupAddKwParams{ - SudocmdgroupAddArgs: reqArgs, - SudocmdgroupAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "sudocmdgroup_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res sudocmdgroupAddResponse +func (c *Client) TopologysegmentDel( + reqArgs *TopologysegmentDelArgs, + optArgs *TopologysegmentDelOptionalArgs, // can be nil +) (*TopologysegmentDelResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := topologysegmentDelKwParams{ + TopologysegmentDelArgs: reqArgs, + TopologysegmentDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "topologysegment_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res topologysegmentDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudocmdgroupAddArgs struct { +type TopologysegmentDelArgs struct { + + /* +Suffix name - /* - Sudo Command Group + */ + Topologysuffixcn string `json:"topologysuffixcn,omitempty"` + } - */ - Cn string `json:"cn,omitempty"` -} +type TopologysegmentDelOptionalArgs struct { + + /* +Segment name +Arbitrary string identifying the segment + */ + Cn *[]string `json:"cn,omitempty"` + + /* + +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } -type SudocmdgroupAddOptionalArgs struct { +type topologysegmentDelKwParams struct { + *TopologysegmentDelArgs + *TopologysegmentDelOptionalArgs - /* - Description - Group description - */ - Description *string `json:"description,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* +type topologysegmentDelResponse struct { + Error *Error `json:"error"` + Result *TopologysegmentDelResult `json:"result"` +} - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` +type TopologysegmentDelResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } - /* +func (t *TopologysegmentDelResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("TopologysegmentDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("TopologysegmentDelResult%v", string(b)) +} - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` +/* +Search for topology segments. +*/ +func (c *Client) TopologysegmentFind( + criteria string, // A string searched in all relevant object attributes + reqArgs *TopologysegmentFindArgs, + optArgs *TopologysegmentFindOptionalArgs, // can be nil +) (*TopologysegmentFindResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := topologysegmentFindKwParams{ + TopologysegmentFindArgs: reqArgs, + TopologysegmentFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "topologysegment_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res topologysegmentFindResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - /* +type TopologysegmentFindArgs struct { + + /* +Suffix name - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` + */ + Topologysuffixcn string `json:"topologysuffixcn,omitempty"` + } - /* +type TopologysegmentFindOptionalArgs struct { + + /* +Segment name +Arbitrary string identifying the segment + */ + Cn *string `json:"cn,omitempty"` + + /* +Left node +Left replication node - an IPA server + */ + Iparepltoposegmentleftnode *string `json:"iparepltoposegmentleftnode,omitempty"` + + /* +Right node +Right replication node - an IPA server + */ + Iparepltoposegmentrightnode *string `json:"iparepltoposegmentrightnode,omitempty"` + + /* +Connectivity +Direction of replication between left and right replication node + */ + Iparepltoposegmentdirection *string `json:"iparepltoposegmentdirection,omitempty"` + + /* +Attributes to strip +A space separated list of attributes which are removed from replication updates. + */ + Nsds5replicastripattrs *string `json:"nsds5replicastripattrs,omitempty"` + + /* +Attributes to replicate +Attributes that are not replicated to a consumer server during a fractional update. E.g., `(objectclass=*) $ EXCLUDE accountlockout memberof + */ + Nsds5replicatedattributelist *string `json:"nsds5replicatedattributelist,omitempty"` + + /* +Attributes for total update +Attributes that are not replicated to a consumer server during a total update. E.g. (objectclass=*) $ EXCLUDE accountlockout + */ + Nsds5replicatedattributelisttotal *string `json:"nsds5replicatedattributelisttotal,omitempty"` + + /* +Session timeout +Number of seconds outbound LDAP operations waits for a response from the remote replica before timing out and failing + */ + Nsds5replicatimeout *int `json:"nsds5replicatimeout,omitempty"` + + /* +Replication agreement enabled +Whether a replication agreement is active, meaning whether replication is occurring per that agreement + */ + Nsds5replicaenabled *string `json:"nsds5replicaenabled,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("name") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` +type topologysegmentFindKwParams struct { + *TopologysegmentFindArgs + *TopologysegmentFindOptionalArgs - /* + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` +type topologysegmentFindResponse struct { + Error *Error `json:"error"` + Result *TopologysegmentFindResult `json:"result"` } -type sudocmdgroupAddKwParams struct { - *SudocmdgroupAddArgs - *SudocmdgroupAddOptionalArgs +type TopologysegmentFindResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Topologysegment `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` +func (t *TopologysegmentFindResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("TopologysegmentFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("TopologysegmentFindResult%v", string(b)) } -type sudocmdgroupAddResponse struct { - Error *Error `json:"error"` - Result *SudocmdgroupAddResult `json:"result"` +/* +Modify a segment. +*/ +func (c *Client) TopologysegmentMod( + reqArgs *TopologysegmentModArgs, + optArgs *TopologysegmentModOptionalArgs, // can be nil +) (*TopologysegmentModResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := topologysegmentModKwParams{ + TopologysegmentModArgs: reqArgs, + TopologysegmentModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "topologysegment_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res topologysegmentModResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudocmdgroupAddResult struct { +type TopologysegmentModArgs struct { + + /* +Suffix name - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` + */ + Topologysuffixcn string `json:"topologysuffixcn,omitempty"` + } - /* +type TopologysegmentModOptionalArgs struct { + + /* +Segment name +Arbitrary string identifying the segment + */ + Cn *string `json:"cn,omitempty"` + + /* +Attributes to strip +A space separated list of attributes which are removed from replication updates. + */ + Nsds5replicastripattrs *string `json:"nsds5replicastripattrs,omitempty"` + + /* +Attributes to replicate +Attributes that are not replicated to a consumer server during a fractional update. E.g., `(objectclass=*) $ EXCLUDE accountlockout memberof + */ + Nsds5replicatedattributelist *string `json:"nsds5replicatedattributelist,omitempty"` + + /* +Attributes for total update +Attributes that are not replicated to a consumer server during a total update. E.g. (objectclass=*) $ EXCLUDE accountlockout + */ + Nsds5replicatedattributelisttotal *string `json:"nsds5replicatedattributelisttotal,omitempty"` + + /* +Session timeout +Number of seconds outbound LDAP operations waits for a response from the remote replica before timing out and failing + */ + Nsds5replicatimeout *int `json:"nsds5replicatimeout,omitempty"` + + /* +Replication agreement enabled +Whether a replication agreement is active, meaning whether replication is occurring per that agreement + */ + Nsds5replicaenabled *string `json:"nsds5replicaenabled,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } - (required) - */ - Result Sudocmdgroup `json:"result,omitempty"` +type topologysegmentModKwParams struct { + *TopologysegmentModArgs + *TopologysegmentModOptionalArgs - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } -func (t *SudocmdgroupAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SudocmdgroupAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SudocmdgroupAddResult%v", string(b)) +type topologysegmentModResponse struct { + Error *Error `json:"error"` + Result *TopologysegmentModResult `json:"result"` +} + +type TopologysegmentModResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Topologysegment `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } + +func (t *TopologysegmentModResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("TopologysegmentModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("TopologysegmentModResult%v", string(b)) } /* -Add members to Sudo Command Group. +Request a full re-initialization of the node retrieving data from the other node. */ -func (c *Client) SudocmdgroupAddMember( - reqArgs *SudocmdgroupAddMemberArgs, - optArgs *SudocmdgroupAddMemberOptionalArgs, // can be nil -) (*SudocmdgroupAddMemberResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := sudocmdgroupAddMemberKwParams{ - SudocmdgroupAddMemberArgs: reqArgs, - SudocmdgroupAddMemberOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "sudocmdgroup_add_member", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res sudocmdgroupAddMemberResponse +func (c *Client) TopologysegmentReinitialize( + reqArgs *TopologysegmentReinitializeArgs, + optArgs *TopologysegmentReinitializeOptionalArgs, // can be nil +) (*TopologysegmentReinitializeResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := topologysegmentReinitializeKwParams{ + TopologysegmentReinitializeArgs: reqArgs, + TopologysegmentReinitializeOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "topologysegment_reinitialize", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res topologysegmentReinitializeResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type SudocmdgroupAddMemberArgs struct { - - /* - Sudo Command Group - - */ - Cn string `json:"cn,omitempty"` + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudocmdgroupAddMemberOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` +type TopologysegmentReinitializeArgs struct { + + /* +Suffix name - /* + */ + Topologysuffixcn string `json:"topologysuffixcn,omitempty"` + } - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` +type TopologysegmentReinitializeOptionalArgs struct { + + /* +Segment name +Arbitrary string identifying the segment + */ + Cn *string `json:"cn,omitempty"` + + /* + +Initialize left node + */ + Left *bool `json:"left,omitempty"` + + /* + +Initialize right node + */ + Right *bool `json:"right,omitempty"` + + /* + +Stop already started refresh of chosen node(s) + */ + Stop *bool `json:"stop,omitempty"` + } - /* +type topologysegmentReinitializeKwParams struct { + *TopologysegmentReinitializeArgs + *TopologysegmentReinitializeOptionalArgs - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - member sudo command - sudo commands to add - */ - Sudocmd *[]string `json:"sudocmd,omitempty"` +type topologysegmentReinitializeResponse struct { + Error *Error `json:"error"` + Result *TopologysegmentReinitializeResult `json:"result"` } -type sudocmdgroupAddMemberKwParams struct { - *SudocmdgroupAddMemberArgs - *SudocmdgroupAddMemberOptionalArgs +type TopologysegmentReinitializeResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` +func (t *TopologysegmentReinitializeResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("TopologysegmentReinitializeResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("TopologysegmentReinitializeResult%v", string(b)) } -type sudocmdgroupAddMemberResponse struct { - Error *Error `json:"error"` - Result *SudocmdgroupAddMemberResult `json:"result"` +/* +Display a segment. +*/ +func (c *Client) TopologysegmentShow( + reqArgs *TopologysegmentShowArgs, + optArgs *TopologysegmentShowOptionalArgs, // can be nil +) (*TopologysegmentShowResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := topologysegmentShowKwParams{ + TopologysegmentShowArgs: reqArgs, + TopologysegmentShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "topologysegment_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res topologysegmentShowResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudocmdgroupAddMemberResult struct { +type TopologysegmentShowArgs struct { + + /* +Suffix name - /* + */ + Topologysuffixcn string `json:"topologysuffixcn,omitempty"` + } - (required) - */ - Result interface{} `json:"result,omitempty"` +type TopologysegmentShowOptionalArgs struct { + + /* +Segment name +Arbitrary string identifying the segment + */ + Cn *string `json:"cn,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` +type topologysegmentShowKwParams struct { + *TopologysegmentShowArgs + *TopologysegmentShowOptionalArgs - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } -func (t *SudocmdgroupAddMemberResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SudocmdgroupAddMemberResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SudocmdgroupAddMemberResult%v", string(b)) +type topologysegmentShowResponse struct { + Error *Error `json:"error"` + Result *TopologysegmentShowResult `json:"result"` +} + +type TopologysegmentShowResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Topologysegment `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } + +func (t *TopologysegmentShowResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("TopologysegmentShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("TopologysegmentShowResult%v", string(b)) } /* -Delete Sudo Command Group. +Add a new topology suffix to be managed. */ -func (c *Client) SudocmdgroupDel( - reqArgs *SudocmdgroupDelArgs, - optArgs *SudocmdgroupDelOptionalArgs, // can be nil -) (*SudocmdgroupDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := sudocmdgroupDelKwParams{ - SudocmdgroupDelArgs: reqArgs, - SudocmdgroupDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "sudocmdgroup_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res sudocmdgroupDelResponse +func (c *Client) TopologysuffixAdd( + reqArgs *TopologysuffixAddArgs, + optArgs *TopologysuffixAddOptionalArgs, // can be nil +) (*TopologysuffixAddResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := topologysuffixAddKwParams{ + TopologysuffixAddArgs: reqArgs, + TopologysuffixAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "topologysuffix_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res topologysuffixAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudocmdgroupDelArgs struct { - - /* - Sudo Command Group - - */ - Cn []string `json:"cn,omitempty"` -} +type TopologysuffixAddArgs struct { + + /* +Suffix name -type SudocmdgroupDelOptionalArgs struct { + */ + Cn string `json:"cn,omitempty"` + + /* +Managed LDAP suffix DN - /* + */ + Iparepltopoconfroot string `json:"iparepltopoconfroot,omitempty"` + } - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` -} +type TopologysuffixAddOptionalArgs struct { + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } -type sudocmdgroupDelKwParams struct { - *SudocmdgroupDelArgs - *SudocmdgroupDelOptionalArgs +type topologysuffixAddKwParams struct { + *TopologysuffixAddArgs + *TopologysuffixAddOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } -type sudocmdgroupDelResponse struct { - Error *Error `json:"error"` - Result *SudocmdgroupDelResult `json:"result"` +type topologysuffixAddResponse struct { + Error *Error `json:"error"` + Result *TopologysuffixAddResult `json:"result"` } -type SudocmdgroupDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} +type TopologysuffixAddResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Topologysuffix `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } -func (t *SudocmdgroupDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SudocmdgroupDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SudocmdgroupDelResult%v", string(b)) +func (t *TopologysuffixAddResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("TopologysuffixAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("TopologysuffixAddResult%v", string(b)) } /* -Search for Sudo Command Groups. +Delete a topology suffix. */ -func (c *Client) SudocmdgroupFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *SudocmdgroupFindArgs, - optArgs *SudocmdgroupFindOptionalArgs, // can be nil -) (*SudocmdgroupFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := sudocmdgroupFindKwParams{ - SudocmdgroupFindArgs: reqArgs, - SudocmdgroupFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "sudocmdgroup_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res sudocmdgroupFindResponse +func (c *Client) TopologysuffixDel( + reqArgs *TopologysuffixDelArgs, + optArgs *TopologysuffixDelOptionalArgs, // can be nil +) (*TopologysuffixDelResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := topologysuffixDelKwParams{ + TopologysuffixDelArgs: reqArgs, + TopologysuffixDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "topologysuffix_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res topologysuffixDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudocmdgroupFindArgs struct { -} +type TopologysuffixDelArgs struct { + + /* +Suffix name -type SudocmdgroupFindOptionalArgs struct { + */ + Cn []string `json:"cn,omitempty"` + } - /* - Sudo Command Group +type TopologysuffixDelOptionalArgs struct { + + /* + +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } - */ - Cn *string `json:"cn,omitempty"` +type topologysuffixDelKwParams struct { + *TopologysuffixDelArgs + *TopologysuffixDelOptionalArgs - /* - Description - Group description - */ - Description *string `json:"description,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` +type topologysuffixDelResponse struct { + Error *Error `json:"error"` + Result *TopologysuffixDelResult `json:"result"` +} - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` +type TopologysuffixDelResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } - /* +func (t *TopologysuffixDelResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("TopologysuffixDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("TopologysuffixDelResult%v", string(b)) +} - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` +/* +Search for topology suffixes. +*/ +func (c *Client) TopologysuffixFind( + criteria string, // A string searched in all relevant object attributes + reqArgs *TopologysuffixFindArgs, + optArgs *TopologysuffixFindOptionalArgs, // can be nil +) (*TopologysuffixFindResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := topologysuffixFindKwParams{ + TopologysuffixFindArgs: reqArgs, + TopologysuffixFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "topologysuffix_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res topologysuffixFindResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - /* +type TopologysuffixFindArgs struct { + } - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` +type TopologysuffixFindOptionalArgs struct { + + /* +Suffix name + + */ + Cn *string `json:"cn,omitempty"` + + /* +Managed LDAP suffix DN + + */ + Iparepltopoconfroot *string `json:"iparepltopoconfroot,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("name") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } - /* +type topologysuffixFindKwParams struct { + *TopologysuffixFindArgs + *TopologysuffixFindOptionalArgs - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - Primary key only - Results should contain primary key attribute only ("sudocmdgroup-name") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` +type topologysuffixFindResponse struct { + Error *Error `json:"error"` + Result *TopologysuffixFindResult `json:"result"` } -type sudocmdgroupFindKwParams struct { - *SudocmdgroupFindArgs - *SudocmdgroupFindOptionalArgs +type TopologysuffixFindResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Topologysuffix `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` +func (t *TopologysuffixFindResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("TopologysuffixFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("TopologysuffixFindResult%v", string(b)) } -type sudocmdgroupFindResponse struct { - Error *Error `json:"error"` - Result *SudocmdgroupFindResult `json:"result"` +/* +Modify a topology suffix. +*/ +func (c *Client) TopologysuffixMod( + reqArgs *TopologysuffixModArgs, + optArgs *TopologysuffixModOptionalArgs, // can be nil +) (*TopologysuffixModResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := topologysuffixModKwParams{ + TopologysuffixModArgs: reqArgs, + TopologysuffixModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "topologysuffix_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res topologysuffixModResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudocmdgroupFindResult struct { +type TopologysuffixModArgs struct { + + /* +Suffix name - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` + */ + Cn string `json:"cn,omitempty"` + } - /* +type TopologysuffixModOptionalArgs struct { + + /* +Managed LDAP suffix DN + + */ + Iparepltopoconfroot *string `json:"iparepltopoconfroot,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } - (required) - */ - Result []Sudocmdgroup `json:"result,omitempty"` +type topologysuffixModKwParams struct { + *TopologysuffixModArgs + *TopologysuffixModOptionalArgs - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` +type topologysuffixModResponse struct { + Error *Error `json:"error"` + Result *TopologysuffixModResult `json:"result"` } -func (t *SudocmdgroupFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SudocmdgroupFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SudocmdgroupFindResult%v", string(b)) +type TopologysuffixModResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Topologysuffix `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } + +func (t *TopologysuffixModResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("TopologysuffixModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("TopologysuffixModResult%v", string(b)) } /* -Modify Sudo Command Group. +Show managed suffix. */ -func (c *Client) SudocmdgroupMod( - reqArgs *SudocmdgroupModArgs, - optArgs *SudocmdgroupModOptionalArgs, // can be nil -) (*SudocmdgroupModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := sudocmdgroupModKwParams{ - SudocmdgroupModArgs: reqArgs, - SudocmdgroupModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "sudocmdgroup_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res sudocmdgroupModResponse +func (c *Client) TopologysuffixShow( + reqArgs *TopologysuffixShowArgs, + optArgs *TopologysuffixShowOptionalArgs, // can be nil +) (*TopologysuffixShowResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := topologysuffixShowKwParams{ + TopologysuffixShowArgs: reqArgs, + TopologysuffixShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "topologysuffix_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res topologysuffixShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudocmdgroupModArgs struct { - - /* - Sudo Command Group - - */ - Cn string `json:"cn,omitempty"` -} - -type SudocmdgroupModOptionalArgs struct { +type TopologysuffixShowArgs struct { + + /* +Suffix name - /* - Description - Group description - */ - Description *string `json:"description,omitempty"` + */ + Cn string `json:"cn,omitempty"` + } - /* +type TopologysuffixShowOptionalArgs struct { + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` +type topologysuffixShowKwParams struct { + *TopologysuffixShowArgs + *TopologysuffixShowOptionalArgs - /* + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` +type topologysuffixShowResponse struct { + Error *Error `json:"error"` + Result *TopologysuffixShowResult `json:"result"` +} - /* +type TopologysuffixShowResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Topologysuffix `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` +func (t *TopologysuffixShowResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("TopologysuffixShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("TopologysuffixShowResult%v", string(b)) +} - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` +/* +Verify replication topology for suffix. - /* +Checks done: + 1. check if a topology is not disconnected. In other words if there are + replication paths between all servers. + 2. check if servers don't have more than the recommended number of + replication agreements +*/ +func (c *Client) TopologysuffixVerify( + reqArgs *TopologysuffixVerifyArgs, + optArgs *TopologysuffixVerifyOptionalArgs, // can be nil +) (*TopologysuffixVerifyResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := topologysuffixVerifyKwParams{ + TopologysuffixVerifyArgs: reqArgs, + TopologysuffixVerifyOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "topologysuffix_verify", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res topologysuffixVerifyResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` +type TopologysuffixVerifyArgs struct { + + /* +Suffix name - /* + */ + Cn string `json:"cn,omitempty"` + } - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` +type TopologysuffixVerifyOptionalArgs struct { + } - /* +type topologysuffixVerifyKwParams struct { + *TopologysuffixVerifyArgs + *TopologysuffixVerifyOptionalArgs - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } -type sudocmdgroupModKwParams struct { - *SudocmdgroupModArgs - *SudocmdgroupModOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` +type topologysuffixVerifyResponse struct { + Error *Error `json:"error"` + Result *TopologysuffixVerifyResult `json:"result"` } -type sudocmdgroupModResponse struct { - Error *Error `json:"error"` - Result *SudocmdgroupModResult `json:"result"` -} +type TopologysuffixVerifyResult struct { + + + /* -type SudocmdgroupModResult struct { + (required) + */ + Result interface{} `json:"result,omitempty"` + } - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` +func (t *TopologysuffixVerifyResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("TopologysuffixVerifyResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("TopologysuffixVerifyResult%v", string(b)) +} - /* +/* +Add new trust to use. - (required) - */ - Result Sudocmdgroup `json:"result,omitempty"` +This command establishes trust relationship to another domain +which becomes 'trusted'. As result, users of the trusted domain +may access resources of this domain. - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} +Only trusts to Active Directory domains are supported right now. -func (t *SudocmdgroupModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SudocmdgroupModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SudocmdgroupModResult%v", string(b)) -} +The command can be safely run multiple times against the same domain, +this will cause change to trust relationship credentials on both +sides. -/* -Remove members from Sudo Command Group. +Note that if the command was previously run with a specific range type, +or with automatic detection of the range type, and you want to configure a +different range type, you may need to delete first the ID range using +ipa idrange-del before retrying the command with the desired range type. */ -func (c *Client) SudocmdgroupRemoveMember( - reqArgs *SudocmdgroupRemoveMemberArgs, - optArgs *SudocmdgroupRemoveMemberOptionalArgs, // can be nil -) (*SudocmdgroupRemoveMemberResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := sudocmdgroupRemoveMemberKwParams{ - SudocmdgroupRemoveMemberArgs: reqArgs, - SudocmdgroupRemoveMemberOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "sudocmdgroup_remove_member", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res sudocmdgroupRemoveMemberResponse +func (c *Client) TrustAdd( + reqArgs *TrustAddArgs, + optArgs *TrustAddOptionalArgs, // can be nil +) (*TrustAddResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := trustAddKwParams{ + TrustAddArgs: reqArgs, + TrustAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "trust_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res trustAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type SudocmdgroupRemoveMemberArgs struct { - - /* - Sudo Command Group - - */ - Cn string `json:"cn,omitempty"` + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudocmdgroupRemoveMemberOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` +type TrustAddArgs struct { + + /* +Realm name - /* + */ + Cn string `json:"cn,omitempty"` + } - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` +type TrustAddOptionalArgs struct { + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* +Trust type (ad for Active Directory, default) + + */ + TrustType *string `json:"trust_type,omitempty"` + + /* +Active Directory domain administrator + + */ + RealmAdmin *string `json:"realm_admin,omitempty"` + + /* +Active Directory domain administrator's password + + */ + RealmPasswd *string `json:"realm_passwd,omitempty"` + + /* +Domain controller for the Active Directory domain (optional) + + */ + RealmServer *string `json:"realm_server,omitempty"` + + /* +Shared secret for the trust + + */ + TrustSecret *string `json:"trust_secret,omitempty"` + + /* +First Posix ID of the range reserved for the trusted domain + + */ + BaseID *int `json:"base_id,omitempty"` + + /* +Size of the ID range reserved for the trusted domain + + */ + RangeSize *int `json:"range_size,omitempty"` + + /* +Range type +Type of trusted domain ID range, one of ipa-ad-trust, ipa-ad-trust-posix + */ + RangeType *string `json:"range_type,omitempty"` + + /* +Two-way trust +Establish bi-directional trust. By default trust is inbound one-way only. + */ + Bidirectional *bool `json:"bidirectional,omitempty"` + + /* +External trust +Establish external trust to a domain in another forest. The trust is not transitive beyond the domain. + */ + External *bool `json:"external,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } - /* +type trustAddKwParams struct { + *TrustAddArgs + *TrustAddOptionalArgs - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - member sudo command - sudo commands to remove - */ - Sudocmd *[]string `json:"sudocmd,omitempty"` +type trustAddResponse struct { + Error *Error `json:"error"` + Result *TrustAddResult `json:"result"` } -type sudocmdgroupRemoveMemberKwParams struct { - *SudocmdgroupRemoveMemberArgs - *SudocmdgroupRemoveMemberOptionalArgs +type TrustAddResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Trust `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` +func (t *TrustAddResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("TrustAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("TrustAddResult%v", string(b)) } -type sudocmdgroupRemoveMemberResponse struct { - Error *Error `json:"error"` - Result *SudocmdgroupRemoveMemberResult `json:"result"` +/* +Delete a trust. +*/ +func (c *Client) TrustDel( + reqArgs *TrustDelArgs, + optArgs *TrustDelOptionalArgs, // can be nil +) (*TrustDelResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := trustDelKwParams{ + TrustDelArgs: reqArgs, + TrustDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "trust_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res trustDelResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudocmdgroupRemoveMemberResult struct { +type TrustDelArgs struct { + + /* +Realm name - /* + */ + Cn []string `json:"cn,omitempty"` + } - (required) - */ - Result interface{} `json:"result,omitempty"` +type TrustDelOptionalArgs struct { + + /* + +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` +type trustDelKwParams struct { + *TrustDelArgs + *TrustDelOptionalArgs - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } -func (t *SudocmdgroupRemoveMemberResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SudocmdgroupRemoveMemberResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SudocmdgroupRemoveMemberResult%v", string(b)) +type trustDelResponse struct { + Error *Error `json:"error"` + Result *TrustDelResult `json:"result"` +} + +type TrustDelResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } + +func (t *TrustDelResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("TrustDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("TrustDelResult%v", string(b)) } /* -Display Sudo Command Group. +Refresh list of the domains associated with the trust */ -func (c *Client) SudocmdgroupShow( - reqArgs *SudocmdgroupShowArgs, - optArgs *SudocmdgroupShowOptionalArgs, // can be nil -) (*SudocmdgroupShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := sudocmdgroupShowKwParams{ - SudocmdgroupShowArgs: reqArgs, - SudocmdgroupShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "sudocmdgroup_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res sudocmdgroupShowResponse +func (c *Client) TrustFetchDomains( + reqArgs *TrustFetchDomainsArgs, + optArgs *TrustFetchDomainsOptionalArgs, // can be nil +) (*TrustFetchDomainsResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := trustFetchDomainsKwParams{ + TrustFetchDomainsArgs: reqArgs, + TrustFetchDomainsOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "trust_fetch_domains", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res trustFetchDomainsResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type SudocmdgroupShowArgs struct { - - /* - Sudo Command Group - - */ - Cn string `json:"cn,omitempty"` + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudocmdgroupShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* +type TrustFetchDomainsArgs struct { + + /* +Realm name - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` + */ + Cn string `json:"cn,omitempty"` + } - /* +type TrustFetchDomainsOptionalArgs struct { + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* +Active Directory domain administrator + + */ + RealmAdmin *string `json:"realm_admin,omitempty"` + + /* +Active Directory domain administrator's password + + */ + RealmPasswd *string `json:"realm_passwd,omitempty"` + + /* +Domain controller for the Active Directory domain (optional) + + */ + RealmServer *string `json:"realm_server,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` +type trustFetchDomainsKwParams struct { + *TrustFetchDomainsArgs + *TrustFetchDomainsOptionalArgs - /* + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` +type trustFetchDomainsResponse struct { + Error *Error `json:"error"` + Result *TrustFetchDomainsResult `json:"result"` } -type sudocmdgroupShowKwParams struct { - *SudocmdgroupShowArgs - *SudocmdgroupShowOptionalArgs +type TrustFetchDomainsResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []interface{} `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` +func (t *TrustFetchDomainsResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("TrustFetchDomainsResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("TrustFetchDomainsResult%v", string(b)) } -type sudocmdgroupShowResponse struct { - Error *Error `json:"error"` - Result *SudocmdgroupShowResult `json:"result"` +/* +Search for trusts. +*/ +func (c *Client) TrustFind( + criteria string, // A string searched in all relevant object attributes + reqArgs *TrustFindArgs, + optArgs *TrustFindOptionalArgs, // can be nil +) (*TrustFindResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := trustFindKwParams{ + TrustFindArgs: reqArgs, + TrustFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "trust_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res trustFindResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudocmdgroupShowResult struct { +type TrustFindArgs struct { + } - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` +type TrustFindOptionalArgs struct { + + /* +Realm name + + */ + Cn *string `json:"cn,omitempty"` + + /* +Domain NetBIOS name + + */ + Ipantflatname *string `json:"ipantflatname,omitempty"` + + /* +Domain Security Identifier + + */ + Ipanttrusteddomainsid *string `json:"ipanttrusteddomainsid,omitempty"` + + /* +SID blacklist incoming + + */ + Ipantsidblacklistincoming *[]string `json:"ipantsidblacklistincoming,omitempty"` + + /* +SID blacklist outgoing + + */ + Ipantsidblacklistoutgoing *[]string `json:"ipantsidblacklistoutgoing,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("realm") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } - /* +type trustFindKwParams struct { + *TrustFindArgs + *TrustFindOptionalArgs - (required) - */ - Result Sudocmdgroup `json:"result,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` +type trustFindResponse struct { + Error *Error `json:"error"` + Result *TrustFindResult `json:"result"` } -func (t *SudocmdgroupShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SudocmdgroupShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SudocmdgroupShowResult%v", string(b)) +type TrustFindResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Trust `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } + +func (t *TrustFindResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("TrustFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("TrustFindResult%v", string(b)) } /* -Create new Sudo Rule. +Modify a trust (for future use). + + Currently only the default option to modify the LDAP attributes is + available. More specific options will be added in coming releases. */ -func (c *Client) SudoruleAdd( - reqArgs *SudoruleAddArgs, - optArgs *SudoruleAddOptionalArgs, // can be nil -) (*SudoruleAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := sudoruleAddKwParams{ - SudoruleAddArgs: reqArgs, - SudoruleAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "sudorule_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res sudoruleAddResponse +func (c *Client) TrustMod( + reqArgs *TrustModArgs, + optArgs *TrustModOptionalArgs, // can be nil +) (*TrustModResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := trustModKwParams{ + TrustModArgs: reqArgs, + TrustModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "trust_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res trustModResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudoruleAddArgs struct { - - /* - Rule name +type TrustModArgs struct { + + /* +Realm name - */ - Cn string `json:"cn,omitempty"` -} + */ + Cn string `json:"cn,omitempty"` + } -type SudoruleAddOptionalArgs struct { +type TrustModOptionalArgs struct { + + /* +SID blacklist incoming + + */ + Ipantsidblacklistincoming *[]string `json:"ipantsidblacklistincoming,omitempty"` + + /* +SID blacklist outgoing + + */ + Ipantsidblacklistoutgoing *[]string `json:"ipantsidblacklistoutgoing,omitempty"` + + /* +UPN suffixes + + */ + Ipantadditionalsuffixes *[]string `json:"ipantadditionalsuffixes,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } - /* - Description - - */ - Description *string `json:"description,omitempty"` +type trustModKwParams struct { + *TrustModArgs + *TrustModOptionalArgs - /* - Enabled + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - */ - Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` +type trustModResponse struct { + Error *Error `json:"error"` + Result *TrustModResult `json:"result"` +} - /* - User category - User category the rule applies to - */ - Usercategory *string `json:"usercategory,omitempty"` +type TrustModResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Trust `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } - /* - Host category - Host category the rule applies to - */ - Hostcategory *string `json:"hostcategory,omitempty"` +func (t *TrustModResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("TrustModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("TrustModResult%v", string(b)) +} - /* - Command category - Command category the rule applies to - */ - Cmdcategory *string `json:"cmdcategory,omitempty"` +/* +Resolve security identifiers of users and groups in trusted domains +*/ +func (c *Client) TrustResolve( + reqArgs *TrustResolveArgs, + optArgs *TrustResolveOptionalArgs, // can be nil +) (*TrustResolveResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := trustResolveKwParams{ + TrustResolveArgs: reqArgs, + TrustResolveOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "trust_resolve", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res trustResolveResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - /* - RunAs User category - RunAs User category the rule applies to - */ - Ipasudorunasusercategory *string `json:"ipasudorunasusercategory,omitempty"` +type TrustResolveArgs struct { + + /* +Security Identifiers (SIDs) - /* - RunAs Group category - RunAs Group category the rule applies to - */ - Ipasudorunasgroupcategory *string `json:"ipasudorunasgroupcategory,omitempty"` + */ + Sids []string `json:"sids,omitempty"` + } - /* - Sudo order - integer to order the Sudo rules - */ - Sudoorder *int `json:"sudoorder,omitempty"` +type TrustResolveOptionalArgs struct { + + /* - /* - External User - External User the rule applies to (sudorule-find only) - */ - Externaluser *string `json:"externaluser,omitempty"` +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* - /* - External host +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } - */ - Externalhost *[]string `json:"externalhost,omitempty"` +type trustResolveKwParams struct { + *TrustResolveArgs + *TrustResolveOptionalArgs - /* - RunAs External User - External User the commands can run as (sudorule-find only) - */ - Ipasudorunasextuser *string `json:"ipasudorunasextuser,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - RunAs External Group - External Group the commands can run as (sudorule-find only) - */ - Ipasudorunasextgroup *string `json:"ipasudorunasextgroup,omitempty"` +type trustResolveResponse struct { + Error *Error `json:"error"` + Result *TrustResolveResult `json:"result"` +} - /* +type TrustResolveResult struct { + + + /* - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` + (required) + */ + Result []interface{} `json:"result,omitempty"` + } - /* +func (t *TrustResolveResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("TrustResolveResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("TrustResolveResult%v", string(b)) +} - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` +/* +Display information about a trust. +*/ +func (c *Client) TrustShow( + reqArgs *TrustShowArgs, + optArgs *TrustShowOptionalArgs, // can be nil +) (*TrustShowResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := trustShowKwParams{ + TrustShowArgs: reqArgs, + TrustShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "trust_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res trustShowResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - /* +type TrustShowArgs struct { + + /* +Realm name - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` + */ + Cn string `json:"cn,omitempty"` + } - /* +type TrustShowOptionalArgs struct { + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` +type trustShowKwParams struct { + *TrustShowArgs + *TrustShowOptionalArgs - /* + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` +type trustShowResponse struct { + Error *Error `json:"error"` + Result *TrustShowResult `json:"result"` } -type sudoruleAddKwParams struct { - *SudoruleAddArgs - *SudoruleAddOptionalArgs +type TrustShowResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Trust `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` +func (t *TrustShowResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("TrustShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("TrustShowResult%v", string(b)) } -type sudoruleAddResponse struct { - Error *Error `json:"error"` - Result *SudoruleAddResult `json:"result"` +/* +Modify global trust configuration. +*/ +func (c *Client) TrustconfigMod( + reqArgs *TrustconfigModArgs, + optArgs *TrustconfigModOptionalArgs, // can be nil +) (*TrustconfigModResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := trustconfigModKwParams{ + TrustconfigModArgs: reqArgs, + TrustconfigModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "trustconfig_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res trustconfigModResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudoruleAddResult struct { +type TrustconfigModArgs struct { + } - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` +type TrustconfigModOptionalArgs struct { + + /* +Fallback primary group + + */ + Ipantfallbackprimarygroup *string `json:"ipantfallbackprimarygroup,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* +Trust type (ad for Active Directory, default) + + */ + TrustType *string `json:"trust_type,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } - /* +type trustconfigModKwParams struct { + *TrustconfigModArgs + *TrustconfigModOptionalArgs - (required) - */ - Result Sudorule `json:"result,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` +type trustconfigModResponse struct { + Error *Error `json:"error"` + Result *TrustconfigModResult `json:"result"` } -func (t *SudoruleAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SudoruleAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SudoruleAddResult%v", string(b)) +type TrustconfigModResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Trustconfig `json:"result,omitempty"` + + /* + + (required) + */ + Value string `json:"value,omitempty"` + } + +func (t *TrustconfigModResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("TrustconfigModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("TrustconfigModResult%v", string(b)) } /* -Add commands and sudo command groups affected by Sudo Rule. +Show global trust configuration. */ -func (c *Client) SudoruleAddAllowCommand( - reqArgs *SudoruleAddAllowCommandArgs, - optArgs *SudoruleAddAllowCommandOptionalArgs, // can be nil -) (*SudoruleAddAllowCommandResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := sudoruleAddAllowCommandKwParams{ - SudoruleAddAllowCommandArgs: reqArgs, - SudoruleAddAllowCommandOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "sudorule_add_allow_command", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res sudoruleAddAllowCommandResponse +func (c *Client) TrustconfigShow( + reqArgs *TrustconfigShowArgs, + optArgs *TrustconfigShowOptionalArgs, // can be nil +) (*TrustconfigShowResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := trustconfigShowKwParams{ + TrustconfigShowArgs: reqArgs, + TrustconfigShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "trustconfig_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res trustconfigShowResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudoruleAddAllowCommandArgs struct { +type TrustconfigShowArgs struct { + } + +type TrustconfigShowOptionalArgs struct { + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* +Trust type (ad for Active Directory, default) + + */ + TrustType *string `json:"trust_type,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } - /* - Rule name +type trustconfigShowKwParams struct { + *TrustconfigShowArgs + *TrustconfigShowOptionalArgs - */ - Cn string `json:"cn,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } -type SudoruleAddAllowCommandOptionalArgs struct { - - /* +type trustconfigShowResponse struct { + Error *Error `json:"error"` + Result *TrustconfigShowResult `json:"result"` +} - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` +type TrustconfigShowResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Trustconfig `json:"result,omitempty"` + + /* + + (required) + */ + Value string `json:"value,omitempty"` + } - /* +func (t *TrustconfigShowResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("TrustconfigShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("TrustconfigShowResult%v", string(b)) +} - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` +/* +Allow access from the trusted domain +*/ +func (c *Client) TrustdomainAdd( + reqArgs *TrustdomainAddArgs, + optArgs *TrustdomainAddOptionalArgs, // can be nil +) (*TrustdomainAddResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := trustdomainAddKwParams{ + TrustdomainAddArgs: reqArgs, + TrustdomainAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "trustdomain_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res trustdomainAddResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - /* +type TrustdomainAddArgs struct { + + /* +Realm name - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` + */ + Trustcn string `json:"trustcn,omitempty"` + + /* +Domain name - /* - member sudo command - sudo commands to add - */ - Sudocmd *[]string `json:"sudocmd,omitempty"` + */ + Cn string `json:"cn,omitempty"` + } - /* - member sudo command group - sudo command groups to add - */ - Sudocmdgroup *[]string `json:"sudocmdgroup,omitempty"` -} +type TrustdomainAddOptionalArgs struct { + + /* +Domain NetBIOS name + + */ + Ipantflatname *string `json:"ipantflatname,omitempty"` + + /* +Domain Security Identifier + + */ + Ipanttrusteddomainsid *string `json:"ipanttrusteddomainsid,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* +Trust type (ad for Active Directory, default) + + */ + TrustType *string `json:"trust_type,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } -type sudoruleAddAllowCommandKwParams struct { - *SudoruleAddAllowCommandArgs - *SudoruleAddAllowCommandOptionalArgs +type trustdomainAddKwParams struct { + *TrustdomainAddArgs + *TrustdomainAddOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } -type sudoruleAddAllowCommandResponse struct { - Error *Error `json:"error"` - Result *SudoruleAddAllowCommandResult `json:"result"` +type trustdomainAddResponse struct { + Error *Error `json:"error"` + Result *TrustdomainAddResult `json:"result"` } -type SudoruleAddAllowCommandResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` -} +type TrustdomainAddResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Trustdomain `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } -func (t *SudoruleAddAllowCommandResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SudoruleAddAllowCommandResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SudoruleAddAllowCommandResult%v", string(b)) +func (t *TrustdomainAddResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("TrustdomainAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("TrustdomainAddResult%v", string(b)) } /* -Add commands and sudo command groups affected by Sudo Rule. +Remove information about the domain associated with the trust. */ -func (c *Client) SudoruleAddDenyCommand( - reqArgs *SudoruleAddDenyCommandArgs, - optArgs *SudoruleAddDenyCommandOptionalArgs, // can be nil -) (*SudoruleAddDenyCommandResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := sudoruleAddDenyCommandKwParams{ - SudoruleAddDenyCommandArgs: reqArgs, - SudoruleAddDenyCommandOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "sudorule_add_deny_command", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res sudoruleAddDenyCommandResponse +func (c *Client) TrustdomainDel( + reqArgs *TrustdomainDelArgs, + optArgs *TrustdomainDelOptionalArgs, // can be nil +) (*TrustdomainDelResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := trustdomainDelKwParams{ + TrustdomainDelArgs: reqArgs, + TrustdomainDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "trustdomain_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res trustdomainDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudoruleAddDenyCommandArgs struct { - - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` -} - -type SudoruleAddDenyCommandOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` +type TrustdomainDelArgs struct { + + /* +Realm name - /* + */ + Trustcn string `json:"trustcn,omitempty"` + + /* +Domain name - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` + */ + Cn []string `json:"cn,omitempty"` + } - /* - member sudo command - sudo commands to add - */ - Sudocmd *[]string `json:"sudocmd,omitempty"` +type TrustdomainDelOptionalArgs struct { + + /* - /* - member sudo command group - sudo command groups to add - */ - Sudocmdgroup *[]string `json:"sudocmdgroup,omitempty"` -} +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } -type sudoruleAddDenyCommandKwParams struct { - *SudoruleAddDenyCommandArgs - *SudoruleAddDenyCommandOptionalArgs +type trustdomainDelKwParams struct { + *TrustdomainDelArgs + *TrustdomainDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } -type sudoruleAddDenyCommandResponse struct { - Error *Error `json:"error"` - Result *SudoruleAddDenyCommandResult `json:"result"` +type trustdomainDelResponse struct { + Error *Error `json:"error"` + Result *TrustdomainDelResult `json:"result"` } -type SudoruleAddDenyCommandResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` -} +type TrustdomainDelResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } -func (t *SudoruleAddDenyCommandResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SudoruleAddDenyCommandResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SudoruleAddDenyCommandResult%v", string(b)) +func (t *TrustdomainDelResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("TrustdomainDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("TrustdomainDelResult%v", string(b)) } /* -Add hosts and hostgroups affected by Sudo Rule. +Disable use of IPA resources by the domain of the trust */ -func (c *Client) SudoruleAddHost( - reqArgs *SudoruleAddHostArgs, - optArgs *SudoruleAddHostOptionalArgs, // can be nil -) (*SudoruleAddHostResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := sudoruleAddHostKwParams{ - SudoruleAddHostArgs: reqArgs, - SudoruleAddHostOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "sudorule_add_host", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res sudoruleAddHostResponse +func (c *Client) TrustdomainDisable( + reqArgs *TrustdomainDisableArgs, + optArgs *TrustdomainDisableOptionalArgs, // can be nil +) (*TrustdomainDisableResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := trustdomainDisableKwParams{ + TrustdomainDisableArgs: reqArgs, + TrustdomainDisableOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "trustdomain_disable", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res trustdomainDisableResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudoruleAddHostArgs struct { - - /* - Rule name +type TrustdomainDisableArgs struct { + + /* +Realm name - */ - Cn string `json:"cn,omitempty"` -} + */ + Trustcn string `json:"trustcn,omitempty"` + + /* +Domain name -type SudoruleAddHostOptionalArgs struct { + */ + Cn string `json:"cn,omitempty"` + } - /* +type TrustdomainDisableOptionalArgs struct { + } - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` +type trustdomainDisableKwParams struct { + *TrustdomainDisableArgs + *TrustdomainDisableOptionalArgs - /* + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` +type trustdomainDisableResponse struct { + Error *Error `json:"error"` + Result *TrustdomainDisableResult `json:"result"` +} - /* +type TrustdomainDisableResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member host - hosts to add - */ - Host *[]string `json:"host,omitempty"` - - /* - member host group - host groups to add - */ - Hostgroup *[]string `json:"hostgroup,omitempty"` - - /* - host masks of allowed hosts - - */ - Hostmask *[]string `json:"hostmask,omitempty"` +func (t *TrustdomainDisableResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("TrustdomainDisableResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("TrustdomainDisableResult%v", string(b)) } -type sudoruleAddHostKwParams struct { - *SudoruleAddHostArgs - *SudoruleAddHostOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` +/* +Allow use of IPA resources by the domain of the trust +*/ +func (c *Client) TrustdomainEnable( + reqArgs *TrustdomainEnableArgs, + optArgs *TrustdomainEnableOptionalArgs, // can be nil +) (*TrustdomainEnableResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := trustdomainEnableKwParams{ + TrustdomainEnableArgs: reqArgs, + TrustdomainEnableOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "trustdomain_enable", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res trustdomainEnableResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type sudoruleAddHostResponse struct { - Error *Error `json:"error"` - Result *SudoruleAddHostResult `json:"result"` -} +type TrustdomainEnableArgs struct { + + /* +Realm name -type SudoruleAddHostResult struct { + */ + Trustcn string `json:"trustcn,omitempty"` + + /* +Domain name - /* + */ + Cn string `json:"cn,omitempty"` + } - (required) - */ - Result interface{} `json:"result,omitempty"` +type TrustdomainEnableOptionalArgs struct { + } - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` +type trustdomainEnableKwParams struct { + *TrustdomainEnableArgs + *TrustdomainEnableOptionalArgs - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } -func (t *SudoruleAddHostResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SudoruleAddHostResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SudoruleAddHostResult%v", string(b)) +type trustdomainEnableResponse struct { + Error *Error `json:"error"` + Result *TrustdomainEnableResult `json:"result"` +} + +type TrustdomainEnableResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } + +func (t *TrustdomainEnableResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("TrustdomainEnableResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("TrustdomainEnableResult%v", string(b)) } /* -Add an option to the Sudo Rule. +Search domains of the trust */ -func (c *Client) SudoruleAddOption( - reqArgs *SudoruleAddOptionArgs, - optArgs *SudoruleAddOptionOptionalArgs, // can be nil -) (*SudoruleAddOptionResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := sudoruleAddOptionKwParams{ - SudoruleAddOptionArgs: reqArgs, - SudoruleAddOptionOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "sudorule_add_option", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res sudoruleAddOptionResponse +func (c *Client) TrustdomainFind( + criteria string, // A string searched in all relevant object attributes + reqArgs *TrustdomainFindArgs, + optArgs *TrustdomainFindOptionalArgs, // can be nil +) (*TrustdomainFindResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := trustdomainFindKwParams{ + TrustdomainFindArgs: reqArgs, + TrustdomainFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "trustdomain_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res trustdomainFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudoruleAddOptionArgs struct { +type TrustdomainFindArgs struct { + + /* +Realm name - /* - Rule name + */ + Trustcn string `json:"trustcn,omitempty"` + } - */ - Cn string `json:"cn,omitempty"` +type TrustdomainFindOptionalArgs struct { + + /* +Domain name + + */ + Cn *string `json:"cn,omitempty"` + + /* +Domain NetBIOS name + + */ + Ipantflatname *string `json:"ipantflatname,omitempty"` + + /* +Domain Security Identifier + + */ + Ipanttrusteddomainsid *string `json:"ipanttrusteddomainsid,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("domain") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } - /* - Sudo Option +type trustdomainFindKwParams struct { + *TrustdomainFindArgs + *TrustdomainFindOptionalArgs - */ - Ipasudoopt string `json:"ipasudoopt,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } -type SudoruleAddOptionOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` +type trustdomainFindResponse struct { + Error *Error `json:"error"` + Result *TrustdomainFindResult `json:"result"` } -type sudoruleAddOptionKwParams struct { - *SudoruleAddOptionArgs - *SudoruleAddOptionOptionalArgs +type TrustdomainFindResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Trustdomain `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` +func (t *TrustdomainFindResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("TrustdomainFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("TrustdomainFindResult%v", string(b)) } -type sudoruleAddOptionResponse struct { - Error *Error `json:"error"` - Result *SudoruleAddOptionResult `json:"result"` +/* +Modify trustdomain of the trust +*/ +func (c *Client) TrustdomainMod( + reqArgs *TrustdomainModArgs, + optArgs *TrustdomainModOptionalArgs, // can be nil +) (*TrustdomainModResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := trustdomainModKwParams{ + TrustdomainModArgs: reqArgs, + TrustdomainModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "trustdomain_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res trustdomainModResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudoruleAddOptionResult struct { +type TrustdomainModArgs struct { + + /* +Realm name - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` + */ + Trustcn string `json:"trustcn,omitempty"` + + /* +Domain name - /* + */ + Cn string `json:"cn,omitempty"` + } - (required) - */ - Result interface{} `json:"result,omitempty"` +type TrustdomainModOptionalArgs struct { + + /* +Domain NetBIOS name + + */ + Ipantflatname *string `json:"ipantflatname,omitempty"` + + /* +Domain Security Identifier + + */ + Ipanttrusteddomainsid *string `json:"ipanttrusteddomainsid,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* +Trust type (ad for Active Directory, default) + + */ + TrustType *string `json:"trust_type,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } + +type trustdomainModKwParams struct { + *TrustdomainModArgs + *TrustdomainModOptionalArgs - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } -func (t *SudoruleAddOptionResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SudoruleAddOptionResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SudoruleAddOptionResult%v", string(b)) +type trustdomainModResponse struct { + Error *Error `json:"error"` + Result *TrustdomainModResult `json:"result"` +} + +type TrustdomainModResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Trustdomain `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } + +func (t *TrustdomainModResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("TrustdomainModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("TrustdomainModResult%v", string(b)) } /* -Add group for Sudo to execute as. +Add a new user. */ -func (c *Client) SudoruleAddRunasgroup( - reqArgs *SudoruleAddRunasgroupArgs, - optArgs *SudoruleAddRunasgroupOptionalArgs, // can be nil -) (*SudoruleAddRunasgroupResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := sudoruleAddRunasgroupKwParams{ - SudoruleAddRunasgroupArgs: reqArgs, - SudoruleAddRunasgroupOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "sudorule_add_runasgroup", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res sudoruleAddRunasgroupResponse +func (c *Client) UserAdd( + reqArgs *UserAddArgs, + optArgs *UserAddOptionalArgs, // can be nil +) (*UserAddResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := userAddKwParams{ + UserAddArgs: reqArgs, + UserAddOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "user_add", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res userAddResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type SudoruleAddRunasgroupArgs struct { - - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudoruleAddRunasgroupOptionalArgs struct { - - /* +type UserAddArgs struct { + + /* +First name - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` + */ + Givenname string `json:"givenname,omitempty"` + + /* +Last name - /* + */ + Sn string `json:"sn,omitempty"` + } - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` +type UserAddOptionalArgs struct { + + /* +User login + + */ + UID *string `json:"uid,omitempty"` + + /* +Full name + + */ + Cn *string `json:"cn,omitempty"` + + /* +Display name + + */ + Displayname *string `json:"displayname,omitempty"` + + /* +Initials + + */ + Initials *string `json:"initials,omitempty"` + + /* +Home directory + + */ + Homedirectory *string `json:"homedirectory,omitempty"` + + /* +GECOS + + */ + Gecos *string `json:"gecos,omitempty"` + + /* +Login shell + + */ + Loginshell *string `json:"loginshell,omitempty"` + + /* +Principal alias + + */ + Krbprincipalname *[]string `json:"krbprincipalname,omitempty"` + + /* +Kerberos principal expiration + + */ + Krbprincipalexpiration *time.Time `json:"krbprincipalexpiration,omitempty"` + + /* +User password expiration + + */ + Krbpasswordexpiration *time.Time `json:"krbpasswordexpiration,omitempty"` + + /* +Email address + + */ + Mail *[]string `json:"mail,omitempty"` + + /* +Password +Prompt to set the user password + */ + Userpassword *string `json:"userpassword,omitempty"` + + /* + +Generate a random user password + */ + Random *bool `json:"random,omitempty"` + + /* +UID +User ID Number (system will assign one if not provided) + */ + Uidnumber *int `json:"uidnumber,omitempty"` + + /* +GID +Group ID Number + */ + Gidnumber *int `json:"gidnumber,omitempty"` + + /* +Street address + + */ + Street *string `json:"street,omitempty"` + + /* +City + + */ + L *string `json:"l,omitempty"` + + /* +State/Province + + */ + St *string `json:"st,omitempty"` + + /* +ZIP + + */ + Postalcode *string `json:"postalcode,omitempty"` + + /* +Telephone Number + + */ + Telephonenumber *[]string `json:"telephonenumber,omitempty"` + + /* +Mobile Telephone Number + + */ + Mobile *[]string `json:"mobile,omitempty"` + + /* +Pager Number + + */ + Pager *[]string `json:"pager,omitempty"` + + /* +Fax Number + + */ + Facsimiletelephonenumber *[]string `json:"facsimiletelephonenumber,omitempty"` + + /* +Org. Unit + + */ + Ou *string `json:"ou,omitempty"` + + /* +Job Title + + */ + Title *string `json:"title,omitempty"` + + /* +Manager + + */ + Manager *string `json:"manager,omitempty"` + + /* +Car License + + */ + Carlicense *[]string `json:"carlicense,omitempty"` + + /* +SSH public key + + */ + Ipasshpubkey *[]string `json:"ipasshpubkey,omitempty"` + + /* +User authentication types +Types of supported user authentication + */ + Ipauserauthtype *[]string `json:"ipauserauthtype,omitempty"` + + /* +Class +User category (semantics placed on this attribute are for local interpretation) + */ + Userclass *[]string `json:"userclass,omitempty"` + + /* +RADIUS proxy configuration + + */ + Ipatokenradiusconfiglink *string `json:"ipatokenradiusconfiglink,omitempty"` + + /* +RADIUS proxy username + + */ + Ipatokenradiususername *string `json:"ipatokenradiususername,omitempty"` + + /* +Department Number + + */ + Departmentnumber *[]string `json:"departmentnumber,omitempty"` + + /* +Employee Number + + */ + Employeenumber *string `json:"employeenumber,omitempty"` + + /* +Employee Type + + */ + Employeetype *string `json:"employeetype,omitempty"` + + /* +Preferred Language + + */ + Preferredlanguage *string `json:"preferredlanguage,omitempty"` + + /* +Certificate +Base-64 encoded user certificate + */ + Usercertificate *[]interface{} `json:"usercertificate,omitempty"` + + /* +Account disabled + + */ + Nsaccountlock *bool `json:"nsaccountlock,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Don't create user private group + */ + Noprivate *bool `json:"noprivate,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } - /* +type userAddKwParams struct { + *UserAddArgs + *UserAddOptionalArgs - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - member group - groups to add - */ - Group *[]string `json:"group,omitempty"` +type userAddResponse struct { + Error *Error `json:"error"` + Result *UserAddResult `json:"result"` } -type sudoruleAddRunasgroupKwParams struct { - *SudoruleAddRunasgroupArgs - *SudoruleAddRunasgroupOptionalArgs +type UserAddResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result User `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` +func (t *UserAddResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("UserAddResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("UserAddResult%v", string(b)) } -type sudoruleAddRunasgroupResponse struct { - Error *Error `json:"error"` - Result *SudoruleAddRunasgroupResult `json:"result"` +/* +Add one or more certificates to the user entry +*/ +func (c *Client) UserAddCert( + reqArgs *UserAddCertArgs, + optArgs *UserAddCertOptionalArgs, // can be nil +) (*UserAddCertResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := userAddCertKwParams{ + UserAddCertArgs: reqArgs, + UserAddCertOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "user_add_cert", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res userAddCertResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudoruleAddRunasgroupResult struct { +type UserAddCertArgs struct { + + /* +Certificate +Base-64 encoded user certificate + */ + Usercertificate []interface{} `json:"usercertificate,omitempty"` + } - /* +type UserAddCertOptionalArgs struct { + + /* +User login + + */ + UID *string `json:"uid,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } - (required) - */ - Result interface{} `json:"result,omitempty"` +type userAddCertKwParams struct { + *UserAddCertArgs + *UserAddCertOptionalArgs - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` +type userAddCertResponse struct { + Error *Error `json:"error"` + Result *UserAddCertResult `json:"result"` } -func (t *SudoruleAddRunasgroupResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SudoruleAddRunasgroupResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SudoruleAddRunasgroupResult%v", string(b)) +type UserAddCertResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } + +func (t *UserAddCertResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("UserAddCertResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("UserAddCertResult%v", string(b)) } /* -Add users and groups for Sudo to execute as. +Add one or more certificate mappings to the user entry. */ -func (c *Client) SudoruleAddRunasuser( - reqArgs *SudoruleAddRunasuserArgs, - optArgs *SudoruleAddRunasuserOptionalArgs, // can be nil -) (*SudoruleAddRunasuserResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := sudoruleAddRunasuserKwParams{ - SudoruleAddRunasuserArgs: reqArgs, - SudoruleAddRunasuserOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "sudorule_add_runasuser", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res sudoruleAddRunasuserResponse +func (c *Client) UserAddCertmapdata( + ipacertmapdata string, // Certificate mapping data + reqArgs *UserAddCertmapdataArgs, + optArgs *UserAddCertmapdataOptionalArgs, // can be nil +) (*UserAddCertmapdataResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := userAddCertmapdataKwParams{ + UserAddCertmapdataArgs: reqArgs, + UserAddCertmapdataOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "user_add_certmapdata", + Params: []interface{}{ + []interface{}{ipacertmapdata, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res userAddCertmapdataResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} + +type UserAddCertmapdataArgs struct { + } + +type UserAddCertmapdataOptionalArgs struct { + + /* +User login + + */ + UID *string `json:"uid,omitempty"` + + /* +Issuer +Issuer of the certificate + */ + Issuer *string `json:"issuer,omitempty"` + + /* +Subject +Subject of the certificate + */ + Subject *string `json:"subject,omitempty"` + + /* +Certificate +Base-64 encoded user certificate + */ + Certificate *[]interface{} `json:"certificate,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } + +type userAddCertmapdataKwParams struct { + *UserAddCertmapdataArgs + *UserAddCertmapdataOptionalArgs + + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} + +type userAddCertmapdataResponse struct { + Error *Error `json:"error"` + Result *UserAddCertmapdataResult `json:"result"` +} + +type UserAddCertmapdataResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } + +func (t *UserAddCertmapdataResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("UserAddCertmapdataResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("UserAddCertmapdataResult%v", string(b)) } -type SudoruleAddRunasuserArgs struct { - - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` +/* +Add a manager to the user entry +*/ +func (c *Client) UserAddManager( + reqArgs *UserAddManagerArgs, + optArgs *UserAddManagerOptionalArgs, // can be nil +) (*UserAddManagerResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := userAddManagerKwParams{ + UserAddManagerArgs: reqArgs, + UserAddManagerOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "user_add_manager", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res userAddManagerResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudoruleAddRunasuserOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` +type UserAddManagerArgs struct { + } - /* +type UserAddManagerOptionalArgs struct { + + /* +User login + + */ + UID *string `json:"uid,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member user +users to add + */ + User *[]string `json:"user,omitempty"` + } - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` +type userAddManagerKwParams struct { + *UserAddManagerArgs + *UserAddManagerOptionalArgs - /* - member user - users to add - */ - User *[]string `json:"user,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - member group - groups to add - */ - Group *[]string `json:"group,omitempty"` +type userAddManagerResponse struct { + Error *Error `json:"error"` + Result *UserAddManagerResult `json:"result"` } -type sudoruleAddRunasuserKwParams struct { - *SudoruleAddRunasuserArgs - *SudoruleAddRunasuserOptionalArgs +type UserAddManagerResult struct { + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` +func (t *UserAddManagerResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("UserAddManagerResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("UserAddManagerResult%v", string(b)) } -type sudoruleAddRunasuserResponse struct { - Error *Error `json:"error"` - Result *SudoruleAddRunasuserResult `json:"result"` +/* +Add new principal alias to the user entry +*/ +func (c *Client) UserAddPrincipal( + reqArgs *UserAddPrincipalArgs, + optArgs *UserAddPrincipalOptionalArgs, // can be nil +) (*UserAddPrincipalResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := userAddPrincipalKwParams{ + UserAddPrincipalArgs: reqArgs, + UserAddPrincipalOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "user_add_principal", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res userAddPrincipalResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudoruleAddRunasuserResult struct { +type UserAddPrincipalArgs struct { + } - /* +type UserAddPrincipalOptionalArgs struct { + + /* +User login + + */ + UID *string `json:"uid,omitempty"` + + /* +Principal alias + + */ + Krbprincipalname *[]string `json:"krbprincipalname,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } - (required) - */ - Result interface{} `json:"result,omitempty"` +type userAddPrincipalKwParams struct { + *UserAddPrincipalArgs + *UserAddPrincipalOptionalArgs - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` +type userAddPrincipalResponse struct { + Error *Error `json:"error"` + Result *UserAddPrincipalResult `json:"result"` } -func (t *SudoruleAddRunasuserResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SudoruleAddRunasuserResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SudoruleAddRunasuserResult%v", string(b)) +type UserAddPrincipalResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } + +func (t *UserAddPrincipalResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("UserAddPrincipalResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("UserAddPrincipalResult%v", string(b)) } /* -Add users and groups affected by Sudo Rule. +Delete a user. */ -func (c *Client) SudoruleAddUser( - reqArgs *SudoruleAddUserArgs, - optArgs *SudoruleAddUserOptionalArgs, // can be nil -) (*SudoruleAddUserResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := sudoruleAddUserKwParams{ - SudoruleAddUserArgs: reqArgs, - SudoruleAddUserOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "sudorule_add_user", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res sudoruleAddUserResponse +func (c *Client) UserDel( + reqArgs *UserDelArgs, + optArgs *UserDelOptionalArgs, // can be nil +) (*UserDelResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := userDelKwParams{ + UserDelArgs: reqArgs, + UserDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "user_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res userDelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type SudoruleAddUserArgs struct { - - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudoruleAddUserOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* +type UserDelArgs struct { + } - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` +type UserDelOptionalArgs struct { + + /* +User login - /* + */ + UID *[]string `json:"uid,omitempty"` + + /* - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + + /* - /* - member user - users to add - */ - User *[]string `json:"user,omitempty"` - /* - member group - groups to add - */ - Group *[]string `json:"group,omitempty"` -} + */ + Preserve *bool `json:"preserve,omitempty"` + } -type sudoruleAddUserKwParams struct { - *SudoruleAddUserArgs - *SudoruleAddUserOptionalArgs +type userDelKwParams struct { + *UserDelArgs + *UserDelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } -type sudoruleAddUserResponse struct { - Error *Error `json:"error"` - Result *SudoruleAddUserResult `json:"result"` +type userDelResponse struct { + Error *Error `json:"error"` + Result *UserDelResult `json:"result"` } -type SudoruleAddUserResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` +type UserDelResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` -} - -func (t *SudoruleAddUserResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SudoruleAddUserResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SudoruleAddUserResult%v", string(b)) +func (t *UserDelResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("UserDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("UserDelResult%v", string(b)) } /* -Delete Sudo Rule. +Disable a user account. */ -func (c *Client) SudoruleDel( - reqArgs *SudoruleDelArgs, - optArgs *SudoruleDelOptionalArgs, // can be nil -) (*SudoruleDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := sudoruleDelKwParams{ - SudoruleDelArgs: reqArgs, - SudoruleDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "sudorule_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res sudoruleDelResponse +func (c *Client) UserDisable( + reqArgs *UserDisableArgs, + optArgs *UserDisableOptionalArgs, // can be nil +) (*UserDisableResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := userDisableKwParams{ + UserDisableArgs: reqArgs, + UserDisableOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "user_disable", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res userDisableResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudoruleDelArgs struct { +type UserDisableArgs struct { + } - /* - Rule name +type UserDisableOptionalArgs struct { + + /* +User login - */ - Cn []string `json:"cn,omitempty"` -} + */ + UID *string `json:"uid,omitempty"` + } -type SudoruleDelOptionalArgs struct { +type userDisableKwParams struct { + *UserDisableArgs + *UserDisableOptionalArgs - /* + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` +type userDisableResponse struct { + Error *Error `json:"error"` + Result *UserDisableResult `json:"result"` } -type sudoruleDelKwParams struct { - *SudoruleDelArgs - *SudoruleDelOptionalArgs +type UserDisableResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` +func (t *UserDisableResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("UserDisableResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("UserDisableResult%v", string(b)) } -type sudoruleDelResponse struct { - Error *Error `json:"error"` - Result *SudoruleDelResult `json:"result"` +/* +Enable a user account. +*/ +func (c *Client) UserEnable( + reqArgs *UserEnableArgs, + optArgs *UserEnableOptionalArgs, // can be nil +) (*UserEnableResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := userEnableKwParams{ + UserEnableArgs: reqArgs, + UserEnableOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "user_enable", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res userEnableResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudoruleDelResult struct { +type UserEnableArgs struct { + } - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` +type UserEnableOptionalArgs struct { + + /* +User login - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` + */ + UID *string `json:"uid,omitempty"` + } - /* +type userEnableKwParams struct { + *UserEnableArgs + *UserEnableOptionalArgs - (required) - */ - Value []string `json:"value,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } -func (t *SudoruleDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SudoruleDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SudoruleDelResult%v", string(b)) +type userEnableResponse struct { + Error *Error `json:"error"` + Result *UserEnableResult `json:"result"` +} + +type UserEnableResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } + +func (t *UserEnableResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("UserEnableResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("UserEnableResult%v", string(b)) } /* -Disable a Sudo Rule. +Search for users. */ -func (c *Client) SudoruleDisable( - reqArgs *SudoruleDisableArgs, - optArgs *SudoruleDisableOptionalArgs, // can be nil -) (*SudoruleDisableResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := sudoruleDisableKwParams{ - SudoruleDisableArgs: reqArgs, - SudoruleDisableOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "sudorule_disable", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res sudoruleDisableResponse +func (c *Client) UserFind( + criteria string, // A string searched in all relevant object attributes + reqArgs *UserFindArgs, + optArgs *UserFindOptionalArgs, // can be nil +) (*UserFindResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := userFindKwParams{ + UserFindArgs: reqArgs, + UserFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "user_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res userFindResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudoruleDisableArgs struct { +type UserFindArgs struct { + } + +type UserFindOptionalArgs struct { + + /* +User login + + */ + UID *string `json:"uid,omitempty"` + + /* +First name + + */ + Givenname *string `json:"givenname,omitempty"` + + /* +Last name + + */ + Sn *string `json:"sn,omitempty"` + + /* +Full name + + */ + Cn *string `json:"cn,omitempty"` + + /* +Display name + + */ + Displayname *string `json:"displayname,omitempty"` + + /* +Initials + + */ + Initials *string `json:"initials,omitempty"` + + /* +Home directory + + */ + Homedirectory *string `json:"homedirectory,omitempty"` + + /* +GECOS + + */ + Gecos *string `json:"gecos,omitempty"` + + /* +Login shell + + */ + Loginshell *string `json:"loginshell,omitempty"` + + /* +Principal alias + + */ + Krbprincipalname *[]string `json:"krbprincipalname,omitempty"` + + /* +Kerberos principal expiration + + */ + Krbprincipalexpiration *time.Time `json:"krbprincipalexpiration,omitempty"` + + /* +User password expiration + + */ + Krbpasswordexpiration *time.Time `json:"krbpasswordexpiration,omitempty"` + + /* +Email address + + */ + Mail *[]string `json:"mail,omitempty"` + + /* +Password +Prompt to set the user password + */ + Userpassword *string `json:"userpassword,omitempty"` + + /* +UID +User ID Number (system will assign one if not provided) + */ + Uidnumber *int `json:"uidnumber,omitempty"` + + /* +GID +Group ID Number + */ + Gidnumber *int `json:"gidnumber,omitempty"` + + /* +Street address + + */ + Street *string `json:"street,omitempty"` + + /* +City + + */ + L *string `json:"l,omitempty"` + + /* +State/Province + + */ + St *string `json:"st,omitempty"` + + /* +ZIP + + */ + Postalcode *string `json:"postalcode,omitempty"` + + /* +Telephone Number + + */ + Telephonenumber *[]string `json:"telephonenumber,omitempty"` + + /* +Mobile Telephone Number + + */ + Mobile *[]string `json:"mobile,omitempty"` + + /* +Pager Number + + */ + Pager *[]string `json:"pager,omitempty"` + + /* +Fax Number + + */ + Facsimiletelephonenumber *[]string `json:"facsimiletelephonenumber,omitempty"` + + /* +Org. Unit + + */ + Ou *string `json:"ou,omitempty"` + + /* +Job Title + + */ + Title *string `json:"title,omitempty"` + + /* +Manager + + */ + Manager *string `json:"manager,omitempty"` + + /* +Car License + + */ + Carlicense *[]string `json:"carlicense,omitempty"` + + /* +User authentication types +Types of supported user authentication + */ + Ipauserauthtype *[]string `json:"ipauserauthtype,omitempty"` + + /* +Class +User category (semantics placed on this attribute are for local interpretation) + */ + Userclass *[]string `json:"userclass,omitempty"` + + /* +RADIUS proxy configuration + + */ + Ipatokenradiusconfiglink *string `json:"ipatokenradiusconfiglink,omitempty"` + + /* +RADIUS proxy username + + */ + Ipatokenradiususername *string `json:"ipatokenradiususername,omitempty"` + + /* +Department Number + + */ + Departmentnumber *[]string `json:"departmentnumber,omitempty"` + + /* +Employee Number + + */ + Employeenumber *string `json:"employeenumber,omitempty"` + + /* +Employee Type + + */ + Employeetype *string `json:"employeetype,omitempty"` + + /* +Preferred Language + + */ + Preferredlanguage *string `json:"preferredlanguage,omitempty"` + + /* +Certificate +Base-64 encoded user certificate + */ + Usercertificate *[]interface{} `json:"usercertificate,omitempty"` + + /* +Account disabled + + */ + Nsaccountlock *bool `json:"nsaccountlock,omitempty"` + + /* +Preserved user + + */ + Preserved *bool `json:"preserved,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* +Self +Display user record for current Kerberos principal + */ + Whoami *bool `json:"whoami,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("login") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + + /* +group +Search for users with these member of groups. + */ + InGroup *[]string `json:"in_group,omitempty"` + + /* +group +Search for users without these member of groups. + */ + NotInGroup *[]string `json:"not_in_group,omitempty"` + + /* +netgroup +Search for users with these member of netgroups. + */ + InNetgroup *[]string `json:"in_netgroup,omitempty"` + + /* +netgroup +Search for users without these member of netgroups. + */ + NotInNetgroup *[]string `json:"not_in_netgroup,omitempty"` + + /* +role +Search for users with these member of roles. + */ + InRole *[]string `json:"in_role,omitempty"` + + /* +role +Search for users without these member of roles. + */ + NotInRole *[]string `json:"not_in_role,omitempty"` + + /* +HBAC rule +Search for users with these member of HBAC rules. + */ + InHbacrule *[]string `json:"in_hbacrule,omitempty"` + + /* +HBAC rule +Search for users without these member of HBAC rules. + */ + NotInHbacrule *[]string `json:"not_in_hbacrule,omitempty"` + + /* +sudo rule +Search for users with these member of sudo rules. + */ + InSudorule *[]string `json:"in_sudorule,omitempty"` + + /* +sudo rule +Search for users without these member of sudo rules. + */ + NotInSudorule *[]string `json:"not_in_sudorule,omitempty"` + } - /* - Rule name +type userFindKwParams struct { + *UserFindArgs + *UserFindOptionalArgs - */ - Cn string `json:"cn,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } -type SudoruleDisableOptionalArgs struct { +type userFindResponse struct { + Error *Error `json:"error"` + Result *UserFindResult `json:"result"` } -type sudoruleDisableKwParams struct { - *SudoruleDisableArgs - *SudoruleDisableOptionalArgs +type UserFindResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []User `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` +func (t *UserFindResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("UserFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("UserFindResult%v", string(b)) } -type sudoruleDisableResponse struct { - Error *Error `json:"error"` - Result *SudoruleDisableResult `json:"result"` +/* +Modify a user. +*/ +func (c *Client) UserMod( + reqArgs *UserModArgs, + optArgs *UserModOptionalArgs, // can be nil +) (*UserModResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := userModKwParams{ + UserModArgs: reqArgs, + UserModOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "user_mod", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res userModResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudoruleDisableResult struct { +type UserModArgs struct { + } + +type UserModOptionalArgs struct { + + /* +User login + + */ + UID *string `json:"uid,omitempty"` + + /* +First name + + */ + Givenname *string `json:"givenname,omitempty"` + + /* +Last name + + */ + Sn *string `json:"sn,omitempty"` + + /* +Full name + + */ + Cn *string `json:"cn,omitempty"` + + /* +Display name + + */ + Displayname *string `json:"displayname,omitempty"` + + /* +Initials + + */ + Initials *string `json:"initials,omitempty"` + + /* +Home directory + + */ + Homedirectory *string `json:"homedirectory,omitempty"` + + /* +GECOS + + */ + Gecos *string `json:"gecos,omitempty"` + + /* +Login shell + + */ + Loginshell *string `json:"loginshell,omitempty"` + + /* +Principal alias + + */ + Krbprincipalname *[]string `json:"krbprincipalname,omitempty"` + + /* +Kerberos principal expiration + + */ + Krbprincipalexpiration *time.Time `json:"krbprincipalexpiration,omitempty"` + + /* +User password expiration + + */ + Krbpasswordexpiration *time.Time `json:"krbpasswordexpiration,omitempty"` + + /* +Email address + + */ + Mail *[]string `json:"mail,omitempty"` + + /* +Password +Prompt to set the user password + */ + Userpassword *string `json:"userpassword,omitempty"` + + /* + +Generate a random user password + */ + Random *bool `json:"random,omitempty"` + + /* +UID +User ID Number (system will assign one if not provided) + */ + Uidnumber *int `json:"uidnumber,omitempty"` + + /* +GID +Group ID Number + */ + Gidnumber *int `json:"gidnumber,omitempty"` + + /* +Street address + + */ + Street *string `json:"street,omitempty"` + + /* +City + + */ + L *string `json:"l,omitempty"` + + /* +State/Province + + */ + St *string `json:"st,omitempty"` + + /* +ZIP + + */ + Postalcode *string `json:"postalcode,omitempty"` + + /* +Telephone Number + + */ + Telephonenumber *[]string `json:"telephonenumber,omitempty"` + + /* +Mobile Telephone Number + + */ + Mobile *[]string `json:"mobile,omitempty"` + + /* +Pager Number + + */ + Pager *[]string `json:"pager,omitempty"` + + /* +Fax Number + + */ + Facsimiletelephonenumber *[]string `json:"facsimiletelephonenumber,omitempty"` + + /* +Org. Unit + + */ + Ou *string `json:"ou,omitempty"` + + /* +Job Title + + */ + Title *string `json:"title,omitempty"` + + /* +Manager + + */ + Manager *string `json:"manager,omitempty"` + + /* +Car License + + */ + Carlicense *[]string `json:"carlicense,omitempty"` + + /* +SSH public key + + */ + Ipasshpubkey *[]string `json:"ipasshpubkey,omitempty"` + + /* +User authentication types +Types of supported user authentication + */ + Ipauserauthtype *[]string `json:"ipauserauthtype,omitempty"` + + /* +Class +User category (semantics placed on this attribute are for local interpretation) + */ + Userclass *[]string `json:"userclass,omitempty"` + + /* +RADIUS proxy configuration + + */ + Ipatokenradiusconfiglink *string `json:"ipatokenradiusconfiglink,omitempty"` + + /* +RADIUS proxy username + + */ + Ipatokenradiususername *string `json:"ipatokenradiususername,omitempty"` + + /* +Department Number + + */ + Departmentnumber *[]string `json:"departmentnumber,omitempty"` + + /* +Employee Number + + */ + Employeenumber *string `json:"employeenumber,omitempty"` + + /* +Employee Type + + */ + Employeetype *string `json:"employeetype,omitempty"` + + /* +Preferred Language + + */ + Preferredlanguage *string `json:"preferredlanguage,omitempty"` + + /* +Certificate +Base-64 encoded user certificate + */ + Usercertificate *[]interface{} `json:"usercertificate,omitempty"` + + /* +Account disabled + + */ + Nsaccountlock *bool `json:"nsaccountlock,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +Rename +Rename the user object + */ + Rename *string `json:"rename,omitempty"` + } - /* +type userModKwParams struct { + *UserModArgs + *UserModOptionalArgs - (required) - */ - Result interface{} `json:"result,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } -func (t *SudoruleDisableResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SudoruleDisableResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SudoruleDisableResult%v", string(b)) +type userModResponse struct { + Error *Error `json:"error"` + Result *UserModResult `json:"result"` +} + +type UserModResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result User `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } + +func (t *UserModResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("UserModResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("UserModResult%v", string(b)) } /* -Enable a Sudo Rule. +Remove one or more certificates to the user entry */ -func (c *Client) SudoruleEnable( - reqArgs *SudoruleEnableArgs, - optArgs *SudoruleEnableOptionalArgs, // can be nil -) (*SudoruleEnableResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := sudoruleEnableKwParams{ - SudoruleEnableArgs: reqArgs, - SudoruleEnableOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "sudorule_enable", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res sudoruleEnableResponse +func (c *Client) UserRemoveCert( + reqArgs *UserRemoveCertArgs, + optArgs *UserRemoveCertOptionalArgs, // can be nil +) (*UserRemoveCertResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := userRemoveCertKwParams{ + UserRemoveCertArgs: reqArgs, + UserRemoveCertOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "user_remove_cert", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res userRemoveCertResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudoruleEnableArgs struct { - - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` -} +type UserRemoveCertArgs struct { + + /* +Certificate +Base-64 encoded user certificate + */ + Usercertificate []interface{} `json:"usercertificate,omitempty"` + } -type SudoruleEnableOptionalArgs struct { -} +type UserRemoveCertOptionalArgs struct { + + /* +User login + + */ + UID *string `json:"uid,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } -type sudoruleEnableKwParams struct { - *SudoruleEnableArgs - *SudoruleEnableOptionalArgs +type userRemoveCertKwParams struct { + *UserRemoveCertArgs + *UserRemoveCertOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } -type sudoruleEnableResponse struct { - Error *Error `json:"error"` - Result *SudoruleEnableResult `json:"result"` +type userRemoveCertResponse struct { + Error *Error `json:"error"` + Result *UserRemoveCertResult `json:"result"` } -type SudoruleEnableResult struct { - - /* +type UserRemoveCertResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } - (required) - */ - Result interface{} `json:"result,omitempty"` +func (t *UserRemoveCertResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("UserRemoveCertResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("UserRemoveCertResult%v", string(b)) } -func (t *SudoruleEnableResult) String() string { - if t == nil { - return "" +/* +Remove one or more certificate mappings from the user entry. +*/ +func (c *Client) UserRemoveCertmapdata( + ipacertmapdata string, // Certificate mapping data + reqArgs *UserRemoveCertmapdataArgs, + optArgs *UserRemoveCertmapdataOptionalArgs, // can be nil +) (*UserRemoveCertmapdataResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := userRemoveCertmapdataKwParams{ + UserRemoveCertmapdataArgs: reqArgs, + UserRemoveCertmapdataOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "user_remove_certmapdata", + Params: []interface{}{ + []interface{}{ipacertmapdata, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res userRemoveCertmapdataResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SudoruleEnableResult[failed json.Marshal: %v]", e) + if res.Error != nil { + return nil, res.Error } - return fmt.Sprintf("SudoruleEnableResult%v", string(b)) + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} + +type UserRemoveCertmapdataArgs struct { + } + +type UserRemoveCertmapdataOptionalArgs struct { + + /* +User login + + */ + UID *string `json:"uid,omitempty"` + + /* +Issuer +Issuer of the certificate + */ + Issuer *string `json:"issuer,omitempty"` + + /* +Subject +Subject of the certificate + */ + Subject *string `json:"subject,omitempty"` + + /* +Certificate +Base-64 encoded user certificate + */ + Certificate *[]interface{} `json:"certificate,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } + +type userRemoveCertmapdataKwParams struct { + *UserRemoveCertmapdataArgs + *UserRemoveCertmapdataOptionalArgs + + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} + +type userRemoveCertmapdataResponse struct { + Error *Error `json:"error"` + Result *UserRemoveCertmapdataResult `json:"result"` +} + +type UserRemoveCertmapdataResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } + +func (t *UserRemoveCertmapdataResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("UserRemoveCertmapdataResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("UserRemoveCertmapdataResult%v", string(b)) } /* -Search for Sudo Rule. +Remove a manager to the user entry */ -func (c *Client) SudoruleFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *SudoruleFindArgs, - optArgs *SudoruleFindOptionalArgs, // can be nil -) (*SudoruleFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := sudoruleFindKwParams{ - SudoruleFindArgs: reqArgs, - SudoruleFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "sudorule_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res sudoruleFindResponse +func (c *Client) UserRemoveManager( + reqArgs *UserRemoveManagerArgs, + optArgs *UserRemoveManagerOptionalArgs, // can be nil +) (*UserRemoveManagerResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := userRemoveManagerKwParams{ + UserRemoveManagerArgs: reqArgs, + UserRemoveManagerOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "user_remove_manager", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res userRemoveManagerResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type SudoruleFindArgs struct { + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudoruleFindOptionalArgs struct { +type UserRemoveManagerArgs struct { + } - /* - Rule name - - */ - Cn *string `json:"cn,omitempty"` - - /* - Description - - */ - Description *string `json:"description,omitempty"` - - /* - Enabled - - */ - Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` - - /* - User category - User category the rule applies to - */ - Usercategory *string `json:"usercategory,omitempty"` - - /* - Host category - Host category the rule applies to - */ - Hostcategory *string `json:"hostcategory,omitempty"` - - /* - Command category - Command category the rule applies to - */ - Cmdcategory *string `json:"cmdcategory,omitempty"` - - /* - RunAs User category - RunAs User category the rule applies to - */ - Ipasudorunasusercategory *string `json:"ipasudorunasusercategory,omitempty"` - - /* - RunAs Group category - RunAs Group category the rule applies to - */ - Ipasudorunasgroupcategory *string `json:"ipasudorunasgroupcategory,omitempty"` - - /* - Sudo order - integer to order the Sudo rules - */ - Sudoorder *int `json:"sudoorder,omitempty"` - - /* - External User - External User the rule applies to (sudorule-find only) - */ - Externaluser *string `json:"externaluser,omitempty"` - - /* - External host - - */ - Externalhost *[]string `json:"externalhost,omitempty"` - - /* - RunAs External User - External User the commands can run as (sudorule-find only) - */ - Ipasudorunasextuser *string `json:"ipasudorunasextuser,omitempty"` - - /* - RunAs External Group - External Group the commands can run as (sudorule-find only) - */ - Ipasudorunasextgroup *string `json:"ipasudorunasextgroup,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("sudorule-name") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} +type UserRemoveManagerOptionalArgs struct { + + /* +User login + + */ + UID *string `json:"uid,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member user +users to remove + */ + User *[]string `json:"user,omitempty"` + } -type sudoruleFindKwParams struct { - *SudoruleFindArgs - *SudoruleFindOptionalArgs +type userRemoveManagerKwParams struct { + *UserRemoveManagerArgs + *UserRemoveManagerOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } -type sudoruleFindResponse struct { - Error *Error `json:"error"` - Result *SudoruleFindResult `json:"result"` +type userRemoveManagerResponse struct { + Error *Error `json:"error"` + Result *UserRemoveManagerResult `json:"result"` } -type SudoruleFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Sudorule `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} +type UserRemoveManagerResult struct { + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } -func (t *SudoruleFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SudoruleFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SudoruleFindResult%v", string(b)) +func (t *UserRemoveManagerResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("UserRemoveManagerResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("UserRemoveManagerResult%v", string(b)) } /* -Modify Sudo Rule. +Remove principal alias from the user entry */ -func (c *Client) SudoruleMod( - reqArgs *SudoruleModArgs, - optArgs *SudoruleModOptionalArgs, // can be nil -) (*SudoruleModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := sudoruleModKwParams{ - SudoruleModArgs: reqArgs, - SudoruleModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "sudorule_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res sudoruleModResponse +func (c *Client) UserRemovePrincipal( + reqArgs *UserRemovePrincipalArgs, + optArgs *UserRemovePrincipalOptionalArgs, // can be nil +) (*UserRemovePrincipalResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := userRemovePrincipalKwParams{ + UserRemovePrincipalArgs: reqArgs, + UserRemovePrincipalOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "user_remove_principal", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res userRemovePrincipalResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudoruleModArgs struct { +type UserRemovePrincipalArgs struct { + } + +type UserRemovePrincipalOptionalArgs struct { + + /* +User login + + */ + UID *string `json:"uid,omitempty"` + + /* +Principal alias + + */ + Krbprincipalname *[]string `json:"krbprincipalname,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } - /* - Rule name +type userRemovePrincipalKwParams struct { + *UserRemovePrincipalArgs + *UserRemovePrincipalOptionalArgs - */ - Cn string `json:"cn,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } -type SudoruleModOptionalArgs struct { - - /* - Description - - */ - Description *string `json:"description,omitempty"` - - /* - Enabled - - */ - Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` - - /* - User category - User category the rule applies to - */ - Usercategory *string `json:"usercategory,omitempty"` +type userRemovePrincipalResponse struct { + Error *Error `json:"error"` + Result *UserRemovePrincipalResult `json:"result"` +} - /* - Host category - Host category the rule applies to - */ - Hostcategory *string `json:"hostcategory,omitempty"` +type UserRemovePrincipalResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } - /* - Command category - Command category the rule applies to - */ - Cmdcategory *string `json:"cmdcategory,omitempty"` +func (t *UserRemovePrincipalResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("UserRemovePrincipalResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("UserRemovePrincipalResult%v", string(b)) +} - /* - RunAs User category - RunAs User category the rule applies to - */ - Ipasudorunasusercategory *string `json:"ipasudorunasusercategory,omitempty"` +/* +Display information about a user. +*/ +func (c *Client) UserShow( + reqArgs *UserShowArgs, + optArgs *UserShowOptionalArgs, // can be nil +) (*UserShowResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := userShowKwParams{ + UserShowArgs: reqArgs, + UserShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "user_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res userShowResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - /* - RunAs Group category - RunAs Group category the rule applies to - */ - Ipasudorunasgroupcategory *string `json:"ipasudorunasgroupcategory,omitempty"` +type UserShowArgs struct { + } - /* - Sudo order - integer to order the Sudo rules - */ - Sudoorder *int `json:"sudoorder,omitempty"` +type UserShowOptionalArgs struct { + + /* +User login + + */ + UID *string `json:"uid,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +file to store certificate in + */ + Out *string `json:"out,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } - /* - External User - External User the rule applies to (sudorule-find only) - */ - Externaluser *string `json:"externaluser,omitempty"` +type userShowKwParams struct { + *UserShowArgs + *UserShowOptionalArgs - /* - External host + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - */ - Externalhost *[]string `json:"externalhost,omitempty"` +type userShowResponse struct { + Error *Error `json:"error"` + Result *UserShowResult `json:"result"` +} - /* - RunAs External User - External User the commands can run as (sudorule-find only) - */ - Ipasudorunasextuser *string `json:"ipasudorunasextuser,omitempty"` +type UserShowResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result User `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } - /* - RunAs External Group - External Group the commands can run as (sudorule-find only) - */ - Ipasudorunasextgroup *string `json:"ipasudorunasextgroup,omitempty"` +func (t *UserShowResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("UserShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("UserShowResult%v", string(b)) +} - /* +/* +Move deleted user into staged area +*/ +func (c *Client) UserStage( + reqArgs *UserStageArgs, + optArgs *UserStageOptionalArgs, // can be nil +) (*UserStageResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := userStageKwParams{ + UserStageArgs: reqArgs, + UserStageOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "user_stage", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res userStageResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` +type UserStageArgs struct { + } - /* +type UserStageOptionalArgs struct { + + /* +User login - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` + */ + UID *[]string `json:"uid,omitempty"` + + /* - /* +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + } - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` +type userStageKwParams struct { + *UserStageArgs + *UserStageOptionalArgs - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - /* +type userStageResponse struct { + Error *Error `json:"error"` + Result *UserStageResult `json:"result"` +} - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` +type UserStageResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} - -type sudoruleModKwParams struct { - *SudoruleModArgs - *SudoruleModOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type sudoruleModResponse struct { - Error *Error `json:"error"` - Result *SudoruleModResult `json:"result"` -} - -type SudoruleModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Sudorule `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *SudoruleModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SudoruleModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SudoruleModResult%v", string(b)) +func (t *UserStageResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("UserStageResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("UserStageResult%v", string(b)) } /* -Remove commands and sudo command groups affected by Sudo Rule. -*/ -func (c *Client) SudoruleRemoveAllowCommand( - reqArgs *SudoruleRemoveAllowCommandArgs, - optArgs *SudoruleRemoveAllowCommandOptionalArgs, // can be nil -) (*SudoruleRemoveAllowCommandResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := sudoruleRemoveAllowCommandKwParams{ - SudoruleRemoveAllowCommandArgs: reqArgs, - SudoruleRemoveAllowCommandOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "sudorule_remove_allow_command", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res sudoruleRemoveAllowCommandResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type SudoruleRemoveAllowCommandArgs struct { - - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` -} - -type SudoruleRemoveAllowCommandOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member sudo command - sudo commands to remove - */ - Sudocmd *[]string `json:"sudocmd,omitempty"` - - /* - member sudo command group - sudo command groups to remove - */ - Sudocmdgroup *[]string `json:"sudocmdgroup,omitempty"` -} - -type sudoruleRemoveAllowCommandKwParams struct { - *SudoruleRemoveAllowCommandArgs - *SudoruleRemoveAllowCommandOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type sudoruleRemoveAllowCommandResponse struct { - Error *Error `json:"error"` - Result *SudoruleRemoveAllowCommandResult `json:"result"` -} - -type SudoruleRemoveAllowCommandResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` +Lockout status of a user account - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` + An account may become locked if the password is entered incorrectly too + many times within a specific time period as controlled by password + policy. A locked account is a temporary condition and may be unlocked by + an administrator. - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} + This connects to each IPA master and displays the lockout status on + each one. -func (t *SudoruleRemoveAllowCommandResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SudoruleRemoveAllowCommandResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SudoruleRemoveAllowCommandResult%v", string(b)) -} + To determine whether an account is locked on a given server you need + to compare the number of failed logins and the time of the last failure. + For an account to be locked it must exceed the maxfail failures within + the failinterval duration as specified in the password policy associated + with the user. -/* -Remove commands and sudo command groups affected by Sudo Rule. + The failed login counter is modified only when a user attempts a log in + so it is possible that an account may appear locked but the last failed + login attempt is older than the lockouttime of the password policy. This + means that the user may attempt a login again. */ -func (c *Client) SudoruleRemoveDenyCommand( - reqArgs *SudoruleRemoveDenyCommandArgs, - optArgs *SudoruleRemoveDenyCommandOptionalArgs, // can be nil -) (*SudoruleRemoveDenyCommandResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := sudoruleRemoveDenyCommandKwParams{ - SudoruleRemoveDenyCommandArgs: reqArgs, - SudoruleRemoveDenyCommandOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "sudorule_remove_deny_command", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res sudoruleRemoveDenyCommandResponse +func (c *Client) UserStatus( + reqArgs *UserStatusArgs, + optArgs *UserStatusOptionalArgs, // can be nil +) (*UserStatusResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := userStatusKwParams{ + UserStatusArgs: reqArgs, + UserStatusOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "user_status", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res userStatusResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type SudoruleRemoveDenyCommandArgs struct { - - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudoruleRemoveDenyCommandOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member sudo command - sudo commands to remove - */ - Sudocmd *[]string `json:"sudocmd,omitempty"` +type UserStatusArgs struct { + } - /* - member sudo command group - sudo command groups to remove - */ - Sudocmdgroup *[]string `json:"sudocmdgroup,omitempty"` -} +type UserStatusOptionalArgs struct { + + /* +User login + + */ + Useruid *string `json:"useruid,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } -type sudoruleRemoveDenyCommandKwParams struct { - *SudoruleRemoveDenyCommandArgs - *SudoruleRemoveDenyCommandOptionalArgs +type userStatusKwParams struct { + *UserStatusArgs + *UserStatusOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } -type sudoruleRemoveDenyCommandResponse struct { - Error *Error `json:"error"` - Result *SudoruleRemoveDenyCommandResult `json:"result"` +type userStatusResponse struct { + Error *Error `json:"error"` + Result *UserStatusResult `json:"result"` } -type SudoruleRemoveDenyCommandResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} +type UserStatusResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Userstatus `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } -func (t *SudoruleRemoveDenyCommandResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SudoruleRemoveDenyCommandResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SudoruleRemoveDenyCommandResult%v", string(b)) +func (t *UserStatusResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("UserStatusResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("UserStatusResult%v", string(b)) } /* -Remove hosts and hostgroups affected by Sudo Rule. +Undelete a delete user account. */ -func (c *Client) SudoruleRemoveHost( - reqArgs *SudoruleRemoveHostArgs, - optArgs *SudoruleRemoveHostOptionalArgs, // can be nil -) (*SudoruleRemoveHostResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := sudoruleRemoveHostKwParams{ - SudoruleRemoveHostArgs: reqArgs, - SudoruleRemoveHostOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "sudorule_remove_host", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res sudoruleRemoveHostResponse +func (c *Client) UserUndel( + reqArgs *UserUndelArgs, + optArgs *UserUndelOptionalArgs, // can be nil +) (*UserUndelResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := userUndelKwParams{ + UserUndelArgs: reqArgs, + UserUndelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "user_undel", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res userUndelResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudoruleRemoveHostArgs struct { - - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` -} - -type SudoruleRemoveHostOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member host - hosts to remove - */ - Host *[]string `json:"host,omitempty"` - - /* - member host group - host groups to remove - */ - Hostgroup *[]string `json:"hostgroup,omitempty"` +type UserUndelArgs struct { + } - /* - host masks of allowed hosts +type UserUndelOptionalArgs struct { + + /* +User login - */ - Hostmask *[]string `json:"hostmask,omitempty"` -} + */ + UID *string `json:"uid,omitempty"` + } -type sudoruleRemoveHostKwParams struct { - *SudoruleRemoveHostArgs - *SudoruleRemoveHostOptionalArgs +type userUndelKwParams struct { + *UserUndelArgs + *UserUndelOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } -type sudoruleRemoveHostResponse struct { - Error *Error `json:"error"` - Result *SudoruleRemoveHostResult `json:"result"` +type userUndelResponse struct { + Error *Error `json:"error"` + Result *UserUndelResult `json:"result"` } -type SudoruleRemoveHostResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} +type UserUndelResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } -func (t *SudoruleRemoveHostResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SudoruleRemoveHostResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SudoruleRemoveHostResult%v", string(b)) +func (t *UserUndelResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("UserUndelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("UserUndelResult%v", string(b)) } /* -Remove an option from Sudo Rule. +Unlock a user account + + An account may become locked if the password is entered incorrectly too + many times within a specific time period as controlled by password + policy. A locked account is a temporary condition and may be unlocked by + an administrator. */ -func (c *Client) SudoruleRemoveOption( - reqArgs *SudoruleRemoveOptionArgs, - optArgs *SudoruleRemoveOptionOptionalArgs, // can be nil -) (*SudoruleRemoveOptionResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := sudoruleRemoveOptionKwParams{ - SudoruleRemoveOptionArgs: reqArgs, - SudoruleRemoveOptionOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "sudorule_remove_option", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res sudoruleRemoveOptionResponse +func (c *Client) UserUnlock( + reqArgs *UserUnlockArgs, + optArgs *UserUnlockOptionalArgs, // can be nil +) (*UserUnlockResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := userUnlockKwParams{ + UserUnlockArgs: reqArgs, + UserUnlockOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "user_unlock", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res userUnlockResponse if e := json.NewDecoder(readCloser).Decode(&res); e != nil { return nil, e } if res.Error != nil { return nil, res.Error } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type SudoruleRemoveOptionArgs struct { - - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` - - /* - Sudo Option - - */ - Ipasudoopt string `json:"ipasudoopt,omitempty"` + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil } -type SudoruleRemoveOptionOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` +type UserUnlockArgs struct { + } - /* +type UserUnlockOptionalArgs struct { + + /* +User login - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} + */ + UID *string `json:"uid,omitempty"` + } -type sudoruleRemoveOptionKwParams struct { - *SudoruleRemoveOptionArgs - *SudoruleRemoveOptionOptionalArgs +type userUnlockKwParams struct { + *UserUnlockArgs + *UserUnlockOptionalArgs - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` } -type sudoruleRemoveOptionResponse struct { - Error *Error `json:"error"` - Result *SudoruleRemoveOptionResult `json:"result"` +type userUnlockResponse struct { + Error *Error `json:"error"` + Result *UserUnlockResult `json:"result"` } -type SudoruleRemoveOptionResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} +type UserUnlockResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +True means the operation was successful + (required) + */ + Result bool `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } -func (t *SudoruleRemoveOptionResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SudoruleRemoveOptionResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SudoruleRemoveOptionResult%v", string(b)) +func (t *UserUnlockResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("UserUnlockResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("UserUnlockResult%v", string(b)) } /* -Remove group for Sudo to execute as. -*/ -func (c *Client) SudoruleRemoveRunasgroup( - reqArgs *SudoruleRemoveRunasgroupArgs, - optArgs *SudoruleRemoveRunasgroupOptionalArgs, // can be nil -) (*SudoruleRemoveRunasgroupResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := sudoruleRemoveRunasgroupKwParams{ - SudoruleRemoveRunasgroupArgs: reqArgs, - SudoruleRemoveRunasgroupOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "sudorule_remove_runasgroup", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res sudoruleRemoveRunasgroupResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type SudoruleRemoveRunasgroupArgs struct { - - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` -} - -type SudoruleRemoveRunasgroupOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member group - groups to remove - */ - Group *[]string `json:"group,omitempty"` -} - -type sudoruleRemoveRunasgroupKwParams struct { - *SudoruleRemoveRunasgroupArgs - *SudoruleRemoveRunasgroupOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type sudoruleRemoveRunasgroupResponse struct { - Error *Error `json:"error"` - Result *SudoruleRemoveRunasgroupResult `json:"result"` -} - -type SudoruleRemoveRunasgroupResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} - -func (t *SudoruleRemoveRunasgroupResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SudoruleRemoveRunasgroupResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SudoruleRemoveRunasgroupResult%v", string(b)) -} - -/* -Remove users and groups for Sudo to execute as. -*/ -func (c *Client) SudoruleRemoveRunasuser( - reqArgs *SudoruleRemoveRunasuserArgs, - optArgs *SudoruleRemoveRunasuserOptionalArgs, // can be nil -) (*SudoruleRemoveRunasuserResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := sudoruleRemoveRunasuserKwParams{ - SudoruleRemoveRunasuserArgs: reqArgs, - SudoruleRemoveRunasuserOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "sudorule_remove_runasuser", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res sudoruleRemoveRunasuserResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type SudoruleRemoveRunasuserArgs struct { - - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` -} - -type SudoruleRemoveRunasuserOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member user - users to remove - */ - User *[]string `json:"user,omitempty"` - - /* - member group - groups to remove - */ - Group *[]string `json:"group,omitempty"` -} - -type sudoruleRemoveRunasuserKwParams struct { - *SudoruleRemoveRunasuserArgs - *SudoruleRemoveRunasuserOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type sudoruleRemoveRunasuserResponse struct { - Error *Error `json:"error"` - Result *SudoruleRemoveRunasuserResult `json:"result"` -} - -type SudoruleRemoveRunasuserResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} - -func (t *SudoruleRemoveRunasuserResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SudoruleRemoveRunasuserResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SudoruleRemoveRunasuserResult%v", string(b)) -} - -/* -Remove users and groups affected by Sudo Rule. -*/ -func (c *Client) SudoruleRemoveUser( - reqArgs *SudoruleRemoveUserArgs, - optArgs *SudoruleRemoveUserOptionalArgs, // can be nil -) (*SudoruleRemoveUserResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := sudoruleRemoveUserKwParams{ - SudoruleRemoveUserArgs: reqArgs, - SudoruleRemoveUserOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "sudorule_remove_user", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res sudoruleRemoveUserResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type SudoruleRemoveUserArgs struct { - - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` -} - -type SudoruleRemoveUserOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member user - users to remove - */ - User *[]string `json:"user,omitempty"` - - /* - member group - groups to remove - */ - Group *[]string `json:"group,omitempty"` -} - -type sudoruleRemoveUserKwParams struct { - *SudoruleRemoveUserArgs - *SudoruleRemoveUserOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type sudoruleRemoveUserResponse struct { - Error *Error `json:"error"` - Result *SudoruleRemoveUserResult `json:"result"` -} - -type SudoruleRemoveUserResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} - -func (t *SudoruleRemoveUserResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SudoruleRemoveUserResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SudoruleRemoveUserResult%v", string(b)) -} - -/* -Display Sudo Rule. -*/ -func (c *Client) SudoruleShow( - reqArgs *SudoruleShowArgs, - optArgs *SudoruleShowOptionalArgs, // can be nil -) (*SudoruleShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := sudoruleShowKwParams{ - SudoruleShowArgs: reqArgs, - SudoruleShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "sudorule_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res sudoruleShowResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type SudoruleShowArgs struct { - - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` -} - -type SudoruleShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} - -type sudoruleShowKwParams struct { - *SudoruleShowArgs - *SudoruleShowOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type sudoruleShowResponse struct { - Error *Error `json:"error"` - Result *SudoruleShowResult `json:"result"` -} - -type SudoruleShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Sudorule `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *SudoruleShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("SudoruleShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("SudoruleShowResult%v", string(b)) -} - -/* -Search for help topics. -*/ -func (c *Client) TopicFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *TopicFindArgs, - optArgs *TopicFindOptionalArgs, // can be nil -) (*TopicFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := topicFindKwParams{ - TopicFindArgs: reqArgs, - TopicFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "topic_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res topicFindResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type TopicFindArgs struct { -} - -type TopicFindOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("name") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} - -type topicFindKwParams struct { - *TopicFindArgs - *TopicFindOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type topicFindResponse struct { - Error *Error `json:"error"` - Result *TopicFindResult `json:"result"` -} - -type TopicFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Topic `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} - -func (t *TopicFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("TopicFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("TopicFindResult%v", string(b)) -} - -/* -Display information about a help topic. */ -func (c *Client) TopicShow( - reqArgs *TopicShowArgs, - optArgs *TopicShowOptionalArgs, // can be nil -) (*TopicShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := topicShowKwParams{ - TopicShowArgs: reqArgs, - TopicShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "topic_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res topicShowResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type TopicShowArgs struct { - - /* - Full name - - */ - FullName string `json:"full_name,omitempty"` -} - -type TopicShowOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} - -type topicShowKwParams struct { - *TopicShowArgs - *TopicShowOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type topicShowResponse struct { - Error *Error `json:"error"` - Result *TopicShowResult `json:"result"` -} - -type TopicShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Topic `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *TopicShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("TopicShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("TopicShowResult%v", string(b)) -} - -/* -Add a new segment. -*/ -func (c *Client) TopologysegmentAdd( - reqArgs *TopologysegmentAddArgs, - optArgs *TopologysegmentAddOptionalArgs, // can be nil -) (*TopologysegmentAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := topologysegmentAddKwParams{ - TopologysegmentAddArgs: reqArgs, - TopologysegmentAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "topologysegment_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res topologysegmentAddResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type TopologysegmentAddArgs struct { - - /* - Suffix name - - */ - Topologysuffixcn string `json:"topologysuffixcn,omitempty"` - - /* - Left node - Left replication node - an IPA server - */ - Iparepltoposegmentleftnode string `json:"iparepltoposegmentleftnode,omitempty"` - - /* - Right node - Right replication node - an IPA server - */ - Iparepltoposegmentrightnode string `json:"iparepltoposegmentrightnode,omitempty"` -} - -type TopologysegmentAddOptionalArgs struct { - - /* - Segment name - Arbitrary string identifying the segment - */ - Cn *string `json:"cn,omitempty"` - - /* - Connectivity - Direction of replication between left and right replication node - */ - Iparepltoposegmentdirection *string `json:"iparepltoposegmentdirection,omitempty"` - - /* - Attributes to strip - A space separated list of attributes which are removed from replication updates. - */ - Nsds5replicastripattrs *string `json:"nsds5replicastripattrs,omitempty"` - - /* - Attributes to replicate - Attributes that are not replicated to a consumer server during a fractional update. E.g., `(objectclass=*) $ EXCLUDE accountlockout memberof - */ - Nsds5replicatedattributelist *string `json:"nsds5replicatedattributelist,omitempty"` - - /* - Attributes for total update - Attributes that are not replicated to a consumer server during a total update. E.g. (objectclass=*) $ EXCLUDE accountlockout - */ - Nsds5replicatedattributelisttotal *string `json:"nsds5replicatedattributelisttotal,omitempty"` - - /* - Session timeout - Number of seconds outbound LDAP operations waits for a response from the remote replica before timing out and failing - */ - Nsds5replicatimeout *int `json:"nsds5replicatimeout,omitempty"` - - /* - Replication agreement enabled - Whether a replication agreement is active, meaning whether replication is occurring per that agreement - */ - Nsds5replicaenabled *string `json:"nsds5replicaenabled,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} - -type topologysegmentAddKwParams struct { - *TopologysegmentAddArgs - *TopologysegmentAddOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type topologysegmentAddResponse struct { - Error *Error `json:"error"` - Result *TopologysegmentAddResult `json:"result"` -} - -type TopologysegmentAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Topologysegment `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *TopologysegmentAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("TopologysegmentAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("TopologysegmentAddResult%v", string(b)) -} - -/* -Delete a segment. -*/ -func (c *Client) TopologysegmentDel( - reqArgs *TopologysegmentDelArgs, - optArgs *TopologysegmentDelOptionalArgs, // can be nil -) (*TopologysegmentDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := topologysegmentDelKwParams{ - TopologysegmentDelArgs: reqArgs, - TopologysegmentDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "topologysegment_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res topologysegmentDelResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type TopologysegmentDelArgs struct { - - /* - Suffix name - - */ - Topologysuffixcn string `json:"topologysuffixcn,omitempty"` -} - -type TopologysegmentDelOptionalArgs struct { - - /* - Segment name - Arbitrary string identifying the segment - */ - Cn *[]string `json:"cn,omitempty"` - - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` -} - -type topologysegmentDelKwParams struct { - *TopologysegmentDelArgs - *TopologysegmentDelOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type topologysegmentDelResponse struct { - Error *Error `json:"error"` - Result *TopologysegmentDelResult `json:"result"` -} - -type TopologysegmentDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} - -func (t *TopologysegmentDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("TopologysegmentDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("TopologysegmentDelResult%v", string(b)) -} - -/* -Search for topology segments. -*/ -func (c *Client) TopologysegmentFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *TopologysegmentFindArgs, - optArgs *TopologysegmentFindOptionalArgs, // can be nil -) (*TopologysegmentFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := topologysegmentFindKwParams{ - TopologysegmentFindArgs: reqArgs, - TopologysegmentFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "topologysegment_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res topologysegmentFindResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type TopologysegmentFindArgs struct { - - /* - Suffix name - - */ - Topologysuffixcn string `json:"topologysuffixcn,omitempty"` -} - -type TopologysegmentFindOptionalArgs struct { - - /* - Segment name - Arbitrary string identifying the segment - */ - Cn *string `json:"cn,omitempty"` - - /* - Left node - Left replication node - an IPA server - */ - Iparepltoposegmentleftnode *string `json:"iparepltoposegmentleftnode,omitempty"` - - /* - Right node - Right replication node - an IPA server - */ - Iparepltoposegmentrightnode *string `json:"iparepltoposegmentrightnode,omitempty"` - - /* - Connectivity - Direction of replication between left and right replication node - */ - Iparepltoposegmentdirection *string `json:"iparepltoposegmentdirection,omitempty"` - - /* - Attributes to strip - A space separated list of attributes which are removed from replication updates. - */ - Nsds5replicastripattrs *string `json:"nsds5replicastripattrs,omitempty"` - - /* - Attributes to replicate - Attributes that are not replicated to a consumer server during a fractional update. E.g., `(objectclass=*) $ EXCLUDE accountlockout memberof - */ - Nsds5replicatedattributelist *string `json:"nsds5replicatedattributelist,omitempty"` - - /* - Attributes for total update - Attributes that are not replicated to a consumer server during a total update. E.g. (objectclass=*) $ EXCLUDE accountlockout - */ - Nsds5replicatedattributelisttotal *string `json:"nsds5replicatedattributelisttotal,omitempty"` - - /* - Session timeout - Number of seconds outbound LDAP operations waits for a response from the remote replica before timing out and failing - */ - Nsds5replicatimeout *int `json:"nsds5replicatimeout,omitempty"` - - /* - Replication agreement enabled - Whether a replication agreement is active, meaning whether replication is occurring per that agreement - */ - Nsds5replicaenabled *string `json:"nsds5replicaenabled,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("name") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} - -type topologysegmentFindKwParams struct { - *TopologysegmentFindArgs - *TopologysegmentFindOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type topologysegmentFindResponse struct { - Error *Error `json:"error"` - Result *TopologysegmentFindResult `json:"result"` -} - -type TopologysegmentFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Topologysegment `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} - -func (t *TopologysegmentFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("TopologysegmentFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("TopologysegmentFindResult%v", string(b)) -} - -/* -Modify a segment. -*/ -func (c *Client) TopologysegmentMod( - reqArgs *TopologysegmentModArgs, - optArgs *TopologysegmentModOptionalArgs, // can be nil -) (*TopologysegmentModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := topologysegmentModKwParams{ - TopologysegmentModArgs: reqArgs, - TopologysegmentModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "topologysegment_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res topologysegmentModResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type TopologysegmentModArgs struct { - - /* - Suffix name - - */ - Topologysuffixcn string `json:"topologysuffixcn,omitempty"` -} - -type TopologysegmentModOptionalArgs struct { - - /* - Segment name - Arbitrary string identifying the segment - */ - Cn *string `json:"cn,omitempty"` - - /* - Attributes to strip - A space separated list of attributes which are removed from replication updates. - */ - Nsds5replicastripattrs *string `json:"nsds5replicastripattrs,omitempty"` - - /* - Attributes to replicate - Attributes that are not replicated to a consumer server during a fractional update. E.g., `(objectclass=*) $ EXCLUDE accountlockout memberof - */ - Nsds5replicatedattributelist *string `json:"nsds5replicatedattributelist,omitempty"` - - /* - Attributes for total update - Attributes that are not replicated to a consumer server during a total update. E.g. (objectclass=*) $ EXCLUDE accountlockout - */ - Nsds5replicatedattributelisttotal *string `json:"nsds5replicatedattributelisttotal,omitempty"` - - /* - Session timeout - Number of seconds outbound LDAP operations waits for a response from the remote replica before timing out and failing - */ - Nsds5replicatimeout *int `json:"nsds5replicatimeout,omitempty"` - - /* - Replication agreement enabled - Whether a replication agreement is active, meaning whether replication is occurring per that agreement - */ - Nsds5replicaenabled *string `json:"nsds5replicaenabled,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} - -type topologysegmentModKwParams struct { - *TopologysegmentModArgs - *TopologysegmentModOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type topologysegmentModResponse struct { - Error *Error `json:"error"` - Result *TopologysegmentModResult `json:"result"` -} - -type TopologysegmentModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Topologysegment `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *TopologysegmentModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("TopologysegmentModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("TopologysegmentModResult%v", string(b)) -} - -/* -Request a full re-initialization of the node retrieving data from the other node. -*/ -func (c *Client) TopologysegmentReinitialize( - reqArgs *TopologysegmentReinitializeArgs, - optArgs *TopologysegmentReinitializeOptionalArgs, // can be nil -) (*TopologysegmentReinitializeResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := topologysegmentReinitializeKwParams{ - TopologysegmentReinitializeArgs: reqArgs, - TopologysegmentReinitializeOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "topologysegment_reinitialize", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res topologysegmentReinitializeResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type TopologysegmentReinitializeArgs struct { - - /* - Suffix name - - */ - Topologysuffixcn string `json:"topologysuffixcn,omitempty"` -} - -type TopologysegmentReinitializeOptionalArgs struct { - - /* - Segment name - Arbitrary string identifying the segment - */ - Cn *string `json:"cn,omitempty"` - - /* - - Initialize left node - */ - Left *bool `json:"left,omitempty"` - - /* - - Initialize right node - */ - Right *bool `json:"right,omitempty"` - - /* - - Stop already started refresh of chosen node(s) - */ - Stop *bool `json:"stop,omitempty"` -} - -type topologysegmentReinitializeKwParams struct { - *TopologysegmentReinitializeArgs - *TopologysegmentReinitializeOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type topologysegmentReinitializeResponse struct { - Error *Error `json:"error"` - Result *TopologysegmentReinitializeResult `json:"result"` -} - -type TopologysegmentReinitializeResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - True means the operation was successful - (required) - */ - Result bool `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *TopologysegmentReinitializeResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("TopologysegmentReinitializeResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("TopologysegmentReinitializeResult%v", string(b)) -} - -/* -Display a segment. -*/ -func (c *Client) TopologysegmentShow( - reqArgs *TopologysegmentShowArgs, - optArgs *TopologysegmentShowOptionalArgs, // can be nil -) (*TopologysegmentShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := topologysegmentShowKwParams{ - TopologysegmentShowArgs: reqArgs, - TopologysegmentShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "topologysegment_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res topologysegmentShowResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type TopologysegmentShowArgs struct { - - /* - Suffix name - - */ - Topologysuffixcn string `json:"topologysuffixcn,omitempty"` -} - -type TopologysegmentShowOptionalArgs struct { - - /* - Segment name - Arbitrary string identifying the segment - */ - Cn *string `json:"cn,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} - -type topologysegmentShowKwParams struct { - *TopologysegmentShowArgs - *TopologysegmentShowOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type topologysegmentShowResponse struct { - Error *Error `json:"error"` - Result *TopologysegmentShowResult `json:"result"` -} - -type TopologysegmentShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Topologysegment `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *TopologysegmentShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("TopologysegmentShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("TopologysegmentShowResult%v", string(b)) -} - -/* -Add a new topology suffix to be managed. -*/ -func (c *Client) TopologysuffixAdd( - reqArgs *TopologysuffixAddArgs, - optArgs *TopologysuffixAddOptionalArgs, // can be nil -) (*TopologysuffixAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := topologysuffixAddKwParams{ - TopologysuffixAddArgs: reqArgs, - TopologysuffixAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "topologysuffix_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res topologysuffixAddResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type TopologysuffixAddArgs struct { - - /* - Suffix name - - */ - Cn string `json:"cn,omitempty"` - - /* - Managed LDAP suffix DN - - */ - Iparepltopoconfroot string `json:"iparepltopoconfroot,omitempty"` -} - -type TopologysuffixAddOptionalArgs struct { - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} - -type topologysuffixAddKwParams struct { - *TopologysuffixAddArgs - *TopologysuffixAddOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type topologysuffixAddResponse struct { - Error *Error `json:"error"` - Result *TopologysuffixAddResult `json:"result"` -} - -type TopologysuffixAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Topologysuffix `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *TopologysuffixAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("TopologysuffixAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("TopologysuffixAddResult%v", string(b)) -} - -/* -Delete a topology suffix. -*/ -func (c *Client) TopologysuffixDel( - reqArgs *TopologysuffixDelArgs, - optArgs *TopologysuffixDelOptionalArgs, // can be nil -) (*TopologysuffixDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := topologysuffixDelKwParams{ - TopologysuffixDelArgs: reqArgs, - TopologysuffixDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "topologysuffix_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res topologysuffixDelResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type TopologysuffixDelArgs struct { - - /* - Suffix name - - */ - Cn []string `json:"cn,omitempty"` -} - -type TopologysuffixDelOptionalArgs struct { - - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` -} - -type topologysuffixDelKwParams struct { - *TopologysuffixDelArgs - *TopologysuffixDelOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type topologysuffixDelResponse struct { - Error *Error `json:"error"` - Result *TopologysuffixDelResult `json:"result"` -} - -type TopologysuffixDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} - -func (t *TopologysuffixDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("TopologysuffixDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("TopologysuffixDelResult%v", string(b)) -} - -/* -Search for topology suffixes. -*/ -func (c *Client) TopologysuffixFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *TopologysuffixFindArgs, - optArgs *TopologysuffixFindOptionalArgs, // can be nil -) (*TopologysuffixFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := topologysuffixFindKwParams{ - TopologysuffixFindArgs: reqArgs, - TopologysuffixFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "topologysuffix_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res topologysuffixFindResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type TopologysuffixFindArgs struct { -} - -type TopologysuffixFindOptionalArgs struct { - - /* - Suffix name - - */ - Cn *string `json:"cn,omitempty"` - - /* - Managed LDAP suffix DN - - */ - Iparepltopoconfroot *string `json:"iparepltopoconfroot,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("name") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} - -type topologysuffixFindKwParams struct { - *TopologysuffixFindArgs - *TopologysuffixFindOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type topologysuffixFindResponse struct { - Error *Error `json:"error"` - Result *TopologysuffixFindResult `json:"result"` -} - -type TopologysuffixFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Topologysuffix `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} - -func (t *TopologysuffixFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("TopologysuffixFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("TopologysuffixFindResult%v", string(b)) -} - -/* -Modify a topology suffix. -*/ -func (c *Client) TopologysuffixMod( - reqArgs *TopologysuffixModArgs, - optArgs *TopologysuffixModOptionalArgs, // can be nil -) (*TopologysuffixModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := topologysuffixModKwParams{ - TopologysuffixModArgs: reqArgs, - TopologysuffixModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "topologysuffix_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res topologysuffixModResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type TopologysuffixModArgs struct { - - /* - Suffix name - - */ - Cn string `json:"cn,omitempty"` -} - -type TopologysuffixModOptionalArgs struct { - - /* - Managed LDAP suffix DN - - */ - Iparepltopoconfroot *string `json:"iparepltopoconfroot,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} - -type topologysuffixModKwParams struct { - *TopologysuffixModArgs - *TopologysuffixModOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type topologysuffixModResponse struct { - Error *Error `json:"error"` - Result *TopologysuffixModResult `json:"result"` -} - -type TopologysuffixModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Topologysuffix `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *TopologysuffixModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("TopologysuffixModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("TopologysuffixModResult%v", string(b)) -} - -/* -Show managed suffix. -*/ -func (c *Client) TopologysuffixShow( - reqArgs *TopologysuffixShowArgs, - optArgs *TopologysuffixShowOptionalArgs, // can be nil -) (*TopologysuffixShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := topologysuffixShowKwParams{ - TopologysuffixShowArgs: reqArgs, - TopologysuffixShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "topologysuffix_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res topologysuffixShowResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type TopologysuffixShowArgs struct { - - /* - Suffix name - - */ - Cn string `json:"cn,omitempty"` -} - -type TopologysuffixShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} - -type topologysuffixShowKwParams struct { - *TopologysuffixShowArgs - *TopologysuffixShowOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type topologysuffixShowResponse struct { - Error *Error `json:"error"` - Result *TopologysuffixShowResult `json:"result"` -} - -type TopologysuffixShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Topologysuffix `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *TopologysuffixShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("TopologysuffixShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("TopologysuffixShowResult%v", string(b)) -} - -/* -Verify replication topology for suffix. - -Checks done: - 1. check if a topology is not disconnected. In other words if there are - replication paths between all servers. - 2. check if servers don't have more than the recommended number of - replication agreements -*/ -func (c *Client) TopologysuffixVerify( - reqArgs *TopologysuffixVerifyArgs, - optArgs *TopologysuffixVerifyOptionalArgs, // can be nil -) (*TopologysuffixVerifyResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := topologysuffixVerifyKwParams{ - TopologysuffixVerifyArgs: reqArgs, - TopologysuffixVerifyOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "topologysuffix_verify", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res topologysuffixVerifyResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type TopologysuffixVerifyArgs struct { - - /* - Suffix name - - */ - Cn string `json:"cn,omitempty"` -} - -type TopologysuffixVerifyOptionalArgs struct { -} - -type topologysuffixVerifyKwParams struct { - *TopologysuffixVerifyArgs - *TopologysuffixVerifyOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type topologysuffixVerifyResponse struct { - Error *Error `json:"error"` - Result *TopologysuffixVerifyResult `json:"result"` -} - -type TopologysuffixVerifyResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` -} - -func (t *TopologysuffixVerifyResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("TopologysuffixVerifyResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("TopologysuffixVerifyResult%v", string(b)) -} - -/* -Add new trust to use. - -This command establishes trust relationship to another domain -which becomes 'trusted'. As result, users of the trusted domain -may access resources of this domain. - -Only trusts to Active Directory domains are supported right now. - -The command can be safely run multiple times against the same domain, -this will cause change to trust relationship credentials on both -sides. -*/ -func (c *Client) TrustAdd( - reqArgs *TrustAddArgs, - optArgs *TrustAddOptionalArgs, // can be nil -) (*TrustAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := trustAddKwParams{ - TrustAddArgs: reqArgs, - TrustAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "trust_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res trustAddResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type TrustAddArgs struct { - - /* - Realm name - - */ - Cn string `json:"cn,omitempty"` -} - -type TrustAddOptionalArgs struct { - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - Trust type (ad for Active Directory, default) - - */ - TrustType *string `json:"trust_type,omitempty"` - - /* - Active Directory domain administrator - - */ - RealmAdmin *string `json:"realm_admin,omitempty"` - - /* - Active Directory domain administrator's password - - */ - RealmPasswd *string `json:"realm_passwd,omitempty"` - - /* - Domain controller for the Active Directory domain (optional) - - */ - RealmServer *string `json:"realm_server,omitempty"` - - /* - Shared secret for the trust - - */ - TrustSecret *string `json:"trust_secret,omitempty"` - - /* - First Posix ID of the range reserved for the trusted domain - - */ - BaseID *int `json:"base_id,omitempty"` - - /* - Size of the ID range reserved for the trusted domain - - */ - RangeSize *int `json:"range_size,omitempty"` - - /* - Range type - Type of trusted domain ID range, one of ipa-ad-trust-posix, ipa-ad-trust - */ - RangeType *string `json:"range_type,omitempty"` - - /* - Two-way trust - Establish bi-directional trust. By default trust is inbound one-way only. - */ - Bidirectional *bool `json:"bidirectional,omitempty"` - - /* - External trust - Establish external trust to a domain in another forest. The trust is not transitive beyond the domain. - */ - External *bool `json:"external,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} - -type trustAddKwParams struct { - *TrustAddArgs - *TrustAddOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type trustAddResponse struct { - Error *Error `json:"error"` - Result *TrustAddResult `json:"result"` -} - -type TrustAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Trust `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *TrustAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("TrustAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("TrustAddResult%v", string(b)) -} - -/* -Delete a trust. -*/ -func (c *Client) TrustDel( - reqArgs *TrustDelArgs, - optArgs *TrustDelOptionalArgs, // can be nil -) (*TrustDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := trustDelKwParams{ - TrustDelArgs: reqArgs, - TrustDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "trust_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res trustDelResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type TrustDelArgs struct { - - /* - Realm name - - */ - Cn []string `json:"cn,omitempty"` -} - -type TrustDelOptionalArgs struct { - - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` -} - -type trustDelKwParams struct { - *TrustDelArgs - *TrustDelOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type trustDelResponse struct { - Error *Error `json:"error"` - Result *TrustDelResult `json:"result"` -} - -type TrustDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} - -func (t *TrustDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("TrustDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("TrustDelResult%v", string(b)) -} - -/* -Refresh list of the domains associated with the trust -*/ -func (c *Client) TrustFetchDomains( - reqArgs *TrustFetchDomainsArgs, - optArgs *TrustFetchDomainsOptionalArgs, // can be nil -) (*TrustFetchDomainsResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := trustFetchDomainsKwParams{ - TrustFetchDomainsArgs: reqArgs, - TrustFetchDomainsOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "trust_fetch_domains", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res trustFetchDomainsResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type TrustFetchDomainsArgs struct { - - /* - Realm name - - */ - Cn string `json:"cn,omitempty"` -} - -type TrustFetchDomainsOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - Domain controller for the Active Directory domain (optional) - - */ - RealmServer *string `json:"realm_server,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} - -type trustFetchDomainsKwParams struct { - *TrustFetchDomainsArgs - *TrustFetchDomainsOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type trustFetchDomainsResponse struct { - Error *Error `json:"error"` - Result *TrustFetchDomainsResult `json:"result"` -} - -type TrustFetchDomainsResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []interface{} `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} - -func (t *TrustFetchDomainsResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("TrustFetchDomainsResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("TrustFetchDomainsResult%v", string(b)) -} - -/* -Search for trusts. -*/ -func (c *Client) TrustFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *TrustFindArgs, - optArgs *TrustFindOptionalArgs, // can be nil -) (*TrustFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := trustFindKwParams{ - TrustFindArgs: reqArgs, - TrustFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "trust_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res trustFindResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type TrustFindArgs struct { -} - -type TrustFindOptionalArgs struct { - - /* - Realm name - - */ - Cn *string `json:"cn,omitempty"` - - /* - Domain NetBIOS name - - */ - Ipantflatname *string `json:"ipantflatname,omitempty"` - - /* - Domain Security Identifier - - */ - Ipanttrusteddomainsid *string `json:"ipanttrusteddomainsid,omitempty"` - - /* - SID blacklist incoming - - */ - Ipantsidblacklistincoming *[]string `json:"ipantsidblacklistincoming,omitempty"` - - /* - SID blacklist outgoing - - */ - Ipantsidblacklistoutgoing *[]string `json:"ipantsidblacklistoutgoing,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("realm") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} - -type trustFindKwParams struct { - *TrustFindArgs - *TrustFindOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type trustFindResponse struct { - Error *Error `json:"error"` - Result *TrustFindResult `json:"result"` -} - -type TrustFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Trust `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} - -func (t *TrustFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("TrustFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("TrustFindResult%v", string(b)) -} - -/* -Modify a trust (for future use). - - Currently only the default option to modify the LDAP attributes is - available. More specific options will be added in coming releases. -*/ -func (c *Client) TrustMod( - reqArgs *TrustModArgs, - optArgs *TrustModOptionalArgs, // can be nil -) (*TrustModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := trustModKwParams{ - TrustModArgs: reqArgs, - TrustModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "trust_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res trustModResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type TrustModArgs struct { - - /* - Realm name - - */ - Cn string `json:"cn,omitempty"` -} - -type TrustModOptionalArgs struct { - - /* - SID blacklist incoming - - */ - Ipantsidblacklistincoming *[]string `json:"ipantsidblacklistincoming,omitempty"` - - /* - SID blacklist outgoing - - */ - Ipantsidblacklistoutgoing *[]string `json:"ipantsidblacklistoutgoing,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} - -type trustModKwParams struct { - *TrustModArgs - *TrustModOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type trustModResponse struct { - Error *Error `json:"error"` - Result *TrustModResult `json:"result"` -} - -type TrustModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Trust `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *TrustModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("TrustModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("TrustModResult%v", string(b)) -} - -/* -Resolve security identifiers of users and groups in trusted domains -*/ -func (c *Client) TrustResolve( - reqArgs *TrustResolveArgs, - optArgs *TrustResolveOptionalArgs, // can be nil -) (*TrustResolveResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := trustResolveKwParams{ - TrustResolveArgs: reqArgs, - TrustResolveOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "trust_resolve", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res trustResolveResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type TrustResolveArgs struct { - - /* - Security Identifiers (SIDs) - - */ - Sids []string `json:"sids,omitempty"` -} - -type TrustResolveOptionalArgs struct { - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} - -type trustResolveKwParams struct { - *TrustResolveArgs - *TrustResolveOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type trustResolveResponse struct { - Error *Error `json:"error"` - Result *TrustResolveResult `json:"result"` -} - -type TrustResolveResult struct { - - /* - - (required) - */ - Result []interface{} `json:"result,omitempty"` -} - -func (t *TrustResolveResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("TrustResolveResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("TrustResolveResult%v", string(b)) -} - -/* -Display information about a trust. -*/ -func (c *Client) TrustShow( - reqArgs *TrustShowArgs, - optArgs *TrustShowOptionalArgs, // can be nil -) (*TrustShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := trustShowKwParams{ - TrustShowArgs: reqArgs, - TrustShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "trust_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res trustShowResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type TrustShowArgs struct { - - /* - Realm name - - */ - Cn string `json:"cn,omitempty"` -} - -type TrustShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} - -type trustShowKwParams struct { - *TrustShowArgs - *TrustShowOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type trustShowResponse struct { - Error *Error `json:"error"` - Result *TrustShowResult `json:"result"` -} - -type TrustShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Trust `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *TrustShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("TrustShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("TrustShowResult%v", string(b)) -} - -/* -Modify global trust configuration. -*/ -func (c *Client) TrustconfigMod( - reqArgs *TrustconfigModArgs, - optArgs *TrustconfigModOptionalArgs, // can be nil -) (*TrustconfigModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := trustconfigModKwParams{ - TrustconfigModArgs: reqArgs, - TrustconfigModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "trustconfig_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res trustconfigModResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type TrustconfigModArgs struct { -} - -type TrustconfigModOptionalArgs struct { - - /* - Fallback primary group - - */ - Ipantfallbackprimarygroup *string `json:"ipantfallbackprimarygroup,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - Trust type (ad for Active Directory, default) - - */ - TrustType *string `json:"trust_type,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} - -type trustconfigModKwParams struct { - *TrustconfigModArgs - *TrustconfigModOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type trustconfigModResponse struct { - Error *Error `json:"error"` - Result *TrustconfigModResult `json:"result"` -} - -type TrustconfigModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Trustconfig `json:"result,omitempty"` - - /* - - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *TrustconfigModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("TrustconfigModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("TrustconfigModResult%v", string(b)) -} - -/* -Show global trust configuration. -*/ -func (c *Client) TrustconfigShow( - reqArgs *TrustconfigShowArgs, - optArgs *TrustconfigShowOptionalArgs, // can be nil -) (*TrustconfigShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := trustconfigShowKwParams{ - TrustconfigShowArgs: reqArgs, - TrustconfigShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "trustconfig_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res trustconfigShowResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type TrustconfigShowArgs struct { -} - -type TrustconfigShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - Trust type (ad for Active Directory, default) - - */ - TrustType *string `json:"trust_type,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} - -type trustconfigShowKwParams struct { - *TrustconfigShowArgs - *TrustconfigShowOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type trustconfigShowResponse struct { - Error *Error `json:"error"` - Result *TrustconfigShowResult `json:"result"` -} - -type TrustconfigShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Trustconfig `json:"result,omitempty"` - - /* - - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *TrustconfigShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("TrustconfigShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("TrustconfigShowResult%v", string(b)) -} - -/* -Allow access from the trusted domain -*/ -func (c *Client) TrustdomainAdd( - reqArgs *TrustdomainAddArgs, - optArgs *TrustdomainAddOptionalArgs, // can be nil -) (*TrustdomainAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := trustdomainAddKwParams{ - TrustdomainAddArgs: reqArgs, - TrustdomainAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "trustdomain_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res trustdomainAddResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type TrustdomainAddArgs struct { - - /* - Realm name - - */ - Trustcn string `json:"trustcn,omitempty"` - - /* - Domain name - - */ - Cn string `json:"cn,omitempty"` -} - -type TrustdomainAddOptionalArgs struct { - - /* - Domain NetBIOS name - - */ - Ipantflatname *string `json:"ipantflatname,omitempty"` - - /* - Domain Security Identifier - - */ - Ipanttrusteddomainsid *string `json:"ipanttrusteddomainsid,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - Trust type (ad for Active Directory, default) - - */ - TrustType *string `json:"trust_type,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} - -type trustdomainAddKwParams struct { - *TrustdomainAddArgs - *TrustdomainAddOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type trustdomainAddResponse struct { - Error *Error `json:"error"` - Result *TrustdomainAddResult `json:"result"` -} - -type TrustdomainAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Trustdomain `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *TrustdomainAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("TrustdomainAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("TrustdomainAddResult%v", string(b)) -} - -/* -Remove information about the domain associated with the trust. -*/ -func (c *Client) TrustdomainDel( - reqArgs *TrustdomainDelArgs, - optArgs *TrustdomainDelOptionalArgs, // can be nil -) (*TrustdomainDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := trustdomainDelKwParams{ - TrustdomainDelArgs: reqArgs, - TrustdomainDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "trustdomain_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res trustdomainDelResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type TrustdomainDelArgs struct { - - /* - Realm name - - */ - Trustcn string `json:"trustcn,omitempty"` - - /* - Domain name - - */ - Cn []string `json:"cn,omitempty"` -} - -type TrustdomainDelOptionalArgs struct { - - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` -} - -type trustdomainDelKwParams struct { - *TrustdomainDelArgs - *TrustdomainDelOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type trustdomainDelResponse struct { - Error *Error `json:"error"` - Result *TrustdomainDelResult `json:"result"` -} - -type TrustdomainDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} - -func (t *TrustdomainDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("TrustdomainDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("TrustdomainDelResult%v", string(b)) -} - -/* -Disable use of IPA resources by the domain of the trust -*/ -func (c *Client) TrustdomainDisable( - reqArgs *TrustdomainDisableArgs, - optArgs *TrustdomainDisableOptionalArgs, // can be nil -) (*TrustdomainDisableResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := trustdomainDisableKwParams{ - TrustdomainDisableArgs: reqArgs, - TrustdomainDisableOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "trustdomain_disable", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res trustdomainDisableResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type TrustdomainDisableArgs struct { - - /* - Realm name - - */ - Trustcn string `json:"trustcn,omitempty"` - - /* - Domain name - - */ - Cn string `json:"cn,omitempty"` -} - -type TrustdomainDisableOptionalArgs struct { -} - -type trustdomainDisableKwParams struct { - *TrustdomainDisableArgs - *TrustdomainDisableOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type trustdomainDisableResponse struct { - Error *Error `json:"error"` - Result *TrustdomainDisableResult `json:"result"` -} - -type TrustdomainDisableResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - True means the operation was successful - (required) - */ - Result bool `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *TrustdomainDisableResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("TrustdomainDisableResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("TrustdomainDisableResult%v", string(b)) -} - -/* -Allow use of IPA resources by the domain of the trust -*/ -func (c *Client) TrustdomainEnable( - reqArgs *TrustdomainEnableArgs, - optArgs *TrustdomainEnableOptionalArgs, // can be nil -) (*TrustdomainEnableResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := trustdomainEnableKwParams{ - TrustdomainEnableArgs: reqArgs, - TrustdomainEnableOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "trustdomain_enable", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res trustdomainEnableResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type TrustdomainEnableArgs struct { - - /* - Realm name - - */ - Trustcn string `json:"trustcn,omitempty"` - - /* - Domain name - - */ - Cn string `json:"cn,omitempty"` -} - -type TrustdomainEnableOptionalArgs struct { -} - -type trustdomainEnableKwParams struct { - *TrustdomainEnableArgs - *TrustdomainEnableOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type trustdomainEnableResponse struct { - Error *Error `json:"error"` - Result *TrustdomainEnableResult `json:"result"` -} - -type TrustdomainEnableResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - True means the operation was successful - (required) - */ - Result bool `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *TrustdomainEnableResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("TrustdomainEnableResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("TrustdomainEnableResult%v", string(b)) -} - -/* -Search domains of the trust -*/ -func (c *Client) TrustdomainFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *TrustdomainFindArgs, - optArgs *TrustdomainFindOptionalArgs, // can be nil -) (*TrustdomainFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := trustdomainFindKwParams{ - TrustdomainFindArgs: reqArgs, - TrustdomainFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "trustdomain_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res trustdomainFindResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type TrustdomainFindArgs struct { - - /* - Realm name - - */ - Trustcn string `json:"trustcn,omitempty"` -} - -type TrustdomainFindOptionalArgs struct { - - /* - Domain name - - */ - Cn *string `json:"cn,omitempty"` - - /* - Domain NetBIOS name - - */ - Ipantflatname *string `json:"ipantflatname,omitempty"` - - /* - Domain Security Identifier - - */ - Ipanttrusteddomainsid *string `json:"ipanttrusteddomainsid,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("domain") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} - -type trustdomainFindKwParams struct { - *TrustdomainFindArgs - *TrustdomainFindOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type trustdomainFindResponse struct { - Error *Error `json:"error"` - Result *TrustdomainFindResult `json:"result"` -} - -type TrustdomainFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Trustdomain `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} - -func (t *TrustdomainFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("TrustdomainFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("TrustdomainFindResult%v", string(b)) -} - -/* -Modify trustdomain of the trust -*/ -func (c *Client) TrustdomainMod( - reqArgs *TrustdomainModArgs, - optArgs *TrustdomainModOptionalArgs, // can be nil -) (*TrustdomainModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := trustdomainModKwParams{ - TrustdomainModArgs: reqArgs, - TrustdomainModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "trustdomain_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res trustdomainModResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type TrustdomainModArgs struct { - - /* - Realm name - - */ - Trustcn string `json:"trustcn,omitempty"` - - /* - Domain name - - */ - Cn string `json:"cn,omitempty"` -} - -type TrustdomainModOptionalArgs struct { - - /* - Domain NetBIOS name - - */ - Ipantflatname *string `json:"ipantflatname,omitempty"` - - /* - Domain Security Identifier - - */ - Ipanttrusteddomainsid *string `json:"ipanttrusteddomainsid,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - Trust type (ad for Active Directory, default) - - */ - TrustType *string `json:"trust_type,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} - -type trustdomainModKwParams struct { - *TrustdomainModArgs - *TrustdomainModOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type trustdomainModResponse struct { - Error *Error `json:"error"` - Result *TrustdomainModResult `json:"result"` -} - -type TrustdomainModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Trustdomain `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *TrustdomainModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("TrustdomainModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("TrustdomainModResult%v", string(b)) -} - -/* -Add a new user. -*/ -func (c *Client) UserAdd( - reqArgs *UserAddArgs, - optArgs *UserAddOptionalArgs, // can be nil -) (*UserAddResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := userAddKwParams{ - UserAddArgs: reqArgs, - UserAddOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "user_add", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res userAddResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type UserAddArgs struct { - - /* - First name - - */ - Givenname string `json:"givenname,omitempty"` - - /* - Last name - - */ - Sn string `json:"sn,omitempty"` -} - -type UserAddOptionalArgs struct { - - /* - User login - - */ - UID *string `json:"uid,omitempty"` - - /* - Full name - - */ - Cn *string `json:"cn,omitempty"` - - /* - Display name - - */ - Displayname *string `json:"displayname,omitempty"` - - /* - Initials - - */ - Initials *string `json:"initials,omitempty"` - - /* - Home directory - - */ - Homedirectory *string `json:"homedirectory,omitempty"` - - /* - GECOS - - */ - Gecos *string `json:"gecos,omitempty"` - - /* - Login shell - - */ - Loginshell *string `json:"loginshell,omitempty"` - - /* - Principal alias - - */ - Krbprincipalname *[]string `json:"krbprincipalname,omitempty"` - - /* - Kerberos principal expiration - - */ - Krbprincipalexpiration *time.Time `json:"krbprincipalexpiration,omitempty"` - - /* - Email address - - */ - Mail *[]string `json:"mail,omitempty"` - - /* - Password - Prompt to set the user password - */ - Userpassword *string `json:"userpassword,omitempty"` - - /* - - Generate a random user password - */ - Random *bool `json:"random,omitempty"` - - /* - UID - User ID Number (system will assign one if not provided) - */ - Uidnumber *int `json:"uidnumber,omitempty"` - - /* - GID - Group ID Number - */ - Gidnumber *int `json:"gidnumber,omitempty"` - - /* - Street address - - */ - Street *string `json:"street,omitempty"` - - /* - City - - */ - L *string `json:"l,omitempty"` - - /* - State/Province - - */ - St *string `json:"st,omitempty"` - - /* - ZIP - - */ - Postalcode *string `json:"postalcode,omitempty"` - - /* - Telephone Number - - */ - Telephonenumber *[]string `json:"telephonenumber,omitempty"` - - /* - Mobile Telephone Number - - */ - Mobile *[]string `json:"mobile,omitempty"` - - /* - Pager Number - - */ - Pager *[]string `json:"pager,omitempty"` - - /* - Fax Number - - */ - Facsimiletelephonenumber *[]string `json:"facsimiletelephonenumber,omitempty"` - - /* - Org. Unit - - */ - Ou *string `json:"ou,omitempty"` - - /* - Job Title - - */ - Title *string `json:"title,omitempty"` - - /* - Manager - - */ - Manager *string `json:"manager,omitempty"` - - /* - Car License - - */ - Carlicense *[]string `json:"carlicense,omitempty"` - - /* - SSH public key - - */ - Ipasshpubkey *[]string `json:"ipasshpubkey,omitempty"` - - /* - User authentication types - Types of supported user authentication - */ - Ipauserauthtype *[]string `json:"ipauserauthtype,omitempty"` - - /* - Class - User category (semantics placed on this attribute are for local interpretation) - */ - Userclass *[]string `json:"userclass,omitempty"` - - /* - RADIUS proxy configuration - - */ - Ipatokenradiusconfiglink *string `json:"ipatokenradiusconfiglink,omitempty"` - - /* - RADIUS proxy username - - */ - Ipatokenradiususername *string `json:"ipatokenradiususername,omitempty"` - - /* - Department Number - - */ - Departmentnumber *[]string `json:"departmentnumber,omitempty"` - - /* - Employee Number - - */ - Employeenumber *string `json:"employeenumber,omitempty"` - - /* - Employee Type - - */ - Employeetype *string `json:"employeetype,omitempty"` - - /* - Preferred Language - - */ - Preferredlanguage *string `json:"preferredlanguage,omitempty"` - - /* - Certificate - Base-64 encoded user certificate - */ - Usercertificate *[]string `json:"usercertificate,omitempty"` - - /* - Account disabled - - */ - Nsaccountlock *bool `json:"nsaccountlock,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Don't create user private group - */ - Noprivate *bool `json:"noprivate,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} - -type userAddKwParams struct { - *UserAddArgs - *UserAddOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type userAddResponse struct { - Error *Error `json:"error"` - Result *UserAddResult `json:"result"` -} - -type UserAddResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result User `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *UserAddResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("UserAddResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("UserAddResult%v", string(b)) -} - -/* -Add one or more certificates to the user entry -*/ -func (c *Client) UserAddCert( - reqArgs *UserAddCertArgs, - optArgs *UserAddCertOptionalArgs, // can be nil -) (*UserAddCertResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := userAddCertKwParams{ - UserAddCertArgs: reqArgs, - UserAddCertOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "user_add_cert", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res userAddCertResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type UserAddCertArgs struct { - - /* - Certificate - Base-64 encoded user certificate - */ - Usercertificate []string `json:"usercertificate,omitempty"` -} - -type UserAddCertOptionalArgs struct { - - /* - User login - - */ - UID *string `json:"uid,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} - -type userAddCertKwParams struct { - *UserAddCertArgs - *UserAddCertOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type userAddCertResponse struct { - Error *Error `json:"error"` - Result *UserAddCertResult `json:"result"` -} - -type UserAddCertResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *UserAddCertResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("UserAddCertResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("UserAddCertResult%v", string(b)) -} - -/* -Add a manager to the user entry -*/ -func (c *Client) UserAddManager( - reqArgs *UserAddManagerArgs, - optArgs *UserAddManagerOptionalArgs, // can be nil -) (*UserAddManagerResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := userAddManagerKwParams{ - UserAddManagerArgs: reqArgs, - UserAddManagerOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "user_add_manager", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res userAddManagerResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type UserAddManagerArgs struct { -} - -type UserAddManagerOptionalArgs struct { - - /* - User login - - */ - UID *string `json:"uid,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member user - users to add - */ - User *[]string `json:"user,omitempty"` -} - -type userAddManagerKwParams struct { - *UserAddManagerArgs - *UserAddManagerOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type userAddManagerResponse struct { - Error *Error `json:"error"` - Result *UserAddManagerResult `json:"result"` -} - -type UserAddManagerResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` -} - -func (t *UserAddManagerResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("UserAddManagerResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("UserAddManagerResult%v", string(b)) -} - -/* -Add new principal alias to the user entry -*/ -func (c *Client) UserAddPrincipal( - reqArgs *UserAddPrincipalArgs, - optArgs *UserAddPrincipalOptionalArgs, // can be nil -) (*UserAddPrincipalResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := userAddPrincipalKwParams{ - UserAddPrincipalArgs: reqArgs, - UserAddPrincipalOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "user_add_principal", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res userAddPrincipalResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type UserAddPrincipalArgs struct { -} - -type UserAddPrincipalOptionalArgs struct { - - /* - User login - - */ - UID *string `json:"uid,omitempty"` - - /* - Principal alias - - */ - Krbprincipalname *[]string `json:"krbprincipalname,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} - -type userAddPrincipalKwParams struct { - *UserAddPrincipalArgs - *UserAddPrincipalOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type userAddPrincipalResponse struct { - Error *Error `json:"error"` - Result *UserAddPrincipalResult `json:"result"` -} - -type UserAddPrincipalResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *UserAddPrincipalResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("UserAddPrincipalResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("UserAddPrincipalResult%v", string(b)) -} - -/* -Delete a user. -*/ -func (c *Client) UserDel( - reqArgs *UserDelArgs, - optArgs *UserDelOptionalArgs, // can be nil -) (*UserDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := userDelKwParams{ - UserDelArgs: reqArgs, - UserDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "user_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res userDelResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type UserDelArgs struct { -} - -type UserDelOptionalArgs struct { - - /* - User login - - */ - UID *[]string `json:"uid,omitempty"` - - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` - - /* - - - */ - Preserve *bool `json:"preserve,omitempty"` -} - -type userDelKwParams struct { - *UserDelArgs - *UserDelOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type userDelResponse struct { - Error *Error `json:"error"` - Result *UserDelResult `json:"result"` -} - -type UserDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} - -func (t *UserDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("UserDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("UserDelResult%v", string(b)) -} - -/* -Disable a user account. -*/ -func (c *Client) UserDisable( - reqArgs *UserDisableArgs, - optArgs *UserDisableOptionalArgs, // can be nil -) (*UserDisableResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := userDisableKwParams{ - UserDisableArgs: reqArgs, - UserDisableOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "user_disable", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res userDisableResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type UserDisableArgs struct { -} - -type UserDisableOptionalArgs struct { - - /* - User login - - */ - UID *string `json:"uid,omitempty"` -} - -type userDisableKwParams struct { - *UserDisableArgs - *UserDisableOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type userDisableResponse struct { - Error *Error `json:"error"` - Result *UserDisableResult `json:"result"` -} - -type UserDisableResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - True means the operation was successful - (required) - */ - Result bool `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *UserDisableResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("UserDisableResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("UserDisableResult%v", string(b)) -} - -/* -Enable a user account. -*/ -func (c *Client) UserEnable( - reqArgs *UserEnableArgs, - optArgs *UserEnableOptionalArgs, // can be nil -) (*UserEnableResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := userEnableKwParams{ - UserEnableArgs: reqArgs, - UserEnableOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "user_enable", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res userEnableResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type UserEnableArgs struct { -} - -type UserEnableOptionalArgs struct { - - /* - User login - - */ - UID *string `json:"uid,omitempty"` -} - -type userEnableKwParams struct { - *UserEnableArgs - *UserEnableOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type userEnableResponse struct { - Error *Error `json:"error"` - Result *UserEnableResult `json:"result"` -} - -type UserEnableResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - True means the operation was successful - (required) - */ - Result bool `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *UserEnableResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("UserEnableResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("UserEnableResult%v", string(b)) -} - -/* -Search for users. -*/ -func (c *Client) UserFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *UserFindArgs, - optArgs *UserFindOptionalArgs, // can be nil -) (*UserFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := userFindKwParams{ - UserFindArgs: reqArgs, - UserFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "user_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res userFindResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type UserFindArgs struct { -} - -type UserFindOptionalArgs struct { - - /* - User login - - */ - UID *string `json:"uid,omitempty"` - - /* - First name - - */ - Givenname *string `json:"givenname,omitempty"` - - /* - Last name - - */ - Sn *string `json:"sn,omitempty"` - - /* - Full name - - */ - Cn *string `json:"cn,omitempty"` - - /* - Display name - - */ - Displayname *string `json:"displayname,omitempty"` - - /* - Initials - - */ - Initials *string `json:"initials,omitempty"` - - /* - Home directory - - */ - Homedirectory *string `json:"homedirectory,omitempty"` - - /* - GECOS - - */ - Gecos *string `json:"gecos,omitempty"` - - /* - Login shell - - */ - Loginshell *string `json:"loginshell,omitempty"` - - /* - Principal alias - - */ - Krbprincipalname *[]string `json:"krbprincipalname,omitempty"` - - /* - Kerberos principal expiration - - */ - Krbprincipalexpiration *time.Time `json:"krbprincipalexpiration,omitempty"` - - /* - Email address - - */ - Mail *[]string `json:"mail,omitempty"` - - /* - Password - Prompt to set the user password - */ - Userpassword *string `json:"userpassword,omitempty"` - - /* - UID - User ID Number (system will assign one if not provided) - */ - Uidnumber *int `json:"uidnumber,omitempty"` - - /* - GID - Group ID Number - */ - Gidnumber *int `json:"gidnumber,omitempty"` - - /* - Street address - - */ - Street *string `json:"street,omitempty"` - - /* - City - - */ - L *string `json:"l,omitempty"` - - /* - State/Province - - */ - St *string `json:"st,omitempty"` - - /* - ZIP - - */ - Postalcode *string `json:"postalcode,omitempty"` - - /* - Telephone Number - - */ - Telephonenumber *[]string `json:"telephonenumber,omitempty"` - - /* - Mobile Telephone Number - - */ - Mobile *[]string `json:"mobile,omitempty"` - - /* - Pager Number - - */ - Pager *[]string `json:"pager,omitempty"` - - /* - Fax Number - - */ - Facsimiletelephonenumber *[]string `json:"facsimiletelephonenumber,omitempty"` - - /* - Org. Unit - - */ - Ou *string `json:"ou,omitempty"` - - /* - Job Title - - */ - Title *string `json:"title,omitempty"` - - /* - Manager - - */ - Manager *string `json:"manager,omitempty"` - - /* - Car License - - */ - Carlicense *[]string `json:"carlicense,omitempty"` - - /* - User authentication types - Types of supported user authentication - */ - Ipauserauthtype *[]string `json:"ipauserauthtype,omitempty"` - - /* - Class - User category (semantics placed on this attribute are for local interpretation) - */ - Userclass *[]string `json:"userclass,omitempty"` - - /* - RADIUS proxy configuration - - */ - Ipatokenradiusconfiglink *string `json:"ipatokenradiusconfiglink,omitempty"` - - /* - RADIUS proxy username - - */ - Ipatokenradiususername *string `json:"ipatokenradiususername,omitempty"` - - /* - Department Number - - */ - Departmentnumber *[]string `json:"departmentnumber,omitempty"` - - /* - Employee Number - - */ - Employeenumber *string `json:"employeenumber,omitempty"` - - /* - Employee Type - - */ - Employeetype *string `json:"employeetype,omitempty"` - - /* - Preferred Language - - */ - Preferredlanguage *string `json:"preferredlanguage,omitempty"` - - /* - Certificate - Base-64 encoded user certificate - */ - Usercertificate *[]string `json:"usercertificate,omitempty"` - - /* - Account disabled - - */ - Nsaccountlock *bool `json:"nsaccountlock,omitempty"` - - /* - Preserved user - - */ - Preserved *bool `json:"preserved,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - Self - Display user record for current Kerberos principal - */ - Whoami *bool `json:"whoami,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("login") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` - - /* - group - Search for users with these member of groups. - */ - InGroup *[]string `json:"in_group,omitempty"` - - /* - group - Search for users without these member of groups. - */ - NotInGroup *[]string `json:"not_in_group,omitempty"` - - /* - netgroup - Search for users with these member of netgroups. - */ - InNetgroup *[]string `json:"in_netgroup,omitempty"` - - /* - netgroup - Search for users without these member of netgroups. - */ - NotInNetgroup *[]string `json:"not_in_netgroup,omitempty"` - - /* - role - Search for users with these member of roles. - */ - InRole *[]string `json:"in_role,omitempty"` - - /* - role - Search for users without these member of roles. - */ - NotInRole *[]string `json:"not_in_role,omitempty"` - - /* - HBAC rule - Search for users with these member of HBAC rules. - */ - InHbacrule *[]string `json:"in_hbacrule,omitempty"` - - /* - HBAC rule - Search for users without these member of HBAC rules. - */ - NotInHbacrule *[]string `json:"not_in_hbacrule,omitempty"` - - /* - sudo rule - Search for users with these member of sudo rules. - */ - InSudorule *[]string `json:"in_sudorule,omitempty"` - - /* - sudo rule - Search for users without these member of sudo rules. - */ - NotInSudorule *[]string `json:"not_in_sudorule,omitempty"` -} - -type userFindKwParams struct { - *UserFindArgs - *UserFindOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type userFindResponse struct { - Error *Error `json:"error"` - Result *UserFindResult `json:"result"` -} - -type UserFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []User `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} - -func (t *UserFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("UserFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("UserFindResult%v", string(b)) -} - -/* -Modify a user. -*/ -func (c *Client) UserMod( - reqArgs *UserModArgs, - optArgs *UserModOptionalArgs, // can be nil -) (*UserModResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := userModKwParams{ - UserModArgs: reqArgs, - UserModOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "user_mod", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res userModResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type UserModArgs struct { -} - -type UserModOptionalArgs struct { - - /* - User login - - */ - UID *string `json:"uid,omitempty"` - - /* - First name - - */ - Givenname *string `json:"givenname,omitempty"` - - /* - Last name - - */ - Sn *string `json:"sn,omitempty"` - - /* - Full name - - */ - Cn *string `json:"cn,omitempty"` - - /* - Display name - - */ - Displayname *string `json:"displayname,omitempty"` - - /* - Initials - - */ - Initials *string `json:"initials,omitempty"` - - /* - Home directory - - */ - Homedirectory *string `json:"homedirectory,omitempty"` - - /* - GECOS - - */ - Gecos *string `json:"gecos,omitempty"` - - /* - Login shell - - */ - Loginshell *string `json:"loginshell,omitempty"` - - /* - Principal alias - - */ - Krbprincipalname *[]string `json:"krbprincipalname,omitempty"` - - /* - Kerberos principal expiration - - */ - Krbprincipalexpiration *time.Time `json:"krbprincipalexpiration,omitempty"` - - /* - Email address - - */ - Mail *[]string `json:"mail,omitempty"` - - /* - Password - Prompt to set the user password - */ - Userpassword *string `json:"userpassword,omitempty"` - - /* - - Generate a random user password - */ - Random *bool `json:"random,omitempty"` - - /* - UID - User ID Number (system will assign one if not provided) - */ - Uidnumber *int `json:"uidnumber,omitempty"` - - /* - GID - Group ID Number - */ - Gidnumber *int `json:"gidnumber,omitempty"` - - /* - Street address - - */ - Street *string `json:"street,omitempty"` - - /* - City - - */ - L *string `json:"l,omitempty"` - - /* - State/Province - - */ - St *string `json:"st,omitempty"` - - /* - ZIP - - */ - Postalcode *string `json:"postalcode,omitempty"` - - /* - Telephone Number - - */ - Telephonenumber *[]string `json:"telephonenumber,omitempty"` - - /* - Mobile Telephone Number - - */ - Mobile *[]string `json:"mobile,omitempty"` - - /* - Pager Number - - */ - Pager *[]string `json:"pager,omitempty"` - - /* - Fax Number - - */ - Facsimiletelephonenumber *[]string `json:"facsimiletelephonenumber,omitempty"` - - /* - Org. Unit - - */ - Ou *string `json:"ou,omitempty"` - - /* - Job Title - - */ - Title *string `json:"title,omitempty"` - - /* - Manager - - */ - Manager *string `json:"manager,omitempty"` - - /* - Car License - - */ - Carlicense *[]string `json:"carlicense,omitempty"` - - /* - SSH public key - - */ - Ipasshpubkey *[]string `json:"ipasshpubkey,omitempty"` - - /* - User authentication types - Types of supported user authentication - */ - Ipauserauthtype *[]string `json:"ipauserauthtype,omitempty"` - - /* - Class - User category (semantics placed on this attribute are for local interpretation) - */ - Userclass *[]string `json:"userclass,omitempty"` - - /* - RADIUS proxy configuration - - */ - Ipatokenradiusconfiglink *string `json:"ipatokenradiusconfiglink,omitempty"` - - /* - RADIUS proxy username - - */ - Ipatokenradiususername *string `json:"ipatokenradiususername,omitempty"` - - /* - Department Number - - */ - Departmentnumber *[]string `json:"departmentnumber,omitempty"` - - /* - Employee Number - - */ - Employeenumber *string `json:"employeenumber,omitempty"` - - /* - Employee Type - - */ - Employeetype *string `json:"employeetype,omitempty"` - - /* - Preferred Language - - */ - Preferredlanguage *string `json:"preferredlanguage,omitempty"` - - /* - Certificate - Base-64 encoded user certificate - */ - Usercertificate *[]string `json:"usercertificate,omitempty"` - - /* - Account disabled - - */ - Nsaccountlock *bool `json:"nsaccountlock,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - Rename - Rename the user object - */ - Rename *string `json:"rename,omitempty"` -} - -type userModKwParams struct { - *UserModArgs - *UserModOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type userModResponse struct { - Error *Error `json:"error"` - Result *UserModResult `json:"result"` -} - -type UserModResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result User `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *UserModResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("UserModResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("UserModResult%v", string(b)) -} - -/* -Remove one or more certificates to the user entry -*/ -func (c *Client) UserRemoveCert( - reqArgs *UserRemoveCertArgs, - optArgs *UserRemoveCertOptionalArgs, // can be nil -) (*UserRemoveCertResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := userRemoveCertKwParams{ - UserRemoveCertArgs: reqArgs, - UserRemoveCertOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "user_remove_cert", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res userRemoveCertResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type UserRemoveCertArgs struct { - - /* - Certificate - Base-64 encoded user certificate - */ - Usercertificate []string `json:"usercertificate,omitempty"` -} - -type UserRemoveCertOptionalArgs struct { - - /* - User login - - */ - UID *string `json:"uid,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} - -type userRemoveCertKwParams struct { - *UserRemoveCertArgs - *UserRemoveCertOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type userRemoveCertResponse struct { - Error *Error `json:"error"` - Result *UserRemoveCertResult `json:"result"` -} - -type UserRemoveCertResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *UserRemoveCertResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("UserRemoveCertResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("UserRemoveCertResult%v", string(b)) -} - -/* -Remove a manager to the user entry -*/ -func (c *Client) UserRemoveManager( - reqArgs *UserRemoveManagerArgs, - optArgs *UserRemoveManagerOptionalArgs, // can be nil -) (*UserRemoveManagerResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := userRemoveManagerKwParams{ - UserRemoveManagerArgs: reqArgs, - UserRemoveManagerOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "user_remove_manager", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res userRemoveManagerResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type UserRemoveManagerArgs struct { -} - -type UserRemoveManagerOptionalArgs struct { - - /* - User login - - */ - UID *string `json:"uid,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member user - users to remove - */ - User *[]string `json:"user,omitempty"` -} - -type userRemoveManagerKwParams struct { - *UserRemoveManagerArgs - *UserRemoveManagerOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type userRemoveManagerResponse struct { - Error *Error `json:"error"` - Result *UserRemoveManagerResult `json:"result"` -} - -type UserRemoveManagerResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} - -func (t *UserRemoveManagerResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("UserRemoveManagerResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("UserRemoveManagerResult%v", string(b)) -} - -/* -Remove principal alias from the user entry -*/ -func (c *Client) UserRemovePrincipal( - reqArgs *UserRemovePrincipalArgs, - optArgs *UserRemovePrincipalOptionalArgs, // can be nil -) (*UserRemovePrincipalResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := userRemovePrincipalKwParams{ - UserRemovePrincipalArgs: reqArgs, - UserRemovePrincipalOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "user_remove_principal", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res userRemovePrincipalResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type UserRemovePrincipalArgs struct { -} - -type UserRemovePrincipalOptionalArgs struct { - - /* - User login - - */ - UID *string `json:"uid,omitempty"` - - /* - Principal alias - - */ - Krbprincipalname *[]string `json:"krbprincipalname,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} - -type userRemovePrincipalKwParams struct { - *UserRemovePrincipalArgs - *UserRemovePrincipalOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type userRemovePrincipalResponse struct { - Error *Error `json:"error"` - Result *UserRemovePrincipalResult `json:"result"` -} - -type UserRemovePrincipalResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *UserRemovePrincipalResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("UserRemovePrincipalResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("UserRemovePrincipalResult%v", string(b)) -} - -/* -Display information about a user. -*/ -func (c *Client) UserShow( - reqArgs *UserShowArgs, - optArgs *UserShowOptionalArgs, // can be nil -) (*UserShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := userShowKwParams{ - UserShowArgs: reqArgs, - UserShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "user_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res userShowResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type UserShowArgs struct { -} - -type UserShowOptionalArgs struct { - - /* - User login - - */ - UID *string `json:"uid,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - file to store certificate in - */ - Out *string `json:"out,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} - -type userShowKwParams struct { - *UserShowArgs - *UserShowOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type userShowResponse struct { - Error *Error `json:"error"` - Result *UserShowResult `json:"result"` -} - -type UserShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result User `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *UserShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("UserShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("UserShowResult%v", string(b)) -} - -/* -Move deleted user into staged area -*/ -func (c *Client) UserStage( - reqArgs *UserStageArgs, - optArgs *UserStageOptionalArgs, // can be nil -) (*UserStageResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := userStageKwParams{ - UserStageArgs: reqArgs, - UserStageOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "user_stage", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res userStageResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type UserStageArgs struct { -} - -type UserStageOptionalArgs struct { - - /* - User login - - */ - UID *[]string `json:"uid,omitempty"` - - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` -} - -type userStageKwParams struct { - *UserStageArgs - *UserStageOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type userStageResponse struct { - Error *Error `json:"error"` - Result *UserStageResult `json:"result"` -} - -type UserStageResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} - -func (t *UserStageResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("UserStageResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("UserStageResult%v", string(b)) -} - -/* -Lockout status of a user account - - An account may become locked if the password is entered incorrectly too - many times within a specific time period as controlled by password - policy. A locked account is a temporary condition and may be unlocked by - an administrator. - - This connects to each IPA master and displays the lockout status on - each one. - - To determine whether an account is locked on a given server you need - to compare the number of failed logins and the time of the last failure. - For an account to be locked it must exceed the maxfail failures within - the failinterval duration as specified in the password policy associated - with the user. - - The failed login counter is modified only when a user attempts a log in - so it is possible that an account may appear locked but the last failed - login attempt is older than the lockouttime of the password policy. This - means that the user may attempt a login again. -*/ -func (c *Client) UserStatus( - reqArgs *UserStatusArgs, - optArgs *UserStatusOptionalArgs, // can be nil -) (*UserStatusResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := userStatusKwParams{ - UserStatusArgs: reqArgs, - UserStatusOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "user_status", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res userStatusResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type UserStatusArgs struct { -} - -type UserStatusOptionalArgs struct { - - /* - User login - - */ - Useruid *string `json:"useruid,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} - -type userStatusKwParams struct { - *UserStatusArgs - *UserStatusOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type userStatusResponse struct { - Error *Error `json:"error"` - Result *UserStatusResult `json:"result"` -} - -type UserStatusResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Userstatus `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} - -func (t *UserStatusResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("UserStatusResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("UserStatusResult%v", string(b)) -} - -/* -Undelete a delete user account. -*/ -func (c *Client) UserUndel( - reqArgs *UserUndelArgs, - optArgs *UserUndelOptionalArgs, // can be nil -) (*UserUndelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := userUndelKwParams{ - UserUndelArgs: reqArgs, - UserUndelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "user_undel", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res userUndelResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type UserUndelArgs struct { -} - -type UserUndelOptionalArgs struct { - - /* - User login - - */ - UID *string `json:"uid,omitempty"` -} - -type userUndelKwParams struct { - *UserUndelArgs - *UserUndelOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type userUndelResponse struct { - Error *Error `json:"error"` - Result *UserUndelResult `json:"result"` -} - -type UserUndelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - True means the operation was successful - (required) - */ - Result bool `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *UserUndelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("UserUndelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("UserUndelResult%v", string(b)) -} - -/* -Unlock a user account - - An account may become locked if the password is entered incorrectly too - many times within a specific time period as controlled by password - policy. A locked account is a temporary condition and may be unlocked by - an administrator. -*/ -func (c *Client) UserUnlock( - reqArgs *UserUnlockArgs, - optArgs *UserUnlockOptionalArgs, // can be nil -) (*UserUnlockResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := userUnlockKwParams{ - UserUnlockArgs: reqArgs, - UserUnlockOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "user_unlock", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res userUnlockResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type UserUnlockArgs struct { -} - -type UserUnlockOptionalArgs struct { - - /* - User login - - */ - UID *string `json:"uid,omitempty"` -} - -type userUnlockKwParams struct { - *UserUnlockArgs - *UserUnlockOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type userUnlockResponse struct { - Error *Error `json:"error"` - Result *UserUnlockResult `json:"result"` -} - -type UserUnlockResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - True means the operation was successful - (required) - */ - Result bool `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *UserUnlockResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("UserUnlockResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("UserUnlockResult%v", string(b)) -} - -/* - - */ -func (c *Client) VaultAddInternal( - reqArgs *VaultAddInternalArgs, - optArgs *VaultAddInternalOptionalArgs, // can be nil -) (*VaultAddInternalResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := vaultAddInternalKwParams{ - VaultAddInternalArgs: reqArgs, - VaultAddInternalOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "vault_add_internal", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res vaultAddInternalResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type VaultAddInternalArgs struct { - - /* - Vault name - - */ - Cn string `json:"cn,omitempty"` -} - -type VaultAddInternalOptionalArgs struct { - - /* - Description - Vault description - */ - Description *string `json:"description,omitempty"` - - /* - Type - Vault type - */ - Ipavaulttype *string `json:"ipavaulttype,omitempty"` - - /* - Salt - Vault salt - */ - Ipavaultsalt *string `json:"ipavaultsalt,omitempty"` - - /* - Public key - Vault public key - */ - Ipavaultpublickey *string `json:"ipavaultpublickey,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Service name of the service vault - */ - Service *string `json:"service,omitempty"` - - /* - - Shared vault - */ - Shared *bool `json:"shared,omitempty"` - - /* - - Username of the user vault - */ - Username *string `json:"username,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} - -type vaultAddInternalKwParams struct { - *VaultAddInternalArgs - *VaultAddInternalOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type vaultAddInternalResponse struct { - Error *Error `json:"error"` - Result *VaultAddInternalResult `json:"result"` -} - -type VaultAddInternalResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *VaultAddInternalResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("VaultAddInternalResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("VaultAddInternalResult%v", string(b)) -} - -/* -Add members to a vault. -*/ -func (c *Client) VaultAddMember( - reqArgs *VaultAddMemberArgs, - optArgs *VaultAddMemberOptionalArgs, // can be nil -) (*VaultAddMemberResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := vaultAddMemberKwParams{ - VaultAddMemberArgs: reqArgs, - VaultAddMemberOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "vault_add_member", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res vaultAddMemberResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type VaultAddMemberArgs struct { - - /* - Vault name - - */ - Cn string `json:"cn,omitempty"` -} - -type VaultAddMemberOptionalArgs struct { - - /* - - Service name of the service vault - */ - Service *string `json:"service,omitempty"` - - /* - - Shared vault - */ - Shared *bool `json:"shared,omitempty"` - - /* - - Username of the user vault - */ - Username *string `json:"username,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member user - users to add - */ - User *[]string `json:"user,omitempty"` - - /* - member group - groups to add - */ - Group *[]string `json:"group,omitempty"` - - /* - member service - services to add - */ - Services *[]string `json:"services,omitempty"` -} - -type vaultAddMemberKwParams struct { - *VaultAddMemberArgs - *VaultAddMemberOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type vaultAddMemberResponse struct { - Error *Error `json:"error"` - Result *VaultAddMemberResult `json:"result"` -} - -type VaultAddMemberResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members added - (required) - */ - Completed int `json:"completed,omitempty"` -} - -func (t *VaultAddMemberResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("VaultAddMemberResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("VaultAddMemberResult%v", string(b)) -} - -/* -Add owners to a vault. -*/ -func (c *Client) VaultAddOwner( - reqArgs *VaultAddOwnerArgs, - optArgs *VaultAddOwnerOptionalArgs, // can be nil -) (*VaultAddOwnerResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := vaultAddOwnerKwParams{ - VaultAddOwnerArgs: reqArgs, - VaultAddOwnerOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "vault_add_owner", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res vaultAddOwnerResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type VaultAddOwnerArgs struct { - - /* - Vault name - - */ - Cn string `json:"cn,omitempty"` -} - -type VaultAddOwnerOptionalArgs struct { - - /* - - Service name of the service vault - */ - Service *string `json:"service,omitempty"` - - /* - - Shared vault - */ - Shared *bool `json:"shared,omitempty"` - - /* - - Username of the user vault - */ - Username *string `json:"username,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - owner user - users to add - */ - User *[]string `json:"user,omitempty"` - - /* - owner group - groups to add - */ - Group *[]string `json:"group,omitempty"` - - /* - owner service - services to add - */ - Services *[]string `json:"services,omitempty"` -} - -type vaultAddOwnerKwParams struct { - *VaultAddOwnerArgs - *VaultAddOwnerOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type vaultAddOwnerResponse struct { - Error *Error `json:"error"` - Result *VaultAddOwnerResult `json:"result"` -} - -type VaultAddOwnerResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Owners that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of owners added - (required) - */ - Completed int `json:"completed,omitempty"` -} - -func (t *VaultAddOwnerResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("VaultAddOwnerResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("VaultAddOwnerResult%v", string(b)) -} - -/* - - */ -func (c *Client) VaultArchiveInternal( - reqArgs *VaultArchiveInternalArgs, - optArgs *VaultArchiveInternalOptionalArgs, // can be nil -) (*VaultArchiveInternalResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := vaultArchiveInternalKwParams{ - VaultArchiveInternalArgs: reqArgs, - VaultArchiveInternalOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "vault_archive_internal", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res vaultArchiveInternalResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type VaultArchiveInternalArgs struct { - - /* - Vault name - - */ - Cn string `json:"cn,omitempty"` - - /* - - Session key wrapped with transport certificate - */ - SessionKey string `json:"session_key,omitempty"` - - /* - - Vault data encrypted with session key - */ - VaultData string `json:"vault_data,omitempty"` - - /* - - Nonce - */ - Nonce string `json:"nonce,omitempty"` -} - -type VaultArchiveInternalOptionalArgs struct { - - /* - - Service name of the service vault - */ - Service *string `json:"service,omitempty"` - - /* - - Shared vault - */ - Shared *bool `json:"shared,omitempty"` - - /* - - Username of the user vault - */ - Username *string `json:"username,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} - -type vaultArchiveInternalKwParams struct { - *VaultArchiveInternalArgs - *VaultArchiveInternalOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type vaultArchiveInternalResponse struct { - Error *Error `json:"error"` - Result *VaultArchiveInternalResult `json:"result"` -} - -type VaultArchiveInternalResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *VaultArchiveInternalResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("VaultArchiveInternalResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("VaultArchiveInternalResult%v", string(b)) -} - -/* -Delete a vault. -*/ -func (c *Client) VaultDel( - reqArgs *VaultDelArgs, - optArgs *VaultDelOptionalArgs, // can be nil -) (*VaultDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := vaultDelKwParams{ - VaultDelArgs: reqArgs, - VaultDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "vault_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res vaultDelResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type VaultDelArgs struct { - - /* - Vault name - - */ - Cn []string `json:"cn,omitempty"` -} - -type VaultDelOptionalArgs struct { - - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` - - /* - - Service name of the service vault - */ - Service *string `json:"service,omitempty"` - - /* - - Shared vault - */ - Shared *bool `json:"shared,omitempty"` - - /* - - Username of the user vault - */ - Username *string `json:"username,omitempty"` -} - -type vaultDelKwParams struct { - *VaultDelArgs - *VaultDelOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type vaultDelResponse struct { - Error *Error `json:"error"` - Result *VaultDelResult `json:"result"` -} - -type VaultDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []string `json:"value,omitempty"` -} - -func (t *VaultDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("VaultDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("VaultDelResult%v", string(b)) -} - -/* -Search for vaults. -*/ -func (c *Client) VaultFind( - criteria string, // A string searched in all relevant object attributes - reqArgs *VaultFindArgs, - optArgs *VaultFindOptionalArgs, // can be nil -) (*VaultFindResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := vaultFindKwParams{ - VaultFindArgs: reqArgs, - VaultFindOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "vault_find", - Params: []interface{}{ - []interface{}{criteria}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res vaultFindResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type VaultFindArgs struct { -} - -type VaultFindOptionalArgs struct { - - /* - Vault name - - */ - Cn *string `json:"cn,omitempty"` - - /* - Description - Vault description - */ - Description *string `json:"description,omitempty"` - - /* - Type - Vault type - */ - Ipavaulttype *string `json:"ipavaulttype,omitempty"` - - /* - Time Limit - Time limit of search in seconds (0 is unlimited) - */ - Timelimit *int `json:"timelimit,omitempty"` - - /* - Size Limit - Maximum number of entries returned (0 is unlimited) - */ - Sizelimit *int `json:"sizelimit,omitempty"` - - /* - - Service name of the service vault - */ - Service *string `json:"service,omitempty"` - - /* - - Shared vault - */ - Shared *bool `json:"shared,omitempty"` - - /* - - Username of the user vault - */ - Username *string `json:"username,omitempty"` - - /* - - List all service vaults - */ - Services *bool `json:"services,omitempty"` - - /* - - List all user vaults - */ - Users *bool `json:"users,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - Primary key only - Results should contain primary key attribute only ("name") - */ - PkeyOnly *bool `json:"pkey_only,omitempty"` -} - -type vaultFindKwParams struct { - *VaultFindArgs - *VaultFindOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type vaultFindResponse struct { - Error *Error `json:"error"` - Result *VaultFindResult `json:"result"` -} - -type VaultFindResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result []Vault `json:"result,omitempty"` - - /* - Number of entries returned - (required) - */ - Count int `json:"count,omitempty"` - - /* - True if not all results were returned - (required) - */ - Truncated bool `json:"truncated,omitempty"` -} - -func (t *VaultFindResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("VaultFindResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("VaultFindResult%v", string(b)) -} - -/* - - */ -func (c *Client) VaultModInternal( - reqArgs *VaultModInternalArgs, - optArgs *VaultModInternalOptionalArgs, // can be nil -) (*VaultModInternalResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := vaultModInternalKwParams{ - VaultModInternalArgs: reqArgs, - VaultModInternalOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "vault_mod_internal", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res vaultModInternalResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type VaultModInternalArgs struct { - - /* - Vault name - - */ - Cn string `json:"cn,omitempty"` -} - -type VaultModInternalOptionalArgs struct { - - /* - Description - Vault description - */ - Description *string `json:"description,omitempty"` - - /* - Type - Vault type - */ - Ipavaulttype *string `json:"ipavaulttype,omitempty"` - - /* - Salt - Vault salt - */ - Ipavaultsalt *string `json:"ipavaultsalt,omitempty"` - - /* - Public key - Vault public key - */ - Ipavaultpublickey *string `json:"ipavaultpublickey,omitempty"` - - /* - - Set an attribute to a name/value pair. Format is attr=value. - For multi-valued attributes, the command replaces the values already present. - */ - Setattr *[]string `json:"setattr,omitempty"` - - /* - - Add an attribute/value pair. Format is attr=value. The attribute - must be part of the schema. - */ - Addattr *[]string `json:"addattr,omitempty"` - - /* - - Delete an attribute/value pair. The option will be evaluated - last, after all sets and adds. - */ - Delattr *[]string `json:"delattr,omitempty"` - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Service name of the service vault - */ - Service *string `json:"service,omitempty"` - - /* - - Shared vault - */ - Shared *bool `json:"shared,omitempty"` - - /* - - Username of the user vault - */ - Username *string `json:"username,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} - -type vaultModInternalKwParams struct { - *VaultModInternalArgs - *VaultModInternalOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type vaultModInternalResponse struct { - Error *Error `json:"error"` - Result *VaultModInternalResult `json:"result"` -} - -type VaultModInternalResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *VaultModInternalResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("VaultModInternalResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("VaultModInternalResult%v", string(b)) -} - -/* -Remove members from a vault. -*/ -func (c *Client) VaultRemoveMember( - reqArgs *VaultRemoveMemberArgs, - optArgs *VaultRemoveMemberOptionalArgs, // can be nil -) (*VaultRemoveMemberResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := vaultRemoveMemberKwParams{ - VaultRemoveMemberArgs: reqArgs, - VaultRemoveMemberOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "vault_remove_member", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res vaultRemoveMemberResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type VaultRemoveMemberArgs struct { - - /* - Vault name - - */ - Cn string `json:"cn,omitempty"` -} - -type VaultRemoveMemberOptionalArgs struct { - - /* - - Service name of the service vault - */ - Service *string `json:"service,omitempty"` - - /* - - Shared vault - */ - Shared *bool `json:"shared,omitempty"` - - /* - - Username of the user vault - */ - Username *string `json:"username,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - member user - users to remove - */ - User *[]string `json:"user,omitempty"` - - /* - member group - groups to remove - */ - Group *[]string `json:"group,omitempty"` - - /* - member service - services to remove - */ - Services *[]string `json:"services,omitempty"` -} - -type vaultRemoveMemberKwParams struct { - *VaultRemoveMemberArgs - *VaultRemoveMemberOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type vaultRemoveMemberResponse struct { - Error *Error `json:"error"` - Result *VaultRemoveMemberResult `json:"result"` -} - -type VaultRemoveMemberResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Members that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of members removed - (required) - */ - Completed int `json:"completed,omitempty"` -} - -func (t *VaultRemoveMemberResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("VaultRemoveMemberResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("VaultRemoveMemberResult%v", string(b)) -} - -/* -Remove owners from a vault. -*/ -func (c *Client) VaultRemoveOwner( - reqArgs *VaultRemoveOwnerArgs, - optArgs *VaultRemoveOwnerOptionalArgs, // can be nil -) (*VaultRemoveOwnerResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := vaultRemoveOwnerKwParams{ - VaultRemoveOwnerArgs: reqArgs, - VaultRemoveOwnerOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "vault_remove_owner", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res vaultRemoveOwnerResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type VaultRemoveOwnerArgs struct { - - /* - Vault name - - */ - Cn string `json:"cn,omitempty"` -} - -type VaultRemoveOwnerOptionalArgs struct { - - /* - - Service name of the service vault - */ - Service *string `json:"service,omitempty"` - - /* - - Shared vault - */ - Shared *bool `json:"shared,omitempty"` - - /* - - Username of the user vault - */ - Username *string `json:"username,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - owner user - users to remove - */ - User *[]string `json:"user,omitempty"` - - /* - owner group - groups to remove - */ - Group *[]string `json:"group,omitempty"` - - /* - owner service - services to remove - */ - Services *[]string `json:"services,omitempty"` -} - -type vaultRemoveOwnerKwParams struct { - *VaultRemoveOwnerArgs - *VaultRemoveOwnerOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type vaultRemoveOwnerResponse struct { - Error *Error `json:"error"` - Result *VaultRemoveOwnerResult `json:"result"` -} - -type VaultRemoveOwnerResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Owners that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of owners removed - (required) - */ - Completed int `json:"completed,omitempty"` -} - -func (t *VaultRemoveOwnerResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("VaultRemoveOwnerResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("VaultRemoveOwnerResult%v", string(b)) -} - -/* - - */ -func (c *Client) VaultRetrieveInternal( - reqArgs *VaultRetrieveInternalArgs, - optArgs *VaultRetrieveInternalOptionalArgs, // can be nil -) (*VaultRetrieveInternalResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := vaultRetrieveInternalKwParams{ - VaultRetrieveInternalArgs: reqArgs, - VaultRetrieveInternalOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "vault_retrieve_internal", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res vaultRetrieveInternalResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type VaultRetrieveInternalArgs struct { - - /* - Vault name - - */ - Cn string `json:"cn,omitempty"` - - /* - - Session key wrapped with transport certificate - */ - SessionKey string `json:"session_key,omitempty"` -} - -type VaultRetrieveInternalOptionalArgs struct { - - /* - - Service name of the service vault - */ - Service *string `json:"service,omitempty"` - - /* - - Shared vault - */ - Shared *bool `json:"shared,omitempty"` - - /* - - Username of the user vault - */ - Username *string `json:"username,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} - -type vaultRetrieveInternalKwParams struct { - *VaultRetrieveInternalArgs - *VaultRetrieveInternalOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type vaultRetrieveInternalResponse struct { - Error *Error `json:"error"` - Result *VaultRetrieveInternalResult `json:"result"` -} - -type VaultRetrieveInternalResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *VaultRetrieveInternalResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("VaultRetrieveInternalResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("VaultRetrieveInternalResult%v", string(b)) -} - -/* -Display information about a vault. -*/ -func (c *Client) VaultShow( - reqArgs *VaultShowArgs, - optArgs *VaultShowOptionalArgs, // can be nil -) (*VaultShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := vaultShowKwParams{ - VaultShowArgs: reqArgs, - VaultShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "vault_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res vaultShowResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type VaultShowArgs struct { - - /* - Vault name - - */ - Cn string `json:"cn,omitempty"` -} - -type VaultShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Service name of the service vault - */ - Service *string `json:"service,omitempty"` - - /* - - Shared vault - */ - Shared *bool `json:"shared,omitempty"` - - /* - - Username of the user vault - */ - Username *string `json:"username,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} - -type vaultShowKwParams struct { - *VaultShowArgs - *VaultShowOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type vaultShowResponse struct { - Error *Error `json:"error"` - Result *VaultShowResult `json:"result"` -} - -type VaultShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Vault `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value string `json:"value,omitempty"` -} - -func (t *VaultShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("VaultShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("VaultShowResult%v", string(b)) -} - -/* -Show vault configuration. -*/ -func (c *Client) VaultconfigShow( - reqArgs *VaultconfigShowArgs, - optArgs *VaultconfigShowOptionalArgs, // can be nil -) (*VaultconfigShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := vaultconfigShowKwParams{ - VaultconfigShowArgs: reqArgs, - VaultconfigShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "vaultconfig_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res vaultconfigShowResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type VaultconfigShowArgs struct { -} - -type VaultconfigShowOptionalArgs struct { - - /* - - Output file to store the transport certificate - */ - TransportOut *string `json:"transport_out,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` -} - -type vaultconfigShowKwParams struct { - *VaultconfigShowArgs - *VaultconfigShowOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type vaultconfigShowResponse struct { - Error *Error `json:"error"` - Result *VaultconfigShowResult `json:"result"` -} - -type VaultconfigShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Vaultconfig `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value interface{} `json:"value,omitempty"` -} - -func (t *VaultconfigShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("VaultconfigShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("VaultconfigShowResult%v", string(b)) -} - -/* -Add owners to a vault container. -*/ -func (c *Client) VaultcontainerAddOwner( - reqArgs *VaultcontainerAddOwnerArgs, - optArgs *VaultcontainerAddOwnerOptionalArgs, // can be nil -) (*VaultcontainerAddOwnerResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := vaultcontainerAddOwnerKwParams{ - VaultcontainerAddOwnerArgs: reqArgs, - VaultcontainerAddOwnerOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "vaultcontainer_add_owner", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res vaultcontainerAddOwnerResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type VaultcontainerAddOwnerArgs struct { -} - -type VaultcontainerAddOwnerOptionalArgs struct { - - /* - - Service name of the service vault - */ - Service *string `json:"service,omitempty"` - - /* - - Shared vault - */ - Shared *bool `json:"shared,omitempty"` - - /* - - Username of the user vault - */ - Username *string `json:"username,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - owner user - users to add - */ - User *[]string `json:"user,omitempty"` - - /* - owner group - groups to add - */ - Group *[]string `json:"group,omitempty"` - - /* - owner service - services to add - */ - Services *[]string `json:"services,omitempty"` -} - -type vaultcontainerAddOwnerKwParams struct { - *VaultcontainerAddOwnerArgs - *VaultcontainerAddOwnerOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type vaultcontainerAddOwnerResponse struct { - Error *Error `json:"error"` - Result *VaultcontainerAddOwnerResult `json:"result"` -} - -type VaultcontainerAddOwnerResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Owners that could not be added - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of owners added - (required) - */ - Completed int `json:"completed,omitempty"` -} - -func (t *VaultcontainerAddOwnerResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("VaultcontainerAddOwnerResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("VaultcontainerAddOwnerResult%v", string(b)) -} - -/* -Delete a vault container. -*/ -func (c *Client) VaultcontainerDel( - reqArgs *VaultcontainerDelArgs, - optArgs *VaultcontainerDelOptionalArgs, // can be nil -) (*VaultcontainerDelResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := vaultcontainerDelKwParams{ - VaultcontainerDelArgs: reqArgs, - VaultcontainerDelOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "vaultcontainer_del", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res vaultcontainerDelResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type VaultcontainerDelArgs struct { -} - -type VaultcontainerDelOptionalArgs struct { - - /* - - Continuous mode: Don't stop on errors. - */ - Continue *bool `json:"continue,omitempty"` - - /* - - Service name of the service vault - */ - Service *string `json:"service,omitempty"` - - /* - - Shared vault - */ - Shared *bool `json:"shared,omitempty"` - - /* - - Username of the user vault - */ - Username *string `json:"username,omitempty"` -} - -type vaultcontainerDelKwParams struct { - *VaultcontainerDelArgs - *VaultcontainerDelOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type vaultcontainerDelResponse struct { - Error *Error `json:"error"` - Result *VaultcontainerDelResult `json:"result"` -} - -type VaultcontainerDelResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - List of deletions that failed - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - - (required) - */ - Value []interface{} `json:"value,omitempty"` -} - -func (t *VaultcontainerDelResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("VaultcontainerDelResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("VaultcontainerDelResult%v", string(b)) -} - -/* -Remove owners from a vault container. -*/ -func (c *Client) VaultcontainerRemoveOwner( - reqArgs *VaultcontainerRemoveOwnerArgs, - optArgs *VaultcontainerRemoveOwnerOptionalArgs, // can be nil -) (*VaultcontainerRemoveOwnerResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := vaultcontainerRemoveOwnerKwParams{ - VaultcontainerRemoveOwnerArgs: reqArgs, - VaultcontainerRemoveOwnerOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "vaultcontainer_remove_owner", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res vaultcontainerRemoveOwnerResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type VaultcontainerRemoveOwnerArgs struct { -} - -type VaultcontainerRemoveOwnerOptionalArgs struct { - - /* - - Service name of the service vault - */ - Service *string `json:"service,omitempty"` - - /* - - Shared vault - */ - Shared *bool `json:"shared,omitempty"` - - /* - - Username of the user vault - */ - Username *string `json:"username,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` - - /* - owner user - users to remove - */ - User *[]string `json:"user,omitempty"` - - /* - owner group - groups to remove - */ - Group *[]string `json:"group,omitempty"` - - /* - owner service - services to remove - */ - Services *[]string `json:"services,omitempty"` -} - -type vaultcontainerRemoveOwnerKwParams struct { - *VaultcontainerRemoveOwnerArgs - *VaultcontainerRemoveOwnerOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type vaultcontainerRemoveOwnerResponse struct { - Error *Error `json:"error"` - Result *VaultcontainerRemoveOwnerResult `json:"result"` -} - -type VaultcontainerRemoveOwnerResult struct { - - /* - - (required) - */ - Result interface{} `json:"result,omitempty"` - - /* - Owners that could not be removed - (required) - */ - Failed interface{} `json:"failed,omitempty"` - - /* - Number of owners removed - (required) - */ - Completed int `json:"completed,omitempty"` -} - -func (t *VaultcontainerRemoveOwnerResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("VaultcontainerRemoveOwnerResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("VaultcontainerRemoveOwnerResult%v", string(b)) -} - -/* -Display information about a vault container. -*/ -func (c *Client) VaultcontainerShow( - reqArgs *VaultcontainerShowArgs, - optArgs *VaultcontainerShowOptionalArgs, // can be nil -) (*VaultcontainerShowResult, error) { - if reqArgs == nil { - return nil, fmt.Errorf("reqArgs cannot be nil") - } - kwp := vaultcontainerShowKwParams{ - VaultcontainerShowArgs: reqArgs, - VaultcontainerShowOptionalArgs: optArgs, - Version: apiVersion, - } - req := request{ - Method: "vaultcontainer_show", - Params: []interface{}{ - []interface{}{}, &kwp}, - } - readCloser, e := c.exec(&req) - if e != nil { - return nil, e - } - defer readCloser.Close() - var res vaultcontainerShowResponse - if e := json.NewDecoder(readCloser).Decode(&res); e != nil { - return nil, e - } - if res.Error != nil { - return nil, res.Error - } - if res.Result == nil { - return nil, fmt.Errorf("missing result in response") - } - return res.Result, nil -} - -type VaultcontainerShowArgs struct { -} - -type VaultcontainerShowOptionalArgs struct { - - /* - Rights - Display the access rights of this entry (requires --all). See ipa man page for details. - */ - Rights *bool `json:"rights,omitempty"` - - /* - - Service name of the service vault - */ - Service *string `json:"service,omitempty"` - - /* - - Shared vault - */ - Shared *bool `json:"shared,omitempty"` - - /* - - Username of the user vault - */ - Username *string `json:"username,omitempty"` - - /* - - Retrieve and print all attributes from the server. Affects command output. - */ - All *bool `json:"all,omitempty"` - - /* - - Print entries as stored on the server. Only affects output format. - */ - Raw *bool `json:"raw,omitempty"` - - /* - - Suppress processing of membership attributes. - */ - NoMembers *bool `json:"no_members,omitempty"` -} - -type vaultcontainerShowKwParams struct { - *VaultcontainerShowArgs - *VaultcontainerShowOptionalArgs - - /* - Automatically set. - Used by the server to determine whether to accept the request. - */ - Version string `json:"version"` -} - -type vaultcontainerShowResponse struct { - Error *Error `json:"error"` - Result *VaultcontainerShowResult `json:"result"` -} - -type VaultcontainerShowResult struct { - - /* - User-friendly description of action performed - (optional) - */ - Summary *string `json:"summary,omitempty"` - - /* - - (required) - */ - Result Vaultcontainer `json:"result,omitempty"` - - /* - The primary_key value of the entry, e.g. 'jdoe' for a user - (required) - */ - Value interface{} `json:"value,omitempty"` -} - -func (t *VaultcontainerShowResult) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("VaultcontainerShowResult[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("VaultcontainerShowResult%v", string(b)) -} - -type Aci struct { - - /* - ACI name - - */ - Aciname string `json:"aciname,omitempty"` - - /* - Permission - Permission ACI grants access to - */ - Permission *string `json:"permission,omitempty"` - - /* - User group - User group ACI grants access to - */ - Group *string `json:"group,omitempty"` - - /* - Permissions - Permissions to grant(read, write, add, delete, all) - */ - Permissions []string `json:"permissions,omitempty"` - - /* - Attributes to which the permission applies - Attributes - */ - Attrs *[]string `json:"attrs,omitempty"` - - /* - Type - type of IPA object (user, group, host, hostgroup, service, netgroup) - */ - Type *string `json:"type,omitempty"` - - /* - Member of - Member of a group - */ - Memberof *string `json:"memberof,omitempty"` - - /* - Filter - Legal LDAP filter (e.g. ou=Engineering) - */ - Filter *string `json:"filter,omitempty"` - - /* - Subtree - Subtree to apply ACI to - */ - Subtree *string `json:"subtree,omitempty"` - - /* - Target group - Group to apply ACI to - */ - Targetgroup *string `json:"targetgroup,omitempty"` - - /* - Target your own entry (self) - Apply ACI to your own entry (self) - */ - Selfaci *bool `json:"selfaci,omitempty"` - - /* - ACI prefix - Prefix used to distinguish ACI types (permission, delegation, selfservice, none) - */ - Aciprefix string `json:"aciprefix,omitempty"` - - /* - ACI - - */ - Aci string `json:"aci,omitempty"` -} - -func (t *Aci) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Aci[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Aci%v", string(b)) -} - -type jsonAci struct { - Aciname interface{} `json:"aciname"` - - Permission interface{} `json:"permission"` - - Group interface{} `json:"group"` - - Permissions interface{} `json:"permissions"` - - Attrs interface{} `json:"attrs"` - - Type interface{} `json:"type"` - - Memberof interface{} `json:"memberof"` - - Filter interface{} `json:"filter"` - - Subtree interface{} `json:"subtree"` - - Targetgroup interface{} `json:"targetgroup"` - - Selfaci interface{} `json:"selfaci"` - - Aciprefix interface{} `json:"aciprefix"` - - Aci interface{} `json:"aci"` -} - -func (out *Aci) UnmarshalJSON(data []byte) error { - var in jsonAci - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Aciname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Aciname = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Aciname: %v; expected exactly one element", raw) - } - out.Aciname = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Aciname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Permission != nil { - raw := in.Permission - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Permission = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Permission = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Permission: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Permission: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Group != nil { - raw := in.Group - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Group = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Group = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Group: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Group: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Permissions - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Permissions = []string{plainV} - } else if sliceOk { - - if len(sliceV) < 1 { - return fmt.Errorf("unexpected value for field Permissions: %v; expected at least one element", raw) - } - - out.Permissions = sliceV - } else { - return fmt.Errorf("unexpected value for field Permissions: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Attrs != nil { - raw := in.Attrs - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Attrs = &[]string{plainV} - } else if sliceOk { - - out.Attrs = &sliceV - } else { - return fmt.Errorf("unexpected value for field Attrs: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Type != nil { - raw := in.Type - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Type = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Type = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Type: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Type: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Memberof != nil { - raw := in.Memberof - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Memberof = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Memberof = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Memberof: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Memberof: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Filter != nil { - raw := in.Filter - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Filter = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Filter = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Filter: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Filter: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Subtree != nil { - raw := in.Subtree - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Subtree = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Subtree = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Subtree: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Subtree: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Targetgroup != nil { - raw := in.Targetgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Targetgroup = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Targetgroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Targetgroup: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Targetgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Selfaci != nil { - raw := in.Selfaci - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Selfaci = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Selfaci = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Selfaci: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Selfaci: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Aciprefix - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Aciprefix = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Aciprefix: %v; expected exactly one element", raw) - } - out.Aciprefix = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Aciprefix: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Aci - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Aci = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Aci: %v; expected exactly one element", raw) - } - out.Aci = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Aci: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Automember struct { - - /* - Automember Rule - Automember Rule - */ - Cn string `json:"cn,omitempty"` - - /* - Description - A description of this auto member rule - */ - Description *string `json:"description,omitempty"` - - /* - Default (fallback) Group - Default group for entries to land - */ - Automemberdefaultgroup *string `json:"automemberdefaultgroup,omitempty"` - - /* - Inclusive Regex - Inclusive Regex - */ - Automemberinclusiveregex *[]string `json:"automemberinclusiveregex,omitempty"` - - /* - Exclusive Regex - Exclusive Regex - */ - Automemberexclusiveregex *[]string `json:"automemberexclusiveregex,omitempty"` -} - -func (t *Automember) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Automember[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Automember%v", string(b)) -} - -type jsonAutomember struct { - Cn interface{} `json:"cn"` - - Description interface{} `json:"description"` - - Automemberdefaultgroup interface{} `json:"automemberdefaultgroup"` - - Automemberinclusiveregex interface{} `json:"automemberinclusiveregex"` - - Automemberexclusiveregex interface{} `json:"automemberexclusiveregex"` -} - -func (out *Automember) UnmarshalJSON(data []byte) error { - var in jsonAutomember - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Cn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) - } - out.Cn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Description != nil { - raw := in.Description - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Description = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Description = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Automemberdefaultgroup != nil { - raw := in.Automemberdefaultgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Automemberdefaultgroup = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Automemberdefaultgroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Automemberdefaultgroup: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Automemberdefaultgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Automemberinclusiveregex != nil { - raw := in.Automemberinclusiveregex - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Automemberinclusiveregex = &[]string{plainV} - } else if sliceOk { - - out.Automemberinclusiveregex = &sliceV - } else { - return fmt.Errorf("unexpected value for field Automemberinclusiveregex: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Automemberexclusiveregex != nil { - raw := in.Automemberexclusiveregex - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Automemberexclusiveregex = &[]string{plainV} - } else if sliceOk { - - out.Automemberexclusiveregex = &sliceV - } else { - return fmt.Errorf("unexpected value for field Automemberexclusiveregex: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type AutomemberDefaultGroup struct { - - /* - Description - A description of this auto member rule - */ - Description *string `json:"description,omitempty"` - - /* - Default (fallback) Group - Default group for entries to land - */ - Automemberdefaultgroup *string `json:"automemberdefaultgroup,omitempty"` - - /* - Inclusive Regex - Inclusive Regex - */ - Automemberinclusiveregex *[]string `json:"automemberinclusiveregex,omitempty"` - - /* - Exclusive Regex - Exclusive Regex - */ - Automemberexclusiveregex *[]string `json:"automemberexclusiveregex,omitempty"` -} - -func (t *AutomemberDefaultGroup) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AutomemberDefaultGroup[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("AutomemberDefaultGroup%v", string(b)) -} - -type jsonAutomemberDefaultGroup struct { - Description interface{} `json:"description"` - - Automemberdefaultgroup interface{} `json:"automemberdefaultgroup"` - - Automemberinclusiveregex interface{} `json:"automemberinclusiveregex"` - - Automemberexclusiveregex interface{} `json:"automemberexclusiveregex"` -} - -func (out *AutomemberDefaultGroup) UnmarshalJSON(data []byte) error { - var in jsonAutomemberDefaultGroup - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if in.Description != nil { - raw := in.Description - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Description = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Description = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Automemberdefaultgroup != nil { - raw := in.Automemberdefaultgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Automemberdefaultgroup = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Automemberdefaultgroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Automemberdefaultgroup: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Automemberdefaultgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Automemberinclusiveregex != nil { - raw := in.Automemberinclusiveregex - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Automemberinclusiveregex = &[]string{plainV} - } else if sliceOk { - - out.Automemberinclusiveregex = &sliceV - } else { - return fmt.Errorf("unexpected value for field Automemberinclusiveregex: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Automemberexclusiveregex != nil { - raw := in.Automemberexclusiveregex - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Automemberexclusiveregex = &[]string{plainV} - } else if sliceOk { - - out.Automemberexclusiveregex = &sliceV - } else { - return fmt.Errorf("unexpected value for field Automemberexclusiveregex: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type AutomemberTask struct { - - /* - Task DN - DN of the started task - */ - Dn string `json:"dn,omitempty"` -} - -func (t *AutomemberTask) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("AutomemberTask[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("AutomemberTask%v", string(b)) -} - -type jsonAutomemberTask struct { - Dn interface{} `json:"dn"` -} - -func (out *AutomemberTask) UnmarshalJSON(data []byte) error { - var in jsonAutomemberTask - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Dn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Dn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Dn: %v; expected exactly one element", raw) - } - out.Dn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Dn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Automountkey struct { - - /* - Key - Automount key name. - */ - Automountkey string `json:"automountkey,omitempty"` - - /* - Mount information - - */ - Automountinformation string `json:"automountinformation,omitempty"` - - /* - description - - */ - Description *string `json:"description,omitempty"` -} - -func (t *Automountkey) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Automountkey[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Automountkey%v", string(b)) -} - -type jsonAutomountkey struct { - Automountkey interface{} `json:"automountkey"` - - Automountinformation interface{} `json:"automountinformation"` - - Description interface{} `json:"description"` -} - -func (out *Automountkey) UnmarshalJSON(data []byte) error { - var in jsonAutomountkey - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Automountkey - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Automountkey = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Automountkey: %v; expected exactly one element", raw) - } - out.Automountkey = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Automountkey: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Automountinformation - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Automountinformation = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Automountinformation: %v; expected exactly one element", raw) - } - out.Automountinformation = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Automountinformation: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Description != nil { - raw := in.Description - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Description = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Description = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Automountlocation struct { - - /* - Location - Automount location name. - */ - Cn string `json:"cn,omitempty"` -} - -func (t *Automountlocation) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Automountlocation[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Automountlocation%v", string(b)) -} - -type jsonAutomountlocation struct { - Cn interface{} `json:"cn"` -} - -func (out *Automountlocation) UnmarshalJSON(data []byte) error { - var in jsonAutomountlocation - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Cn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) - } - out.Cn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Automountmap struct { - - /* - Map - Automount map name. - */ - Automountmapname string `json:"automountmapname,omitempty"` - - /* - Description - - */ - Description *string `json:"description,omitempty"` -} - -func (t *Automountmap) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Automountmap[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Automountmap%v", string(b)) -} - -type jsonAutomountmap struct { - Automountmapname interface{} `json:"automountmapname"` - - Description interface{} `json:"description"` -} - -func (out *Automountmap) UnmarshalJSON(data []byte) error { - var in jsonAutomountmap - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Automountmapname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Automountmapname = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Automountmapname: %v; expected exactly one element", raw) - } - out.Automountmapname = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Automountmapname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Description != nil { - raw := in.Description - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Description = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Description = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Ca struct { - - /* - Name - Name for referencing the CA - */ - Cn string `json:"cn,omitempty"` - - /* - Description - Description of the purpose of the CA - */ - Description *string `json:"description,omitempty"` - - /* - Authority ID - Dogtag Authority ID - */ - Ipacaid string `json:"ipacaid,omitempty"` - - /* - Subject DN - Subject Distinguished Name - */ - Ipacasubjectdn string `json:"ipacasubjectdn,omitempty"` - - /* - Issuer DN - Issuer Distinguished Name - */ - Ipacaissuerdn string `json:"ipacaissuerdn,omitempty"` -} - -func (t *Ca) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Ca[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Ca%v", string(b)) -} - -type jsonCa struct { - Cn interface{} `json:"cn"` - - Description interface{} `json:"description"` - - Ipacaid interface{} `json:"ipacaid"` - - Ipacasubjectdn interface{} `json:"ipacasubjectdn"` - - Ipacaissuerdn interface{} `json:"ipacaissuerdn"` -} - -func (out *Ca) UnmarshalJSON(data []byte) error { - var in jsonCa - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Cn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) - } - out.Cn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Description != nil { - raw := in.Description - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Description = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Description = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Ipacaid - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipacaid = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipacaid: %v; expected exactly one element", raw) - } - out.Ipacaid = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipacaid: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Ipacasubjectdn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipacasubjectdn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipacasubjectdn: %v; expected exactly one element", raw) - } - out.Ipacasubjectdn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipacasubjectdn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Ipacaissuerdn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipacaissuerdn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipacaissuerdn: %v; expected exactly one element", raw) - } - out.Ipacaissuerdn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipacaissuerdn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Caacl struct { - - /* - ACL name - - */ - Cn string `json:"cn,omitempty"` - - /* - Description - - */ - Description *string `json:"description,omitempty"` - - /* - Enabled - - */ - Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` - - /* - CA category - CA category the ACL applies to - */ - Ipacacategory *string `json:"ipacacategory,omitempty"` - - /* - Profile category - Profile category the ACL applies to - */ - Ipacertprofilecategory *string `json:"ipacertprofilecategory,omitempty"` - - /* - User category - User category the ACL applies to - */ - Usercategory *string `json:"usercategory,omitempty"` - - /* - Host category - Host category the ACL applies to - */ - Hostcategory *string `json:"hostcategory,omitempty"` - - /* - Service category - Service category the ACL applies to - */ - Servicecategory *string `json:"servicecategory,omitempty"` - - /* - CAs - - */ - IpamembercaCa *string `json:"ipamemberca_ca,omitempty"` - - /* - Profiles - - */ - IpamembercertprofileCertprofile *string `json:"ipamembercertprofile_certprofile,omitempty"` - - /* - Users - - */ - MemberuserUser *string `json:"memberuser_user,omitempty"` - - /* - User Groups - - */ - MemberuserGroup *string `json:"memberuser_group,omitempty"` - - /* - Hosts - - */ - MemberhostHost *string `json:"memberhost_host,omitempty"` - - /* - Host Groups - - */ - MemberhostHostgroup *string `json:"memberhost_hostgroup,omitempty"` - - /* - Services - - */ - MemberserviceService *string `json:"memberservice_service,omitempty"` -} - -func (t *Caacl) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Caacl[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Caacl%v", string(b)) -} - -type jsonCaacl struct { - Cn interface{} `json:"cn"` - - Description interface{} `json:"description"` - - Ipaenabledflag interface{} `json:"ipaenabledflag"` - - Ipacacategory interface{} `json:"ipacacategory"` - - Ipacertprofilecategory interface{} `json:"ipacertprofilecategory"` - - Usercategory interface{} `json:"usercategory"` - - Hostcategory interface{} `json:"hostcategory"` - - Servicecategory interface{} `json:"servicecategory"` - - IpamembercaCa interface{} `json:"ipamemberca_ca"` - - IpamembercertprofileCertprofile interface{} `json:"ipamembercertprofile_certprofile"` - - MemberuserUser interface{} `json:"memberuser_user"` - - MemberuserGroup interface{} `json:"memberuser_group"` - - MemberhostHost interface{} `json:"memberhost_host"` - - MemberhostHostgroup interface{} `json:"memberhost_hostgroup"` - - MemberserviceService interface{} `json:"memberservice_service"` -} - -func (out *Caacl) UnmarshalJSON(data []byte) error { - var in jsonCaacl - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Cn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) - } - out.Cn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Description != nil { - raw := in.Description - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Description = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Description = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipaenabledflag != nil { - raw := in.Ipaenabledflag - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipaenabledflag = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipaenabledflag = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipaenabledflag: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipaenabledflag: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipacacategory != nil { - raw := in.Ipacacategory - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipacacategory = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipacacategory = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipacacategory: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipacacategory: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipacertprofilecategory != nil { - raw := in.Ipacertprofilecategory - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipacertprofilecategory = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipacertprofilecategory = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipacertprofilecategory: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipacertprofilecategory: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Usercategory != nil { - raw := in.Usercategory - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Usercategory = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Usercategory = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Usercategory: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Usercategory: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Hostcategory != nil { - raw := in.Hostcategory - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Hostcategory = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Hostcategory = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Hostcategory: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Hostcategory: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Servicecategory != nil { - raw := in.Servicecategory - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Servicecategory = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Servicecategory = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Servicecategory: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Servicecategory: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.IpamembercaCa != nil { - raw := in.IpamembercaCa - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.IpamembercaCa = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.IpamembercaCa = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field IpamembercaCa: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field IpamembercaCa: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.IpamembercertprofileCertprofile != nil { - raw := in.IpamembercertprofileCertprofile - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.IpamembercertprofileCertprofile = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.IpamembercertprofileCertprofile = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field IpamembercertprofileCertprofile: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field IpamembercertprofileCertprofile: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberuserUser != nil { - raw := in.MemberuserUser - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberuserUser = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberuserUser = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberuserUser: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberuserUser: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberuserGroup != nil { - raw := in.MemberuserGroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberuserGroup = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberuserGroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberuserGroup: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberuserGroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberhostHost != nil { - raw := in.MemberhostHost - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberhostHost = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberhostHost = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberhostHost: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberhostHost: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberhostHostgroup != nil { - raw := in.MemberhostHostgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberhostHostgroup = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberhostHostgroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberhostHostgroup: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberhostHostgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberserviceService != nil { - raw := in.MemberserviceService - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberserviceService = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberserviceService = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberserviceService: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberserviceService: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Cert struct { - - /* - Issuing CA - Name of issuing CA - */ - Cacn *string `json:"cacn,omitempty"` - - /* - Certificate - Base-64 encoded certificate. - */ - Certificate string `json:"certificate,omitempty"` - - /* - Subject - - */ - Subject string `json:"subject,omitempty"` - - /* - Subject email address - - */ - SanRfc822name *[]string `json:"san_rfc822name,omitempty"` - - /* - Subject DNS name - - */ - SanDnsname *[]string `json:"san_dnsname,omitempty"` - - /* - Subject X.400 address - - */ - SanX400address *[]string `json:"san_x400address,omitempty"` - - /* - Subject directory name - - */ - SanDirectoryname *[]string `json:"san_directoryname,omitempty"` - - /* - Subject EDI Party name - - */ - SanEdipartyname *[]string `json:"san_edipartyname,omitempty"` - - /* - Subject URI - - */ - SanURI *[]string `json:"san_uri,omitempty"` - - /* - Subject IP Address - - */ - SanIpaddress *[]string `json:"san_ipaddress,omitempty"` - - /* - Subject OID - - */ - SanOid *[]string `json:"san_oid,omitempty"` - - /* - Subject UPN - - */ - SanOtherUpn *[]string `json:"san_other_upn,omitempty"` - - /* - Subject Kerberos principal name - - */ - SanOtherKpn *[]string `json:"san_other_kpn,omitempty"` - - /* - Subject Other Name - - */ - SanOther *[]string `json:"san_other,omitempty"` - - /* - Issuer - Issuer DN - */ - Issuer string `json:"issuer,omitempty"` - - /* - Not Before - - */ - ValidNotBefore time.Time `json:"valid_not_before,omitempty"` - - /* - Not After - - */ - ValidNotAfter time.Time `json:"valid_not_after,omitempty"` - - /* - Fingerprint (MD5) - - */ - Md5Fingerprint string `json:"md5_fingerprint,omitempty"` - - /* - Fingerprint (SHA1) - - */ - Sha1Fingerprint string `json:"sha1_fingerprint,omitempty"` - - /* - Serial number - Serial number in decimal or if prefixed with 0x in hexadecimal - */ - SerialNumber int `json:"serial_number,omitempty"` - - /* - Serial number (hex) - - */ - SerialNumberHex string `json:"serial_number_hex,omitempty"` - - /* - Status - - */ - Status string `json:"status,omitempty"` - - /* - Revoked - - */ - Revoked *bool `json:"revoked,omitempty"` - - /* - Revocation reason - Reason for revoking the certificate (0-10). Type "ipa help cert" for revocation reason details. - */ - RevocationReason int `json:"revocation_reason,omitempty"` - - /* - Owner user - - */ - OwnerUser *[]string `json:"owner_user,omitempty"` - - /* - Owner host - - */ - OwnerHost *[]string `json:"owner_host,omitempty"` - - /* - Owner service - Service principal - */ - OwnerService *[]string `json:"owner_service,omitempty"` -} - -func (t *Cert) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Cert[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Cert%v", string(b)) -} - -type jsonCert struct { - Cacn interface{} `json:"cacn"` - - Certificate interface{} `json:"certificate"` - - Subject interface{} `json:"subject"` - - SanRfc822name interface{} `json:"san_rfc822name"` - - SanDnsname interface{} `json:"san_dnsname"` - - SanX400address interface{} `json:"san_x400address"` - - SanDirectoryname interface{} `json:"san_directoryname"` - - SanEdipartyname interface{} `json:"san_edipartyname"` - - SanURI interface{} `json:"san_uri"` - - SanIpaddress interface{} `json:"san_ipaddress"` - - SanOid interface{} `json:"san_oid"` - - SanOtherUpn interface{} `json:"san_other_upn"` - - SanOtherKpn interface{} `json:"san_other_kpn"` - - SanOther interface{} `json:"san_other"` - - Issuer interface{} `json:"issuer"` - - ValidNotBefore interface{} `json:"valid_not_before"` - - ValidNotAfter interface{} `json:"valid_not_after"` - - Md5Fingerprint interface{} `json:"md5_fingerprint"` - - Sha1Fingerprint interface{} `json:"sha1_fingerprint"` - - SerialNumber interface{} `json:"serial_number"` - - SerialNumberHex interface{} `json:"serial_number_hex"` - - Status interface{} `json:"status"` - - Revoked interface{} `json:"revoked"` - - RevocationReason interface{} `json:"revocation_reason"` - - OwnerUser interface{} `json:"owner_user"` - - OwnerHost interface{} `json:"owner_host"` - - OwnerService interface{} `json:"owner_service"` -} - -func (out *Cert) UnmarshalJSON(data []byte) error { - var in jsonCert - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if in.Cacn != nil { - raw := in.Cacn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cacn = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Cacn = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Cacn: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Cacn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Certificate - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Certificate = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Certificate: %v; expected exactly one element", raw) - } - out.Certificate = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Certificate: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Subject - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Subject = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Subject: %v; expected exactly one element", raw) - } - out.Subject = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Subject: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.SanRfc822name != nil { - raw := in.SanRfc822name - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.SanRfc822name = &[]string{plainV} - } else if sliceOk { - - out.SanRfc822name = &sliceV - } else { - return fmt.Errorf("unexpected value for field SanRfc822name: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.SanDnsname != nil { - raw := in.SanDnsname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.SanDnsname = &[]string{plainV} - } else if sliceOk { - - out.SanDnsname = &sliceV - } else { - return fmt.Errorf("unexpected value for field SanDnsname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.SanX400address != nil { - raw := in.SanX400address - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.SanX400address = &[]string{plainV} - } else if sliceOk { - - out.SanX400address = &sliceV - } else { - return fmt.Errorf("unexpected value for field SanX400address: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.SanDirectoryname != nil { - raw := in.SanDirectoryname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.SanDirectoryname = &[]string{plainV} - } else if sliceOk { - - out.SanDirectoryname = &sliceV - } else { - return fmt.Errorf("unexpected value for field SanDirectoryname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.SanEdipartyname != nil { - raw := in.SanEdipartyname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.SanEdipartyname = &[]string{plainV} - } else if sliceOk { - - out.SanEdipartyname = &sliceV - } else { - return fmt.Errorf("unexpected value for field SanEdipartyname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.SanURI != nil { - raw := in.SanURI - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.SanURI = &[]string{plainV} - } else if sliceOk { - - out.SanURI = &sliceV - } else { - return fmt.Errorf("unexpected value for field SanURI: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.SanIpaddress != nil { - raw := in.SanIpaddress - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.SanIpaddress = &[]string{plainV} - } else if sliceOk { - - out.SanIpaddress = &sliceV - } else { - return fmt.Errorf("unexpected value for field SanIpaddress: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.SanOid != nil { - raw := in.SanOid - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.SanOid = &[]string{plainV} - } else if sliceOk { - - out.SanOid = &sliceV - } else { - return fmt.Errorf("unexpected value for field SanOid: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.SanOtherUpn != nil { - raw := in.SanOtherUpn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.SanOtherUpn = &[]string{plainV} - } else if sliceOk { - - out.SanOtherUpn = &sliceV - } else { - return fmt.Errorf("unexpected value for field SanOtherUpn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.SanOtherKpn != nil { - raw := in.SanOtherKpn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.SanOtherKpn = &[]string{plainV} - } else if sliceOk { - - out.SanOtherKpn = &sliceV - } else { - return fmt.Errorf("unexpected value for field SanOtherKpn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.SanOther != nil { - raw := in.SanOther - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.SanOther = &[]string{plainV} - } else if sliceOk { - - out.SanOther = &sliceV - } else { - return fmt.Errorf("unexpected value for field SanOther: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Issuer - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Issuer = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Issuer: %v; expected exactly one element", raw) - } - out.Issuer = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Issuer: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.ValidNotBefore - plainV, plainOk := raw.(time.Time) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []time.Time - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(time.Time) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.ValidNotBefore = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field ValidNotBefore: %v; expected exactly one element", raw) - } - out.ValidNotBefore = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field ValidNotBefore: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.ValidNotAfter - plainV, plainOk := raw.(time.Time) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []time.Time - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(time.Time) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.ValidNotAfter = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field ValidNotAfter: %v; expected exactly one element", raw) - } - out.ValidNotAfter = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field ValidNotAfter: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Md5Fingerprint - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Md5Fingerprint = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Md5Fingerprint: %v; expected exactly one element", raw) - } - out.Md5Fingerprint = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Md5Fingerprint: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Sha1Fingerprint - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Sha1Fingerprint = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Sha1Fingerprint: %v; expected exactly one element", raw) - } - out.Sha1Fingerprint = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Sha1Fingerprint: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.SerialNumber - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field SerialNumber: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.SerialNumber = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field SerialNumber: %v; expected exactly one element", raw) - } - out.SerialNumber = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field SerialNumber: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.SerialNumberHex - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.SerialNumberHex = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field SerialNumberHex: %v; expected exactly one element", raw) - } - out.SerialNumberHex = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field SerialNumberHex: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Status - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Status = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Status: %v; expected exactly one element", raw) - } - out.Status = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Status: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Revoked != nil { - raw := in.Revoked - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Revoked = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Revoked = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Revoked: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Revoked: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.RevocationReason - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field RevocationReason: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.RevocationReason = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field RevocationReason: %v; expected exactly one element", raw) - } - out.RevocationReason = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field RevocationReason: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.OwnerUser != nil { - raw := in.OwnerUser - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.OwnerUser = &[]string{plainV} - } else if sliceOk { - - out.OwnerUser = &sliceV - } else { - return fmt.Errorf("unexpected value for field OwnerUser: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.OwnerHost != nil { - raw := in.OwnerHost - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.OwnerHost = &[]string{plainV} - } else if sliceOk { - - out.OwnerHost = &sliceV - } else { - return fmt.Errorf("unexpected value for field OwnerHost: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.OwnerService != nil { - raw := in.OwnerService - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.OwnerService = &[]string{plainV} - } else if sliceOk { - - out.OwnerService = &sliceV - } else { - return fmt.Errorf("unexpected value for field OwnerService: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Certprofile struct { - - /* - Profile ID - Profile ID for referring to this profile - */ - Cn string `json:"cn,omitempty"` - - /* - Profile configuration - - */ - Config string `json:"config,omitempty"` - - /* - Profile description - Brief description of this profile - */ - Description string `json:"description,omitempty"` - - /* - Store issued certificates - Whether to store certs issued using this profile - */ - Ipacertprofilestoreissued *bool `json:"ipacertprofilestoreissued,omitempty"` -} - -func (t *Certprofile) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Certprofile[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Certprofile%v", string(b)) -} - -type jsonCertprofile struct { - Cn interface{} `json:"cn"` - - Config interface{} `json:"config"` - - Description interface{} `json:"description"` - - Ipacertprofilestoreissued interface{} `json:"ipacertprofilestoreissued"` -} - -func (out *Certprofile) UnmarshalJSON(data []byte) error { - var in jsonCertprofile - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Cn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) - } - out.Cn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Config - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Config = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Config: %v; expected exactly one element", raw) - } - out.Config = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Config: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Description - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Description = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Description: %v; expected exactly one element", raw) - } - out.Description = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipacertprofilestoreissued != nil { - raw := in.Ipacertprofilestoreissued - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipacertprofilestoreissued = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipacertprofilestoreissued = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipacertprofilestoreissued: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipacertprofilestoreissued: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Certreq struct { - - /* - Issuing CA - Name of issuing CA - */ - Cacn *string `json:"cacn,omitempty"` - - /* - Certificate - Base-64 encoded certificate. - */ - Certificate string `json:"certificate,omitempty"` - - /* - Subject - - */ - Subject string `json:"subject,omitempty"` - - /* - Subject email address - - */ - SanRfc822name *[]string `json:"san_rfc822name,omitempty"` - - /* - Subject DNS name - - */ - SanDnsname *[]string `json:"san_dnsname,omitempty"` - - /* - Subject X.400 address - - */ - SanX400address *[]string `json:"san_x400address,omitempty"` - - /* - Subject directory name - - */ - SanDirectoryname *[]string `json:"san_directoryname,omitempty"` - - /* - Subject EDI Party name - - */ - SanEdipartyname *[]string `json:"san_edipartyname,omitempty"` - - /* - Subject URI - - */ - SanURI *[]string `json:"san_uri,omitempty"` - - /* - Subject IP Address - - */ - SanIpaddress *[]string `json:"san_ipaddress,omitempty"` - - /* - Subject OID - - */ - SanOid *[]string `json:"san_oid,omitempty"` - - /* - Subject UPN - - */ - SanOtherUpn *[]string `json:"san_other_upn,omitempty"` - - /* - Subject Kerberos principal name - - */ - SanOtherKpn *[]string `json:"san_other_kpn,omitempty"` - - /* - Subject Other Name - - */ - SanOther *[]string `json:"san_other,omitempty"` - - /* - Issuer - Issuer DN - */ - Issuer string `json:"issuer,omitempty"` - - /* - Not Before - - */ - ValidNotBefore time.Time `json:"valid_not_before,omitempty"` - - /* - Not After - - */ - ValidNotAfter time.Time `json:"valid_not_after,omitempty"` - - /* - Fingerprint (MD5) - - */ - Md5Fingerprint string `json:"md5_fingerprint,omitempty"` - - /* - Fingerprint (SHA1) - - */ - Sha1Fingerprint string `json:"sha1_fingerprint,omitempty"` - - /* - Serial number - Serial number in decimal or if prefixed with 0x in hexadecimal - */ - SerialNumber int `json:"serial_number,omitempty"` - - /* - Serial number (hex) - - */ - SerialNumberHex string `json:"serial_number_hex,omitempty"` - - /* - - - */ - RequestType string `json:"request_type,omitempty"` - - /* - Profile ID - Certificate Profile to use - */ - ProfileID *string `json:"profile_id,omitempty"` - - /* - Request status - - */ - CertRequestStatus string `json:"cert_request_status,omitempty"` - - /* - Request id - - */ - RequestID int `json:"request_id,omitempty"` -} - -func (t *Certreq) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Certreq[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Certreq%v", string(b)) -} - -type jsonCertreq struct { - Cacn interface{} `json:"cacn"` - - Certificate interface{} `json:"certificate"` - - Subject interface{} `json:"subject"` - - SanRfc822name interface{} `json:"san_rfc822name"` - - SanDnsname interface{} `json:"san_dnsname"` - - SanX400address interface{} `json:"san_x400address"` - - SanDirectoryname interface{} `json:"san_directoryname"` - - SanEdipartyname interface{} `json:"san_edipartyname"` - - SanURI interface{} `json:"san_uri"` - - SanIpaddress interface{} `json:"san_ipaddress"` - - SanOid interface{} `json:"san_oid"` - - SanOtherUpn interface{} `json:"san_other_upn"` - - SanOtherKpn interface{} `json:"san_other_kpn"` - - SanOther interface{} `json:"san_other"` - - Issuer interface{} `json:"issuer"` - - ValidNotBefore interface{} `json:"valid_not_before"` - - ValidNotAfter interface{} `json:"valid_not_after"` - - Md5Fingerprint interface{} `json:"md5_fingerprint"` - - Sha1Fingerprint interface{} `json:"sha1_fingerprint"` - - SerialNumber interface{} `json:"serial_number"` - - SerialNumberHex interface{} `json:"serial_number_hex"` - - RequestType interface{} `json:"request_type"` - - ProfileID interface{} `json:"profile_id"` - - CertRequestStatus interface{} `json:"cert_request_status"` - - RequestID interface{} `json:"request_id"` -} - -func (out *Certreq) UnmarshalJSON(data []byte) error { - var in jsonCertreq - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if in.Cacn != nil { - raw := in.Cacn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cacn = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Cacn = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Cacn: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Cacn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Certificate - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Certificate = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Certificate: %v; expected exactly one element", raw) - } - out.Certificate = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Certificate: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Subject - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Subject = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Subject: %v; expected exactly one element", raw) - } - out.Subject = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Subject: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.SanRfc822name != nil { - raw := in.SanRfc822name - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.SanRfc822name = &[]string{plainV} - } else if sliceOk { - - out.SanRfc822name = &sliceV - } else { - return fmt.Errorf("unexpected value for field SanRfc822name: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.SanDnsname != nil { - raw := in.SanDnsname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.SanDnsname = &[]string{plainV} - } else if sliceOk { - - out.SanDnsname = &sliceV - } else { - return fmt.Errorf("unexpected value for field SanDnsname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.SanX400address != nil { - raw := in.SanX400address - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.SanX400address = &[]string{plainV} - } else if sliceOk { - - out.SanX400address = &sliceV - } else { - return fmt.Errorf("unexpected value for field SanX400address: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.SanDirectoryname != nil { - raw := in.SanDirectoryname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.SanDirectoryname = &[]string{plainV} - } else if sliceOk { - - out.SanDirectoryname = &sliceV - } else { - return fmt.Errorf("unexpected value for field SanDirectoryname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.SanEdipartyname != nil { - raw := in.SanEdipartyname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.SanEdipartyname = &[]string{plainV} - } else if sliceOk { - - out.SanEdipartyname = &sliceV - } else { - return fmt.Errorf("unexpected value for field SanEdipartyname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.SanURI != nil { - raw := in.SanURI - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.SanURI = &[]string{plainV} - } else if sliceOk { - - out.SanURI = &sliceV - } else { - return fmt.Errorf("unexpected value for field SanURI: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.SanIpaddress != nil { - raw := in.SanIpaddress - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.SanIpaddress = &[]string{plainV} - } else if sliceOk { - - out.SanIpaddress = &sliceV - } else { - return fmt.Errorf("unexpected value for field SanIpaddress: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.SanOid != nil { - raw := in.SanOid - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.SanOid = &[]string{plainV} - } else if sliceOk { - - out.SanOid = &sliceV - } else { - return fmt.Errorf("unexpected value for field SanOid: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.SanOtherUpn != nil { - raw := in.SanOtherUpn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.SanOtherUpn = &[]string{plainV} - } else if sliceOk { - - out.SanOtherUpn = &sliceV - } else { - return fmt.Errorf("unexpected value for field SanOtherUpn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.SanOtherKpn != nil { - raw := in.SanOtherKpn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.SanOtherKpn = &[]string{plainV} - } else if sliceOk { - - out.SanOtherKpn = &sliceV - } else { - return fmt.Errorf("unexpected value for field SanOtherKpn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.SanOther != nil { - raw := in.SanOther - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.SanOther = &[]string{plainV} - } else if sliceOk { - - out.SanOther = &sliceV - } else { - return fmt.Errorf("unexpected value for field SanOther: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Issuer - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Issuer = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Issuer: %v; expected exactly one element", raw) - } - out.Issuer = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Issuer: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.ValidNotBefore - plainV, plainOk := raw.(time.Time) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []time.Time - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(time.Time) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.ValidNotBefore = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field ValidNotBefore: %v; expected exactly one element", raw) - } - out.ValidNotBefore = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field ValidNotBefore: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.ValidNotAfter - plainV, plainOk := raw.(time.Time) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []time.Time - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(time.Time) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.ValidNotAfter = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field ValidNotAfter: %v; expected exactly one element", raw) - } - out.ValidNotAfter = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field ValidNotAfter: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Md5Fingerprint - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Md5Fingerprint = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Md5Fingerprint: %v; expected exactly one element", raw) - } - out.Md5Fingerprint = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Md5Fingerprint: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Sha1Fingerprint - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Sha1Fingerprint = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Sha1Fingerprint: %v; expected exactly one element", raw) - } - out.Sha1Fingerprint = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Sha1Fingerprint: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.SerialNumber - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field SerialNumber: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.SerialNumber = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field SerialNumber: %v; expected exactly one element", raw) - } - out.SerialNumber = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field SerialNumber: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.SerialNumberHex - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.SerialNumberHex = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field SerialNumberHex: %v; expected exactly one element", raw) - } - out.SerialNumberHex = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field SerialNumberHex: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.RequestType - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.RequestType = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field RequestType: %v; expected exactly one element", raw) - } - out.RequestType = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field RequestType: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.ProfileID != nil { - raw := in.ProfileID - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.ProfileID = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.ProfileID = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field ProfileID: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field ProfileID: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.CertRequestStatus - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.CertRequestStatus = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field CertRequestStatus: %v; expected exactly one element", raw) - } - out.CertRequestStatus = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field CertRequestStatus: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.RequestID - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field RequestID: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.RequestID = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field RequestID: %v; expected exactly one element", raw) - } - out.RequestID = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field RequestID: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Class struct { - - /* - Name - - */ - Name string `json:"name,omitempty"` - - /* - Version - - */ - Version string `json:"version,omitempty"` - - /* - Full name - - */ - FullName string `json:"full_name,omitempty"` - - /* - Documentation - - */ - Doc *string `json:"doc,omitempty"` - - /* - Exclude from - - */ - Exclude *[]string `json:"exclude,omitempty"` - - /* - Include in - - */ - Include *[]string `json:"include,omitempty"` - - /* - Help topic - - */ - TopicTopic *string `json:"topic_topic,omitempty"` - - /* - Parameters - - */ - ParamsParam *[]string `json:"params_param,omitempty"` -} - -func (t *Class) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Class[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Class%v", string(b)) -} - -type jsonClass struct { - Name interface{} `json:"name"` - - Version interface{} `json:"version"` - - FullName interface{} `json:"full_name"` - - Doc interface{} `json:"doc"` - - Exclude interface{} `json:"exclude"` - - Include interface{} `json:"include"` - - TopicTopic interface{} `json:"topic_topic"` - - ParamsParam interface{} `json:"params_param"` -} - -func (out *Class) UnmarshalJSON(data []byte) error { - var in jsonClass - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Name - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Name = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Name: %v; expected exactly one element", raw) - } - out.Name = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Name: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Version - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Version = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Version: %v; expected exactly one element", raw) - } - out.Version = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Version: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.FullName - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.FullName = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field FullName: %v; expected exactly one element", raw) - } - out.FullName = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field FullName: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Doc != nil { - raw := in.Doc - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Doc = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Doc = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Doc: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Doc: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Exclude != nil { - raw := in.Exclude - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Exclude = &[]string{plainV} - } else if sliceOk { - - out.Exclude = &sliceV - } else { - return fmt.Errorf("unexpected value for field Exclude: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Include != nil { - raw := in.Include - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Include = &[]string{plainV} - } else if sliceOk { - - out.Include = &sliceV - } else { - return fmt.Errorf("unexpected value for field Include: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.TopicTopic != nil { - raw := in.TopicTopic - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.TopicTopic = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.TopicTopic = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field TopicTopic: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field TopicTopic: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.ParamsParam != nil { - raw := in.ParamsParam - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.ParamsParam = &[]string{plainV} - } else if sliceOk { - - out.ParamsParam = &sliceV - } else { - return fmt.Errorf("unexpected value for field ParamsParam: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Command struct { - - /* - Name - - */ - Name string `json:"name,omitempty"` - - /* - Version - - */ - Version string `json:"version,omitempty"` - - /* - Full name - - */ - FullName string `json:"full_name,omitempty"` - - /* - Documentation - - */ - Doc *string `json:"doc,omitempty"` - - /* - Exclude from - - */ - Exclude *[]string `json:"exclude,omitempty"` - - /* - Include in - - */ - Include *[]string `json:"include,omitempty"` - - /* - Help topic - - */ - TopicTopic *string `json:"topic_topic,omitempty"` - - /* - Parameters - - */ - ParamsParam *[]string `json:"params_param,omitempty"` - - /* - Method of - - */ - ObjClass *string `json:"obj_class,omitempty"` - - /* - Method name - - */ - AttrName *string `json:"attr_name,omitempty"` -} - -func (t *Command) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Command[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Command%v", string(b)) -} - -type jsonCommand struct { - Name interface{} `json:"name"` - - Version interface{} `json:"version"` - - FullName interface{} `json:"full_name"` - - Doc interface{} `json:"doc"` - - Exclude interface{} `json:"exclude"` - - Include interface{} `json:"include"` - - TopicTopic interface{} `json:"topic_topic"` - - ParamsParam interface{} `json:"params_param"` - - ObjClass interface{} `json:"obj_class"` - - AttrName interface{} `json:"attr_name"` -} - -func (out *Command) UnmarshalJSON(data []byte) error { - var in jsonCommand - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Name - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Name = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Name: %v; expected exactly one element", raw) - } - out.Name = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Name: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Version - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Version = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Version: %v; expected exactly one element", raw) - } - out.Version = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Version: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.FullName - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.FullName = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field FullName: %v; expected exactly one element", raw) - } - out.FullName = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field FullName: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Doc != nil { - raw := in.Doc - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Doc = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Doc = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Doc: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Doc: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Exclude != nil { - raw := in.Exclude - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Exclude = &[]string{plainV} - } else if sliceOk { - - out.Exclude = &sliceV - } else { - return fmt.Errorf("unexpected value for field Exclude: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Include != nil { - raw := in.Include - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Include = &[]string{plainV} - } else if sliceOk { - - out.Include = &sliceV - } else { - return fmt.Errorf("unexpected value for field Include: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.TopicTopic != nil { - raw := in.TopicTopic - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.TopicTopic = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.TopicTopic = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field TopicTopic: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field TopicTopic: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.ParamsParam != nil { - raw := in.ParamsParam - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.ParamsParam = &[]string{plainV} - } else if sliceOk { - - out.ParamsParam = &sliceV - } else { - return fmt.Errorf("unexpected value for field ParamsParam: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.ObjClass != nil { - raw := in.ObjClass - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.ObjClass = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.ObjClass = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field ObjClass: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field ObjClass: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.AttrName != nil { - raw := in.AttrName - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.AttrName = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.AttrName = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field AttrName: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field AttrName: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Config struct { - - /* - Maximum username length - - */ - Ipamaxusernamelength int `json:"ipamaxusernamelength,omitempty"` - - /* - Home directory base - Default location of home directories - */ - Ipahomesrootdir string `json:"ipahomesrootdir,omitempty"` - - /* - Default shell - Default shell for new users - */ - Ipadefaultloginshell string `json:"ipadefaultloginshell,omitempty"` - - /* - Default users group - Default group for new users - */ - Ipadefaultprimarygroup string `json:"ipadefaultprimarygroup,omitempty"` - - /* - Default e-mail domain - Default e-mail domain - */ - Ipadefaultemaildomain *string `json:"ipadefaultemaildomain,omitempty"` - - /* - Search time limit - Maximum amount of time (seconds) for a search (-1 or 0 is unlimited) - */ - Ipasearchtimelimit int `json:"ipasearchtimelimit,omitempty"` - - /* - Search size limit - Maximum number of records to search (-1 or 0 is unlimited) - */ - Ipasearchrecordslimit int `json:"ipasearchrecordslimit,omitempty"` - - /* - User search fields - A comma-separated list of fields to search in when searching for users - */ - Ipausersearchfields string `json:"ipausersearchfields,omitempty"` - - /* - Group search fields - A comma-separated list of fields to search in when searching for groups - */ - Ipagroupsearchfields string `json:"ipagroupsearchfields,omitempty"` - - /* - Enable migration mode - Enable migration mode - */ - Ipamigrationenabled *bool `json:"ipamigrationenabled,omitempty"` - - /* - Certificate Subject base - Base for certificate subjects (OU=Test,O=Example) - */ - Ipacertificatesubjectbase string `json:"ipacertificatesubjectbase,omitempty"` - - /* - Default group objectclasses - Default group objectclasses (comma-separated list) - */ - Ipagroupobjectclasses []string `json:"ipagroupobjectclasses,omitempty"` - - /* - Default user objectclasses - Default user objectclasses (comma-separated list) - */ - Ipauserobjectclasses []string `json:"ipauserobjectclasses,omitempty"` - - /* - Password Expiration Notification (days) - Number of days's notice of impending password expiration - */ - Ipapwdexpadvnotify int `json:"ipapwdexpadvnotify,omitempty"` - - /* - Password plugin features - Extra hashes to generate in password plug-in - */ - Ipaconfigstring *[]string `json:"ipaconfigstring,omitempty"` - - /* - SELinux user map order - Order in increasing priority of SELinux users, delimited by $ - */ - Ipaselinuxusermaporder string `json:"ipaselinuxusermaporder,omitempty"` - - /* - Default SELinux user - Default SELinux user when no match is found in SELinux map rule - */ - Ipaselinuxusermapdefault *string `json:"ipaselinuxusermapdefault,omitempty"` - - /* - Default PAC types - Default types of PAC supported for services - */ - Ipakrbauthzdata *[]string `json:"ipakrbauthzdata,omitempty"` - - /* - Default user authentication types - Default types of supported user authentication - */ - Ipauserauthtype *[]string `json:"ipauserauthtype,omitempty"` - - /* - IPA masters - List of all IPA masters - */ - IpaMasterServer *[]string `json:"ipa_master_server,omitempty"` - - /* - IPA CA servers - IPA servers configured as certificate authority - */ - CaServerServer *[]string `json:"ca_server_server,omitempty"` - - /* - IPA NTP servers - IPA servers with enabled NTP - */ - NtpServerServer *[]string `json:"ntp_server_server,omitempty"` - - /* - IPA CA renewal master - Renewal master for IPA certificate authority - */ - CaRenewalMasterServer *string `json:"ca_renewal_master_server,omitempty"` -} - -func (t *Config) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Config[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Config%v", string(b)) -} - -type jsonConfig struct { - Ipamaxusernamelength interface{} `json:"ipamaxusernamelength"` - - Ipahomesrootdir interface{} `json:"ipahomesrootdir"` - - Ipadefaultloginshell interface{} `json:"ipadefaultloginshell"` - - Ipadefaultprimarygroup interface{} `json:"ipadefaultprimarygroup"` - - Ipadefaultemaildomain interface{} `json:"ipadefaultemaildomain"` - - Ipasearchtimelimit interface{} `json:"ipasearchtimelimit"` - - Ipasearchrecordslimit interface{} `json:"ipasearchrecordslimit"` - - Ipausersearchfields interface{} `json:"ipausersearchfields"` - - Ipagroupsearchfields interface{} `json:"ipagroupsearchfields"` - - Ipamigrationenabled interface{} `json:"ipamigrationenabled"` - - Ipacertificatesubjectbase interface{} `json:"ipacertificatesubjectbase"` - - Ipagroupobjectclasses interface{} `json:"ipagroupobjectclasses"` - - Ipauserobjectclasses interface{} `json:"ipauserobjectclasses"` - - Ipapwdexpadvnotify interface{} `json:"ipapwdexpadvnotify"` - - Ipaconfigstring interface{} `json:"ipaconfigstring"` - - Ipaselinuxusermaporder interface{} `json:"ipaselinuxusermaporder"` - - Ipaselinuxusermapdefault interface{} `json:"ipaselinuxusermapdefault"` - - Ipakrbauthzdata interface{} `json:"ipakrbauthzdata"` - - Ipauserauthtype interface{} `json:"ipauserauthtype"` - - IpaMasterServer interface{} `json:"ipa_master_server"` - - CaServerServer interface{} `json:"ca_server_server"` - - NtpServerServer interface{} `json:"ntp_server_server"` - - CaRenewalMasterServer interface{} `json:"ca_renewal_master_server"` -} - -func (out *Config) UnmarshalJSON(data []byte) error { - var in jsonConfig - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Ipamaxusernamelength - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Ipamaxusernamelength: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Ipamaxusernamelength = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipamaxusernamelength: %v; expected exactly one element", raw) - } - out.Ipamaxusernamelength = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipamaxusernamelength: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Ipahomesrootdir - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipahomesrootdir = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipahomesrootdir: %v; expected exactly one element", raw) - } - out.Ipahomesrootdir = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipahomesrootdir: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Ipadefaultloginshell - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipadefaultloginshell = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipadefaultloginshell: %v; expected exactly one element", raw) - } - out.Ipadefaultloginshell = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipadefaultloginshell: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Ipadefaultprimarygroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipadefaultprimarygroup = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipadefaultprimarygroup: %v; expected exactly one element", raw) - } - out.Ipadefaultprimarygroup = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipadefaultprimarygroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipadefaultemaildomain != nil { - raw := in.Ipadefaultemaildomain - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipadefaultemaildomain = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipadefaultemaildomain = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipadefaultemaildomain: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipadefaultemaildomain: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Ipasearchtimelimit - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Ipasearchtimelimit: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Ipasearchtimelimit = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipasearchtimelimit: %v; expected exactly one element", raw) - } - out.Ipasearchtimelimit = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipasearchtimelimit: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Ipasearchrecordslimit - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Ipasearchrecordslimit: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Ipasearchrecordslimit = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipasearchrecordslimit: %v; expected exactly one element", raw) - } - out.Ipasearchrecordslimit = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipasearchrecordslimit: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Ipausersearchfields - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipausersearchfields = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipausersearchfields: %v; expected exactly one element", raw) - } - out.Ipausersearchfields = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipausersearchfields: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Ipagroupsearchfields - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipagroupsearchfields = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipagroupsearchfields: %v; expected exactly one element", raw) - } - out.Ipagroupsearchfields = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipagroupsearchfields: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipamigrationenabled != nil { - raw := in.Ipamigrationenabled - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipamigrationenabled = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipamigrationenabled = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipamigrationenabled: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipamigrationenabled: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Ipacertificatesubjectbase - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipacertificatesubjectbase = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipacertificatesubjectbase: %v; expected exactly one element", raw) - } - out.Ipacertificatesubjectbase = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipacertificatesubjectbase: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Ipagroupobjectclasses - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipagroupobjectclasses = []string{plainV} - } else if sliceOk { - - if len(sliceV) < 1 { - return fmt.Errorf("unexpected value for field Ipagroupobjectclasses: %v; expected at least one element", raw) - } - - out.Ipagroupobjectclasses = sliceV - } else { - return fmt.Errorf("unexpected value for field Ipagroupobjectclasses: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Ipauserobjectclasses - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipauserobjectclasses = []string{plainV} - } else if sliceOk { - - if len(sliceV) < 1 { - return fmt.Errorf("unexpected value for field Ipauserobjectclasses: %v; expected at least one element", raw) - } - - out.Ipauserobjectclasses = sliceV - } else { - return fmt.Errorf("unexpected value for field Ipauserobjectclasses: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Ipapwdexpadvnotify - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Ipapwdexpadvnotify: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Ipapwdexpadvnotify = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipapwdexpadvnotify: %v; expected exactly one element", raw) - } - out.Ipapwdexpadvnotify = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipapwdexpadvnotify: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipaconfigstring != nil { - raw := in.Ipaconfigstring - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipaconfigstring = &[]string{plainV} - } else if sliceOk { - - out.Ipaconfigstring = &sliceV - } else { - return fmt.Errorf("unexpected value for field Ipaconfigstring: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Ipaselinuxusermaporder - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipaselinuxusermaporder = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipaselinuxusermaporder: %v; expected exactly one element", raw) - } - out.Ipaselinuxusermaporder = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipaselinuxusermaporder: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipaselinuxusermapdefault != nil { - raw := in.Ipaselinuxusermapdefault - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipaselinuxusermapdefault = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipaselinuxusermapdefault = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipaselinuxusermapdefault: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipaselinuxusermapdefault: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipakrbauthzdata != nil { - raw := in.Ipakrbauthzdata - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipakrbauthzdata = &[]string{plainV} - } else if sliceOk { - - out.Ipakrbauthzdata = &sliceV - } else { - return fmt.Errorf("unexpected value for field Ipakrbauthzdata: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipauserauthtype != nil { - raw := in.Ipauserauthtype - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipauserauthtype = &[]string{plainV} - } else if sliceOk { - - out.Ipauserauthtype = &sliceV - } else { - return fmt.Errorf("unexpected value for field Ipauserauthtype: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.IpaMasterServer != nil { - raw := in.IpaMasterServer - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.IpaMasterServer = &[]string{plainV} - } else if sliceOk { - - out.IpaMasterServer = &sliceV - } else { - return fmt.Errorf("unexpected value for field IpaMasterServer: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.CaServerServer != nil { - raw := in.CaServerServer - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.CaServerServer = &[]string{plainV} - } else if sliceOk { - - out.CaServerServer = &sliceV - } else { - return fmt.Errorf("unexpected value for field CaServerServer: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.NtpServerServer != nil { - raw := in.NtpServerServer - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.NtpServerServer = &[]string{plainV} - } else if sliceOk { - - out.NtpServerServer = &sliceV - } else { - return fmt.Errorf("unexpected value for field NtpServerServer: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.CaRenewalMasterServer != nil { - raw := in.CaRenewalMasterServer - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.CaRenewalMasterServer = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.CaRenewalMasterServer = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field CaRenewalMasterServer: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field CaRenewalMasterServer: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Cosentry struct { - - /* - - - */ - Cn string `json:"cn,omitempty"` - - /* - - - */ - Krbpwdpolicyreference string `json:"krbpwdpolicyreference,omitempty"` - - /* - - - */ - Cospriority int `json:"cospriority,omitempty"` -} - -func (t *Cosentry) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Cosentry[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Cosentry%v", string(b)) -} - -type jsonCosentry struct { - Cn interface{} `json:"cn"` - - Krbpwdpolicyreference interface{} `json:"krbpwdpolicyreference"` - - Cospriority interface{} `json:"cospriority"` -} - -func (out *Cosentry) UnmarshalJSON(data []byte) error { - var in jsonCosentry - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Cn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) - } - out.Cn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Krbpwdpolicyreference - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Krbpwdpolicyreference = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Krbpwdpolicyreference: %v; expected exactly one element", raw) - } - out.Krbpwdpolicyreference = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Krbpwdpolicyreference: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Cospriority - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Cospriority: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Cospriority = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Cospriority: %v; expected exactly one element", raw) - } - out.Cospriority = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Cospriority: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Delegation struct { - - /* - Delegation name - Delegation name - */ - Aciname string `json:"aciname,omitempty"` - - /* - Permissions - Permissions to grant (read, write). Default is write. - */ - Permissions *[]string `json:"permissions,omitempty"` - - /* - Attributes - Attributes to which the delegation applies - */ - Attrs []string `json:"attrs,omitempty"` - - /* - Member user group - User group to apply delegation to - */ - Memberof string `json:"memberof,omitempty"` - - /* - User group - User group ACI grants access to - */ - Group string `json:"group,omitempty"` - - /* - ACI - - */ - Aci string `json:"aci,omitempty"` -} - -func (t *Delegation) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Delegation[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Delegation%v", string(b)) -} - -type jsonDelegation struct { - Aciname interface{} `json:"aciname"` - - Permissions interface{} `json:"permissions"` - - Attrs interface{} `json:"attrs"` - - Memberof interface{} `json:"memberof"` - - Group interface{} `json:"group"` - - Aci interface{} `json:"aci"` -} - -func (out *Delegation) UnmarshalJSON(data []byte) error { - var in jsonDelegation - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Aciname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Aciname = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Aciname: %v; expected exactly one element", raw) - } - out.Aciname = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Aciname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Permissions != nil { - raw := in.Permissions - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Permissions = &[]string{plainV} - } else if sliceOk { - - out.Permissions = &sliceV - } else { - return fmt.Errorf("unexpected value for field Permissions: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Attrs - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Attrs = []string{plainV} - } else if sliceOk { - - if len(sliceV) < 1 { - return fmt.Errorf("unexpected value for field Attrs: %v; expected at least one element", raw) - } - - out.Attrs = sliceV - } else { - return fmt.Errorf("unexpected value for field Attrs: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Memberof - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Memberof = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Memberof: %v; expected exactly one element", raw) - } - out.Memberof = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Memberof: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Group - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Group = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Group: %v; expected exactly one element", raw) - } - out.Group = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Group: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Aci - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Aci = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Aci: %v; expected exactly one element", raw) - } - out.Aci = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Aci: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type DNSSystemRecords struct { - - /* - IPA DNS records - - */ - IpaRecords *[]string `json:"ipa_records,omitempty"` - - /* - IPA location records - - */ - LocationRecords *[]string `json:"location_records,omitempty"` -} - -func (t *DNSSystemRecords) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("DNSSystemRecords[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("DNSSystemRecords%v", string(b)) -} - -type jsonDNSSystemRecords struct { - IpaRecords interface{} `json:"ipa_records"` - - LocationRecords interface{} `json:"location_records"` -} - -func (out *DNSSystemRecords) UnmarshalJSON(data []byte) error { - var in jsonDNSSystemRecords - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if in.IpaRecords != nil { - raw := in.IpaRecords - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.IpaRecords = &[]string{plainV} - } else if sliceOk { - - out.IpaRecords = &sliceV - } else { - return fmt.Errorf("unexpected value for field IpaRecords: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.LocationRecords != nil { - raw := in.LocationRecords - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.LocationRecords = &[]string{plainV} - } else if sliceOk { - - out.LocationRecords = &sliceV - } else { - return fmt.Errorf("unexpected value for field LocationRecords: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Dnsa6record struct { - - /* - Record data - - */ - Data string `json:"data,omitempty"` -} - -func (t *Dnsa6record) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Dnsa6record[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Dnsa6record%v", string(b)) -} - -type jsonDnsa6record struct { - Data interface{} `json:"data"` -} - -func (out *Dnsa6record) UnmarshalJSON(data []byte) error { - var in jsonDnsa6record - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Data - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Data = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Data: %v; expected exactly one element", raw) - } - out.Data = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Data: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Dnsaaaarecord struct { - - /* - IP Address - - */ - IPAddress string `json:"ip_address,omitempty"` - - /* - Create reverse - Create reverse record for this IP Address - */ - CreateReverse *bool `json:"create_reverse,omitempty"` -} - -func (t *Dnsaaaarecord) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Dnsaaaarecord[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Dnsaaaarecord%v", string(b)) -} - -type jsonDnsaaaarecord struct { - IPAddress interface{} `json:"ip_address"` - - CreateReverse interface{} `json:"create_reverse"` -} - -func (out *Dnsaaaarecord) UnmarshalJSON(data []byte) error { - var in jsonDnsaaaarecord - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.IPAddress - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.IPAddress = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field IPAddress: %v; expected exactly one element", raw) - } - out.IPAddress = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field IPAddress: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.CreateReverse != nil { - raw := in.CreateReverse - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.CreateReverse = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.CreateReverse = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field CreateReverse: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field CreateReverse: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Dnsafsdbrecord struct { - - /* - Subtype - - */ - Subtype *int `json:"subtype,omitempty"` - - /* - Hostname - - */ - Hostname string `json:"hostname,omitempty"` -} - -func (t *Dnsafsdbrecord) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Dnsafsdbrecord[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Dnsafsdbrecord%v", string(b)) -} - -type jsonDnsafsdbrecord struct { - Subtype interface{} `json:"subtype"` - - Hostname interface{} `json:"hostname"` -} - -func (out *Dnsafsdbrecord) UnmarshalJSON(data []byte) error { - var in jsonDnsafsdbrecord - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if in.Subtype != nil { - raw := in.Subtype - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Subtype: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Subtype = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Subtype = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Subtype: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Subtype: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Hostname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Hostname = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Hostname: %v; expected exactly one element", raw) - } - out.Hostname = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Hostname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Dnsaplrecord struct { -} - -func (t *Dnsaplrecord) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Dnsaplrecord[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Dnsaplrecord%v", string(b)) -} - -type jsonDnsaplrecord struct { -} - -func (out *Dnsaplrecord) UnmarshalJSON(data []byte) error { - var in jsonDnsaplrecord - if e := json.Unmarshal(data, &in); e != nil { - return e - } - return nil -} - -type Dnsarecord struct { - - /* - IP Address - - */ - IPAddress string `json:"ip_address,omitempty"` - - /* - Create reverse - Create reverse record for this IP Address - */ - CreateReverse *bool `json:"create_reverse,omitempty"` -} - -func (t *Dnsarecord) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Dnsarecord[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Dnsarecord%v", string(b)) -} - -type jsonDnsarecord struct { - IPAddress interface{} `json:"ip_address"` - - CreateReverse interface{} `json:"create_reverse"` -} - -func (out *Dnsarecord) UnmarshalJSON(data []byte) error { - var in jsonDnsarecord - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.IPAddress - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.IPAddress = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field IPAddress: %v; expected exactly one element", raw) - } - out.IPAddress = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field IPAddress: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.CreateReverse != nil { - raw := in.CreateReverse - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.CreateReverse = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.CreateReverse = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field CreateReverse: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field CreateReverse: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Dnscertrecord struct { - - /* - Certificate Type - - */ - Type int `json:"type,omitempty"` - - /* - Key Tag - - */ - KeyTag int `json:"key_tag,omitempty"` - - /* - Algorithm - - */ - Algorithm int `json:"algorithm,omitempty"` - - /* - Certificate/CRL - - */ - CertificateOrCrl string `json:"certificate_or_crl,omitempty"` -} - -func (t *Dnscertrecord) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Dnscertrecord[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Dnscertrecord%v", string(b)) -} - -type jsonDnscertrecord struct { - Type interface{} `json:"type"` - - KeyTag interface{} `json:"key_tag"` - - Algorithm interface{} `json:"algorithm"` - - CertificateOrCrl interface{} `json:"certificate_or_crl"` -} - -func (out *Dnscertrecord) UnmarshalJSON(data []byte) error { - var in jsonDnscertrecord - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Type - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Type: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Type = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Type: %v; expected exactly one element", raw) - } - out.Type = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Type: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.KeyTag - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field KeyTag: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.KeyTag = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field KeyTag: %v; expected exactly one element", raw) - } - out.KeyTag = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field KeyTag: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Algorithm - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Algorithm: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Algorithm = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Algorithm: %v; expected exactly one element", raw) - } - out.Algorithm = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Algorithm: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.CertificateOrCrl - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.CertificateOrCrl = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field CertificateOrCrl: %v; expected exactly one element", raw) - } - out.CertificateOrCrl = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field CertificateOrCrl: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Dnscnamerecord struct { - - /* - Hostname - A hostname which this alias hostname points to - */ - Hostname string `json:"hostname,omitempty"` -} - -func (t *Dnscnamerecord) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Dnscnamerecord[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Dnscnamerecord%v", string(b)) -} - -type jsonDnscnamerecord struct { - Hostname interface{} `json:"hostname"` -} - -func (out *Dnscnamerecord) UnmarshalJSON(data []byte) error { - var in jsonDnscnamerecord - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Hostname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Hostname = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Hostname: %v; expected exactly one element", raw) - } - out.Hostname = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Hostname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Dnsconfig struct { - - /* - Global forwarders - Global forwarders. A custom port can be specified for each forwarder using a standard format "IP_ADDRESS port PORT" - */ - Idnsforwarders *[]string `json:"idnsforwarders,omitempty"` - - /* - Forward policy - Global forwarding policy. Set to "none" to disable any configured global forwarders. - */ - Idnsforwardpolicy *string `json:"idnsforwardpolicy,omitempty"` - - /* - Allow PTR sync - Allow synchronization of forward (A, AAAA) and reverse (PTR) records - */ - Idnsallowsyncptr *bool `json:"idnsallowsyncptr,omitempty"` - - /* - Zone refresh interval - An interval between regular polls of the name server for new DNS zones - */ - Idnszonerefresh *int `json:"idnszonerefresh,omitempty"` - - /* - IPA DNS version - - */ - Ipadnsversion *int `json:"ipadnsversion,omitempty"` - - /* - IPA DNS servers - List of IPA masters configured as DNS servers - */ - DNSServerServer *[]string `json:"dns_server_server,omitempty"` - - /* - IPA DNSSec key master - IPA server configured as DNSSec key master - */ - DnssecKeyMasterServer *string `json:"dnssec_key_master_server,omitempty"` -} - -func (t *Dnsconfig) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Dnsconfig[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Dnsconfig%v", string(b)) -} - -type jsonDnsconfig struct { - Idnsforwarders interface{} `json:"idnsforwarders"` - - Idnsforwardpolicy interface{} `json:"idnsforwardpolicy"` - - Idnsallowsyncptr interface{} `json:"idnsallowsyncptr"` - - Idnszonerefresh interface{} `json:"idnszonerefresh"` - - Ipadnsversion interface{} `json:"ipadnsversion"` - - DNSServerServer interface{} `json:"dns_server_server"` - - DnssecKeyMasterServer interface{} `json:"dnssec_key_master_server"` -} - -func (out *Dnsconfig) UnmarshalJSON(data []byte) error { - var in jsonDnsconfig - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if in.Idnsforwarders != nil { - raw := in.Idnsforwarders - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Idnsforwarders = &[]string{plainV} - } else if sliceOk { - - out.Idnsforwarders = &sliceV - } else { - return fmt.Errorf("unexpected value for field Idnsforwarders: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Idnsforwardpolicy != nil { - raw := in.Idnsforwardpolicy - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Idnsforwardpolicy = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Idnsforwardpolicy = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Idnsforwardpolicy: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Idnsforwardpolicy: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Idnsallowsyncptr != nil { - raw := in.Idnsallowsyncptr - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Idnsallowsyncptr = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Idnsallowsyncptr = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Idnsallowsyncptr: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Idnsallowsyncptr: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Idnszonerefresh != nil { - raw := in.Idnszonerefresh - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Idnszonerefresh: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Idnszonerefresh = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Idnszonerefresh = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Idnszonerefresh: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Idnszonerefresh: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipadnsversion != nil { - raw := in.Ipadnsversion - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Ipadnsversion: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Ipadnsversion = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipadnsversion = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipadnsversion: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipadnsversion: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.DNSServerServer != nil { - raw := in.DNSServerServer - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.DNSServerServer = &[]string{plainV} - } else if sliceOk { - - out.DNSServerServer = &sliceV - } else { - return fmt.Errorf("unexpected value for field DNSServerServer: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.DnssecKeyMasterServer != nil { - raw := in.DnssecKeyMasterServer - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.DnssecKeyMasterServer = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.DnssecKeyMasterServer = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field DnssecKeyMasterServer: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field DnssecKeyMasterServer: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Dnsdhcidrecord struct { -} - -func (t *Dnsdhcidrecord) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Dnsdhcidrecord[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Dnsdhcidrecord%v", string(b)) -} - -type jsonDnsdhcidrecord struct { -} - -func (out *Dnsdhcidrecord) UnmarshalJSON(data []byte) error { - var in jsonDnsdhcidrecord - if e := json.Unmarshal(data, &in); e != nil { - return e - } - return nil -} - -type Dnsdlvrecord struct { - - /* - Key Tag - - */ - KeyTag int `json:"key_tag,omitempty"` - - /* - Algorithm - - */ - Algorithm int `json:"algorithm,omitempty"` - - /* - Digest Type - - */ - DigestType int `json:"digest_type,omitempty"` - - /* - Digest - - */ - Digest string `json:"digest,omitempty"` -} - -func (t *Dnsdlvrecord) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Dnsdlvrecord[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Dnsdlvrecord%v", string(b)) -} - -type jsonDnsdlvrecord struct { - KeyTag interface{} `json:"key_tag"` - - Algorithm interface{} `json:"algorithm"` - - DigestType interface{} `json:"digest_type"` - - Digest interface{} `json:"digest"` -} - -func (out *Dnsdlvrecord) UnmarshalJSON(data []byte) error { - var in jsonDnsdlvrecord - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.KeyTag - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field KeyTag: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.KeyTag = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field KeyTag: %v; expected exactly one element", raw) - } - out.KeyTag = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field KeyTag: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Algorithm - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Algorithm: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Algorithm = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Algorithm: %v; expected exactly one element", raw) - } - out.Algorithm = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Algorithm: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.DigestType - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field DigestType: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.DigestType = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field DigestType: %v; expected exactly one element", raw) - } - out.DigestType = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field DigestType: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Digest - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Digest = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Digest: %v; expected exactly one element", raw) - } - out.Digest = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Digest: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Dnsdnamerecord struct { - - /* - Target - - */ - Target string `json:"target,omitempty"` -} - -func (t *Dnsdnamerecord) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Dnsdnamerecord[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Dnsdnamerecord%v", string(b)) -} - -type jsonDnsdnamerecord struct { - Target interface{} `json:"target"` -} - -func (out *Dnsdnamerecord) UnmarshalJSON(data []byte) error { - var in jsonDnsdnamerecord - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Target - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Target = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Target: %v; expected exactly one element", raw) - } - out.Target = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Target: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Dnsdsrecord struct { - - /* - Key Tag - - */ - KeyTag int `json:"key_tag,omitempty"` - - /* - Algorithm - - */ - Algorithm int `json:"algorithm,omitempty"` - - /* - Digest Type - - */ - DigestType int `json:"digest_type,omitempty"` - - /* - Digest - - */ - Digest string `json:"digest,omitempty"` -} - -func (t *Dnsdsrecord) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Dnsdsrecord[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Dnsdsrecord%v", string(b)) -} - -type jsonDnsdsrecord struct { - KeyTag interface{} `json:"key_tag"` - - Algorithm interface{} `json:"algorithm"` - - DigestType interface{} `json:"digest_type"` - - Digest interface{} `json:"digest"` -} - -func (out *Dnsdsrecord) UnmarshalJSON(data []byte) error { - var in jsonDnsdsrecord - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.KeyTag - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field KeyTag: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.KeyTag = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field KeyTag: %v; expected exactly one element", raw) - } - out.KeyTag = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field KeyTag: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Algorithm - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Algorithm: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Algorithm = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Algorithm: %v; expected exactly one element", raw) - } - out.Algorithm = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Algorithm: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.DigestType - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field DigestType: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.DigestType = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field DigestType: %v; expected exactly one element", raw) - } - out.DigestType = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field DigestType: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Digest - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Digest = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Digest: %v; expected exactly one element", raw) - } - out.Digest = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Digest: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Dnsforwardzone struct { - - /* - Zone name - Zone name (FQDN) - */ - Idnsname string `json:"idnsname,omitempty"` - - /* - Reverse zone IP network - IP network to create reverse zone name from - */ - NameFromIP *string `json:"name_from_ip,omitempty"` - - /* - Active zone - Is zone active? - */ - Idnszoneactive *bool `json:"idnszoneactive,omitempty"` - - /* - Zone forwarders - Per-zone forwarders. A custom port can be specified for each forwarder using a standard format "IP_ADDRESS port PORT" - */ - Idnsforwarders *[]string `json:"idnsforwarders,omitempty"` - - /* - Forward policy - Per-zone conditional forwarding policy. Set to "none" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded. - */ - Idnsforwardpolicy *string `json:"idnsforwardpolicy,omitempty"` - - /* - Managedby permission - - */ - Managedby string `json:"managedby,omitempty"` -} - -func (t *Dnsforwardzone) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Dnsforwardzone[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Dnsforwardzone%v", string(b)) -} - -type jsonDnsforwardzone struct { - Idnsname interface{} `json:"idnsname"` - - NameFromIP interface{} `json:"name_from_ip"` - - Idnszoneactive interface{} `json:"idnszoneactive"` - - Idnsforwarders interface{} `json:"idnsforwarders"` - - Idnsforwardpolicy interface{} `json:"idnsforwardpolicy"` - - Managedby interface{} `json:"managedby"` -} - -func (out *Dnsforwardzone) UnmarshalJSON(data []byte) error { - var in jsonDnsforwardzone - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Idnsname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Idnsname = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Idnsname: %v; expected exactly one element", raw) - } - out.Idnsname = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Idnsname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.NameFromIP != nil { - raw := in.NameFromIP - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.NameFromIP = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.NameFromIP = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field NameFromIP: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field NameFromIP: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Idnszoneactive != nil { - raw := in.Idnszoneactive - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Idnszoneactive = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Idnszoneactive = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Idnszoneactive: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Idnszoneactive: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Idnsforwarders != nil { - raw := in.Idnsforwarders - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Idnsforwarders = &[]string{plainV} - } else if sliceOk { - - out.Idnsforwarders = &sliceV - } else { - return fmt.Errorf("unexpected value for field Idnsforwarders: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Idnsforwardpolicy != nil { - raw := in.Idnsforwardpolicy - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Idnsforwardpolicy = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Idnsforwardpolicy = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Idnsforwardpolicy: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Idnsforwardpolicy: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Managedby - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Managedby = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Managedby: %v; expected exactly one element", raw) - } - out.Managedby = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Managedby: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Dnshiprecord struct { -} - -func (t *Dnshiprecord) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Dnshiprecord[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Dnshiprecord%v", string(b)) -} - -type jsonDnshiprecord struct { -} - -func (out *Dnshiprecord) UnmarshalJSON(data []byte) error { - var in jsonDnshiprecord - if e := json.Unmarshal(data, &in); e != nil { - return e - } - return nil -} - -type Dnsipseckeyrecord struct { -} - -func (t *Dnsipseckeyrecord) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Dnsipseckeyrecord[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Dnsipseckeyrecord%v", string(b)) -} - -type jsonDnsipseckeyrecord struct { -} - -func (out *Dnsipseckeyrecord) UnmarshalJSON(data []byte) error { - var in jsonDnsipseckeyrecord - if e := json.Unmarshal(data, &in); e != nil { - return e - } - return nil -} - -type Dnskeyrecord struct { -} - -func (t *Dnskeyrecord) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Dnskeyrecord[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Dnskeyrecord%v", string(b)) -} - -type jsonDnskeyrecord struct { -} - -func (out *Dnskeyrecord) UnmarshalJSON(data []byte) error { - var in jsonDnskeyrecord - if e := json.Unmarshal(data, &in); e != nil { - return e - } - return nil -} - -type Dnskxrecord struct { - - /* - Preference - Preference given to this exchanger. Lower values are more preferred - */ - Preference int `json:"preference,omitempty"` - - /* - Exchanger - A host willing to act as a key exchanger - */ - Exchanger string `json:"exchanger,omitempty"` -} - -func (t *Dnskxrecord) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Dnskxrecord[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Dnskxrecord%v", string(b)) -} - -type jsonDnskxrecord struct { - Preference interface{} `json:"preference"` - - Exchanger interface{} `json:"exchanger"` -} - -func (out *Dnskxrecord) UnmarshalJSON(data []byte) error { - var in jsonDnskxrecord - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Preference - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Preference: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Preference = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Preference: %v; expected exactly one element", raw) - } - out.Preference = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Preference: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Exchanger - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Exchanger = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Exchanger: %v; expected exactly one element", raw) - } - out.Exchanger = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Exchanger: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Dnslocrecord struct { - - /* - Degrees Latitude - - */ - LatDeg int `json:"lat_deg,omitempty"` - - /* - Minutes Latitude - - */ - LatMin *int `json:"lat_min,omitempty"` - - /* - Seconds Latitude - - */ - LatSec *float64 `json:"lat_sec,omitempty"` - - /* - Direction Latitude - - */ - LatDir string `json:"lat_dir,omitempty"` - - /* - Degrees Longitude - - */ - LonDeg int `json:"lon_deg,omitempty"` - - /* - Minutes Longitude - - */ - LonMin *int `json:"lon_min,omitempty"` - - /* - Seconds Longitude - - */ - LonSec *float64 `json:"lon_sec,omitempty"` - - /* - Direction Longitude - - */ - LonDir string `json:"lon_dir,omitempty"` - - /* - Altitude - - */ - Altitude float64 `json:"altitude,omitempty"` - - /* - Size - - */ - Size *float64 `json:"size,omitempty"` - - /* - Horizontal Precision - - */ - HPrecision *float64 `json:"h_precision,omitempty"` - - /* - Vertical Precision - - */ - VPrecision *float64 `json:"v_precision,omitempty"` -} - -func (t *Dnslocrecord) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Dnslocrecord[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Dnslocrecord%v", string(b)) -} - -type jsonDnslocrecord struct { - LatDeg interface{} `json:"lat_deg"` - - LatMin interface{} `json:"lat_min"` - - LatSec interface{} `json:"lat_sec"` - - LatDir interface{} `json:"lat_dir"` - - LonDeg interface{} `json:"lon_deg"` - - LonMin interface{} `json:"lon_min"` - - LonSec interface{} `json:"lon_sec"` - - LonDir interface{} `json:"lon_dir"` - - Altitude interface{} `json:"altitude"` - - Size interface{} `json:"size"` - - HPrecision interface{} `json:"h_precision"` - - VPrecision interface{} `json:"v_precision"` -} - -func (out *Dnslocrecord) UnmarshalJSON(data []byte) error { - var in jsonDnslocrecord - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.LatDeg - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field LatDeg: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.LatDeg = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field LatDeg: %v; expected exactly one element", raw) - } - out.LatDeg = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field LatDeg: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.LatMin != nil { - raw := in.LatMin - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field LatMin: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.LatMin = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.LatMin = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field LatMin: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field LatMin: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.LatSec != nil { - raw := in.LatSec - plainV, plainOk := raw.(float64) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []float64 - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(float64) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.LatSec = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.LatSec = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field LatSec: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field LatSec: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.LatDir - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.LatDir = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field LatDir: %v; expected exactly one element", raw) - } - out.LatDir = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field LatDir: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.LonDeg - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field LonDeg: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.LonDeg = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field LonDeg: %v; expected exactly one element", raw) - } - out.LonDeg = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field LonDeg: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.LonMin != nil { - raw := in.LonMin - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field LonMin: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.LonMin = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.LonMin = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field LonMin: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field LonMin: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.LonSec != nil { - raw := in.LonSec - plainV, plainOk := raw.(float64) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []float64 - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(float64) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.LonSec = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.LonSec = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field LonSec: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field LonSec: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.LonDir - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.LonDir = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field LonDir: %v; expected exactly one element", raw) - } - out.LonDir = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field LonDir: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Altitude - plainV, plainOk := raw.(float64) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []float64 - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(float64) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Altitude = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Altitude: %v; expected exactly one element", raw) - } - out.Altitude = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Altitude: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Size != nil { - raw := in.Size - plainV, plainOk := raw.(float64) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []float64 - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(float64) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Size = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Size = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Size: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Size: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.HPrecision != nil { - raw := in.HPrecision - plainV, plainOk := raw.(float64) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []float64 - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(float64) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.HPrecision = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.HPrecision = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field HPrecision: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field HPrecision: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.VPrecision != nil { - raw := in.VPrecision - plainV, plainOk := raw.(float64) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []float64 - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(float64) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.VPrecision = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.VPrecision = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field VPrecision: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field VPrecision: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Dnsmxrecord struct { - - /* - Preference - Preference given to this exchanger. Lower values are more preferred - */ - Preference int `json:"preference,omitempty"` - - /* - Exchanger - A host willing to act as a mail exchanger - */ - Exchanger string `json:"exchanger,omitempty"` -} - -func (t *Dnsmxrecord) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Dnsmxrecord[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Dnsmxrecord%v", string(b)) -} - -type jsonDnsmxrecord struct { - Preference interface{} `json:"preference"` - - Exchanger interface{} `json:"exchanger"` -} - -func (out *Dnsmxrecord) UnmarshalJSON(data []byte) error { - var in jsonDnsmxrecord - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Preference - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Preference: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Preference = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Preference: %v; expected exactly one element", raw) - } - out.Preference = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Preference: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Exchanger - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Exchanger = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Exchanger: %v; expected exactly one element", raw) - } - out.Exchanger = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Exchanger: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Dnsnaptrrecord struct { - - /* - Order - - */ - Order int `json:"order,omitempty"` - - /* - Preference - - */ - Preference int `json:"preference,omitempty"` - - /* - Flags - - */ - Flags string `json:"flags,omitempty"` - - /* - Service - - */ - Service string `json:"service,omitempty"` - - /* - Regular Expression - - */ - Regexp string `json:"regexp,omitempty"` - - /* - Replacement - - */ - Replacement string `json:"replacement,omitempty"` -} - -func (t *Dnsnaptrrecord) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Dnsnaptrrecord[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Dnsnaptrrecord%v", string(b)) -} - -type jsonDnsnaptrrecord struct { - Order interface{} `json:"order"` - - Preference interface{} `json:"preference"` - - Flags interface{} `json:"flags"` - - Service interface{} `json:"service"` - - Regexp interface{} `json:"regexp"` - - Replacement interface{} `json:"replacement"` -} - -func (out *Dnsnaptrrecord) UnmarshalJSON(data []byte) error { - var in jsonDnsnaptrrecord - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Order - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Order: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Order = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Order: %v; expected exactly one element", raw) - } - out.Order = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Order: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Preference - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Preference: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Preference = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Preference: %v; expected exactly one element", raw) - } - out.Preference = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Preference: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Flags - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Flags = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Flags: %v; expected exactly one element", raw) - } - out.Flags = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Flags: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Service - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Service = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Service: %v; expected exactly one element", raw) - } - out.Service = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Service: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Regexp - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Regexp = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Regexp: %v; expected exactly one element", raw) - } - out.Regexp = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Regexp: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Replacement - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Replacement = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Replacement: %v; expected exactly one element", raw) - } - out.Replacement = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Replacement: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Dnsnsecrecord struct { -} - -func (t *Dnsnsecrecord) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Dnsnsecrecord[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Dnsnsecrecord%v", string(b)) -} - -type jsonDnsnsecrecord struct { -} - -func (out *Dnsnsecrecord) UnmarshalJSON(data []byte) error { - var in jsonDnsnsecrecord - if e := json.Unmarshal(data, &in); e != nil { - return e - } - return nil -} - -type Dnsnsrecord struct { - - /* - Hostname - - */ - Hostname string `json:"hostname,omitempty"` -} - -func (t *Dnsnsrecord) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Dnsnsrecord[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Dnsnsrecord%v", string(b)) -} - -type jsonDnsnsrecord struct { - Hostname interface{} `json:"hostname"` -} - -func (out *Dnsnsrecord) UnmarshalJSON(data []byte) error { - var in jsonDnsnsrecord - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Hostname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Hostname = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Hostname: %v; expected exactly one element", raw) - } - out.Hostname = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Hostname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Dnsptrrecord struct { - - /* - Hostname - The hostname this reverse record points to - */ - Hostname string `json:"hostname,omitempty"` -} - -func (t *Dnsptrrecord) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Dnsptrrecord[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Dnsptrrecord%v", string(b)) -} - -type jsonDnsptrrecord struct { - Hostname interface{} `json:"hostname"` -} - -func (out *Dnsptrrecord) UnmarshalJSON(data []byte) error { - var in jsonDnsptrrecord - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Hostname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Hostname = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Hostname: %v; expected exactly one element", raw) - } - out.Hostname = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Hostname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Dnsrecord struct { - - /* - Record name - Record name - */ - Idnsname string `json:"idnsname,omitempty"` - - /* - Time to live - Time to live - */ - Dnsttl *int `json:"dnsttl,omitempty"` - - /* - - - */ - Dnsclass *string `json:"dnsclass,omitempty"` - - /* - Records - - */ - Dnsrecords *interface{} `json:"dnsrecords,omitempty"` - - /* - Record type - - */ - Dnstype *string `json:"dnstype,omitempty"` - - /* - Record data - - */ - Dnsdata *string `json:"dnsdata,omitempty"` - - /* - A record - Raw A records - */ - Arecord *[]string `json:"arecord,omitempty"` - - /* - A IP Address - - */ - APartIPAddress *string `json:"a_part_ip_address,omitempty"` - - /* - A Create reverse - Create reverse record for this IP Address - */ - AExtraCreateReverse *bool `json:"a_extra_create_reverse,omitempty"` - - /* - AAAA record - Raw AAAA records - */ - Aaaarecord *[]string `json:"aaaarecord,omitempty"` - - /* - AAAA IP Address - - */ - AaaaPartIPAddress *string `json:"aaaa_part_ip_address,omitempty"` - - /* - AAAA Create reverse - Create reverse record for this IP Address - */ - AaaaExtraCreateReverse *bool `json:"aaaa_extra_create_reverse,omitempty"` - - /* - A6 record - Raw A6 records - */ - A6record *[]string `json:"a6record,omitempty"` - - /* - A6 Record data - - */ - A6PartData *string `json:"a6_part_data,omitempty"` - - /* - AFSDB record - Raw AFSDB records - */ - Afsdbrecord *[]string `json:"afsdbrecord,omitempty"` - - /* - AFSDB Subtype - - */ - AfsdbPartSubtype *int `json:"afsdb_part_subtype,omitempty"` - - /* - AFSDB Hostname - - */ - AfsdbPartHostname *string `json:"afsdb_part_hostname,omitempty"` - - /* - APL record - Raw APL records - */ - Aplrecord *[]string `json:"aplrecord,omitempty"` - - /* - CERT record - Raw CERT records - */ - Certrecord *[]string `json:"certrecord,omitempty"` - - /* - CERT Certificate Type - - */ - CertPartType *int `json:"cert_part_type,omitempty"` - - /* - CERT Key Tag - - */ - CertPartKeyTag *int `json:"cert_part_key_tag,omitempty"` - - /* - CERT Algorithm - - */ - CertPartAlgorithm *int `json:"cert_part_algorithm,omitempty"` - - /* - CERT Certificate/CRL - - */ - CertPartCertificateOrCrl *string `json:"cert_part_certificate_or_crl,omitempty"` - - /* - CNAME record - Raw CNAME records - */ - Cnamerecord *[]string `json:"cnamerecord,omitempty"` - - /* - CNAME Hostname - A hostname which this alias hostname points to - */ - CnamePartHostname *string `json:"cname_part_hostname,omitempty"` - - /* - DHCID record - Raw DHCID records - */ - Dhcidrecord *[]string `json:"dhcidrecord,omitempty"` - - /* - DLV record - Raw DLV records - */ - Dlvrecord *[]string `json:"dlvrecord,omitempty"` - - /* - DLV Key Tag - - */ - DlvPartKeyTag *int `json:"dlv_part_key_tag,omitempty"` - - /* - DLV Algorithm - - */ - DlvPartAlgorithm *int `json:"dlv_part_algorithm,omitempty"` - - /* - DLV Digest Type - - */ - DlvPartDigestType *int `json:"dlv_part_digest_type,omitempty"` - - /* - DLV Digest - - */ - DlvPartDigest *string `json:"dlv_part_digest,omitempty"` - - /* - DNAME record - Raw DNAME records - */ - Dnamerecord *[]string `json:"dnamerecord,omitempty"` - - /* - DNAME Target - - */ - DnamePartTarget *string `json:"dname_part_target,omitempty"` - - /* - DS record - Raw DS records - */ - Dsrecord *[]string `json:"dsrecord,omitempty"` - - /* - DS Key Tag - - */ - DsPartKeyTag *int `json:"ds_part_key_tag,omitempty"` - - /* - DS Algorithm - - */ - DsPartAlgorithm *int `json:"ds_part_algorithm,omitempty"` - - /* - DS Digest Type - - */ - DsPartDigestType *int `json:"ds_part_digest_type,omitempty"` - - /* - DS Digest - - */ - DsPartDigest *string `json:"ds_part_digest,omitempty"` - - /* - HIP record - Raw HIP records - */ - Hiprecord *[]string `json:"hiprecord,omitempty"` - - /* - IPSECKEY record - Raw IPSECKEY records - */ - Ipseckeyrecord *[]string `json:"ipseckeyrecord,omitempty"` - - /* - KEY record - Raw KEY records - */ - Keyrecord *[]string `json:"keyrecord,omitempty"` - - /* - KX record - Raw KX records - */ - Kxrecord *[]string `json:"kxrecord,omitempty"` - - /* - KX Preference - Preference given to this exchanger. Lower values are more preferred - */ - KxPartPreference *int `json:"kx_part_preference,omitempty"` - - /* - KX Exchanger - A host willing to act as a key exchanger - */ - KxPartExchanger *string `json:"kx_part_exchanger,omitempty"` - - /* - LOC record - Raw LOC records - */ - Locrecord *[]string `json:"locrecord,omitempty"` - - /* - LOC Degrees Latitude - - */ - LocPartLatDeg *int `json:"loc_part_lat_deg,omitempty"` - - /* - LOC Minutes Latitude - - */ - LocPartLatMin *int `json:"loc_part_lat_min,omitempty"` - - /* - LOC Seconds Latitude - - */ - LocPartLatSec *float64 `json:"loc_part_lat_sec,omitempty"` - - /* - LOC Direction Latitude - - */ - LocPartLatDir *string `json:"loc_part_lat_dir,omitempty"` - - /* - LOC Degrees Longitude - - */ - LocPartLonDeg *int `json:"loc_part_lon_deg,omitempty"` - - /* - LOC Minutes Longitude - - */ - LocPartLonMin *int `json:"loc_part_lon_min,omitempty"` - - /* - LOC Seconds Longitude - - */ - LocPartLonSec *float64 `json:"loc_part_lon_sec,omitempty"` - - /* - LOC Direction Longitude - - */ - LocPartLonDir *string `json:"loc_part_lon_dir,omitempty"` - - /* - LOC Altitude - - */ - LocPartAltitude *float64 `json:"loc_part_altitude,omitempty"` - - /* - LOC Size - - */ - LocPartSize *float64 `json:"loc_part_size,omitempty"` - - /* - LOC Horizontal Precision - - */ - LocPartHPrecision *float64 `json:"loc_part_h_precision,omitempty"` - - /* - LOC Vertical Precision - - */ - LocPartVPrecision *float64 `json:"loc_part_v_precision,omitempty"` - - /* - MX record - Raw MX records - */ - Mxrecord *[]string `json:"mxrecord,omitempty"` - - /* - MX Preference - Preference given to this exchanger. Lower values are more preferred - */ - MxPartPreference *int `json:"mx_part_preference,omitempty"` - - /* - MX Exchanger - A host willing to act as a mail exchanger - */ - MxPartExchanger *string `json:"mx_part_exchanger,omitempty"` - - /* - NAPTR record - Raw NAPTR records - */ - Naptrrecord *[]string `json:"naptrrecord,omitempty"` - - /* - NAPTR Order - - */ - NaptrPartOrder *int `json:"naptr_part_order,omitempty"` - - /* - NAPTR Preference - - */ - NaptrPartPreference *int `json:"naptr_part_preference,omitempty"` - - /* - NAPTR Flags - - */ - NaptrPartFlags *string `json:"naptr_part_flags,omitempty"` - - /* - NAPTR Service - - */ - NaptrPartService *string `json:"naptr_part_service,omitempty"` - - /* - NAPTR Regular Expression - - */ - NaptrPartRegexp *string `json:"naptr_part_regexp,omitempty"` - - /* - NAPTR Replacement - - */ - NaptrPartReplacement *string `json:"naptr_part_replacement,omitempty"` - - /* - NS record - Raw NS records - */ - Nsrecord *[]string `json:"nsrecord,omitempty"` - - /* - NS Hostname - - */ - NsPartHostname *string `json:"ns_part_hostname,omitempty"` - - /* - NSEC record - Raw NSEC records - */ - Nsecrecord *[]string `json:"nsecrecord,omitempty"` - - /* - PTR record - Raw PTR records - */ - Ptrrecord *[]string `json:"ptrrecord,omitempty"` - - /* - PTR Hostname - The hostname this reverse record points to - */ - PtrPartHostname *string `json:"ptr_part_hostname,omitempty"` - - /* - RRSIG record - Raw RRSIG records - */ - Rrsigrecord *[]string `json:"rrsigrecord,omitempty"` - - /* - RP record - Raw RP records - */ - Rprecord *[]string `json:"rprecord,omitempty"` - - /* - SIG record - Raw SIG records - */ - Sigrecord *[]string `json:"sigrecord,omitempty"` - - /* - SPF record - Raw SPF records - */ - Spfrecord *[]string `json:"spfrecord,omitempty"` - - /* - SRV record - Raw SRV records - */ - Srvrecord *[]string `json:"srvrecord,omitempty"` - - /* - SRV Priority - - */ - SrvPartPriority *int `json:"srv_part_priority,omitempty"` - - /* - SRV Weight - - */ - SrvPartWeight *int `json:"srv_part_weight,omitempty"` - - /* - SRV Port - - */ - SrvPartPort *int `json:"srv_part_port,omitempty"` - - /* - SRV Target - The domain name of the target host or '.' if the service is decidedly not available at this domain - */ - SrvPartTarget *string `json:"srv_part_target,omitempty"` - - /* - SSHFP record - Raw SSHFP records - */ - Sshfprecord *[]string `json:"sshfprecord,omitempty"` - - /* - SSHFP Algorithm - - */ - SshfpPartAlgorithm *int `json:"sshfp_part_algorithm,omitempty"` - - /* - SSHFP Fingerprint Type - - */ - SshfpPartFpType *int `json:"sshfp_part_fp_type,omitempty"` - - /* - SSHFP Fingerprint - - */ - SshfpPartFingerprint *string `json:"sshfp_part_fingerprint,omitempty"` - - /* - TLSA record - Raw TLSA records - */ - Tlsarecord *[]string `json:"tlsarecord,omitempty"` - - /* - TLSA Certificate Usage - - */ - TlsaPartCertUsage *int `json:"tlsa_part_cert_usage,omitempty"` - - /* - TLSA Selector - - */ - TlsaPartSelector *int `json:"tlsa_part_selector,omitempty"` - - /* - TLSA Matching Type - - */ - TlsaPartMatchingType *int `json:"tlsa_part_matching_type,omitempty"` - - /* - TLSA Certificate Association Data - - */ - TlsaPartCertAssociationData *string `json:"tlsa_part_cert_association_data,omitempty"` - - /* - TXT record - Raw TXT records - */ - Txtrecord *[]string `json:"txtrecord,omitempty"` - - /* - TXT Text Data - - */ - TxtPartData *string `json:"txt_part_data,omitempty"` -} - -func (t *Dnsrecord) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Dnsrecord[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Dnsrecord%v", string(b)) -} - -type jsonDnsrecord struct { - Idnsname interface{} `json:"idnsname"` - - Dnsttl interface{} `json:"dnsttl"` - - Dnsclass interface{} `json:"dnsclass"` - - Dnsrecords interface{} `json:"dnsrecords"` - - Dnstype interface{} `json:"dnstype"` - - Dnsdata interface{} `json:"dnsdata"` - - Arecord interface{} `json:"arecord"` - - APartIPAddress interface{} `json:"a_part_ip_address"` - - AExtraCreateReverse interface{} `json:"a_extra_create_reverse"` - - Aaaarecord interface{} `json:"aaaarecord"` - - AaaaPartIPAddress interface{} `json:"aaaa_part_ip_address"` - - AaaaExtraCreateReverse interface{} `json:"aaaa_extra_create_reverse"` - - A6record interface{} `json:"a6record"` - - A6PartData interface{} `json:"a6_part_data"` - - Afsdbrecord interface{} `json:"afsdbrecord"` - - AfsdbPartSubtype interface{} `json:"afsdb_part_subtype"` - - AfsdbPartHostname interface{} `json:"afsdb_part_hostname"` - - Aplrecord interface{} `json:"aplrecord"` - - Certrecord interface{} `json:"certrecord"` - - CertPartType interface{} `json:"cert_part_type"` - - CertPartKeyTag interface{} `json:"cert_part_key_tag"` - - CertPartAlgorithm interface{} `json:"cert_part_algorithm"` - - CertPartCertificateOrCrl interface{} `json:"cert_part_certificate_or_crl"` - - Cnamerecord interface{} `json:"cnamerecord"` - - CnamePartHostname interface{} `json:"cname_part_hostname"` - - Dhcidrecord interface{} `json:"dhcidrecord"` - - Dlvrecord interface{} `json:"dlvrecord"` - - DlvPartKeyTag interface{} `json:"dlv_part_key_tag"` - - DlvPartAlgorithm interface{} `json:"dlv_part_algorithm"` - - DlvPartDigestType interface{} `json:"dlv_part_digest_type"` - - DlvPartDigest interface{} `json:"dlv_part_digest"` - - Dnamerecord interface{} `json:"dnamerecord"` - - DnamePartTarget interface{} `json:"dname_part_target"` - - Dsrecord interface{} `json:"dsrecord"` - - DsPartKeyTag interface{} `json:"ds_part_key_tag"` - - DsPartAlgorithm interface{} `json:"ds_part_algorithm"` - - DsPartDigestType interface{} `json:"ds_part_digest_type"` - - DsPartDigest interface{} `json:"ds_part_digest"` - - Hiprecord interface{} `json:"hiprecord"` - - Ipseckeyrecord interface{} `json:"ipseckeyrecord"` - - Keyrecord interface{} `json:"keyrecord"` - - Kxrecord interface{} `json:"kxrecord"` - - KxPartPreference interface{} `json:"kx_part_preference"` - - KxPartExchanger interface{} `json:"kx_part_exchanger"` - - Locrecord interface{} `json:"locrecord"` - - LocPartLatDeg interface{} `json:"loc_part_lat_deg"` - - LocPartLatMin interface{} `json:"loc_part_lat_min"` - - LocPartLatSec interface{} `json:"loc_part_lat_sec"` - - LocPartLatDir interface{} `json:"loc_part_lat_dir"` - - LocPartLonDeg interface{} `json:"loc_part_lon_deg"` - - LocPartLonMin interface{} `json:"loc_part_lon_min"` - - LocPartLonSec interface{} `json:"loc_part_lon_sec"` - - LocPartLonDir interface{} `json:"loc_part_lon_dir"` - - LocPartAltitude interface{} `json:"loc_part_altitude"` - - LocPartSize interface{} `json:"loc_part_size"` - - LocPartHPrecision interface{} `json:"loc_part_h_precision"` - - LocPartVPrecision interface{} `json:"loc_part_v_precision"` - - Mxrecord interface{} `json:"mxrecord"` - - MxPartPreference interface{} `json:"mx_part_preference"` - - MxPartExchanger interface{} `json:"mx_part_exchanger"` - - Naptrrecord interface{} `json:"naptrrecord"` - - NaptrPartOrder interface{} `json:"naptr_part_order"` - - NaptrPartPreference interface{} `json:"naptr_part_preference"` - - NaptrPartFlags interface{} `json:"naptr_part_flags"` - - NaptrPartService interface{} `json:"naptr_part_service"` - - NaptrPartRegexp interface{} `json:"naptr_part_regexp"` - - NaptrPartReplacement interface{} `json:"naptr_part_replacement"` - - Nsrecord interface{} `json:"nsrecord"` - - NsPartHostname interface{} `json:"ns_part_hostname"` - - Nsecrecord interface{} `json:"nsecrecord"` - - Ptrrecord interface{} `json:"ptrrecord"` - - PtrPartHostname interface{} `json:"ptr_part_hostname"` - - Rrsigrecord interface{} `json:"rrsigrecord"` - - Rprecord interface{} `json:"rprecord"` - - Sigrecord interface{} `json:"sigrecord"` - - Spfrecord interface{} `json:"spfrecord"` - - Srvrecord interface{} `json:"srvrecord"` - - SrvPartPriority interface{} `json:"srv_part_priority"` - - SrvPartWeight interface{} `json:"srv_part_weight"` - - SrvPartPort interface{} `json:"srv_part_port"` - - SrvPartTarget interface{} `json:"srv_part_target"` - - Sshfprecord interface{} `json:"sshfprecord"` - - SshfpPartAlgorithm interface{} `json:"sshfp_part_algorithm"` - - SshfpPartFpType interface{} `json:"sshfp_part_fp_type"` - - SshfpPartFingerprint interface{} `json:"sshfp_part_fingerprint"` - - Tlsarecord interface{} `json:"tlsarecord"` - - TlsaPartCertUsage interface{} `json:"tlsa_part_cert_usage"` - - TlsaPartSelector interface{} `json:"tlsa_part_selector"` - - TlsaPartMatchingType interface{} `json:"tlsa_part_matching_type"` - - TlsaPartCertAssociationData interface{} `json:"tlsa_part_cert_association_data"` - - Txtrecord interface{} `json:"txtrecord"` - - TxtPartData interface{} `json:"txt_part_data"` -} - -func (out *Dnsrecord) UnmarshalJSON(data []byte) error { - var in jsonDnsrecord - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Idnsname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Idnsname = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Idnsname: %v; expected exactly one element", raw) - } - out.Idnsname = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Idnsname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Dnsttl != nil { - raw := in.Dnsttl - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Dnsttl: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Dnsttl = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Dnsttl = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Dnsttl: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Dnsttl: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Dnsclass != nil { - raw := in.Dnsclass - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Dnsclass = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Dnsclass = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Dnsclass: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Dnsclass: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Dnsrecords != nil { - raw := in.Dnsrecords - plainV, plainOk := raw.(interface{}) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []interface{} - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(interface{}) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Dnsrecords = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Dnsrecords = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Dnsrecords: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Dnsrecords: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Dnstype != nil { - raw := in.Dnstype - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Dnstype = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Dnstype = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Dnstype: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Dnstype: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Dnsdata != nil { - raw := in.Dnsdata - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Dnsdata = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Dnsdata = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Dnsdata: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Dnsdata: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Arecord != nil { - raw := in.Arecord - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Arecord = &[]string{plainV} - } else if sliceOk { - - out.Arecord = &sliceV - } else { - return fmt.Errorf("unexpected value for field Arecord: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.APartIPAddress != nil { - raw := in.APartIPAddress - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.APartIPAddress = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.APartIPAddress = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field APartIPAddress: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field APartIPAddress: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.AExtraCreateReverse != nil { - raw := in.AExtraCreateReverse - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.AExtraCreateReverse = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.AExtraCreateReverse = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field AExtraCreateReverse: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field AExtraCreateReverse: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Aaaarecord != nil { - raw := in.Aaaarecord - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Aaaarecord = &[]string{plainV} - } else if sliceOk { - - out.Aaaarecord = &sliceV - } else { - return fmt.Errorf("unexpected value for field Aaaarecord: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.AaaaPartIPAddress != nil { - raw := in.AaaaPartIPAddress - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.AaaaPartIPAddress = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.AaaaPartIPAddress = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field AaaaPartIPAddress: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field AaaaPartIPAddress: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.AaaaExtraCreateReverse != nil { - raw := in.AaaaExtraCreateReverse - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.AaaaExtraCreateReverse = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.AaaaExtraCreateReverse = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field AaaaExtraCreateReverse: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field AaaaExtraCreateReverse: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.A6record != nil { - raw := in.A6record - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.A6record = &[]string{plainV} - } else if sliceOk { - - out.A6record = &sliceV - } else { - return fmt.Errorf("unexpected value for field A6record: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.A6PartData != nil { - raw := in.A6PartData - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.A6PartData = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.A6PartData = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field A6PartData: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field A6PartData: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Afsdbrecord != nil { - raw := in.Afsdbrecord - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Afsdbrecord = &[]string{plainV} - } else if sliceOk { - - out.Afsdbrecord = &sliceV - } else { - return fmt.Errorf("unexpected value for field Afsdbrecord: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.AfsdbPartSubtype != nil { - raw := in.AfsdbPartSubtype - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field AfsdbPartSubtype: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.AfsdbPartSubtype = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.AfsdbPartSubtype = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field AfsdbPartSubtype: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field AfsdbPartSubtype: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.AfsdbPartHostname != nil { - raw := in.AfsdbPartHostname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.AfsdbPartHostname = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.AfsdbPartHostname = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field AfsdbPartHostname: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field AfsdbPartHostname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Aplrecord != nil { - raw := in.Aplrecord - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Aplrecord = &[]string{plainV} - } else if sliceOk { - - out.Aplrecord = &sliceV - } else { - return fmt.Errorf("unexpected value for field Aplrecord: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Certrecord != nil { - raw := in.Certrecord - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Certrecord = &[]string{plainV} - } else if sliceOk { - - out.Certrecord = &sliceV - } else { - return fmt.Errorf("unexpected value for field Certrecord: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.CertPartType != nil { - raw := in.CertPartType - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field CertPartType: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.CertPartType = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.CertPartType = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field CertPartType: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field CertPartType: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.CertPartKeyTag != nil { - raw := in.CertPartKeyTag - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field CertPartKeyTag: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.CertPartKeyTag = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.CertPartKeyTag = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field CertPartKeyTag: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field CertPartKeyTag: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.CertPartAlgorithm != nil { - raw := in.CertPartAlgorithm - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field CertPartAlgorithm: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.CertPartAlgorithm = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.CertPartAlgorithm = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field CertPartAlgorithm: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field CertPartAlgorithm: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.CertPartCertificateOrCrl != nil { - raw := in.CertPartCertificateOrCrl - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.CertPartCertificateOrCrl = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.CertPartCertificateOrCrl = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field CertPartCertificateOrCrl: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field CertPartCertificateOrCrl: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Cnamerecord != nil { - raw := in.Cnamerecord - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cnamerecord = &[]string{plainV} - } else if sliceOk { - - out.Cnamerecord = &sliceV - } else { - return fmt.Errorf("unexpected value for field Cnamerecord: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.CnamePartHostname != nil { - raw := in.CnamePartHostname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.CnamePartHostname = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.CnamePartHostname = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field CnamePartHostname: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field CnamePartHostname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Dhcidrecord != nil { - raw := in.Dhcidrecord - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Dhcidrecord = &[]string{plainV} - } else if sliceOk { - - out.Dhcidrecord = &sliceV - } else { - return fmt.Errorf("unexpected value for field Dhcidrecord: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Dlvrecord != nil { - raw := in.Dlvrecord - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Dlvrecord = &[]string{plainV} - } else if sliceOk { - - out.Dlvrecord = &sliceV - } else { - return fmt.Errorf("unexpected value for field Dlvrecord: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.DlvPartKeyTag != nil { - raw := in.DlvPartKeyTag - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field DlvPartKeyTag: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.DlvPartKeyTag = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.DlvPartKeyTag = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field DlvPartKeyTag: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field DlvPartKeyTag: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.DlvPartAlgorithm != nil { - raw := in.DlvPartAlgorithm - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field DlvPartAlgorithm: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.DlvPartAlgorithm = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.DlvPartAlgorithm = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field DlvPartAlgorithm: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field DlvPartAlgorithm: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.DlvPartDigestType != nil { - raw := in.DlvPartDigestType - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field DlvPartDigestType: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.DlvPartDigestType = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.DlvPartDigestType = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field DlvPartDigestType: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field DlvPartDigestType: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.DlvPartDigest != nil { - raw := in.DlvPartDigest - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.DlvPartDigest = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.DlvPartDigest = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field DlvPartDigest: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field DlvPartDigest: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Dnamerecord != nil { - raw := in.Dnamerecord - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Dnamerecord = &[]string{plainV} - } else if sliceOk { - - out.Dnamerecord = &sliceV - } else { - return fmt.Errorf("unexpected value for field Dnamerecord: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.DnamePartTarget != nil { - raw := in.DnamePartTarget - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.DnamePartTarget = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.DnamePartTarget = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field DnamePartTarget: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field DnamePartTarget: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Dsrecord != nil { - raw := in.Dsrecord - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Dsrecord = &[]string{plainV} - } else if sliceOk { - - out.Dsrecord = &sliceV - } else { - return fmt.Errorf("unexpected value for field Dsrecord: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.DsPartKeyTag != nil { - raw := in.DsPartKeyTag - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field DsPartKeyTag: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.DsPartKeyTag = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.DsPartKeyTag = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field DsPartKeyTag: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field DsPartKeyTag: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.DsPartAlgorithm != nil { - raw := in.DsPartAlgorithm - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field DsPartAlgorithm: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.DsPartAlgorithm = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.DsPartAlgorithm = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field DsPartAlgorithm: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field DsPartAlgorithm: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.DsPartDigestType != nil { - raw := in.DsPartDigestType - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field DsPartDigestType: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.DsPartDigestType = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.DsPartDigestType = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field DsPartDigestType: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field DsPartDigestType: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.DsPartDigest != nil { - raw := in.DsPartDigest - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.DsPartDigest = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.DsPartDigest = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field DsPartDigest: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field DsPartDigest: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Hiprecord != nil { - raw := in.Hiprecord - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Hiprecord = &[]string{plainV} - } else if sliceOk { - - out.Hiprecord = &sliceV - } else { - return fmt.Errorf("unexpected value for field Hiprecord: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipseckeyrecord != nil { - raw := in.Ipseckeyrecord - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipseckeyrecord = &[]string{plainV} - } else if sliceOk { - - out.Ipseckeyrecord = &sliceV - } else { - return fmt.Errorf("unexpected value for field Ipseckeyrecord: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Keyrecord != nil { - raw := in.Keyrecord - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Keyrecord = &[]string{plainV} - } else if sliceOk { - - out.Keyrecord = &sliceV - } else { - return fmt.Errorf("unexpected value for field Keyrecord: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Kxrecord != nil { - raw := in.Kxrecord - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Kxrecord = &[]string{plainV} - } else if sliceOk { - - out.Kxrecord = &sliceV - } else { - return fmt.Errorf("unexpected value for field Kxrecord: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.KxPartPreference != nil { - raw := in.KxPartPreference - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field KxPartPreference: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.KxPartPreference = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.KxPartPreference = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field KxPartPreference: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field KxPartPreference: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.KxPartExchanger != nil { - raw := in.KxPartExchanger - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.KxPartExchanger = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.KxPartExchanger = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field KxPartExchanger: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field KxPartExchanger: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Locrecord != nil { - raw := in.Locrecord - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Locrecord = &[]string{plainV} - } else if sliceOk { - - out.Locrecord = &sliceV - } else { - return fmt.Errorf("unexpected value for field Locrecord: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.LocPartLatDeg != nil { - raw := in.LocPartLatDeg - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field LocPartLatDeg: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.LocPartLatDeg = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.LocPartLatDeg = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field LocPartLatDeg: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field LocPartLatDeg: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.LocPartLatMin != nil { - raw := in.LocPartLatMin - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field LocPartLatMin: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.LocPartLatMin = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.LocPartLatMin = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field LocPartLatMin: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field LocPartLatMin: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.LocPartLatSec != nil { - raw := in.LocPartLatSec - plainV, plainOk := raw.(float64) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []float64 - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(float64) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.LocPartLatSec = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.LocPartLatSec = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field LocPartLatSec: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field LocPartLatSec: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.LocPartLatDir != nil { - raw := in.LocPartLatDir - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.LocPartLatDir = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.LocPartLatDir = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field LocPartLatDir: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field LocPartLatDir: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.LocPartLonDeg != nil { - raw := in.LocPartLonDeg - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field LocPartLonDeg: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.LocPartLonDeg = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.LocPartLonDeg = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field LocPartLonDeg: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field LocPartLonDeg: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.LocPartLonMin != nil { - raw := in.LocPartLonMin - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field LocPartLonMin: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.LocPartLonMin = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.LocPartLonMin = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field LocPartLonMin: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field LocPartLonMin: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.LocPartLonSec != nil { - raw := in.LocPartLonSec - plainV, plainOk := raw.(float64) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []float64 - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(float64) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.LocPartLonSec = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.LocPartLonSec = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field LocPartLonSec: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field LocPartLonSec: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.LocPartLonDir != nil { - raw := in.LocPartLonDir - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.LocPartLonDir = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.LocPartLonDir = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field LocPartLonDir: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field LocPartLonDir: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.LocPartAltitude != nil { - raw := in.LocPartAltitude - plainV, plainOk := raw.(float64) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []float64 - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(float64) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.LocPartAltitude = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.LocPartAltitude = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field LocPartAltitude: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field LocPartAltitude: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.LocPartSize != nil { - raw := in.LocPartSize - plainV, plainOk := raw.(float64) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []float64 - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(float64) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.LocPartSize = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.LocPartSize = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field LocPartSize: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field LocPartSize: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.LocPartHPrecision != nil { - raw := in.LocPartHPrecision - plainV, plainOk := raw.(float64) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []float64 - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(float64) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.LocPartHPrecision = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.LocPartHPrecision = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field LocPartHPrecision: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field LocPartHPrecision: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.LocPartVPrecision != nil { - raw := in.LocPartVPrecision - plainV, plainOk := raw.(float64) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []float64 - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(float64) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.LocPartVPrecision = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.LocPartVPrecision = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field LocPartVPrecision: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field LocPartVPrecision: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Mxrecord != nil { - raw := in.Mxrecord - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Mxrecord = &[]string{plainV} - } else if sliceOk { - - out.Mxrecord = &sliceV - } else { - return fmt.Errorf("unexpected value for field Mxrecord: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MxPartPreference != nil { - raw := in.MxPartPreference - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field MxPartPreference: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.MxPartPreference = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MxPartPreference = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MxPartPreference: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MxPartPreference: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MxPartExchanger != nil { - raw := in.MxPartExchanger - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MxPartExchanger = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MxPartExchanger = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MxPartExchanger: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MxPartExchanger: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Naptrrecord != nil { - raw := in.Naptrrecord - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Naptrrecord = &[]string{plainV} - } else if sliceOk { - - out.Naptrrecord = &sliceV - } else { - return fmt.Errorf("unexpected value for field Naptrrecord: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.NaptrPartOrder != nil { - raw := in.NaptrPartOrder - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field NaptrPartOrder: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.NaptrPartOrder = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.NaptrPartOrder = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field NaptrPartOrder: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field NaptrPartOrder: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.NaptrPartPreference != nil { - raw := in.NaptrPartPreference - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field NaptrPartPreference: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.NaptrPartPreference = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.NaptrPartPreference = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field NaptrPartPreference: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field NaptrPartPreference: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.NaptrPartFlags != nil { - raw := in.NaptrPartFlags - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.NaptrPartFlags = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.NaptrPartFlags = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field NaptrPartFlags: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field NaptrPartFlags: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.NaptrPartService != nil { - raw := in.NaptrPartService - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.NaptrPartService = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.NaptrPartService = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field NaptrPartService: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field NaptrPartService: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.NaptrPartRegexp != nil { - raw := in.NaptrPartRegexp - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.NaptrPartRegexp = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.NaptrPartRegexp = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field NaptrPartRegexp: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field NaptrPartRegexp: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.NaptrPartReplacement != nil { - raw := in.NaptrPartReplacement - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.NaptrPartReplacement = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.NaptrPartReplacement = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field NaptrPartReplacement: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field NaptrPartReplacement: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Nsrecord != nil { - raw := in.Nsrecord - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Nsrecord = &[]string{plainV} - } else if sliceOk { - - out.Nsrecord = &sliceV - } else { - return fmt.Errorf("unexpected value for field Nsrecord: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.NsPartHostname != nil { - raw := in.NsPartHostname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.NsPartHostname = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.NsPartHostname = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field NsPartHostname: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field NsPartHostname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Nsecrecord != nil { - raw := in.Nsecrecord - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Nsecrecord = &[]string{plainV} - } else if sliceOk { - - out.Nsecrecord = &sliceV - } else { - return fmt.Errorf("unexpected value for field Nsecrecord: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ptrrecord != nil { - raw := in.Ptrrecord - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ptrrecord = &[]string{plainV} - } else if sliceOk { - - out.Ptrrecord = &sliceV - } else { - return fmt.Errorf("unexpected value for field Ptrrecord: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.PtrPartHostname != nil { - raw := in.PtrPartHostname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.PtrPartHostname = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.PtrPartHostname = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field PtrPartHostname: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field PtrPartHostname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Rrsigrecord != nil { - raw := in.Rrsigrecord - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Rrsigrecord = &[]string{plainV} - } else if sliceOk { - - out.Rrsigrecord = &sliceV - } else { - return fmt.Errorf("unexpected value for field Rrsigrecord: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Rprecord != nil { - raw := in.Rprecord - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Rprecord = &[]string{plainV} - } else if sliceOk { - - out.Rprecord = &sliceV - } else { - return fmt.Errorf("unexpected value for field Rprecord: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Sigrecord != nil { - raw := in.Sigrecord - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Sigrecord = &[]string{plainV} - } else if sliceOk { - - out.Sigrecord = &sliceV - } else { - return fmt.Errorf("unexpected value for field Sigrecord: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Spfrecord != nil { - raw := in.Spfrecord - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Spfrecord = &[]string{plainV} - } else if sliceOk { - - out.Spfrecord = &sliceV - } else { - return fmt.Errorf("unexpected value for field Spfrecord: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Srvrecord != nil { - raw := in.Srvrecord - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Srvrecord = &[]string{plainV} - } else if sliceOk { - - out.Srvrecord = &sliceV - } else { - return fmt.Errorf("unexpected value for field Srvrecord: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.SrvPartPriority != nil { - raw := in.SrvPartPriority - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field SrvPartPriority: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.SrvPartPriority = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.SrvPartPriority = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field SrvPartPriority: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field SrvPartPriority: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.SrvPartWeight != nil { - raw := in.SrvPartWeight - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field SrvPartWeight: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.SrvPartWeight = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.SrvPartWeight = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field SrvPartWeight: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field SrvPartWeight: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.SrvPartPort != nil { - raw := in.SrvPartPort - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field SrvPartPort: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.SrvPartPort = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.SrvPartPort = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field SrvPartPort: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field SrvPartPort: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.SrvPartTarget != nil { - raw := in.SrvPartTarget - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.SrvPartTarget = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.SrvPartTarget = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field SrvPartTarget: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field SrvPartTarget: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Sshfprecord != nil { - raw := in.Sshfprecord - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Sshfprecord = &[]string{plainV} - } else if sliceOk { - - out.Sshfprecord = &sliceV - } else { - return fmt.Errorf("unexpected value for field Sshfprecord: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.SshfpPartAlgorithm != nil { - raw := in.SshfpPartAlgorithm - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field SshfpPartAlgorithm: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.SshfpPartAlgorithm = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.SshfpPartAlgorithm = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field SshfpPartAlgorithm: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field SshfpPartAlgorithm: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.SshfpPartFpType != nil { - raw := in.SshfpPartFpType - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field SshfpPartFpType: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.SshfpPartFpType = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.SshfpPartFpType = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field SshfpPartFpType: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field SshfpPartFpType: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.SshfpPartFingerprint != nil { - raw := in.SshfpPartFingerprint - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.SshfpPartFingerprint = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.SshfpPartFingerprint = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field SshfpPartFingerprint: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field SshfpPartFingerprint: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Tlsarecord != nil { - raw := in.Tlsarecord - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Tlsarecord = &[]string{plainV} - } else if sliceOk { - - out.Tlsarecord = &sliceV - } else { - return fmt.Errorf("unexpected value for field Tlsarecord: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.TlsaPartCertUsage != nil { - raw := in.TlsaPartCertUsage - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field TlsaPartCertUsage: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.TlsaPartCertUsage = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.TlsaPartCertUsage = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field TlsaPartCertUsage: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field TlsaPartCertUsage: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.TlsaPartSelector != nil { - raw := in.TlsaPartSelector - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field TlsaPartSelector: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.TlsaPartSelector = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.TlsaPartSelector = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field TlsaPartSelector: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field TlsaPartSelector: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.TlsaPartMatchingType != nil { - raw := in.TlsaPartMatchingType - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field TlsaPartMatchingType: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.TlsaPartMatchingType = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.TlsaPartMatchingType = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field TlsaPartMatchingType: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field TlsaPartMatchingType: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.TlsaPartCertAssociationData != nil { - raw := in.TlsaPartCertAssociationData - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.TlsaPartCertAssociationData = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.TlsaPartCertAssociationData = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field TlsaPartCertAssociationData: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field TlsaPartCertAssociationData: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Txtrecord != nil { - raw := in.Txtrecord - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Txtrecord = &[]string{plainV} - } else if sliceOk { - - out.Txtrecord = &sliceV - } else { - return fmt.Errorf("unexpected value for field Txtrecord: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.TxtPartData != nil { - raw := in.TxtPartData - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.TxtPartData = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.TxtPartData = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field TxtPartData: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field TxtPartData: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Dnsrprecord struct { -} - -func (t *Dnsrprecord) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Dnsrprecord[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Dnsrprecord%v", string(b)) -} - -type jsonDnsrprecord struct { -} - -func (out *Dnsrprecord) UnmarshalJSON(data []byte) error { - var in jsonDnsrprecord - if e := json.Unmarshal(data, &in); e != nil { - return e - } - return nil -} - -type Dnsrrsigrecord struct { -} - -func (t *Dnsrrsigrecord) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Dnsrrsigrecord[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Dnsrrsigrecord%v", string(b)) -} - -type jsonDnsrrsigrecord struct { -} - -func (out *Dnsrrsigrecord) UnmarshalJSON(data []byte) error { - var in jsonDnsrrsigrecord - if e := json.Unmarshal(data, &in); e != nil { - return e - } - return nil -} - -type Dnsserver struct { - - /* - Server name - DNS Server name - */ - Idnsserverid string `json:"idnsserverid,omitempty"` - - /* - SOA mname override - SOA mname (authoritative server) override - */ - Idnssoamname *string `json:"idnssoamname,omitempty"` - - /* - Forwarders - Per-server forwarders. A custom port can be specified for each forwarder using a standard format "IP_ADDRESS port PORT" - */ - Idnsforwarders *[]string `json:"idnsforwarders,omitempty"` - - /* - Forward policy - Per-server conditional forwarding policy. Set to "none" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded. - */ - Idnsforwardpolicy *string `json:"idnsforwardpolicy,omitempty"` -} - -func (t *Dnsserver) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Dnsserver[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Dnsserver%v", string(b)) -} - -type jsonDnsserver struct { - Idnsserverid interface{} `json:"idnsserverid"` - - Idnssoamname interface{} `json:"idnssoamname"` - - Idnsforwarders interface{} `json:"idnsforwarders"` - - Idnsforwardpolicy interface{} `json:"idnsforwardpolicy"` -} - -func (out *Dnsserver) UnmarshalJSON(data []byte) error { - var in jsonDnsserver - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Idnsserverid - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Idnsserverid = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Idnsserverid: %v; expected exactly one element", raw) - } - out.Idnsserverid = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Idnsserverid: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Idnssoamname != nil { - raw := in.Idnssoamname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Idnssoamname = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Idnssoamname = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Idnssoamname: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Idnssoamname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Idnsforwarders != nil { - raw := in.Idnsforwarders - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Idnsforwarders = &[]string{plainV} - } else if sliceOk { - - out.Idnsforwarders = &sliceV - } else { - return fmt.Errorf("unexpected value for field Idnsforwarders: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Idnsforwardpolicy != nil { - raw := in.Idnsforwardpolicy - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Idnsforwardpolicy = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Idnsforwardpolicy = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Idnsforwardpolicy: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Idnsforwardpolicy: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Dnssigrecord struct { -} - -func (t *Dnssigrecord) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Dnssigrecord[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Dnssigrecord%v", string(b)) -} - -type jsonDnssigrecord struct { -} - -func (out *Dnssigrecord) UnmarshalJSON(data []byte) error { - var in jsonDnssigrecord - if e := json.Unmarshal(data, &in); e != nil { - return e - } - return nil -} - -type Dnsspfrecord struct { -} - -func (t *Dnsspfrecord) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Dnsspfrecord[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Dnsspfrecord%v", string(b)) -} - -type jsonDnsspfrecord struct { -} - -func (out *Dnsspfrecord) UnmarshalJSON(data []byte) error { - var in jsonDnsspfrecord - if e := json.Unmarshal(data, &in); e != nil { - return e - } - return nil -} - -type Dnssrvrecord struct { - - /* - Priority - - */ - Priority int `json:"priority,omitempty"` - - /* - Weight - - */ - Weight int `json:"weight,omitempty"` - - /* - Port - - */ - Port int `json:"port,omitempty"` - - /* - Target - The domain name of the target host or '.' if the service is decidedly not available at this domain - */ - Target string `json:"target,omitempty"` -} - -func (t *Dnssrvrecord) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Dnssrvrecord[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Dnssrvrecord%v", string(b)) -} - -type jsonDnssrvrecord struct { - Priority interface{} `json:"priority"` - - Weight interface{} `json:"weight"` - - Port interface{} `json:"port"` - - Target interface{} `json:"target"` -} - -func (out *Dnssrvrecord) UnmarshalJSON(data []byte) error { - var in jsonDnssrvrecord - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Priority - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Priority: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Priority = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Priority: %v; expected exactly one element", raw) - } - out.Priority = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Priority: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Weight - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Weight: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Weight = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Weight: %v; expected exactly one element", raw) - } - out.Weight = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Weight: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Port - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Port: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Port = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Port: %v; expected exactly one element", raw) - } - out.Port = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Port: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Target - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Target = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Target: %v; expected exactly one element", raw) - } - out.Target = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Target: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Dnssshfprecord struct { - - /* - Algorithm - - */ - Algorithm int `json:"algorithm,omitempty"` - - /* - Fingerprint Type - - */ - FpType int `json:"fp_type,omitempty"` - - /* - Fingerprint - - */ - Fingerprint string `json:"fingerprint,omitempty"` -} - -func (t *Dnssshfprecord) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Dnssshfprecord[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Dnssshfprecord%v", string(b)) -} - -type jsonDnssshfprecord struct { - Algorithm interface{} `json:"algorithm"` - - FpType interface{} `json:"fp_type"` - - Fingerprint interface{} `json:"fingerprint"` -} - -func (out *Dnssshfprecord) UnmarshalJSON(data []byte) error { - var in jsonDnssshfprecord - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Algorithm - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Algorithm: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Algorithm = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Algorithm: %v; expected exactly one element", raw) - } - out.Algorithm = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Algorithm: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.FpType - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field FpType: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.FpType = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field FpType: %v; expected exactly one element", raw) - } - out.FpType = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field FpType: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Fingerprint - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Fingerprint = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Fingerprint: %v; expected exactly one element", raw) - } - out.Fingerprint = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Fingerprint: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Dnstlsarecord struct { - - /* - Certificate Usage - - */ - CertUsage int `json:"cert_usage,omitempty"` - - /* - Selector - - */ - Selector int `json:"selector,omitempty"` - - /* - Matching Type - - */ - MatchingType int `json:"matching_type,omitempty"` - - /* - Certificate Association Data - - */ - CertAssociationData string `json:"cert_association_data,omitempty"` -} - -func (t *Dnstlsarecord) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Dnstlsarecord[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Dnstlsarecord%v", string(b)) -} - -type jsonDnstlsarecord struct { - CertUsage interface{} `json:"cert_usage"` - - Selector interface{} `json:"selector"` - - MatchingType interface{} `json:"matching_type"` - - CertAssociationData interface{} `json:"cert_association_data"` -} - -func (out *Dnstlsarecord) UnmarshalJSON(data []byte) error { - var in jsonDnstlsarecord - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.CertUsage - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field CertUsage: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.CertUsage = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field CertUsage: %v; expected exactly one element", raw) - } - out.CertUsage = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field CertUsage: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Selector - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Selector: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Selector = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Selector: %v; expected exactly one element", raw) - } - out.Selector = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Selector: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.MatchingType - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field MatchingType: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.MatchingType = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field MatchingType: %v; expected exactly one element", raw) - } - out.MatchingType = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field MatchingType: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.CertAssociationData - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.CertAssociationData = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field CertAssociationData: %v; expected exactly one element", raw) - } - out.CertAssociationData = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field CertAssociationData: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Dnstxtrecord struct { - - /* - Text Data - - */ - Data string `json:"data,omitempty"` -} - -func (t *Dnstxtrecord) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Dnstxtrecord[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Dnstxtrecord%v", string(b)) -} - -type jsonDnstxtrecord struct { - Data interface{} `json:"data"` -} - -func (out *Dnstxtrecord) UnmarshalJSON(data []byte) error { - var in jsonDnstxtrecord - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Data - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Data = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Data: %v; expected exactly one element", raw) - } - out.Data = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Data: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Dnszone struct { - - /* - Zone name - Zone name (FQDN) - */ - Idnsname string `json:"idnsname,omitempty"` - - /* - Reverse zone IP network - IP network to create reverse zone name from - */ - NameFromIP *string `json:"name_from_ip,omitempty"` - - /* - Active zone - Is zone active? - */ - Idnszoneactive *bool `json:"idnszoneactive,omitempty"` - - /* - Zone forwarders - Per-zone forwarders. A custom port can be specified for each forwarder using a standard format "IP_ADDRESS port PORT" - */ - Idnsforwarders *[]string `json:"idnsforwarders,omitempty"` - - /* - Forward policy - Per-zone conditional forwarding policy. Set to "none" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded. - */ - Idnsforwardpolicy *string `json:"idnsforwardpolicy,omitempty"` - - /* - Managedby permission - - */ - Managedby string `json:"managedby,omitempty"` - - /* - Authoritative nameserver - Authoritative nameserver domain name - */ - Idnssoamname *string `json:"idnssoamname,omitempty"` - - /* - Administrator e-mail address - Administrator e-mail address - */ - Idnssoarname string `json:"idnssoarname,omitempty"` - - /* - SOA serial - SOA record serial number - */ - Idnssoaserial int `json:"idnssoaserial,omitempty"` - - /* - SOA refresh - SOA record refresh time - */ - Idnssoarefresh int `json:"idnssoarefresh,omitempty"` - - /* - SOA retry - SOA record retry time - */ - Idnssoaretry int `json:"idnssoaretry,omitempty"` - - /* - SOA expire - SOA record expire time - */ - Idnssoaexpire int `json:"idnssoaexpire,omitempty"` - - /* - SOA minimum - How long should negative responses be cached - */ - Idnssoaminimum int `json:"idnssoaminimum,omitempty"` - - /* - Time to live - Time to live for records at zone apex - */ - Dnsttl *int `json:"dnsttl,omitempty"` - - /* - Default time to live - Time to live for records without explicit TTL definition - */ - Dnsdefaultttl *int `json:"dnsdefaultttl,omitempty"` - - /* - - - */ - Dnsclass *string `json:"dnsclass,omitempty"` - - /* - BIND update policy - BIND update policy - */ - Idnsupdatepolicy *string `json:"idnsupdatepolicy,omitempty"` - - /* - Dynamic update - Allow dynamic updates. - */ - Idnsallowdynupdate *bool `json:"idnsallowdynupdate,omitempty"` - - /* - Allow query - Semicolon separated list of IP addresses or networks which are allowed to issue queries - */ - Idnsallowquery *string `json:"idnsallowquery,omitempty"` - - /* - Allow transfer - Semicolon separated list of IP addresses or networks which are allowed to transfer the zone - */ - Idnsallowtransfer *string `json:"idnsallowtransfer,omitempty"` - - /* - Allow PTR sync - Allow synchronization of forward (A, AAAA) and reverse (PTR) records in the zone - */ - Idnsallowsyncptr *bool `json:"idnsallowsyncptr,omitempty"` - - /* - Allow in-line DNSSEC signing - Allow inline DNSSEC signing of records in the zone - */ - Idnssecinlinesigning *bool `json:"idnssecinlinesigning,omitempty"` - - /* - NSEC3PARAM record - NSEC3PARAM record for zone in format: hash_algorithm flags iterations salt - */ - Nsec3paramrecord *string `json:"nsec3paramrecord,omitempty"` -} - -func (t *Dnszone) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Dnszone[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Dnszone%v", string(b)) -} - -type jsonDnszone struct { - Idnsname interface{} `json:"idnsname"` - - NameFromIP interface{} `json:"name_from_ip"` - - Idnszoneactive interface{} `json:"idnszoneactive"` - - Idnsforwarders interface{} `json:"idnsforwarders"` - - Idnsforwardpolicy interface{} `json:"idnsforwardpolicy"` - - Managedby interface{} `json:"managedby"` - - Idnssoamname interface{} `json:"idnssoamname"` - - Idnssoarname interface{} `json:"idnssoarname"` - - Idnssoaserial interface{} `json:"idnssoaserial"` - - Idnssoarefresh interface{} `json:"idnssoarefresh"` - - Idnssoaretry interface{} `json:"idnssoaretry"` - - Idnssoaexpire interface{} `json:"idnssoaexpire"` - - Idnssoaminimum interface{} `json:"idnssoaminimum"` - - Dnsttl interface{} `json:"dnsttl"` - - Dnsdefaultttl interface{} `json:"dnsdefaultttl"` - - Dnsclass interface{} `json:"dnsclass"` - - Idnsupdatepolicy interface{} `json:"idnsupdatepolicy"` - - Idnsallowdynupdate interface{} `json:"idnsallowdynupdate"` - - Idnsallowquery interface{} `json:"idnsallowquery"` - - Idnsallowtransfer interface{} `json:"idnsallowtransfer"` - - Idnsallowsyncptr interface{} `json:"idnsallowsyncptr"` - - Idnssecinlinesigning interface{} `json:"idnssecinlinesigning"` - - Nsec3paramrecord interface{} `json:"nsec3paramrecord"` -} - -func (out *Dnszone) UnmarshalJSON(data []byte) error { - var in jsonDnszone - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Idnsname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Idnsname = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Idnsname: %v; expected exactly one element", raw) - } - out.Idnsname = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Idnsname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.NameFromIP != nil { - raw := in.NameFromIP - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.NameFromIP = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.NameFromIP = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field NameFromIP: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field NameFromIP: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Idnszoneactive != nil { - raw := in.Idnszoneactive - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Idnszoneactive = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Idnszoneactive = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Idnszoneactive: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Idnszoneactive: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Idnsforwarders != nil { - raw := in.Idnsforwarders - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Idnsforwarders = &[]string{plainV} - } else if sliceOk { - - out.Idnsforwarders = &sliceV - } else { - return fmt.Errorf("unexpected value for field Idnsforwarders: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Idnsforwardpolicy != nil { - raw := in.Idnsforwardpolicy - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Idnsforwardpolicy = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Idnsforwardpolicy = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Idnsforwardpolicy: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Idnsforwardpolicy: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Managedby - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Managedby = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Managedby: %v; expected exactly one element", raw) - } - out.Managedby = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Managedby: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Idnssoamname != nil { - raw := in.Idnssoamname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Idnssoamname = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Idnssoamname = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Idnssoamname: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Idnssoamname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Idnssoarname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Idnssoarname = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Idnssoarname: %v; expected exactly one element", raw) - } - out.Idnssoarname = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Idnssoarname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Idnssoaserial - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Idnssoaserial: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Idnssoaserial = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Idnssoaserial: %v; expected exactly one element", raw) - } - out.Idnssoaserial = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Idnssoaserial: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Idnssoarefresh - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Idnssoarefresh: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Idnssoarefresh = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Idnssoarefresh: %v; expected exactly one element", raw) - } - out.Idnssoarefresh = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Idnssoarefresh: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Idnssoaretry - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Idnssoaretry: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Idnssoaretry = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Idnssoaretry: %v; expected exactly one element", raw) - } - out.Idnssoaretry = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Idnssoaretry: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Idnssoaexpire - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Idnssoaexpire: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Idnssoaexpire = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Idnssoaexpire: %v; expected exactly one element", raw) - } - out.Idnssoaexpire = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Idnssoaexpire: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Idnssoaminimum - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Idnssoaminimum: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Idnssoaminimum = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Idnssoaminimum: %v; expected exactly one element", raw) - } - out.Idnssoaminimum = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Idnssoaminimum: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Dnsttl != nil { - raw := in.Dnsttl - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Dnsttl: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Dnsttl = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Dnsttl = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Dnsttl: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Dnsttl: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Dnsdefaultttl != nil { - raw := in.Dnsdefaultttl - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Dnsdefaultttl: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Dnsdefaultttl = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Dnsdefaultttl = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Dnsdefaultttl: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Dnsdefaultttl: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Dnsclass != nil { - raw := in.Dnsclass - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Dnsclass = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Dnsclass = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Dnsclass: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Dnsclass: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Idnsupdatepolicy != nil { - raw := in.Idnsupdatepolicy - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Idnsupdatepolicy = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Idnsupdatepolicy = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Idnsupdatepolicy: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Idnsupdatepolicy: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Idnsallowdynupdate != nil { - raw := in.Idnsallowdynupdate - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Idnsallowdynupdate = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Idnsallowdynupdate = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Idnsallowdynupdate: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Idnsallowdynupdate: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Idnsallowquery != nil { - raw := in.Idnsallowquery - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Idnsallowquery = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Idnsallowquery = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Idnsallowquery: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Idnsallowquery: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Idnsallowtransfer != nil { - raw := in.Idnsallowtransfer - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Idnsallowtransfer = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Idnsallowtransfer = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Idnsallowtransfer: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Idnsallowtransfer: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Idnsallowsyncptr != nil { - raw := in.Idnsallowsyncptr - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Idnsallowsyncptr = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Idnsallowsyncptr = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Idnsallowsyncptr: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Idnsallowsyncptr: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Idnssecinlinesigning != nil { - raw := in.Idnssecinlinesigning - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Idnssecinlinesigning = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Idnssecinlinesigning = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Idnssecinlinesigning: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Idnssecinlinesigning: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Nsec3paramrecord != nil { - raw := in.Nsec3paramrecord - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Nsec3paramrecord = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Nsec3paramrecord = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Nsec3paramrecord: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Nsec3paramrecord: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Group struct { - - /* - Group name - - */ - Cn string `json:"cn,omitempty"` - - /* - Description - Group description - */ - Description *string `json:"description,omitempty"` - - /* - GID - GID (use this option to set it manually) - */ - Gidnumber *int `json:"gidnumber,omitempty"` - - /* - External member - Members of a trusted domain in DOM\name or name@domain form - */ - Ipaexternalmember *[]string `json:"ipaexternalmember,omitempty"` - - /* - Member users - - */ - MemberUser *[]string `json:"member_user,omitempty"` - - /* - Member groups - - */ - MemberGroup *[]string `json:"member_group,omitempty"` - - /* - Member of groups - - */ - MemberofGroup *[]string `json:"memberof_group,omitempty"` - - /* - Roles - - */ - MemberofRole *[]string `json:"memberof_role,omitempty"` - - /* - Member of netgroups - - */ - MemberofNetgroup *[]string `json:"memberof_netgroup,omitempty"` - - /* - Member of Sudo rule - - */ - MemberofSudorule *[]string `json:"memberof_sudorule,omitempty"` - - /* - Member of HBAC rule - - */ - MemberofHbacrule *[]string `json:"memberof_hbacrule,omitempty"` - - /* - Indirect Member users - - */ - MemberindirectUser *string `json:"memberindirect_user,omitempty"` - - /* - Indirect Member groups - - */ - MemberindirectGroup *string `json:"memberindirect_group,omitempty"` - - /* - Indirect Member of group - - */ - MemberofindirectGroup *string `json:"memberofindirect_group,omitempty"` - - /* - Indirect Member of netgroup - - */ - MemberofindirectNetgroup *string `json:"memberofindirect_netgroup,omitempty"` - - /* - Indirect Member of role - - */ - MemberofindirectRole *string `json:"memberofindirect_role,omitempty"` - - /* - Indirect Member of Sudo rule - - */ - MemberofindirectSudorule *string `json:"memberofindirect_sudorule,omitempty"` - - /* - Indirect Member of HBAC rule - - */ - MemberofindirectHbacrule *string `json:"memberofindirect_hbacrule,omitempty"` -} - -func (t *Group) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Group[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Group%v", string(b)) -} - -type jsonGroup struct { - Cn interface{} `json:"cn"` - - Description interface{} `json:"description"` - - Gidnumber interface{} `json:"gidnumber"` - - Ipaexternalmember interface{} `json:"ipaexternalmember"` - - MemberUser interface{} `json:"member_user"` - - MemberGroup interface{} `json:"member_group"` - - MemberofGroup interface{} `json:"memberof_group"` - - MemberofRole interface{} `json:"memberof_role"` - - MemberofNetgroup interface{} `json:"memberof_netgroup"` - - MemberofSudorule interface{} `json:"memberof_sudorule"` - - MemberofHbacrule interface{} `json:"memberof_hbacrule"` - - MemberindirectUser interface{} `json:"memberindirect_user"` - - MemberindirectGroup interface{} `json:"memberindirect_group"` - - MemberofindirectGroup interface{} `json:"memberofindirect_group"` - - MemberofindirectNetgroup interface{} `json:"memberofindirect_netgroup"` - - MemberofindirectRole interface{} `json:"memberofindirect_role"` - - MemberofindirectSudorule interface{} `json:"memberofindirect_sudorule"` - - MemberofindirectHbacrule interface{} `json:"memberofindirect_hbacrule"` -} - -func (out *Group) UnmarshalJSON(data []byte) error { - var in jsonGroup - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Cn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) - } - out.Cn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Description != nil { - raw := in.Description - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Description = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Description = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Gidnumber != nil { - raw := in.Gidnumber - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Gidnumber: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Gidnumber = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Gidnumber = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Gidnumber: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Gidnumber: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipaexternalmember != nil { - raw := in.Ipaexternalmember - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipaexternalmember = &[]string{plainV} - } else if sliceOk { - - out.Ipaexternalmember = &sliceV - } else { - return fmt.Errorf("unexpected value for field Ipaexternalmember: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberUser != nil { - raw := in.MemberUser - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberUser = &[]string{plainV} - } else if sliceOk { - - out.MemberUser = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberUser: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberGroup != nil { - raw := in.MemberGroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberGroup = &[]string{plainV} - } else if sliceOk { - - out.MemberGroup = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberGroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofGroup != nil { - raw := in.MemberofGroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofGroup = &[]string{plainV} - } else if sliceOk { - - out.MemberofGroup = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberofGroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofRole != nil { - raw := in.MemberofRole - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofRole = &[]string{plainV} - } else if sliceOk { - - out.MemberofRole = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberofRole: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofNetgroup != nil { - raw := in.MemberofNetgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofNetgroup = &[]string{plainV} - } else if sliceOk { - - out.MemberofNetgroup = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberofNetgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofSudorule != nil { - raw := in.MemberofSudorule - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofSudorule = &[]string{plainV} - } else if sliceOk { - - out.MemberofSudorule = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberofSudorule: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofHbacrule != nil { - raw := in.MemberofHbacrule - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofHbacrule = &[]string{plainV} - } else if sliceOk { - - out.MemberofHbacrule = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberofHbacrule: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberindirectUser != nil { - raw := in.MemberindirectUser - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberindirectUser = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberindirectUser = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberindirectUser: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberindirectUser: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberindirectGroup != nil { - raw := in.MemberindirectGroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberindirectGroup = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberindirectGroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberindirectGroup: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberindirectGroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofindirectGroup != nil { - raw := in.MemberofindirectGroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofindirectGroup = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberofindirectGroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberofindirectGroup: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberofindirectGroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofindirectNetgroup != nil { - raw := in.MemberofindirectNetgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofindirectNetgroup = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberofindirectNetgroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberofindirectNetgroup: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberofindirectNetgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofindirectRole != nil { - raw := in.MemberofindirectRole - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofindirectRole = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberofindirectRole = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberofindirectRole: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberofindirectRole: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofindirectSudorule != nil { - raw := in.MemberofindirectSudorule - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofindirectSudorule = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberofindirectSudorule = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberofindirectSudorule: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberofindirectSudorule: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofindirectHbacrule != nil { - raw := in.MemberofindirectHbacrule - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofindirectHbacrule = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberofindirectHbacrule = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberofindirectHbacrule: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberofindirectHbacrule: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Hbacrule struct { - - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` - - /* - Rule type - Rule type (allow) - */ - Accessruletype string `json:"accessruletype,omitempty"` - - /* - User category - User category the rule applies to - */ - Usercategory *string `json:"usercategory,omitempty"` - - /* - Host category - Host category the rule applies to - */ - Hostcategory *string `json:"hostcategory,omitempty"` - - /* - Source host category - Source host category the rule applies to - */ - Sourcehostcategory *string `json:"sourcehostcategory,omitempty"` - - /* - Service category - Service category the rule applies to - */ - Servicecategory *string `json:"servicecategory,omitempty"` - - /* - Description - - */ - Description *string `json:"description,omitempty"` - - /* - Enabled - - */ - Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` - - /* - Users - - */ - MemberuserUser *string `json:"memberuser_user,omitempty"` - - /* - User Groups - - */ - MemberuserGroup *string `json:"memberuser_group,omitempty"` - - /* - Hosts - - */ - MemberhostHost *string `json:"memberhost_host,omitempty"` - - /* - Host Groups - - */ - MemberhostHostgroup *string `json:"memberhost_hostgroup,omitempty"` - - /* - Source Hosts - - */ - SourcehostHost *string `json:"sourcehost_host,omitempty"` - - /* - Source Host Groups - - */ - SourcehostHostgroup *string `json:"sourcehost_hostgroup,omitempty"` - - /* - Services - - */ - MemberserviceHbacsvc *string `json:"memberservice_hbacsvc,omitempty"` - - /* - Service Groups - - */ - MemberserviceHbacsvcgroup *string `json:"memberservice_hbacsvcgroup,omitempty"` - - /* - External host - - */ - Externalhost *[]string `json:"externalhost,omitempty"` -} - -func (t *Hbacrule) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Hbacrule[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Hbacrule%v", string(b)) -} - -type jsonHbacrule struct { - Cn interface{} `json:"cn"` - - Accessruletype interface{} `json:"accessruletype"` - - Usercategory interface{} `json:"usercategory"` - - Hostcategory interface{} `json:"hostcategory"` - - Sourcehostcategory interface{} `json:"sourcehostcategory"` - - Servicecategory interface{} `json:"servicecategory"` - - Description interface{} `json:"description"` - - Ipaenabledflag interface{} `json:"ipaenabledflag"` - - MemberuserUser interface{} `json:"memberuser_user"` - - MemberuserGroup interface{} `json:"memberuser_group"` - - MemberhostHost interface{} `json:"memberhost_host"` - - MemberhostHostgroup interface{} `json:"memberhost_hostgroup"` - - SourcehostHost interface{} `json:"sourcehost_host"` - - SourcehostHostgroup interface{} `json:"sourcehost_hostgroup"` - - MemberserviceHbacsvc interface{} `json:"memberservice_hbacsvc"` - - MemberserviceHbacsvcgroup interface{} `json:"memberservice_hbacsvcgroup"` - - Externalhost interface{} `json:"externalhost"` -} - -func (out *Hbacrule) UnmarshalJSON(data []byte) error { - var in jsonHbacrule - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Cn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) - } - out.Cn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Accessruletype - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Accessruletype = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Accessruletype: %v; expected exactly one element", raw) - } - out.Accessruletype = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Accessruletype: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Usercategory != nil { - raw := in.Usercategory - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Usercategory = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Usercategory = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Usercategory: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Usercategory: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Hostcategory != nil { - raw := in.Hostcategory - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Hostcategory = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Hostcategory = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Hostcategory: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Hostcategory: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Sourcehostcategory != nil { - raw := in.Sourcehostcategory - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Sourcehostcategory = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Sourcehostcategory = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Sourcehostcategory: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Sourcehostcategory: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Servicecategory != nil { - raw := in.Servicecategory - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Servicecategory = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Servicecategory = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Servicecategory: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Servicecategory: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Description != nil { - raw := in.Description - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Description = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Description = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipaenabledflag != nil { - raw := in.Ipaenabledflag - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipaenabledflag = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipaenabledflag = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipaenabledflag: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipaenabledflag: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberuserUser != nil { - raw := in.MemberuserUser - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberuserUser = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberuserUser = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberuserUser: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberuserUser: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberuserGroup != nil { - raw := in.MemberuserGroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberuserGroup = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberuserGroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberuserGroup: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberuserGroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberhostHost != nil { - raw := in.MemberhostHost - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberhostHost = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberhostHost = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberhostHost: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberhostHost: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberhostHostgroup != nil { - raw := in.MemberhostHostgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberhostHostgroup = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberhostHostgroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberhostHostgroup: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberhostHostgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.SourcehostHost != nil { - raw := in.SourcehostHost - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.SourcehostHost = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.SourcehostHost = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field SourcehostHost: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field SourcehostHost: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.SourcehostHostgroup != nil { - raw := in.SourcehostHostgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.SourcehostHostgroup = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.SourcehostHostgroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field SourcehostHostgroup: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field SourcehostHostgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberserviceHbacsvc != nil { - raw := in.MemberserviceHbacsvc - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberserviceHbacsvc = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberserviceHbacsvc = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberserviceHbacsvc: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberserviceHbacsvc: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberserviceHbacsvcgroup != nil { - raw := in.MemberserviceHbacsvcgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberserviceHbacsvcgroup = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberserviceHbacsvcgroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberserviceHbacsvcgroup: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberserviceHbacsvcgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Externalhost != nil { - raw := in.Externalhost - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Externalhost = &[]string{plainV} - } else if sliceOk { - - out.Externalhost = &sliceV - } else { - return fmt.Errorf("unexpected value for field Externalhost: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Hbacsvc struct { - - /* - Service name - HBAC service - */ - Cn string `json:"cn,omitempty"` - - /* - Description - HBAC service description - */ - Description *string `json:"description,omitempty"` - - /* - Member of HBAC service groups - - */ - MemberofHbacsvcgroup *[]string `json:"memberof_hbacsvcgroup,omitempty"` -} - -func (t *Hbacsvc) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Hbacsvc[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Hbacsvc%v", string(b)) -} - -type jsonHbacsvc struct { - Cn interface{} `json:"cn"` - - Description interface{} `json:"description"` - - MemberofHbacsvcgroup interface{} `json:"memberof_hbacsvcgroup"` -} - -func (out *Hbacsvc) UnmarshalJSON(data []byte) error { - var in jsonHbacsvc - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Cn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) - } - out.Cn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Description != nil { - raw := in.Description - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Description = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Description = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofHbacsvcgroup != nil { - raw := in.MemberofHbacsvcgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofHbacsvcgroup = &[]string{plainV} - } else if sliceOk { - - out.MemberofHbacsvcgroup = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberofHbacsvcgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Hbacsvcgroup struct { - - /* - Service group name - - */ - Cn string `json:"cn,omitempty"` - - /* - Description - HBAC service group description - */ - Description *string `json:"description,omitempty"` - - /* - Member HBAC service - - */ - MemberHbacsvc *[]string `json:"member_hbacsvc,omitempty"` -} - -func (t *Hbacsvcgroup) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Hbacsvcgroup[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Hbacsvcgroup%v", string(b)) -} - -type jsonHbacsvcgroup struct { - Cn interface{} `json:"cn"` - - Description interface{} `json:"description"` - - MemberHbacsvc interface{} `json:"member_hbacsvc"` -} - -func (out *Hbacsvcgroup) UnmarshalJSON(data []byte) error { - var in jsonHbacsvcgroup - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Cn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) - } - out.Cn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Description != nil { - raw := in.Description - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Description = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Description = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberHbacsvc != nil { - raw := in.MemberHbacsvc - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberHbacsvc = &[]string{plainV} - } else if sliceOk { - - out.MemberHbacsvc = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberHbacsvc: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Host struct { - - /* - Host name - - */ - Fqdn string `json:"fqdn,omitempty"` - - /* - Description - A description of this host - */ - Description *string `json:"description,omitempty"` - - /* - Locality - Host locality (e.g. "Baltimore, MD") - */ - L *string `json:"l,omitempty"` - - /* - Location - Host location (e.g. "Lab 2") - */ - Nshostlocation *string `json:"nshostlocation,omitempty"` - - /* - Platform - Host hardware platform (e.g. "Lenovo T61") - */ - Nshardwareplatform *string `json:"nshardwareplatform,omitempty"` - - /* - Operating system - Host operating system and version (e.g. "Fedora 9") - */ - Nsosversion *string `json:"nsosversion,omitempty"` - - /* - User password - Password used in bulk enrollment - */ - Userpassword *string `json:"userpassword,omitempty"` - - /* - - Generate a random password to be used in bulk enrollment - */ - Random *bool `json:"random,omitempty"` - - /* - Random password - - */ - Randompassword *string `json:"randompassword,omitempty"` - - /* - Certificate - Base-64 encoded host certificate - */ - Usercertificate *[]string `json:"usercertificate,omitempty"` - - /* - Subject - - */ - Subject string `json:"subject,omitempty"` - - /* - Serial Number - - */ - SerialNumber string `json:"serial_number,omitempty"` - - /* - Serial Number (hex) - - */ - SerialNumberHex string `json:"serial_number_hex,omitempty"` - - /* - Issuer - - */ - Issuer string `json:"issuer,omitempty"` - - /* - Not Before - - */ - ValidNotBefore string `json:"valid_not_before,omitempty"` - - /* - Not After - - */ - ValidNotAfter string `json:"valid_not_after,omitempty"` - - /* - Fingerprint (MD5) - - */ - Md5Fingerprint string `json:"md5_fingerprint,omitempty"` - - /* - Fingerprint (SHA1) - - */ - Sha1Fingerprint string `json:"sha1_fingerprint,omitempty"` - - /* - Revocation reason - - */ - RevocationReason *string `json:"revocation_reason,omitempty"` - - /* - Principal name - - */ - Krbcanonicalname *string `json:"krbcanonicalname,omitempty"` - - /* - Principal alias - - */ - Krbprincipalname *[]string `json:"krbprincipalname,omitempty"` - - /* - MAC address - Hardware MAC address(es) on this host - */ - Macaddress *[]string `json:"macaddress,omitempty"` - - /* - SSH public key - - */ - Ipasshpubkey *[]string `json:"ipasshpubkey,omitempty"` - - /* - SSH public key fingerprint - - */ - Sshpubkeyfp *[]string `json:"sshpubkeyfp,omitempty"` - - /* - Class - Host category (semantics placed on this attribute are for local interpretation) - */ - Userclass *[]string `json:"userclass,omitempty"` - - /* - Assigned ID View - - */ - Ipaassignedidview *string `json:"ipaassignedidview,omitempty"` - - /* - Authentication Indicators - Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations. - */ - Krbprincipalauthind *[]string `json:"krbprincipalauthind,omitempty"` - - /* - Requires pre-authentication - Pre-authentication is required for the service - */ - Ipakrbrequirespreauth *bool `json:"ipakrbrequirespreauth,omitempty"` - - /* - Trusted for delegation - Client credentials may be delegated to the service - */ - Ipakrbokasdelegate *bool `json:"ipakrbokasdelegate,omitempty"` - - /* - Trusted to authenticate as user - The service is allowed to authenticate on behalf of a client - */ - Ipakrboktoauthasdelegate *bool `json:"ipakrboktoauthasdelegate,omitempty"` - - /* - Password - - */ - HasPassword *bool `json:"has_password,omitempty"` - - /* - Member of host-groups - - */ - MemberofHostgroup *[]string `json:"memberof_hostgroup,omitempty"` - - /* - Roles - - */ - MemberofRole *[]string `json:"memberof_role,omitempty"` - - /* - Member of netgroups - - */ - MemberofNetgroup *[]string `json:"memberof_netgroup,omitempty"` - - /* - Member of Sudo rule - - */ - MemberofSudorule *[]string `json:"memberof_sudorule,omitempty"` - - /* - Member of HBAC rule - - */ - MemberofHbacrule *[]string `json:"memberof_hbacrule,omitempty"` - - /* - Indirect Member of netgroup - - */ - MemberofindirectNetgroup *string `json:"memberofindirect_netgroup,omitempty"` - - /* - Indirect Member of host-group - - */ - MemberofindirectHostgroup *string `json:"memberofindirect_hostgroup,omitempty"` - - /* - Indirect Member of role - - */ - MemberofindirectRole *string `json:"memberofindirect_role,omitempty"` - - /* - Indirect Member of Sudo rule - - */ - MemberofindirectSudorule *string `json:"memberofindirect_sudorule,omitempty"` - - /* - Indirect Member of HBAC rule - - */ - MemberofindirectHbacrule *string `json:"memberofindirect_hbacrule,omitempty"` - - /* - Keytab - - */ - HasKeytab *bool `json:"has_keytab,omitempty"` - - /* - Managed by - - */ - ManagedbyHost string `json:"managedby_host,omitempty"` - - /* - Managing - - */ - ManagingHost string `json:"managing_host,omitempty"` - - /* - Users allowed to retrieve keytab - - */ - IpaallowedtoperformReadKeysUser string `json:"ipaallowedtoperform_read_keys_user,omitempty"` - - /* - Groups allowed to retrieve keytab - - */ - IpaallowedtoperformReadKeysGroup string `json:"ipaallowedtoperform_read_keys_group,omitempty"` - - /* - Hosts allowed to retrieve keytab - - */ - IpaallowedtoperformReadKeysHost string `json:"ipaallowedtoperform_read_keys_host,omitempty"` - - /* - Host Groups allowed to retrieve keytab - - */ - IpaallowedtoperformReadKeysHostgroup string `json:"ipaallowedtoperform_read_keys_hostgroup,omitempty"` - - /* - Users allowed to create keytab - - */ - IpaallowedtoperformWriteKeysUser string `json:"ipaallowedtoperform_write_keys_user,omitempty"` - - /* - Groups allowed to create keytab - - */ - IpaallowedtoperformWriteKeysGroup string `json:"ipaallowedtoperform_write_keys_group,omitempty"` - - /* - Hosts allowed to create keytab - - */ - IpaallowedtoperformWriteKeysHost string `json:"ipaallowedtoperform_write_keys_host,omitempty"` - - /* - Host Groups allowed to create keytab - - */ - IpaallowedtoperformWriteKeysHostgroup string `json:"ipaallowedtoperform_write_keys_hostgroup,omitempty"` -} - -func (t *Host) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Host[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Host%v", string(b)) -} - -type jsonHost struct { - Fqdn interface{} `json:"fqdn"` - - Description interface{} `json:"description"` - - L interface{} `json:"l"` - - Nshostlocation interface{} `json:"nshostlocation"` - - Nshardwareplatform interface{} `json:"nshardwareplatform"` - - Nsosversion interface{} `json:"nsosversion"` - - Userpassword interface{} `json:"userpassword"` - - Random interface{} `json:"random"` - - Randompassword interface{} `json:"randompassword"` - - Usercertificate interface{} `json:"usercertificate"` - - Subject interface{} `json:"subject"` - - SerialNumber interface{} `json:"serial_number"` - - SerialNumberHex interface{} `json:"serial_number_hex"` - - Issuer interface{} `json:"issuer"` - - ValidNotBefore interface{} `json:"valid_not_before"` - - ValidNotAfter interface{} `json:"valid_not_after"` - - Md5Fingerprint interface{} `json:"md5_fingerprint"` - - Sha1Fingerprint interface{} `json:"sha1_fingerprint"` - - RevocationReason interface{} `json:"revocation_reason"` - - Krbcanonicalname interface{} `json:"krbcanonicalname"` - - Krbprincipalname interface{} `json:"krbprincipalname"` - - Macaddress interface{} `json:"macaddress"` - - Ipasshpubkey interface{} `json:"ipasshpubkey"` - - Sshpubkeyfp interface{} `json:"sshpubkeyfp"` - - Userclass interface{} `json:"userclass"` - - Ipaassignedidview interface{} `json:"ipaassignedidview"` - - Krbprincipalauthind interface{} `json:"krbprincipalauthind"` - - Ipakrbrequirespreauth interface{} `json:"ipakrbrequirespreauth"` - - Ipakrbokasdelegate interface{} `json:"ipakrbokasdelegate"` - - Ipakrboktoauthasdelegate interface{} `json:"ipakrboktoauthasdelegate"` - - HasPassword interface{} `json:"has_password"` - - MemberofHostgroup interface{} `json:"memberof_hostgroup"` - - MemberofRole interface{} `json:"memberof_role"` - - MemberofNetgroup interface{} `json:"memberof_netgroup"` - - MemberofSudorule interface{} `json:"memberof_sudorule"` - - MemberofHbacrule interface{} `json:"memberof_hbacrule"` - - MemberofindirectNetgroup interface{} `json:"memberofindirect_netgroup"` - - MemberofindirectHostgroup interface{} `json:"memberofindirect_hostgroup"` - - MemberofindirectRole interface{} `json:"memberofindirect_role"` - - MemberofindirectSudorule interface{} `json:"memberofindirect_sudorule"` - - MemberofindirectHbacrule interface{} `json:"memberofindirect_hbacrule"` - - HasKeytab interface{} `json:"has_keytab"` - - ManagedbyHost interface{} `json:"managedby_host"` - - ManagingHost interface{} `json:"managing_host"` - - IpaallowedtoperformReadKeysUser interface{} `json:"ipaallowedtoperform_read_keys_user"` - - IpaallowedtoperformReadKeysGroup interface{} `json:"ipaallowedtoperform_read_keys_group"` - - IpaallowedtoperformReadKeysHost interface{} `json:"ipaallowedtoperform_read_keys_host"` - - IpaallowedtoperformReadKeysHostgroup interface{} `json:"ipaallowedtoperform_read_keys_hostgroup"` - - IpaallowedtoperformWriteKeysUser interface{} `json:"ipaallowedtoperform_write_keys_user"` - - IpaallowedtoperformWriteKeysGroup interface{} `json:"ipaallowedtoperform_write_keys_group"` - - IpaallowedtoperformWriteKeysHost interface{} `json:"ipaallowedtoperform_write_keys_host"` - - IpaallowedtoperformWriteKeysHostgroup interface{} `json:"ipaallowedtoperform_write_keys_hostgroup"` -} - -func (out *Host) UnmarshalJSON(data []byte) error { - var in jsonHost - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Fqdn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Fqdn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Fqdn: %v; expected exactly one element", raw) - } - out.Fqdn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Fqdn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Description != nil { - raw := in.Description - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Description = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Description = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.L != nil { - raw := in.L - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.L = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.L = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field L: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field L: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Nshostlocation != nil { - raw := in.Nshostlocation - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Nshostlocation = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Nshostlocation = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Nshostlocation: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Nshostlocation: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Nshardwareplatform != nil { - raw := in.Nshardwareplatform - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Nshardwareplatform = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Nshardwareplatform = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Nshardwareplatform: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Nshardwareplatform: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Nsosversion != nil { - raw := in.Nsosversion - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Nsosversion = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Nsosversion = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Nsosversion: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Nsosversion: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Userpassword != nil { - raw := in.Userpassword - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Userpassword = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Userpassword = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Userpassword: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Userpassword: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Random != nil { - raw := in.Random - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Random = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Random = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Random: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Random: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Randompassword != nil { - raw := in.Randompassword - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Randompassword = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Randompassword = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Randompassword: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Randompassword: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Usercertificate != nil { - raw := in.Usercertificate - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Usercertificate = &[]string{plainV} - } else if sliceOk { - - out.Usercertificate = &sliceV - } else { - return fmt.Errorf("unexpected value for field Usercertificate: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Subject - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Subject = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Subject: %v; expected exactly one element", raw) - } - out.Subject = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Subject: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.SerialNumber - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.SerialNumber = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field SerialNumber: %v; expected exactly one element", raw) - } - out.SerialNumber = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field SerialNumber: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.SerialNumberHex - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.SerialNumberHex = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field SerialNumberHex: %v; expected exactly one element", raw) - } - out.SerialNumberHex = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field SerialNumberHex: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Issuer - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Issuer = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Issuer: %v; expected exactly one element", raw) - } - out.Issuer = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Issuer: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.ValidNotBefore - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.ValidNotBefore = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field ValidNotBefore: %v; expected exactly one element", raw) - } - out.ValidNotBefore = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field ValidNotBefore: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.ValidNotAfter - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.ValidNotAfter = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field ValidNotAfter: %v; expected exactly one element", raw) - } - out.ValidNotAfter = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field ValidNotAfter: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Md5Fingerprint - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Md5Fingerprint = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Md5Fingerprint: %v; expected exactly one element", raw) - } - out.Md5Fingerprint = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Md5Fingerprint: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Sha1Fingerprint - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Sha1Fingerprint = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Sha1Fingerprint: %v; expected exactly one element", raw) - } - out.Sha1Fingerprint = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Sha1Fingerprint: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.RevocationReason != nil { - raw := in.RevocationReason - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.RevocationReason = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.RevocationReason = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field RevocationReason: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field RevocationReason: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Krbcanonicalname != nil { - raw := in.Krbcanonicalname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Krbcanonicalname = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Krbcanonicalname = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Krbcanonicalname: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Krbcanonicalname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Krbprincipalname != nil { - raw := in.Krbprincipalname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Krbprincipalname = &[]string{plainV} - } else if sliceOk { - - out.Krbprincipalname = &sliceV - } else { - return fmt.Errorf("unexpected value for field Krbprincipalname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Macaddress != nil { - raw := in.Macaddress - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Macaddress = &[]string{plainV} - } else if sliceOk { - - out.Macaddress = &sliceV - } else { - return fmt.Errorf("unexpected value for field Macaddress: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipasshpubkey != nil { - raw := in.Ipasshpubkey - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipasshpubkey = &[]string{plainV} - } else if sliceOk { - - out.Ipasshpubkey = &sliceV - } else { - return fmt.Errorf("unexpected value for field Ipasshpubkey: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Sshpubkeyfp != nil { - raw := in.Sshpubkeyfp - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Sshpubkeyfp = &[]string{plainV} - } else if sliceOk { - - out.Sshpubkeyfp = &sliceV - } else { - return fmt.Errorf("unexpected value for field Sshpubkeyfp: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Userclass != nil { - raw := in.Userclass - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Userclass = &[]string{plainV} - } else if sliceOk { - - out.Userclass = &sliceV - } else { - return fmt.Errorf("unexpected value for field Userclass: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipaassignedidview != nil { - raw := in.Ipaassignedidview - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipaassignedidview = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipaassignedidview = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipaassignedidview: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipaassignedidview: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Krbprincipalauthind != nil { - raw := in.Krbprincipalauthind - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Krbprincipalauthind = &[]string{plainV} - } else if sliceOk { - - out.Krbprincipalauthind = &sliceV - } else { - return fmt.Errorf("unexpected value for field Krbprincipalauthind: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipakrbrequirespreauth != nil { - raw := in.Ipakrbrequirespreauth - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipakrbrequirespreauth = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipakrbrequirespreauth = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipakrbrequirespreauth: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipakrbrequirespreauth: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipakrbokasdelegate != nil { - raw := in.Ipakrbokasdelegate - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipakrbokasdelegate = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipakrbokasdelegate = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipakrbokasdelegate: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipakrbokasdelegate: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipakrboktoauthasdelegate != nil { - raw := in.Ipakrboktoauthasdelegate - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipakrboktoauthasdelegate = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipakrboktoauthasdelegate = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipakrboktoauthasdelegate: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipakrboktoauthasdelegate: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.HasPassword != nil { - raw := in.HasPassword - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.HasPassword = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.HasPassword = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field HasPassword: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field HasPassword: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofHostgroup != nil { - raw := in.MemberofHostgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofHostgroup = &[]string{plainV} - } else if sliceOk { - - out.MemberofHostgroup = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberofHostgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofRole != nil { - raw := in.MemberofRole - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofRole = &[]string{plainV} - } else if sliceOk { - - out.MemberofRole = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberofRole: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofNetgroup != nil { - raw := in.MemberofNetgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofNetgroup = &[]string{plainV} - } else if sliceOk { - - out.MemberofNetgroup = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberofNetgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofSudorule != nil { - raw := in.MemberofSudorule - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofSudorule = &[]string{plainV} - } else if sliceOk { - - out.MemberofSudorule = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberofSudorule: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofHbacrule != nil { - raw := in.MemberofHbacrule - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofHbacrule = &[]string{plainV} - } else if sliceOk { - - out.MemberofHbacrule = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberofHbacrule: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofindirectNetgroup != nil { - raw := in.MemberofindirectNetgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofindirectNetgroup = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberofindirectNetgroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberofindirectNetgroup: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberofindirectNetgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofindirectHostgroup != nil { - raw := in.MemberofindirectHostgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofindirectHostgroup = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberofindirectHostgroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberofindirectHostgroup: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberofindirectHostgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofindirectRole != nil { - raw := in.MemberofindirectRole - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofindirectRole = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberofindirectRole = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberofindirectRole: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberofindirectRole: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofindirectSudorule != nil { - raw := in.MemberofindirectSudorule - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofindirectSudorule = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberofindirectSudorule = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberofindirectSudorule: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberofindirectSudorule: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofindirectHbacrule != nil { - raw := in.MemberofindirectHbacrule - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofindirectHbacrule = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberofindirectHbacrule = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberofindirectHbacrule: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberofindirectHbacrule: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.HasKeytab != nil { - raw := in.HasKeytab - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.HasKeytab = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.HasKeytab = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field HasKeytab: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field HasKeytab: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.ManagedbyHost - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.ManagedbyHost = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field ManagedbyHost: %v; expected exactly one element", raw) - } - out.ManagedbyHost = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field ManagedbyHost: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.ManagingHost - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.ManagingHost = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field ManagingHost: %v; expected exactly one element", raw) - } - out.ManagingHost = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field ManagingHost: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.IpaallowedtoperformReadKeysUser - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.IpaallowedtoperformReadKeysUser = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field IpaallowedtoperformReadKeysUser: %v; expected exactly one element", raw) - } - out.IpaallowedtoperformReadKeysUser = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field IpaallowedtoperformReadKeysUser: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.IpaallowedtoperformReadKeysGroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.IpaallowedtoperformReadKeysGroup = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field IpaallowedtoperformReadKeysGroup: %v; expected exactly one element", raw) - } - out.IpaallowedtoperformReadKeysGroup = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field IpaallowedtoperformReadKeysGroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.IpaallowedtoperformReadKeysHost - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.IpaallowedtoperformReadKeysHost = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field IpaallowedtoperformReadKeysHost: %v; expected exactly one element", raw) - } - out.IpaallowedtoperformReadKeysHost = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field IpaallowedtoperformReadKeysHost: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.IpaallowedtoperformReadKeysHostgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.IpaallowedtoperformReadKeysHostgroup = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field IpaallowedtoperformReadKeysHostgroup: %v; expected exactly one element", raw) - } - out.IpaallowedtoperformReadKeysHostgroup = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field IpaallowedtoperformReadKeysHostgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.IpaallowedtoperformWriteKeysUser - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.IpaallowedtoperformWriteKeysUser = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field IpaallowedtoperformWriteKeysUser: %v; expected exactly one element", raw) - } - out.IpaallowedtoperformWriteKeysUser = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field IpaallowedtoperformWriteKeysUser: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.IpaallowedtoperformWriteKeysGroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.IpaallowedtoperformWriteKeysGroup = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field IpaallowedtoperformWriteKeysGroup: %v; expected exactly one element", raw) - } - out.IpaallowedtoperformWriteKeysGroup = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field IpaallowedtoperformWriteKeysGroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.IpaallowedtoperformWriteKeysHost - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.IpaallowedtoperformWriteKeysHost = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field IpaallowedtoperformWriteKeysHost: %v; expected exactly one element", raw) - } - out.IpaallowedtoperformWriteKeysHost = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field IpaallowedtoperformWriteKeysHost: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.IpaallowedtoperformWriteKeysHostgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.IpaallowedtoperformWriteKeysHostgroup = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field IpaallowedtoperformWriteKeysHostgroup: %v; expected exactly one element", raw) - } - out.IpaallowedtoperformWriteKeysHostgroup = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field IpaallowedtoperformWriteKeysHostgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Hostgroup struct { - - /* - Host-group - Name of host-group - */ - Cn string `json:"cn,omitempty"` - - /* - Description - A description of this host-group - */ - Description *string `json:"description,omitempty"` - - /* - Member hosts - - */ - MemberHost *[]string `json:"member_host,omitempty"` - - /* - Member host-groups - - */ - MemberHostgroup *[]string `json:"member_hostgroup,omitempty"` - - /* - Member of host-groups - - */ - MemberofHostgroup *[]string `json:"memberof_hostgroup,omitempty"` - - /* - Member of netgroups - - */ - MemberofNetgroup *[]string `json:"memberof_netgroup,omitempty"` - - /* - Member of Sudo rule - - */ - MemberofSudorule *[]string `json:"memberof_sudorule,omitempty"` - - /* - Member of HBAC rule - - */ - MemberofHbacrule *[]string `json:"memberof_hbacrule,omitempty"` - - /* - Indirect Member hosts - - */ - MemberindirectHost *string `json:"memberindirect_host,omitempty"` - - /* - Indirect Member host-groups - - */ - MemberindirectHostgroup *string `json:"memberindirect_hostgroup,omitempty"` - - /* - Indirect Member of host-group - - */ - MemberofindirectHostgroup *string `json:"memberofindirect_hostgroup,omitempty"` - - /* - Indirect Member of Sudo rule - - */ - MemberofindirectSudorule *string `json:"memberofindirect_sudorule,omitempty"` - - /* - Indirect Member of HBAC rule - - */ - MemberofindirectHbacrule *string `json:"memberofindirect_hbacrule,omitempty"` -} - -func (t *Hostgroup) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Hostgroup[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Hostgroup%v", string(b)) -} - -type jsonHostgroup struct { - Cn interface{} `json:"cn"` - - Description interface{} `json:"description"` - - MemberHost interface{} `json:"member_host"` - - MemberHostgroup interface{} `json:"member_hostgroup"` - - MemberofHostgroup interface{} `json:"memberof_hostgroup"` - - MemberofNetgroup interface{} `json:"memberof_netgroup"` - - MemberofSudorule interface{} `json:"memberof_sudorule"` - - MemberofHbacrule interface{} `json:"memberof_hbacrule"` - - MemberindirectHost interface{} `json:"memberindirect_host"` - - MemberindirectHostgroup interface{} `json:"memberindirect_hostgroup"` - - MemberofindirectHostgroup interface{} `json:"memberofindirect_hostgroup"` - - MemberofindirectSudorule interface{} `json:"memberofindirect_sudorule"` - - MemberofindirectHbacrule interface{} `json:"memberofindirect_hbacrule"` -} - -func (out *Hostgroup) UnmarshalJSON(data []byte) error { - var in jsonHostgroup - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Cn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) - } - out.Cn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Description != nil { - raw := in.Description - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Description = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Description = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberHost != nil { - raw := in.MemberHost - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberHost = &[]string{plainV} - } else if sliceOk { - - out.MemberHost = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberHost: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberHostgroup != nil { - raw := in.MemberHostgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberHostgroup = &[]string{plainV} - } else if sliceOk { - - out.MemberHostgroup = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberHostgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofHostgroup != nil { - raw := in.MemberofHostgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofHostgroup = &[]string{plainV} - } else if sliceOk { - - out.MemberofHostgroup = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberofHostgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofNetgroup != nil { - raw := in.MemberofNetgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofNetgroup = &[]string{plainV} - } else if sliceOk { - - out.MemberofNetgroup = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberofNetgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofSudorule != nil { - raw := in.MemberofSudorule - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofSudorule = &[]string{plainV} - } else if sliceOk { - - out.MemberofSudorule = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberofSudorule: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofHbacrule != nil { - raw := in.MemberofHbacrule - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofHbacrule = &[]string{plainV} - } else if sliceOk { - - out.MemberofHbacrule = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberofHbacrule: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberindirectHost != nil { - raw := in.MemberindirectHost - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberindirectHost = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberindirectHost = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberindirectHost: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberindirectHost: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberindirectHostgroup != nil { - raw := in.MemberindirectHostgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberindirectHostgroup = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberindirectHostgroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberindirectHostgroup: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberindirectHostgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofindirectHostgroup != nil { - raw := in.MemberofindirectHostgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofindirectHostgroup = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberofindirectHostgroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberofindirectHostgroup: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberofindirectHostgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofindirectSudorule != nil { - raw := in.MemberofindirectSudorule - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofindirectSudorule = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberofindirectSudorule = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberofindirectSudorule: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberofindirectSudorule: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofindirectHbacrule != nil { - raw := in.MemberofindirectHbacrule - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofindirectHbacrule = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberofindirectHbacrule = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberofindirectHbacrule: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberofindirectHbacrule: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Idoverridegroup struct { - - /* - Anchor to override - - */ - Ipaanchoruuid string `json:"ipaanchoruuid,omitempty"` - - /* - Description - - */ - Description *string `json:"description,omitempty"` - - /* - Group name - - */ - Cn *string `json:"cn,omitempty"` - - /* - GID - Group ID Number - */ - Gidnumber *int `json:"gidnumber,omitempty"` -} - -func (t *Idoverridegroup) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Idoverridegroup[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Idoverridegroup%v", string(b)) -} - -type jsonIdoverridegroup struct { - Ipaanchoruuid interface{} `json:"ipaanchoruuid"` - - Description interface{} `json:"description"` - - Cn interface{} `json:"cn"` - - Gidnumber interface{} `json:"gidnumber"` -} - -func (out *Idoverridegroup) UnmarshalJSON(data []byte) error { - var in jsonIdoverridegroup - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Ipaanchoruuid - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipaanchoruuid = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipaanchoruuid: %v; expected exactly one element", raw) - } - out.Ipaanchoruuid = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipaanchoruuid: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Description != nil { - raw := in.Description - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Description = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Description = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Cn != nil { - raw := in.Cn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cn = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Cn = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Cn: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Gidnumber != nil { - raw := in.Gidnumber - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Gidnumber: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Gidnumber = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Gidnumber = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Gidnumber: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Gidnumber: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Idoverrideuser struct { - - /* - Anchor to override - - */ - Ipaanchoruuid string `json:"ipaanchoruuid,omitempty"` - - /* - Description - - */ - Description *string `json:"description,omitempty"` - - /* - User login - - */ - UID *string `json:"uid,omitempty"` - - /* - UID - User ID Number - */ - Uidnumber *int `json:"uidnumber,omitempty"` - - /* - GECOS - - */ - Gecos *string `json:"gecos,omitempty"` - - /* - GID - Group ID Number - */ - Gidnumber *int `json:"gidnumber,omitempty"` - - /* - Home directory - - */ - Homedirectory *string `json:"homedirectory,omitempty"` - - /* - Login shell - - */ - Loginshell *string `json:"loginshell,omitempty"` - - /* - - - */ - Ipaoriginaluid *string `json:"ipaoriginaluid,omitempty"` - - /* - SSH public key - - */ - Ipasshpubkey *[]string `json:"ipasshpubkey,omitempty"` - - /* - Certificate - Base-64 encoded user certificate - */ - Usercertificate *[]string `json:"usercertificate,omitempty"` -} - -func (t *Idoverrideuser) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Idoverrideuser[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Idoverrideuser%v", string(b)) -} - -type jsonIdoverrideuser struct { - Ipaanchoruuid interface{} `json:"ipaanchoruuid"` - - Description interface{} `json:"description"` - - UID interface{} `json:"uid"` - - Uidnumber interface{} `json:"uidnumber"` - - Gecos interface{} `json:"gecos"` - - Gidnumber interface{} `json:"gidnumber"` - - Homedirectory interface{} `json:"homedirectory"` - - Loginshell interface{} `json:"loginshell"` - - Ipaoriginaluid interface{} `json:"ipaoriginaluid"` - - Ipasshpubkey interface{} `json:"ipasshpubkey"` - - Usercertificate interface{} `json:"usercertificate"` -} - -func (out *Idoverrideuser) UnmarshalJSON(data []byte) error { - var in jsonIdoverrideuser - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Ipaanchoruuid - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipaanchoruuid = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipaanchoruuid: %v; expected exactly one element", raw) - } - out.Ipaanchoruuid = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipaanchoruuid: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Description != nil { - raw := in.Description - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Description = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Description = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.UID != nil { - raw := in.UID - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.UID = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.UID = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field UID: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field UID: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Uidnumber != nil { - raw := in.Uidnumber - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Uidnumber: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Uidnumber = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Uidnumber = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Uidnumber: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Uidnumber: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Gecos != nil { - raw := in.Gecos - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Gecos = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Gecos = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Gecos: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Gecos: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Gidnumber != nil { - raw := in.Gidnumber - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Gidnumber: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Gidnumber = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Gidnumber = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Gidnumber: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Gidnumber: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Homedirectory != nil { - raw := in.Homedirectory - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Homedirectory = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Homedirectory = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Homedirectory: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Homedirectory: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Loginshell != nil { - raw := in.Loginshell - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Loginshell = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Loginshell = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Loginshell: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Loginshell: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipaoriginaluid != nil { - raw := in.Ipaoriginaluid - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipaoriginaluid = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipaoriginaluid = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipaoriginaluid: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipaoriginaluid: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipasshpubkey != nil { - raw := in.Ipasshpubkey - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipasshpubkey = &[]string{plainV} - } else if sliceOk { - - out.Ipasshpubkey = &sliceV - } else { - return fmt.Errorf("unexpected value for field Ipasshpubkey: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Usercertificate != nil { - raw := in.Usercertificate - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Usercertificate = &[]string{plainV} - } else if sliceOk { - - out.Usercertificate = &sliceV - } else { - return fmt.Errorf("unexpected value for field Usercertificate: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Idrange struct { - - /* - Range name - - */ - Cn string `json:"cn,omitempty"` - - /* - First Posix ID of the range - - */ - Ipabaseid int `json:"ipabaseid,omitempty"` - - /* - Number of IDs in the range - - */ - Ipaidrangesize int `json:"ipaidrangesize,omitempty"` - - /* - First RID of the corresponding RID range - - */ - Ipabaserid *int `json:"ipabaserid,omitempty"` - - /* - First RID of the secondary RID range - - */ - Ipasecondarybaserid *int `json:"ipasecondarybaserid,omitempty"` - - /* - Domain SID of the trusted domain - - */ - Ipanttrusteddomainsid *string `json:"ipanttrusteddomainsid,omitempty"` - - /* - Name of the trusted domain - - */ - Ipanttrusteddomainname *string `json:"ipanttrusteddomainname,omitempty"` - - /* - Range type - ID range type, one of ipa-ad-trust-posix, ipa-ad-trust, ipa-local - */ - Iparangetype *string `json:"iparangetype,omitempty"` -} - -func (t *Idrange) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Idrange[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Idrange%v", string(b)) -} - -type jsonIdrange struct { - Cn interface{} `json:"cn"` - - Ipabaseid interface{} `json:"ipabaseid"` - - Ipaidrangesize interface{} `json:"ipaidrangesize"` - - Ipabaserid interface{} `json:"ipabaserid"` - - Ipasecondarybaserid interface{} `json:"ipasecondarybaserid"` - - Ipanttrusteddomainsid interface{} `json:"ipanttrusteddomainsid"` - - Ipanttrusteddomainname interface{} `json:"ipanttrusteddomainname"` - - Iparangetype interface{} `json:"iparangetype"` -} - -func (out *Idrange) UnmarshalJSON(data []byte) error { - var in jsonIdrange - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Cn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) - } - out.Cn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Ipabaseid - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Ipabaseid: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Ipabaseid = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipabaseid: %v; expected exactly one element", raw) - } - out.Ipabaseid = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipabaseid: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Ipaidrangesize - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Ipaidrangesize: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Ipaidrangesize = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipaidrangesize: %v; expected exactly one element", raw) - } - out.Ipaidrangesize = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipaidrangesize: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipabaserid != nil { - raw := in.Ipabaserid - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Ipabaserid: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Ipabaserid = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipabaserid = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipabaserid: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipabaserid: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipasecondarybaserid != nil { - raw := in.Ipasecondarybaserid - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Ipasecondarybaserid: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Ipasecondarybaserid = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipasecondarybaserid = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipasecondarybaserid: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipasecondarybaserid: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipanttrusteddomainsid != nil { - raw := in.Ipanttrusteddomainsid - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipanttrusteddomainsid = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipanttrusteddomainsid = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipanttrusteddomainsid: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipanttrusteddomainsid: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipanttrusteddomainname != nil { - raw := in.Ipanttrusteddomainname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipanttrusteddomainname = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipanttrusteddomainname = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipanttrusteddomainname: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipanttrusteddomainname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Iparangetype != nil { - raw := in.Iparangetype - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Iparangetype = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Iparangetype = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Iparangetype: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Iparangetype: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Idview struct { - - /* - ID View Name - - */ - Cn string `json:"cn,omitempty"` - - /* - Description - - */ - Description *string `json:"description,omitempty"` - - /* - User object overrides - - */ - Useroverrides string `json:"useroverrides,omitempty"` - - /* - Group object overrides - - */ - Groupoverrides string `json:"groupoverrides,omitempty"` - - /* - Hosts the view applies to - - */ - Appliedtohosts string `json:"appliedtohosts,omitempty"` -} - -func (t *Idview) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Idview[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Idview%v", string(b)) -} - -type jsonIdview struct { - Cn interface{} `json:"cn"` - - Description interface{} `json:"description"` - - Useroverrides interface{} `json:"useroverrides"` - - Groupoverrides interface{} `json:"groupoverrides"` - - Appliedtohosts interface{} `json:"appliedtohosts"` -} - -func (out *Idview) UnmarshalJSON(data []byte) error { - var in jsonIdview - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Cn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) - } - out.Cn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Description != nil { - raw := in.Description - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Description = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Description = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Useroverrides - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Useroverrides = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Useroverrides: %v; expected exactly one element", raw) - } - out.Useroverrides = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Useroverrides: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Groupoverrides - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Groupoverrides = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Groupoverrides: %v; expected exactly one element", raw) - } - out.Groupoverrides = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Groupoverrides: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Appliedtohosts - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Appliedtohosts = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Appliedtohosts: %v; expected exactly one element", raw) - } - out.Appliedtohosts = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Appliedtohosts: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Krbtpolicy struct { - - /* - User name - Manage ticket policy for specific user - */ - UID *string `json:"uid,omitempty"` - - /* - Max life - Maximum ticket life (seconds) - */ - Krbmaxticketlife *int `json:"krbmaxticketlife,omitempty"` - - /* - Max renew - Maximum renewable age (seconds) - */ - Krbmaxrenewableage *int `json:"krbmaxrenewableage,omitempty"` -} - -func (t *Krbtpolicy) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Krbtpolicy[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Krbtpolicy%v", string(b)) -} - -type jsonKrbtpolicy struct { - UID interface{} `json:"uid"` - - Krbmaxticketlife interface{} `json:"krbmaxticketlife"` - - Krbmaxrenewableage interface{} `json:"krbmaxrenewableage"` -} - -func (out *Krbtpolicy) UnmarshalJSON(data []byte) error { - var in jsonKrbtpolicy - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if in.UID != nil { - raw := in.UID - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.UID = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.UID = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field UID: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field UID: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Krbmaxticketlife != nil { - raw := in.Krbmaxticketlife - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Krbmaxticketlife: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Krbmaxticketlife = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Krbmaxticketlife = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Krbmaxticketlife: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Krbmaxticketlife: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Krbmaxrenewableage != nil { - raw := in.Krbmaxrenewableage - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Krbmaxrenewableage: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Krbmaxrenewableage = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Krbmaxrenewableage = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Krbmaxrenewableage: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Krbmaxrenewableage: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Location struct { - - /* - Location name - IPA location name - */ - Idnsname string `json:"idnsname,omitempty"` - - /* - Description - IPA Location description - */ - Description *string `json:"description,omitempty"` - - /* - Servers - Servers that belongs to the IPA location - */ - ServersServer *[]string `json:"servers_server,omitempty"` - - /* - Advertised by servers - List of servers which advertise the given location - */ - DNSServer *[]string `json:"dns_server,omitempty"` -} - -func (t *Location) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Location[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Location%v", string(b)) -} - -type jsonLocation struct { - Idnsname interface{} `json:"idnsname"` - - Description interface{} `json:"description"` - - ServersServer interface{} `json:"servers_server"` - - DNSServer interface{} `json:"dns_server"` -} - -func (out *Location) UnmarshalJSON(data []byte) error { - var in jsonLocation - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Idnsname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Idnsname = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Idnsname: %v; expected exactly one element", raw) - } - out.Idnsname = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Idnsname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Description != nil { - raw := in.Description - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Description = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Description = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.ServersServer != nil { - raw := in.ServersServer - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.ServersServer = &[]string{plainV} - } else if sliceOk { - - out.ServersServer = &sliceV - } else { - return fmt.Errorf("unexpected value for field ServersServer: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.DNSServer != nil { - raw := in.DNSServer - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.DNSServer = &[]string{plainV} - } else if sliceOk { - - out.DNSServer = &sliceV - } else { - return fmt.Errorf("unexpected value for field DNSServer: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Metaobject struct { - - /* - Name - - */ - Name string `json:"name,omitempty"` - - /* - Version - - */ - Version string `json:"version,omitempty"` - - /* - Full name - - */ - FullName string `json:"full_name,omitempty"` - - /* - Documentation - - */ - Doc *string `json:"doc,omitempty"` - - /* - Exclude from - - */ - Exclude *[]string `json:"exclude,omitempty"` - - /* - Include in - - */ - Include *[]string `json:"include,omitempty"` - - /* - Help topic - - */ - TopicTopic *string `json:"topic_topic,omitempty"` - - /* - Parameters - - */ - ParamsParam *[]string `json:"params_param,omitempty"` -} - -func (t *Metaobject) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Metaobject[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Metaobject%v", string(b)) -} - -type jsonMetaobject struct { - Name interface{} `json:"name"` - - Version interface{} `json:"version"` - - FullName interface{} `json:"full_name"` - - Doc interface{} `json:"doc"` - - Exclude interface{} `json:"exclude"` - - Include interface{} `json:"include"` - - TopicTopic interface{} `json:"topic_topic"` - - ParamsParam interface{} `json:"params_param"` -} - -func (out *Metaobject) UnmarshalJSON(data []byte) error { - var in jsonMetaobject - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Name - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Name = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Name: %v; expected exactly one element", raw) - } - out.Name = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Name: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Version - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Version = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Version: %v; expected exactly one element", raw) - } - out.Version = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Version: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.FullName - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.FullName = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field FullName: %v; expected exactly one element", raw) - } - out.FullName = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field FullName: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Doc != nil { - raw := in.Doc - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Doc = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Doc = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Doc: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Doc: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Exclude != nil { - raw := in.Exclude - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Exclude = &[]string{plainV} - } else if sliceOk { - - out.Exclude = &sliceV - } else { - return fmt.Errorf("unexpected value for field Exclude: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Include != nil { - raw := in.Include - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Include = &[]string{plainV} - } else if sliceOk { - - out.Include = &sliceV - } else { - return fmt.Errorf("unexpected value for field Include: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.TopicTopic != nil { - raw := in.TopicTopic - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.TopicTopic = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.TopicTopic = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field TopicTopic: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field TopicTopic: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.ParamsParam != nil { - raw := in.ParamsParam - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.ParamsParam = &[]string{plainV} - } else if sliceOk { - - out.ParamsParam = &sliceV - } else { - return fmt.Errorf("unexpected value for field ParamsParam: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Netgroup struct { - - /* - Netgroup name - - */ - Cn string `json:"cn,omitempty"` - - /* - Description - Netgroup description - */ - Description *string `json:"description,omitempty"` - - /* - NIS domain name - - */ - Nisdomainname *string `json:"nisdomainname,omitempty"` - - /* - IPA unique ID - IPA unique ID - */ - Ipauniqueid *string `json:"ipauniqueid,omitempty"` - - /* - User category - User category the rule applies to - */ - Usercategory *string `json:"usercategory,omitempty"` - - /* - Host category - Host category the rule applies to - */ - Hostcategory *string `json:"hostcategory,omitempty"` - - /* - External host - - */ - Externalhost *[]string `json:"externalhost,omitempty"` - - /* - Member netgroups - - */ - MemberNetgroup *[]string `json:"member_netgroup,omitempty"` - - /* - Member of netgroups - - */ - MemberofNetgroup *[]string `json:"memberof_netgroup,omitempty"` - - /* - Indirect Member netgroups - - */ - MemberindirectNetgroup *string `json:"memberindirect_netgroup,omitempty"` - - /* - Member User - - */ - MemberuserUser *string `json:"memberuser_user,omitempty"` - - /* - Member Group - - */ - MemberuserGroup *string `json:"memberuser_group,omitempty"` - - /* - Member Host - - */ - MemberhostHost *string `json:"memberhost_host,omitempty"` - - /* - Member Hostgroup - - */ - MemberhostHostgroup *string `json:"memberhost_hostgroup,omitempty"` -} - -func (t *Netgroup) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Netgroup[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Netgroup%v", string(b)) -} - -type jsonNetgroup struct { - Cn interface{} `json:"cn"` - - Description interface{} `json:"description"` - - Nisdomainname interface{} `json:"nisdomainname"` - - Ipauniqueid interface{} `json:"ipauniqueid"` - - Usercategory interface{} `json:"usercategory"` - - Hostcategory interface{} `json:"hostcategory"` - - Externalhost interface{} `json:"externalhost"` - - MemberNetgroup interface{} `json:"member_netgroup"` - - MemberofNetgroup interface{} `json:"memberof_netgroup"` - - MemberindirectNetgroup interface{} `json:"memberindirect_netgroup"` - - MemberuserUser interface{} `json:"memberuser_user"` - - MemberuserGroup interface{} `json:"memberuser_group"` - - MemberhostHost interface{} `json:"memberhost_host"` - - MemberhostHostgroup interface{} `json:"memberhost_hostgroup"` -} - -func (out *Netgroup) UnmarshalJSON(data []byte) error { - var in jsonNetgroup - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Cn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) - } - out.Cn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Description != nil { - raw := in.Description - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Description = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Description = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Nisdomainname != nil { - raw := in.Nisdomainname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Nisdomainname = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Nisdomainname = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Nisdomainname: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Nisdomainname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipauniqueid != nil { - raw := in.Ipauniqueid - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipauniqueid = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipauniqueid = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipauniqueid: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipauniqueid: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Usercategory != nil { - raw := in.Usercategory - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Usercategory = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Usercategory = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Usercategory: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Usercategory: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Hostcategory != nil { - raw := in.Hostcategory - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Hostcategory = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Hostcategory = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Hostcategory: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Hostcategory: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Externalhost != nil { - raw := in.Externalhost - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Externalhost = &[]string{plainV} - } else if sliceOk { - - out.Externalhost = &sliceV - } else { - return fmt.Errorf("unexpected value for field Externalhost: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberNetgroup != nil { - raw := in.MemberNetgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberNetgroup = &[]string{plainV} - } else if sliceOk { - - out.MemberNetgroup = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberNetgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofNetgroup != nil { - raw := in.MemberofNetgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofNetgroup = &[]string{plainV} - } else if sliceOk { - - out.MemberofNetgroup = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberofNetgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberindirectNetgroup != nil { - raw := in.MemberindirectNetgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberindirectNetgroup = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberindirectNetgroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberindirectNetgroup: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberindirectNetgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberuserUser != nil { - raw := in.MemberuserUser - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberuserUser = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberuserUser = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberuserUser: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberuserUser: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberuserGroup != nil { - raw := in.MemberuserGroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberuserGroup = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberuserGroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberuserGroup: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberuserGroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberhostHost != nil { - raw := in.MemberhostHost - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberhostHost = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberhostHost = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberhostHost: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberhostHost: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberhostHostgroup != nil { - raw := in.MemberhostHostgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberhostHostgroup = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberhostHostgroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberhostHostgroup: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberhostHostgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Otpconfig struct { - - /* - TOTP authentication Window - TOTP authentication time variance (seconds) - */ - Ipatokentotpauthwindow int `json:"ipatokentotpauthwindow,omitempty"` - - /* - TOTP Synchronization Window - TOTP synchronization time variance (seconds) - */ - Ipatokentotpsyncwindow int `json:"ipatokentotpsyncwindow,omitempty"` - - /* - HOTP Authentication Window - HOTP authentication skip-ahead - */ - Ipatokenhotpauthwindow int `json:"ipatokenhotpauthwindow,omitempty"` - - /* - HOTP Synchronization Window - HOTP synchronization skip-ahead - */ - Ipatokenhotpsyncwindow int `json:"ipatokenhotpsyncwindow,omitempty"` -} - -func (t *Otpconfig) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Otpconfig[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Otpconfig%v", string(b)) -} - -type jsonOtpconfig struct { - Ipatokentotpauthwindow interface{} `json:"ipatokentotpauthwindow"` - - Ipatokentotpsyncwindow interface{} `json:"ipatokentotpsyncwindow"` - - Ipatokenhotpauthwindow interface{} `json:"ipatokenhotpauthwindow"` - - Ipatokenhotpsyncwindow interface{} `json:"ipatokenhotpsyncwindow"` -} - -func (out *Otpconfig) UnmarshalJSON(data []byte) error { - var in jsonOtpconfig - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Ipatokentotpauthwindow - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Ipatokentotpauthwindow: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Ipatokentotpauthwindow = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipatokentotpauthwindow: %v; expected exactly one element", raw) - } - out.Ipatokentotpauthwindow = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipatokentotpauthwindow: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Ipatokentotpsyncwindow - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Ipatokentotpsyncwindow: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Ipatokentotpsyncwindow = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipatokentotpsyncwindow: %v; expected exactly one element", raw) - } - out.Ipatokentotpsyncwindow = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipatokentotpsyncwindow: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Ipatokenhotpauthwindow - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Ipatokenhotpauthwindow: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Ipatokenhotpauthwindow = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipatokenhotpauthwindow: %v; expected exactly one element", raw) - } - out.Ipatokenhotpauthwindow = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipatokenhotpauthwindow: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Ipatokenhotpsyncwindow - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Ipatokenhotpsyncwindow: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Ipatokenhotpsyncwindow = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipatokenhotpsyncwindow: %v; expected exactly one element", raw) - } - out.Ipatokenhotpsyncwindow = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipatokenhotpsyncwindow: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Otptoken struct { - - /* - Unique ID - - */ - Ipatokenuniqueid string `json:"ipatokenuniqueid,omitempty"` - - /* - Type - Type of the token - */ - Type *string `json:"type,omitempty"` - - /* - Description - Token description (informational only) - */ - Description *string `json:"description,omitempty"` - - /* - Owner - Assigned user of the token (default: self) - */ - Ipatokenowner *string `json:"ipatokenowner,omitempty"` - - /* - Manager - Assigned manager of the token (default: self) - */ - ManagedbyUser *string `json:"managedby_user,omitempty"` - - /* - Disabled - Mark the token as disabled (default: false) - */ - Ipatokendisabled *bool `json:"ipatokendisabled,omitempty"` - - /* - Validity start - First date/time the token can be used - */ - Ipatokennotbefore *time.Time `json:"ipatokennotbefore,omitempty"` - - /* - Validity end - Last date/time the token can be used - */ - Ipatokennotafter *time.Time `json:"ipatokennotafter,omitempty"` - - /* - Vendor - Token vendor name (informational only) - */ - Ipatokenvendor *string `json:"ipatokenvendor,omitempty"` - - /* - Model - Token model (informational only) - */ - Ipatokenmodel *string `json:"ipatokenmodel,omitempty"` - - /* - Serial - Token serial (informational only) - */ - Ipatokenserial *string `json:"ipatokenserial,omitempty"` - - /* - Key - Token secret (Base32; default: random) - */ - Ipatokenotpkey *string `json:"ipatokenotpkey,omitempty"` - - /* - Algorithm - Token hash algorithm - */ - Ipatokenotpalgorithm *string `json:"ipatokenotpalgorithm,omitempty"` - - /* - Digits - Number of digits each token code will have - */ - Ipatokenotpdigits *int `json:"ipatokenotpdigits,omitempty"` - - /* - Clock offset - TOTP token / FreeIPA server time difference - */ - Ipatokentotpclockoffset *int `json:"ipatokentotpclockoffset,omitempty"` - - /* - Clock interval - Length of TOTP token code validity - */ - Ipatokentotptimestep *int `json:"ipatokentotptimestep,omitempty"` - - /* - Counter - Initial counter for the HOTP token - */ - Ipatokenhotpcounter *int `json:"ipatokenhotpcounter,omitempty"` - - /* - URI - - */ - URI *string `json:"uri,omitempty"` -} - -func (t *Otptoken) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Otptoken[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Otptoken%v", string(b)) -} - -type jsonOtptoken struct { - Ipatokenuniqueid interface{} `json:"ipatokenuniqueid"` - - Type interface{} `json:"type"` - - Description interface{} `json:"description"` - - Ipatokenowner interface{} `json:"ipatokenowner"` - - ManagedbyUser interface{} `json:"managedby_user"` - - Ipatokendisabled interface{} `json:"ipatokendisabled"` - - Ipatokennotbefore interface{} `json:"ipatokennotbefore"` - - Ipatokennotafter interface{} `json:"ipatokennotafter"` - - Ipatokenvendor interface{} `json:"ipatokenvendor"` - - Ipatokenmodel interface{} `json:"ipatokenmodel"` - - Ipatokenserial interface{} `json:"ipatokenserial"` - - Ipatokenotpkey interface{} `json:"ipatokenotpkey"` - - Ipatokenotpalgorithm interface{} `json:"ipatokenotpalgorithm"` - - Ipatokenotpdigits interface{} `json:"ipatokenotpdigits"` - - Ipatokentotpclockoffset interface{} `json:"ipatokentotpclockoffset"` - - Ipatokentotptimestep interface{} `json:"ipatokentotptimestep"` - - Ipatokenhotpcounter interface{} `json:"ipatokenhotpcounter"` - - URI interface{} `json:"uri"` -} - -func (out *Otptoken) UnmarshalJSON(data []byte) error { - var in jsonOtptoken - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Ipatokenuniqueid - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipatokenuniqueid = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipatokenuniqueid: %v; expected exactly one element", raw) - } - out.Ipatokenuniqueid = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipatokenuniqueid: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Type != nil { - raw := in.Type - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Type = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Type = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Type: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Type: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Description != nil { - raw := in.Description - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Description = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Description = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipatokenowner != nil { - raw := in.Ipatokenowner - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipatokenowner = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipatokenowner = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipatokenowner: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipatokenowner: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.ManagedbyUser != nil { - raw := in.ManagedbyUser - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.ManagedbyUser = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.ManagedbyUser = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field ManagedbyUser: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field ManagedbyUser: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipatokendisabled != nil { - raw := in.Ipatokendisabled - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipatokendisabled = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipatokendisabled = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipatokendisabled: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipatokendisabled: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipatokennotbefore != nil { - raw := in.Ipatokennotbefore - plainV, plainOk := raw.(time.Time) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []time.Time - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(time.Time) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipatokennotbefore = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipatokennotbefore = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipatokennotbefore: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipatokennotbefore: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipatokennotafter != nil { - raw := in.Ipatokennotafter - plainV, plainOk := raw.(time.Time) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []time.Time - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(time.Time) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipatokennotafter = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipatokennotafter = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipatokennotafter: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipatokennotafter: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipatokenvendor != nil { - raw := in.Ipatokenvendor - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipatokenvendor = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipatokenvendor = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipatokenvendor: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipatokenvendor: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipatokenmodel != nil { - raw := in.Ipatokenmodel - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipatokenmodel = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipatokenmodel = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipatokenmodel: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipatokenmodel: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipatokenserial != nil { - raw := in.Ipatokenserial - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipatokenserial = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipatokenserial = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipatokenserial: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipatokenserial: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipatokenotpkey != nil { - raw := in.Ipatokenotpkey - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipatokenotpkey = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipatokenotpkey = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipatokenotpkey: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipatokenotpkey: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipatokenotpalgorithm != nil { - raw := in.Ipatokenotpalgorithm - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipatokenotpalgorithm = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipatokenotpalgorithm = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipatokenotpalgorithm: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipatokenotpalgorithm: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipatokenotpdigits != nil { - raw := in.Ipatokenotpdigits - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Ipatokenotpdigits: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Ipatokenotpdigits = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipatokenotpdigits = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipatokenotpdigits: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipatokenotpdigits: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipatokentotpclockoffset != nil { - raw := in.Ipatokentotpclockoffset - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Ipatokentotpclockoffset: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Ipatokentotpclockoffset = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipatokentotpclockoffset = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipatokentotpclockoffset: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipatokentotpclockoffset: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipatokentotptimestep != nil { - raw := in.Ipatokentotptimestep - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Ipatokentotptimestep: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Ipatokentotptimestep = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipatokentotptimestep = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipatokentotptimestep: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipatokentotptimestep: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipatokenhotpcounter != nil { - raw := in.Ipatokenhotpcounter - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Ipatokenhotpcounter: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Ipatokenhotpcounter = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipatokenhotpcounter = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipatokenhotpcounter: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipatokenhotpcounter: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.URI != nil { - raw := in.URI - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.URI = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.URI = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field URI: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field URI: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Output struct { - - /* - Name - - */ - Name string `json:"name,omitempty"` - - /* - Documentation - - */ - Doc *string `json:"doc,omitempty"` - - /* - Exclude from - - */ - Exclude *[]string `json:"exclude,omitempty"` - - /* - Include in - - */ - Include *[]string `json:"include,omitempty"` - - /* - Type - - */ - Type *string `json:"type,omitempty"` - - /* - Required - - */ - Required *bool `json:"required,omitempty"` - - /* - Multi-value - - */ - Multivalue *bool `json:"multivalue,omitempty"` -} - -func (t *Output) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Output[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Output%v", string(b)) -} - -type jsonOutput struct { - Name interface{} `json:"name"` - - Doc interface{} `json:"doc"` - - Exclude interface{} `json:"exclude"` - - Include interface{} `json:"include"` - - Type interface{} `json:"type"` - - Required interface{} `json:"required"` - - Multivalue interface{} `json:"multivalue"` -} - -func (out *Output) UnmarshalJSON(data []byte) error { - var in jsonOutput - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Name - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Name = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Name: %v; expected exactly one element", raw) - } - out.Name = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Name: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Doc != nil { - raw := in.Doc - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Doc = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Doc = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Doc: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Doc: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Exclude != nil { - raw := in.Exclude - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Exclude = &[]string{plainV} - } else if sliceOk { - - out.Exclude = &sliceV - } else { - return fmt.Errorf("unexpected value for field Exclude: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Include != nil { - raw := in.Include - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Include = &[]string{plainV} - } else if sliceOk { - - out.Include = &sliceV - } else { - return fmt.Errorf("unexpected value for field Include: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Type != nil { - raw := in.Type - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Type = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Type = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Type: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Type: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Required != nil { - raw := in.Required - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Required = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Required = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Required: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Required: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Multivalue != nil { - raw := in.Multivalue - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Multivalue = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Multivalue = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Multivalue: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Multivalue: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Param struct { - - /* - Name - - */ - Name string `json:"name,omitempty"` - - /* - Documentation - - */ - Doc *string `json:"doc,omitempty"` - - /* - Exclude from - - */ - Exclude *[]string `json:"exclude,omitempty"` - - /* - Include in - - */ - Include *[]string `json:"include,omitempty"` - - /* - Type - - */ - Type *string `json:"type,omitempty"` - - /* - Required - - */ - Required *bool `json:"required,omitempty"` - - /* - Multi-value - - */ - Multivalue *bool `json:"multivalue,omitempty"` - - /* - Always ask - - */ - Alwaysask *bool `json:"alwaysask,omitempty"` - - /* - CLI metavar - - */ - CliMetavar *string `json:"cli_metavar,omitempty"` - - /* - CLI name - - */ - CliName *string `json:"cli_name,omitempty"` - - /* - Confirm (password) - - */ - Confirm *bool `json:"confirm,omitempty"` - - /* - Default - - */ - Default *[]string `json:"default,omitempty"` - - /* - Default from - - */ - DefaultFromParam *[]string `json:"default_from_param,omitempty"` - - /* - Label - - */ - Label *string `json:"label,omitempty"` - - /* - Convert on server - - */ - NoConvert *bool `json:"no_convert,omitempty"` - - /* - Option group - - */ - OptionGroup *string `json:"option_group,omitempty"` - - /* - Sensitive - - */ - Sensitive *bool `json:"sensitive,omitempty"` - - /* - Positional argument - - */ - Positional *bool `json:"positional,omitempty"` -} - -func (t *Param) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Param[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Param%v", string(b)) -} - -type jsonParam struct { - Name interface{} `json:"name"` - - Doc interface{} `json:"doc"` - - Exclude interface{} `json:"exclude"` - - Include interface{} `json:"include"` - - Type interface{} `json:"type"` - - Required interface{} `json:"required"` - - Multivalue interface{} `json:"multivalue"` - - Alwaysask interface{} `json:"alwaysask"` - - CliMetavar interface{} `json:"cli_metavar"` - - CliName interface{} `json:"cli_name"` - - Confirm interface{} `json:"confirm"` - - Default interface{} `json:"default"` - - DefaultFromParam interface{} `json:"default_from_param"` - - Label interface{} `json:"label"` - - NoConvert interface{} `json:"no_convert"` - - OptionGroup interface{} `json:"option_group"` - - Sensitive interface{} `json:"sensitive"` - - Positional interface{} `json:"positional"` -} - -func (out *Param) UnmarshalJSON(data []byte) error { - var in jsonParam - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Name - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Name = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Name: %v; expected exactly one element", raw) - } - out.Name = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Name: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Doc != nil { - raw := in.Doc - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Doc = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Doc = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Doc: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Doc: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Exclude != nil { - raw := in.Exclude - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Exclude = &[]string{plainV} - } else if sliceOk { - - out.Exclude = &sliceV - } else { - return fmt.Errorf("unexpected value for field Exclude: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Include != nil { - raw := in.Include - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Include = &[]string{plainV} - } else if sliceOk { - - out.Include = &sliceV - } else { - return fmt.Errorf("unexpected value for field Include: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Type != nil { - raw := in.Type - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Type = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Type = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Type: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Type: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Required != nil { - raw := in.Required - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Required = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Required = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Required: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Required: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Multivalue != nil { - raw := in.Multivalue - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Multivalue = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Multivalue = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Multivalue: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Multivalue: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Alwaysask != nil { - raw := in.Alwaysask - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Alwaysask = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Alwaysask = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Alwaysask: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Alwaysask: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.CliMetavar != nil { - raw := in.CliMetavar - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.CliMetavar = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.CliMetavar = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field CliMetavar: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field CliMetavar: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.CliName != nil { - raw := in.CliName - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.CliName = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.CliName = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field CliName: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field CliName: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Confirm != nil { - raw := in.Confirm - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Confirm = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Confirm = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Confirm: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Confirm: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Default != nil { - raw := in.Default - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Default = &[]string{plainV} - } else if sliceOk { - - out.Default = &sliceV - } else { - return fmt.Errorf("unexpected value for field Default: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.DefaultFromParam != nil { - raw := in.DefaultFromParam - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.DefaultFromParam = &[]string{plainV} - } else if sliceOk { - - out.DefaultFromParam = &sliceV - } else { - return fmt.Errorf("unexpected value for field DefaultFromParam: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Label != nil { - raw := in.Label - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Label = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Label = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Label: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Label: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.NoConvert != nil { - raw := in.NoConvert - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.NoConvert = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.NoConvert = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field NoConvert: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field NoConvert: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.OptionGroup != nil { - raw := in.OptionGroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.OptionGroup = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.OptionGroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field OptionGroup: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field OptionGroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Sensitive != nil { - raw := in.Sensitive - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Sensitive = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Sensitive = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Sensitive: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Sensitive: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Positional != nil { - raw := in.Positional - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Positional = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Positional = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Positional: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Positional: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Permission struct { - - /* - Permission name - - */ - Cn string `json:"cn,omitempty"` - - /* - Granted rights - Rights to grant (read, search, compare, write, add, delete, all) - */ - Ipapermright *[]string `json:"ipapermright,omitempty"` - - /* - Effective attributes - All attributes to which the permission applies - */ - Attrs *[]string `json:"attrs,omitempty"` - - /* - Included attributes - User-specified attributes to which the permission applies - */ - Ipapermincludedattr *[]string `json:"ipapermincludedattr,omitempty"` - - /* - Excluded attributes - User-specified attributes to which the permission explicitly does not apply - */ - Ipapermexcludedattr *[]string `json:"ipapermexcludedattr,omitempty"` - - /* - Default attributes - Attributes to which the permission applies by default - */ - Ipapermdefaultattr *[]string `json:"ipapermdefaultattr,omitempty"` - - /* - Bind rule type - Bind rule type - */ - Ipapermbindruletype string `json:"ipapermbindruletype,omitempty"` - - /* - Subtree - Subtree to apply permissions to - */ - Ipapermlocation *string `json:"ipapermlocation,omitempty"` - - /* - Extra target filter - Extra target filter - */ - Extratargetfilter *[]string `json:"extratargetfilter,omitempty"` - - /* - Raw target filter - All target filters, including those implied by type and memberof - */ - Ipapermtargetfilter *[]string `json:"ipapermtargetfilter,omitempty"` - - /* - Target DN - Optional DN to apply the permission to (must be in the subtree, but may not yet exist) - */ - Ipapermtarget *string `json:"ipapermtarget,omitempty"` - - /* - Target DN subtree - Optional DN subtree where an entry can be moved to (must be in the subtree, but may not yet exist) - */ - Ipapermtargetto *string `json:"ipapermtargetto,omitempty"` - - /* - Origin DN subtree - Optional DN subtree from where an entry can be moved (must be in the subtree, but may not yet exist) - */ - Ipapermtargetfrom *string `json:"ipapermtargetfrom,omitempty"` - - /* - Member of group - Target members of a group (sets memberOf targetfilter) - */ - Memberof *[]string `json:"memberof,omitempty"` - - /* - Target group - User group to apply permissions to (sets target) - */ - Targetgroup *string `json:"targetgroup,omitempty"` - - /* - Type - Type of IPA object (sets subtree and objectClass targetfilter) - */ - Type *string `json:"type,omitempty"` - - /* - - Deprecated; use extratargetfilter - */ - Filter *[]string `json:"filter,omitempty"` - - /* - - Deprecated; use ipapermlocation - */ - Subtree *[]string `json:"subtree,omitempty"` - - /* - - Deprecated; use ipapermright - */ - Permissions *[]string `json:"permissions,omitempty"` - - /* - Permission flags - - */ - Ipapermissiontype []string `json:"ipapermissiontype,omitempty"` - - /* - ACI - - */ - Aci string `json:"aci,omitempty"` - - /* - Granted to Privilege - - */ - MemberPrivilege *[]string `json:"member_privilege,omitempty"` - - /* - Indirect Member of roles - - */ - MemberindirectRole *string `json:"memberindirect_role,omitempty"` -} - -func (t *Permission) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Permission[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Permission%v", string(b)) -} - -type jsonPermission struct { - Cn interface{} `json:"cn"` - - Ipapermright interface{} `json:"ipapermright"` - - Attrs interface{} `json:"attrs"` - - Ipapermincludedattr interface{} `json:"ipapermincludedattr"` - - Ipapermexcludedattr interface{} `json:"ipapermexcludedattr"` - - Ipapermdefaultattr interface{} `json:"ipapermdefaultattr"` - - Ipapermbindruletype interface{} `json:"ipapermbindruletype"` - - Ipapermlocation interface{} `json:"ipapermlocation"` - - Extratargetfilter interface{} `json:"extratargetfilter"` - - Ipapermtargetfilter interface{} `json:"ipapermtargetfilter"` - - Ipapermtarget interface{} `json:"ipapermtarget"` - - Ipapermtargetto interface{} `json:"ipapermtargetto"` - - Ipapermtargetfrom interface{} `json:"ipapermtargetfrom"` - - Memberof interface{} `json:"memberof"` - - Targetgroup interface{} `json:"targetgroup"` - - Type interface{} `json:"type"` - - Filter interface{} `json:"filter"` - - Subtree interface{} `json:"subtree"` - - Permissions interface{} `json:"permissions"` - - Ipapermissiontype interface{} `json:"ipapermissiontype"` - - Aci interface{} `json:"aci"` - - MemberPrivilege interface{} `json:"member_privilege"` - - MemberindirectRole interface{} `json:"memberindirect_role"` -} - -func (out *Permission) UnmarshalJSON(data []byte) error { - var in jsonPermission - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Cn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) - } - out.Cn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipapermright != nil { - raw := in.Ipapermright - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipapermright = &[]string{plainV} - } else if sliceOk { - - out.Ipapermright = &sliceV - } else { - return fmt.Errorf("unexpected value for field Ipapermright: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Attrs != nil { - raw := in.Attrs - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Attrs = &[]string{plainV} - } else if sliceOk { - - out.Attrs = &sliceV - } else { - return fmt.Errorf("unexpected value for field Attrs: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipapermincludedattr != nil { - raw := in.Ipapermincludedattr - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipapermincludedattr = &[]string{plainV} - } else if sliceOk { - - out.Ipapermincludedattr = &sliceV - } else { - return fmt.Errorf("unexpected value for field Ipapermincludedattr: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipapermexcludedattr != nil { - raw := in.Ipapermexcludedattr - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipapermexcludedattr = &[]string{plainV} - } else if sliceOk { - - out.Ipapermexcludedattr = &sliceV - } else { - return fmt.Errorf("unexpected value for field Ipapermexcludedattr: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipapermdefaultattr != nil { - raw := in.Ipapermdefaultattr - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipapermdefaultattr = &[]string{plainV} - } else if sliceOk { - - out.Ipapermdefaultattr = &sliceV - } else { - return fmt.Errorf("unexpected value for field Ipapermdefaultattr: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Ipapermbindruletype - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipapermbindruletype = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipapermbindruletype: %v; expected exactly one element", raw) - } - out.Ipapermbindruletype = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipapermbindruletype: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipapermlocation != nil { - raw := in.Ipapermlocation - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipapermlocation = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipapermlocation = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipapermlocation: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipapermlocation: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Extratargetfilter != nil { - raw := in.Extratargetfilter - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Extratargetfilter = &[]string{plainV} - } else if sliceOk { - - out.Extratargetfilter = &sliceV - } else { - return fmt.Errorf("unexpected value for field Extratargetfilter: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipapermtargetfilter != nil { - raw := in.Ipapermtargetfilter - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipapermtargetfilter = &[]string{plainV} - } else if sliceOk { - - out.Ipapermtargetfilter = &sliceV - } else { - return fmt.Errorf("unexpected value for field Ipapermtargetfilter: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipapermtarget != nil { - raw := in.Ipapermtarget - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipapermtarget = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipapermtarget = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipapermtarget: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipapermtarget: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipapermtargetto != nil { - raw := in.Ipapermtargetto - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipapermtargetto = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipapermtargetto = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipapermtargetto: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipapermtargetto: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipapermtargetfrom != nil { - raw := in.Ipapermtargetfrom - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipapermtargetfrom = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipapermtargetfrom = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipapermtargetfrom: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipapermtargetfrom: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Memberof != nil { - raw := in.Memberof - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Memberof = &[]string{plainV} - } else if sliceOk { - - out.Memberof = &sliceV - } else { - return fmt.Errorf("unexpected value for field Memberof: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Targetgroup != nil { - raw := in.Targetgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Targetgroup = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Targetgroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Targetgroup: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Targetgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Type != nil { - raw := in.Type - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Type = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Type = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Type: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Type: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Filter != nil { - raw := in.Filter - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Filter = &[]string{plainV} - } else if sliceOk { - - out.Filter = &sliceV - } else { - return fmt.Errorf("unexpected value for field Filter: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Subtree != nil { - raw := in.Subtree - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Subtree = &[]string{plainV} - } else if sliceOk { - - out.Subtree = &sliceV - } else { - return fmt.Errorf("unexpected value for field Subtree: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Permissions != nil { - raw := in.Permissions - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Permissions = &[]string{plainV} - } else if sliceOk { - - out.Permissions = &sliceV - } else { - return fmt.Errorf("unexpected value for field Permissions: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Ipapermissiontype - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipapermissiontype = []string{plainV} - } else if sliceOk { - - if len(sliceV) < 1 { - return fmt.Errorf("unexpected value for field Ipapermissiontype: %v; expected at least one element", raw) - } - - out.Ipapermissiontype = sliceV - } else { - return fmt.Errorf("unexpected value for field Ipapermissiontype: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Aci - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Aci = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Aci: %v; expected exactly one element", raw) - } - out.Aci = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Aci: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberPrivilege != nil { - raw := in.MemberPrivilege - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberPrivilege = &[]string{plainV} - } else if sliceOk { - - out.MemberPrivilege = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberPrivilege: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberindirectRole != nil { - raw := in.MemberindirectRole - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberindirectRole = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberindirectRole = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberindirectRole: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberindirectRole: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Pkinit struct { -} - -func (t *Pkinit) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Pkinit[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Pkinit%v", string(b)) -} - -type jsonPkinit struct { -} - -func (out *Pkinit) UnmarshalJSON(data []byte) error { - var in jsonPkinit - if e := json.Unmarshal(data, &in); e != nil { - return e - } - return nil -} - -type Privilege struct { - - /* - Privilege name - - */ - Cn string `json:"cn,omitempty"` - - /* - Description - Privilege description - */ - Description *string `json:"description,omitempty"` - - /* - Permissions - - */ - MemberofPermission *[]string `json:"memberof_permission,omitempty"` - - /* - Granting privilege to roles - - */ - MemberRole *[]string `json:"member_role,omitempty"` -} - -func (t *Privilege) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Privilege[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Privilege%v", string(b)) -} - -type jsonPrivilege struct { - Cn interface{} `json:"cn"` - - Description interface{} `json:"description"` - - MemberofPermission interface{} `json:"memberof_permission"` - - MemberRole interface{} `json:"member_role"` -} - -func (out *Privilege) UnmarshalJSON(data []byte) error { - var in jsonPrivilege - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Cn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) - } - out.Cn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Description != nil { - raw := in.Description - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Description = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Description = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofPermission != nil { - raw := in.MemberofPermission - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofPermission = &[]string{plainV} - } else if sliceOk { - - out.MemberofPermission = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberofPermission: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberRole != nil { - raw := in.MemberRole - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberRole = &[]string{plainV} - } else if sliceOk { - - out.MemberRole = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberRole: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Pwpolicy struct { - - /* - Group - Manage password policy for specific group - */ - Cn *string `json:"cn,omitempty"` - - /* - Max lifetime (days) - Maximum password lifetime (in days) - */ - Krbmaxpwdlife *int `json:"krbmaxpwdlife,omitempty"` - - /* - Min lifetime (hours) - Minimum password lifetime (in hours) - */ - Krbminpwdlife *int `json:"krbminpwdlife,omitempty"` - - /* - History size - Password history size - */ - Krbpwdhistorylength *int `json:"krbpwdhistorylength,omitempty"` - - /* - Character classes - Minimum number of character classes - */ - Krbpwdmindiffchars *int `json:"krbpwdmindiffchars,omitempty"` - - /* - Min length - Minimum length of password - */ - Krbpwdminlength *int `json:"krbpwdminlength,omitempty"` - - /* - Priority - Priority of the policy (higher number means lower priority - */ - Cospriority int `json:"cospriority,omitempty"` - - /* - Max failures - Consecutive failures before lockout - */ - Krbpwdmaxfailure *int `json:"krbpwdmaxfailure,omitempty"` - - /* - Failure reset interval - Period after which failure count will be reset (seconds) - */ - Krbpwdfailurecountinterval *int `json:"krbpwdfailurecountinterval,omitempty"` - - /* - Lockout duration - Period for which lockout is enforced (seconds) - */ - Krbpwdlockoutduration *int `json:"krbpwdlockoutduration,omitempty"` -} - -func (t *Pwpolicy) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Pwpolicy[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Pwpolicy%v", string(b)) -} - -type jsonPwpolicy struct { - Cn interface{} `json:"cn"` - - Krbmaxpwdlife interface{} `json:"krbmaxpwdlife"` - - Krbminpwdlife interface{} `json:"krbminpwdlife"` - - Krbpwdhistorylength interface{} `json:"krbpwdhistorylength"` - - Krbpwdmindiffchars interface{} `json:"krbpwdmindiffchars"` - - Krbpwdminlength interface{} `json:"krbpwdminlength"` - - Cospriority interface{} `json:"cospriority"` - - Krbpwdmaxfailure interface{} `json:"krbpwdmaxfailure"` - - Krbpwdfailurecountinterval interface{} `json:"krbpwdfailurecountinterval"` - - Krbpwdlockoutduration interface{} `json:"krbpwdlockoutduration"` -} - -func (out *Pwpolicy) UnmarshalJSON(data []byte) error { - var in jsonPwpolicy - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if in.Cn != nil { - raw := in.Cn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cn = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Cn = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Cn: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Krbmaxpwdlife != nil { - raw := in.Krbmaxpwdlife - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Krbmaxpwdlife: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Krbmaxpwdlife = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Krbmaxpwdlife = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Krbmaxpwdlife: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Krbmaxpwdlife: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Krbminpwdlife != nil { - raw := in.Krbminpwdlife - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Krbminpwdlife: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Krbminpwdlife = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Krbminpwdlife = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Krbminpwdlife: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Krbminpwdlife: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Krbpwdhistorylength != nil { - raw := in.Krbpwdhistorylength - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Krbpwdhistorylength: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Krbpwdhistorylength = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Krbpwdhistorylength = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Krbpwdhistorylength: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Krbpwdhistorylength: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Krbpwdmindiffchars != nil { - raw := in.Krbpwdmindiffchars - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Krbpwdmindiffchars: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Krbpwdmindiffchars = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Krbpwdmindiffchars = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Krbpwdmindiffchars: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Krbpwdmindiffchars: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Krbpwdminlength != nil { - raw := in.Krbpwdminlength - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Krbpwdminlength: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Krbpwdminlength = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Krbpwdminlength = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Krbpwdminlength: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Krbpwdminlength: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Cospriority - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Cospriority: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Cospriority = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Cospriority: %v; expected exactly one element", raw) - } - out.Cospriority = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Cospriority: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Krbpwdmaxfailure != nil { - raw := in.Krbpwdmaxfailure - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Krbpwdmaxfailure: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Krbpwdmaxfailure = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Krbpwdmaxfailure = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Krbpwdmaxfailure: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Krbpwdmaxfailure: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Krbpwdfailurecountinterval != nil { - raw := in.Krbpwdfailurecountinterval - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Krbpwdfailurecountinterval: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Krbpwdfailurecountinterval = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Krbpwdfailurecountinterval = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Krbpwdfailurecountinterval: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Krbpwdfailurecountinterval: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Krbpwdlockoutduration != nil { - raw := in.Krbpwdlockoutduration - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Krbpwdlockoutduration: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Krbpwdlockoutduration = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Krbpwdlockoutduration = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Krbpwdlockoutduration: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Krbpwdlockoutduration: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Radiusproxy struct { - - /* - RADIUS proxy server name - - */ - Cn string `json:"cn,omitempty"` - - /* - Description - A description of this RADIUS proxy server - */ - Description *string `json:"description,omitempty"` - - /* - Server - The hostname or IP (with or without port) - */ - Ipatokenradiusserver []string `json:"ipatokenradiusserver,omitempty"` - - /* - Secret - The secret used to encrypt data - */ - Ipatokenradiussecret string `json:"ipatokenradiussecret,omitempty"` - - /* - Timeout - The total timeout across all retries (in seconds) - */ - Ipatokenradiustimeout *int `json:"ipatokenradiustimeout,omitempty"` - - /* - Retries - The number of times to retry authentication - */ - Ipatokenradiusretries *int `json:"ipatokenradiusretries,omitempty"` - - /* - User attribute - The username attribute on the user object - */ - Ipatokenusermapattribute *string `json:"ipatokenusermapattribute,omitempty"` -} - -func (t *Radiusproxy) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Radiusproxy[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Radiusproxy%v", string(b)) -} - -type jsonRadiusproxy struct { - Cn interface{} `json:"cn"` - - Description interface{} `json:"description"` - - Ipatokenradiusserver interface{} `json:"ipatokenradiusserver"` - - Ipatokenradiussecret interface{} `json:"ipatokenradiussecret"` - - Ipatokenradiustimeout interface{} `json:"ipatokenradiustimeout"` - - Ipatokenradiusretries interface{} `json:"ipatokenradiusretries"` - - Ipatokenusermapattribute interface{} `json:"ipatokenusermapattribute"` -} - -func (out *Radiusproxy) UnmarshalJSON(data []byte) error { - var in jsonRadiusproxy - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Cn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) - } - out.Cn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Description != nil { - raw := in.Description - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Description = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Description = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Ipatokenradiusserver - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipatokenradiusserver = []string{plainV} - } else if sliceOk { - - if len(sliceV) < 1 { - return fmt.Errorf("unexpected value for field Ipatokenradiusserver: %v; expected at least one element", raw) - } - - out.Ipatokenradiusserver = sliceV - } else { - return fmt.Errorf("unexpected value for field Ipatokenradiusserver: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Ipatokenradiussecret - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipatokenradiussecret = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipatokenradiussecret: %v; expected exactly one element", raw) - } - out.Ipatokenradiussecret = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipatokenradiussecret: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipatokenradiustimeout != nil { - raw := in.Ipatokenradiustimeout - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Ipatokenradiustimeout: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Ipatokenradiustimeout = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipatokenradiustimeout = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipatokenradiustimeout: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipatokenradiustimeout: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipatokenradiusretries != nil { - raw := in.Ipatokenradiusretries - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Ipatokenradiusretries: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Ipatokenradiusretries = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipatokenradiusretries = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipatokenradiusretries: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipatokenradiusretries: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipatokenusermapattribute != nil { - raw := in.Ipatokenusermapattribute - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipatokenusermapattribute = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipatokenusermapattribute = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipatokenusermapattribute: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipatokenusermapattribute: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Realmdomains struct { - - /* - Domain - - */ - Associateddomain []string `json:"associateddomain,omitempty"` - - /* - Add domain - - */ - AddDomain *string `json:"add_domain,omitempty"` - - /* - Delete domain - - */ - DelDomain *string `json:"del_domain,omitempty"` -} - -func (t *Realmdomains) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Realmdomains[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Realmdomains%v", string(b)) -} - -type jsonRealmdomains struct { - Associateddomain interface{} `json:"associateddomain"` - - AddDomain interface{} `json:"add_domain"` - - DelDomain interface{} `json:"del_domain"` -} - -func (out *Realmdomains) UnmarshalJSON(data []byte) error { - var in jsonRealmdomains - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Associateddomain - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Associateddomain = []string{plainV} - } else if sliceOk { - - if len(sliceV) < 1 { - return fmt.Errorf("unexpected value for field Associateddomain: %v; expected at least one element", raw) - } - - out.Associateddomain = sliceV - } else { - return fmt.Errorf("unexpected value for field Associateddomain: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.AddDomain != nil { - raw := in.AddDomain - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.AddDomain = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.AddDomain = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field AddDomain: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field AddDomain: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.DelDomain != nil { - raw := in.DelDomain - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.DelDomain = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.DelDomain = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field DelDomain: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field DelDomain: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Role struct { - - /* - Role name - - */ - Cn string `json:"cn,omitempty"` - - /* - Description - A description of this role-group - */ - Description *string `json:"description,omitempty"` - - /* - Member users - - */ - MemberUser *[]string `json:"member_user,omitempty"` - - /* - Member groups - - */ - MemberGroup *[]string `json:"member_group,omitempty"` - - /* - Member hosts - - */ - MemberHost *[]string `json:"member_host,omitempty"` - - /* - Member host-groups - - */ - MemberHostgroup *[]string `json:"member_hostgroup,omitempty"` - - /* - Privileges - - */ - MemberofPrivilege *[]string `json:"memberof_privilege,omitempty"` - - /* - Member services - - */ - MemberService *[]string `json:"member_service,omitempty"` -} - -func (t *Role) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Role[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Role%v", string(b)) -} - -type jsonRole struct { - Cn interface{} `json:"cn"` - - Description interface{} `json:"description"` - - MemberUser interface{} `json:"member_user"` - - MemberGroup interface{} `json:"member_group"` - - MemberHost interface{} `json:"member_host"` - - MemberHostgroup interface{} `json:"member_hostgroup"` - - MemberofPrivilege interface{} `json:"memberof_privilege"` - - MemberService interface{} `json:"member_service"` -} - -func (out *Role) UnmarshalJSON(data []byte) error { - var in jsonRole - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Cn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) - } - out.Cn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Description != nil { - raw := in.Description - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Description = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Description = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberUser != nil { - raw := in.MemberUser - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberUser = &[]string{plainV} - } else if sliceOk { - - out.MemberUser = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberUser: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberGroup != nil { - raw := in.MemberGroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberGroup = &[]string{plainV} - } else if sliceOk { - - out.MemberGroup = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberGroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberHost != nil { - raw := in.MemberHost - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberHost = &[]string{plainV} - } else if sliceOk { - - out.MemberHost = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberHost: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberHostgroup != nil { - raw := in.MemberHostgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberHostgroup = &[]string{plainV} - } else if sliceOk { - - out.MemberHostgroup = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberHostgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofPrivilege != nil { - raw := in.MemberofPrivilege - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofPrivilege = &[]string{plainV} - } else if sliceOk { - - out.MemberofPrivilege = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberofPrivilege: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberService != nil { - raw := in.MemberService - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberService = &[]string{plainV} - } else if sliceOk { - - out.MemberService = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberService: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Selfservice struct { - - /* - Self-service name - Self-service name - */ - Aciname string `json:"aciname,omitempty"` - - /* - Permissions - Permissions to grant (read, write). Default is write. - */ - Permissions *[]string `json:"permissions,omitempty"` - - /* - Attributes - Attributes to which the permission applies. - */ - Attrs []string `json:"attrs,omitempty"` - - /* - ACI - - */ - Aci string `json:"aci,omitempty"` -} - -func (t *Selfservice) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Selfservice[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Selfservice%v", string(b)) -} - -type jsonSelfservice struct { - Aciname interface{} `json:"aciname"` - - Permissions interface{} `json:"permissions"` - - Attrs interface{} `json:"attrs"` - - Aci interface{} `json:"aci"` -} - -func (out *Selfservice) UnmarshalJSON(data []byte) error { - var in jsonSelfservice - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Aciname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Aciname = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Aciname: %v; expected exactly one element", raw) - } - out.Aciname = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Aciname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Permissions != nil { - raw := in.Permissions - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Permissions = &[]string{plainV} - } else if sliceOk { - - out.Permissions = &sliceV - } else { - return fmt.Errorf("unexpected value for field Permissions: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Attrs - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Attrs = []string{plainV} - } else if sliceOk { - - if len(sliceV) < 1 { - return fmt.Errorf("unexpected value for field Attrs: %v; expected at least one element", raw) - } - - out.Attrs = sliceV - } else { - return fmt.Errorf("unexpected value for field Attrs: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Aci - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Aci = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Aci: %v; expected exactly one element", raw) - } - out.Aci = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Aci: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Selinuxusermap struct { - - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` - - /* - SELinux User - - */ - Ipaselinuxuser string `json:"ipaselinuxuser,omitempty"` - - /* - HBAC Rule - HBAC Rule that defines the users, groups and hostgroups - */ - Seealso *string `json:"seealso,omitempty"` - - /* - User category - User category the rule applies to - */ - Usercategory *string `json:"usercategory,omitempty"` - - /* - Host category - Host category the rule applies to - */ - Hostcategory *string `json:"hostcategory,omitempty"` - - /* - Description - - */ - Description *string `json:"description,omitempty"` - - /* - Enabled - - */ - Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` - - /* - Users - - */ - MemberuserUser *string `json:"memberuser_user,omitempty"` - - /* - User Groups - - */ - MemberuserGroup *string `json:"memberuser_group,omitempty"` - - /* - Hosts - - */ - MemberhostHost *string `json:"memberhost_host,omitempty"` - - /* - Host Groups - - */ - MemberhostHostgroup *string `json:"memberhost_hostgroup,omitempty"` -} - -func (t *Selinuxusermap) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Selinuxusermap[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Selinuxusermap%v", string(b)) -} - -type jsonSelinuxusermap struct { - Cn interface{} `json:"cn"` - - Ipaselinuxuser interface{} `json:"ipaselinuxuser"` - - Seealso interface{} `json:"seealso"` - - Usercategory interface{} `json:"usercategory"` - - Hostcategory interface{} `json:"hostcategory"` - - Description interface{} `json:"description"` - - Ipaenabledflag interface{} `json:"ipaenabledflag"` - - MemberuserUser interface{} `json:"memberuser_user"` - - MemberuserGroup interface{} `json:"memberuser_group"` - - MemberhostHost interface{} `json:"memberhost_host"` - - MemberhostHostgroup interface{} `json:"memberhost_hostgroup"` -} - -func (out *Selinuxusermap) UnmarshalJSON(data []byte) error { - var in jsonSelinuxusermap - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Cn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) - } - out.Cn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Ipaselinuxuser - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipaselinuxuser = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipaselinuxuser: %v; expected exactly one element", raw) - } - out.Ipaselinuxuser = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipaselinuxuser: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Seealso != nil { - raw := in.Seealso - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Seealso = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Seealso = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Seealso: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Seealso: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Usercategory != nil { - raw := in.Usercategory - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Usercategory = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Usercategory = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Usercategory: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Usercategory: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Hostcategory != nil { - raw := in.Hostcategory - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Hostcategory = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Hostcategory = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Hostcategory: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Hostcategory: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Description != nil { - raw := in.Description - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Description = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Description = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipaenabledflag != nil { - raw := in.Ipaenabledflag - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipaenabledflag = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipaenabledflag = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipaenabledflag: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipaenabledflag: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberuserUser != nil { - raw := in.MemberuserUser - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberuserUser = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberuserUser = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberuserUser: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberuserUser: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberuserGroup != nil { - raw := in.MemberuserGroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberuserGroup = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberuserGroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberuserGroup: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberuserGroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberhostHost != nil { - raw := in.MemberhostHost - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberhostHost = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberhostHost = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberhostHost: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberhostHost: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberhostHostgroup != nil { - raw := in.MemberhostHostgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberhostHostgroup = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberhostHostgroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberhostHostgroup: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberhostHostgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Server struct { - - /* - Server name - IPA server hostname - */ - Cn string `json:"cn,omitempty"` - - /* - - - */ - Iparepltopomanagedsuffix *[]string `json:"iparepltopomanagedsuffix,omitempty"` - - /* - Managed suffixes - - */ - IparepltopomanagedsuffixTopologysuffix *[]string `json:"iparepltopomanagedsuffix_topologysuffix,omitempty"` - - /* - Min domain level - Minimum domain level - */ - Ipamindomainlevel int `json:"ipamindomainlevel,omitempty"` - - /* - Max domain level - Maximum domain level - */ - Ipamaxdomainlevel int `json:"ipamaxdomainlevel,omitempty"` - - /* - Location - Server location - */ - IpalocationLocation *string `json:"ipalocation_location,omitempty"` - - /* - Service weight - Weight for server services - */ - Ipaserviceweight *int `json:"ipaserviceweight,omitempty"` - - /* - Service relative weight - Relative weight for server services (counts per location) - */ - ServiceRelativeWeight string `json:"service_relative_weight,omitempty"` - - /* - Enabled server roles - List of enabled roles - */ - EnabledRoleServrole *[]string `json:"enabled_role_servrole,omitempty"` -} - -func (t *Server) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Server[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Server%v", string(b)) -} - -type jsonServer struct { - Cn interface{} `json:"cn"` - - Iparepltopomanagedsuffix interface{} `json:"iparepltopomanagedsuffix"` - - IparepltopomanagedsuffixTopologysuffix interface{} `json:"iparepltopomanagedsuffix_topologysuffix"` - - Ipamindomainlevel interface{} `json:"ipamindomainlevel"` - - Ipamaxdomainlevel interface{} `json:"ipamaxdomainlevel"` - - IpalocationLocation interface{} `json:"ipalocation_location"` - - Ipaserviceweight interface{} `json:"ipaserviceweight"` - - ServiceRelativeWeight interface{} `json:"service_relative_weight"` - - EnabledRoleServrole interface{} `json:"enabled_role_servrole"` -} - -func (out *Server) UnmarshalJSON(data []byte) error { - var in jsonServer - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Cn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) - } - out.Cn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Iparepltopomanagedsuffix != nil { - raw := in.Iparepltopomanagedsuffix - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Iparepltopomanagedsuffix = &[]string{plainV} - } else if sliceOk { - - out.Iparepltopomanagedsuffix = &sliceV - } else { - return fmt.Errorf("unexpected value for field Iparepltopomanagedsuffix: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.IparepltopomanagedsuffixTopologysuffix != nil { - raw := in.IparepltopomanagedsuffixTopologysuffix - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.IparepltopomanagedsuffixTopologysuffix = &[]string{plainV} - } else if sliceOk { - - out.IparepltopomanagedsuffixTopologysuffix = &sliceV - } else { - return fmt.Errorf("unexpected value for field IparepltopomanagedsuffixTopologysuffix: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Ipamindomainlevel - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Ipamindomainlevel: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Ipamindomainlevel = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipamindomainlevel: %v; expected exactly one element", raw) - } - out.Ipamindomainlevel = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipamindomainlevel: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Ipamaxdomainlevel - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Ipamaxdomainlevel: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Ipamaxdomainlevel = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipamaxdomainlevel: %v; expected exactly one element", raw) - } - out.Ipamaxdomainlevel = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipamaxdomainlevel: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.IpalocationLocation != nil { - raw := in.IpalocationLocation - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.IpalocationLocation = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.IpalocationLocation = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field IpalocationLocation: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field IpalocationLocation: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipaserviceweight != nil { - raw := in.Ipaserviceweight - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Ipaserviceweight: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Ipaserviceweight = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipaserviceweight = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipaserviceweight: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipaserviceweight: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.ServiceRelativeWeight - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.ServiceRelativeWeight = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field ServiceRelativeWeight: %v; expected exactly one element", raw) - } - out.ServiceRelativeWeight = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field ServiceRelativeWeight: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.EnabledRoleServrole != nil { - raw := in.EnabledRoleServrole - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.EnabledRoleServrole = &[]string{plainV} - } else if sliceOk { - - out.EnabledRoleServrole = &sliceV - } else { - return fmt.Errorf("unexpected value for field EnabledRoleServrole: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type ServerRole struct { - - /* - Server name - IPA server hostname - */ - ServerServer string `json:"server_server,omitempty"` - - /* - Role name - IPA server role name - */ - RoleServrole string `json:"role_servrole,omitempty"` - - /* - Role status - Status of the role - */ - Status *string `json:"status,omitempty"` -} - -func (t *ServerRole) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("ServerRole[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("ServerRole%v", string(b)) -} - -type jsonServerRole struct { - ServerServer interface{} `json:"server_server"` - - RoleServrole interface{} `json:"role_servrole"` - - Status interface{} `json:"status"` -} - -func (out *ServerRole) UnmarshalJSON(data []byte) error { - var in jsonServerRole - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.ServerServer - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.ServerServer = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field ServerServer: %v; expected exactly one element", raw) - } - out.ServerServer = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field ServerServer: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.RoleServrole - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.RoleServrole = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field RoleServrole: %v; expected exactly one element", raw) - } - out.RoleServrole = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field RoleServrole: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Status != nil { - raw := in.Status - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Status = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Status = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Status: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Status: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Service struct { - - /* - Principal name - Service principal - */ - Krbcanonicalname string `json:"krbcanonicalname,omitempty"` - - /* - Principal alias - Service principal alias - */ - Krbprincipalname *[]string `json:"krbprincipalname,omitempty"` - - /* - Certificate - Base-64 encoded service certificate - */ - Usercertificate *[]string `json:"usercertificate,omitempty"` - - /* - Subject - - */ - Subject string `json:"subject,omitempty"` - - /* - Serial Number - - */ - SerialNumber string `json:"serial_number,omitempty"` - - /* - Serial Number (hex) - - */ - SerialNumberHex string `json:"serial_number_hex,omitempty"` - - /* - Issuer - - */ - Issuer string `json:"issuer,omitempty"` - - /* - Not Before - - */ - ValidNotBefore string `json:"valid_not_before,omitempty"` - - /* - Not After - - */ - ValidNotAfter string `json:"valid_not_after,omitempty"` - - /* - Fingerprint (MD5) - - */ - Md5Fingerprint string `json:"md5_fingerprint,omitempty"` - - /* - Fingerprint (SHA1) - - */ - Sha1Fingerprint string `json:"sha1_fingerprint,omitempty"` - - /* - Revocation reason - - */ - RevocationReason *string `json:"revocation_reason,omitempty"` - - /* - PAC type - Override default list of supported PAC types. Use 'NONE' to disable PAC support for this service, e.g. this might be necessary for NFS services. - */ - Ipakrbauthzdata *[]string `json:"ipakrbauthzdata,omitempty"` - - /* - Authentication Indicators - Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations. - */ - Krbprincipalauthind *[]string `json:"krbprincipalauthind,omitempty"` - - /* - Requires pre-authentication - Pre-authentication is required for the service - */ - Ipakrbrequirespreauth *bool `json:"ipakrbrequirespreauth,omitempty"` - - /* - Trusted for delegation - Client credentials may be delegated to the service - */ - Ipakrbokasdelegate *bool `json:"ipakrbokasdelegate,omitempty"` - - /* - Trusted to authenticate as user - The service is allowed to authenticate on behalf of a client - */ - Ipakrboktoauthasdelegate *bool `json:"ipakrboktoauthasdelegate,omitempty"` - - /* - Roles - - */ - MemberofRole *[]string `json:"memberof_role,omitempty"` - - /* - Keytab - - */ - HasKeytab *bool `json:"has_keytab,omitempty"` - - /* - Managed by - - */ - ManagedbyHost string `json:"managedby_host,omitempty"` - - /* - Users allowed to retrieve keytab - - */ - IpaallowedtoperformReadKeysUser string `json:"ipaallowedtoperform_read_keys_user,omitempty"` - - /* - Groups allowed to retrieve keytab - - */ - IpaallowedtoperformReadKeysGroup string `json:"ipaallowedtoperform_read_keys_group,omitempty"` - - /* - Hosts allowed to retrieve keytab - - */ - IpaallowedtoperformReadKeysHost string `json:"ipaallowedtoperform_read_keys_host,omitempty"` - - /* - Host Groups allowed to retrieve keytab - - */ - IpaallowedtoperformReadKeysHostgroup string `json:"ipaallowedtoperform_read_keys_hostgroup,omitempty"` - - /* - Users allowed to create keytab - - */ - IpaallowedtoperformWriteKeysUser string `json:"ipaallowedtoperform_write_keys_user,omitempty"` - - /* - Groups allowed to create keytab - - */ - IpaallowedtoperformWriteKeysGroup string `json:"ipaallowedtoperform_write_keys_group,omitempty"` - - /* - Hosts allowed to create keytab - - */ - IpaallowedtoperformWriteKeysHost string `json:"ipaallowedtoperform_write_keys_host,omitempty"` - - /* - Host Groups allowed to create keytab - - */ - IpaallowedtoperformWriteKeysHostgroup string `json:"ipaallowedtoperform_write_keys_hostgroup,omitempty"` -} - -func (t *Service) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Service[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Service%v", string(b)) -} - -type jsonService struct { - Krbcanonicalname interface{} `json:"krbcanonicalname"` - - Krbprincipalname interface{} `json:"krbprincipalname"` - - Usercertificate interface{} `json:"usercertificate"` - - Subject interface{} `json:"subject"` - - SerialNumber interface{} `json:"serial_number"` - - SerialNumberHex interface{} `json:"serial_number_hex"` - - Issuer interface{} `json:"issuer"` - - ValidNotBefore interface{} `json:"valid_not_before"` - - ValidNotAfter interface{} `json:"valid_not_after"` - - Md5Fingerprint interface{} `json:"md5_fingerprint"` - - Sha1Fingerprint interface{} `json:"sha1_fingerprint"` - - RevocationReason interface{} `json:"revocation_reason"` - - Ipakrbauthzdata interface{} `json:"ipakrbauthzdata"` - - Krbprincipalauthind interface{} `json:"krbprincipalauthind"` - - Ipakrbrequirespreauth interface{} `json:"ipakrbrequirespreauth"` - - Ipakrbokasdelegate interface{} `json:"ipakrbokasdelegate"` - - Ipakrboktoauthasdelegate interface{} `json:"ipakrboktoauthasdelegate"` - - MemberofRole interface{} `json:"memberof_role"` - - HasKeytab interface{} `json:"has_keytab"` - - ManagedbyHost interface{} `json:"managedby_host"` - - IpaallowedtoperformReadKeysUser interface{} `json:"ipaallowedtoperform_read_keys_user"` - - IpaallowedtoperformReadKeysGroup interface{} `json:"ipaallowedtoperform_read_keys_group"` - - IpaallowedtoperformReadKeysHost interface{} `json:"ipaallowedtoperform_read_keys_host"` - - IpaallowedtoperformReadKeysHostgroup interface{} `json:"ipaallowedtoperform_read_keys_hostgroup"` - - IpaallowedtoperformWriteKeysUser interface{} `json:"ipaallowedtoperform_write_keys_user"` - - IpaallowedtoperformWriteKeysGroup interface{} `json:"ipaallowedtoperform_write_keys_group"` - - IpaallowedtoperformWriteKeysHost interface{} `json:"ipaallowedtoperform_write_keys_host"` - - IpaallowedtoperformWriteKeysHostgroup interface{} `json:"ipaallowedtoperform_write_keys_hostgroup"` -} - -func (out *Service) UnmarshalJSON(data []byte) error { - var in jsonService - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Krbcanonicalname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Krbcanonicalname = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Krbcanonicalname: %v; expected exactly one element", raw) - } - out.Krbcanonicalname = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Krbcanonicalname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Krbprincipalname != nil { - raw := in.Krbprincipalname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Krbprincipalname = &[]string{plainV} - } else if sliceOk { - - out.Krbprincipalname = &sliceV - } else { - return fmt.Errorf("unexpected value for field Krbprincipalname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Usercertificate != nil { - raw := in.Usercertificate - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Usercertificate = &[]string{plainV} - } else if sliceOk { - - out.Usercertificate = &sliceV - } else { - return fmt.Errorf("unexpected value for field Usercertificate: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Subject - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Subject = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Subject: %v; expected exactly one element", raw) - } - out.Subject = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Subject: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.SerialNumber - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.SerialNumber = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field SerialNumber: %v; expected exactly one element", raw) - } - out.SerialNumber = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field SerialNumber: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.SerialNumberHex - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.SerialNumberHex = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field SerialNumberHex: %v; expected exactly one element", raw) - } - out.SerialNumberHex = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field SerialNumberHex: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Issuer - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Issuer = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Issuer: %v; expected exactly one element", raw) - } - out.Issuer = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Issuer: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.ValidNotBefore - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.ValidNotBefore = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field ValidNotBefore: %v; expected exactly one element", raw) - } - out.ValidNotBefore = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field ValidNotBefore: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.ValidNotAfter - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.ValidNotAfter = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field ValidNotAfter: %v; expected exactly one element", raw) - } - out.ValidNotAfter = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field ValidNotAfter: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Md5Fingerprint - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Md5Fingerprint = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Md5Fingerprint: %v; expected exactly one element", raw) - } - out.Md5Fingerprint = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Md5Fingerprint: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Sha1Fingerprint - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Sha1Fingerprint = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Sha1Fingerprint: %v; expected exactly one element", raw) - } - out.Sha1Fingerprint = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Sha1Fingerprint: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.RevocationReason != nil { - raw := in.RevocationReason - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.RevocationReason = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.RevocationReason = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field RevocationReason: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field RevocationReason: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipakrbauthzdata != nil { - raw := in.Ipakrbauthzdata - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipakrbauthzdata = &[]string{plainV} - } else if sliceOk { - - out.Ipakrbauthzdata = &sliceV - } else { - return fmt.Errorf("unexpected value for field Ipakrbauthzdata: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Krbprincipalauthind != nil { - raw := in.Krbprincipalauthind - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Krbprincipalauthind = &[]string{plainV} - } else if sliceOk { - - out.Krbprincipalauthind = &sliceV - } else { - return fmt.Errorf("unexpected value for field Krbprincipalauthind: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipakrbrequirespreauth != nil { - raw := in.Ipakrbrequirespreauth - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipakrbrequirespreauth = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipakrbrequirespreauth = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipakrbrequirespreauth: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipakrbrequirespreauth: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipakrbokasdelegate != nil { - raw := in.Ipakrbokasdelegate - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipakrbokasdelegate = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipakrbokasdelegate = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipakrbokasdelegate: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipakrbokasdelegate: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipakrboktoauthasdelegate != nil { - raw := in.Ipakrboktoauthasdelegate - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipakrboktoauthasdelegate = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipakrboktoauthasdelegate = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipakrboktoauthasdelegate: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipakrboktoauthasdelegate: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofRole != nil { - raw := in.MemberofRole - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofRole = &[]string{plainV} - } else if sliceOk { - - out.MemberofRole = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberofRole: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.HasKeytab != nil { - raw := in.HasKeytab - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.HasKeytab = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.HasKeytab = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field HasKeytab: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field HasKeytab: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.ManagedbyHost - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.ManagedbyHost = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field ManagedbyHost: %v; expected exactly one element", raw) - } - out.ManagedbyHost = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field ManagedbyHost: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.IpaallowedtoperformReadKeysUser - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.IpaallowedtoperformReadKeysUser = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field IpaallowedtoperformReadKeysUser: %v; expected exactly one element", raw) - } - out.IpaallowedtoperformReadKeysUser = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field IpaallowedtoperformReadKeysUser: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.IpaallowedtoperformReadKeysGroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.IpaallowedtoperformReadKeysGroup = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field IpaallowedtoperformReadKeysGroup: %v; expected exactly one element", raw) - } - out.IpaallowedtoperformReadKeysGroup = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field IpaallowedtoperformReadKeysGroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.IpaallowedtoperformReadKeysHost - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.IpaallowedtoperformReadKeysHost = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field IpaallowedtoperformReadKeysHost: %v; expected exactly one element", raw) - } - out.IpaallowedtoperformReadKeysHost = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field IpaallowedtoperformReadKeysHost: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.IpaallowedtoperformReadKeysHostgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.IpaallowedtoperformReadKeysHostgroup = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field IpaallowedtoperformReadKeysHostgroup: %v; expected exactly one element", raw) - } - out.IpaallowedtoperformReadKeysHostgroup = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field IpaallowedtoperformReadKeysHostgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.IpaallowedtoperformWriteKeysUser - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.IpaallowedtoperformWriteKeysUser = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field IpaallowedtoperformWriteKeysUser: %v; expected exactly one element", raw) - } - out.IpaallowedtoperformWriteKeysUser = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field IpaallowedtoperformWriteKeysUser: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.IpaallowedtoperformWriteKeysGroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.IpaallowedtoperformWriteKeysGroup = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field IpaallowedtoperformWriteKeysGroup: %v; expected exactly one element", raw) - } - out.IpaallowedtoperformWriteKeysGroup = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field IpaallowedtoperformWriteKeysGroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.IpaallowedtoperformWriteKeysHost - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.IpaallowedtoperformWriteKeysHost = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field IpaallowedtoperformWriteKeysHost: %v; expected exactly one element", raw) - } - out.IpaallowedtoperformWriteKeysHost = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field IpaallowedtoperformWriteKeysHost: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.IpaallowedtoperformWriteKeysHostgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.IpaallowedtoperformWriteKeysHostgroup = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field IpaallowedtoperformWriteKeysHostgroup: %v; expected exactly one element", raw) - } - out.IpaallowedtoperformWriteKeysHostgroup = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field IpaallowedtoperformWriteKeysHostgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Servicedelegationrule struct { - - /* - Delegation name - - */ - Cn string `json:"cn,omitempty"` - - /* - Allowed Target - - */ - IpaallowedtargetServicedelegationtarget string `json:"ipaallowedtarget_servicedelegationtarget,omitempty"` - - /* - Allowed to Impersonate - - */ - Ipaallowedtoimpersonate string `json:"ipaallowedtoimpersonate,omitempty"` - - /* - Member principals - - */ - Memberprincipal string `json:"memberprincipal,omitempty"` -} - -func (t *Servicedelegationrule) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Servicedelegationrule[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Servicedelegationrule%v", string(b)) -} - -type jsonServicedelegationrule struct { - Cn interface{} `json:"cn"` - - IpaallowedtargetServicedelegationtarget interface{} `json:"ipaallowedtarget_servicedelegationtarget"` - - Ipaallowedtoimpersonate interface{} `json:"ipaallowedtoimpersonate"` - - Memberprincipal interface{} `json:"memberprincipal"` -} - -func (out *Servicedelegationrule) UnmarshalJSON(data []byte) error { - var in jsonServicedelegationrule - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Cn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) - } - out.Cn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.IpaallowedtargetServicedelegationtarget - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.IpaallowedtargetServicedelegationtarget = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field IpaallowedtargetServicedelegationtarget: %v; expected exactly one element", raw) - } - out.IpaallowedtargetServicedelegationtarget = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field IpaallowedtargetServicedelegationtarget: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Ipaallowedtoimpersonate - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipaallowedtoimpersonate = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipaallowedtoimpersonate: %v; expected exactly one element", raw) - } - out.Ipaallowedtoimpersonate = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipaallowedtoimpersonate: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Memberprincipal - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Memberprincipal = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Memberprincipal: %v; expected exactly one element", raw) - } - out.Memberprincipal = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Memberprincipal: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Servicedelegationtarget struct { - - /* - Delegation name - - */ - Cn string `json:"cn,omitempty"` - - /* - Allowed Target - - */ - IpaallowedtargetServicedelegationtarget string `json:"ipaallowedtarget_servicedelegationtarget,omitempty"` - - /* - Allowed to Impersonate - - */ - Ipaallowedtoimpersonate string `json:"ipaallowedtoimpersonate,omitempty"` - - /* - Member principals - - */ - Memberprincipal string `json:"memberprincipal,omitempty"` -} - -func (t *Servicedelegationtarget) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Servicedelegationtarget[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Servicedelegationtarget%v", string(b)) -} - -type jsonServicedelegationtarget struct { - Cn interface{} `json:"cn"` - - IpaallowedtargetServicedelegationtarget interface{} `json:"ipaallowedtarget_servicedelegationtarget"` - - Ipaallowedtoimpersonate interface{} `json:"ipaallowedtoimpersonate"` - - Memberprincipal interface{} `json:"memberprincipal"` -} - -func (out *Servicedelegationtarget) UnmarshalJSON(data []byte) error { - var in jsonServicedelegationtarget - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Cn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) - } - out.Cn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.IpaallowedtargetServicedelegationtarget - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.IpaallowedtargetServicedelegationtarget = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field IpaallowedtargetServicedelegationtarget: %v; expected exactly one element", raw) - } - out.IpaallowedtargetServicedelegationtarget = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field IpaallowedtargetServicedelegationtarget: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Ipaallowedtoimpersonate - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipaallowedtoimpersonate = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipaallowedtoimpersonate: %v; expected exactly one element", raw) - } - out.Ipaallowedtoimpersonate = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipaallowedtoimpersonate: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Memberprincipal - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Memberprincipal = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Memberprincipal: %v; expected exactly one element", raw) - } - out.Memberprincipal = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Memberprincipal: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Servrole struct { - - /* - Role name - IPA role name - */ - Name string `json:"name,omitempty"` -} - -func (t *Servrole) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Servrole[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Servrole%v", string(b)) -} - -type jsonServrole struct { - Name interface{} `json:"name"` -} - -func (out *Servrole) UnmarshalJSON(data []byte) error { - var in jsonServrole - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Name - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Name = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Name: %v; expected exactly one element", raw) - } - out.Name = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Name: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Stageuser struct { - - /* - User login - - */ - UID string `json:"uid,omitempty"` - - /* - First name - - */ - Givenname string `json:"givenname,omitempty"` - - /* - Last name - - */ - Sn string `json:"sn,omitempty"` - - /* - Full name - - */ - Cn string `json:"cn,omitempty"` - - /* - Display name - - */ - Displayname *string `json:"displayname,omitempty"` - - /* - Initials - - */ - Initials *string `json:"initials,omitempty"` - - /* - Home directory - - */ - Homedirectory *string `json:"homedirectory,omitempty"` - - /* - GECOS - - */ - Gecos *string `json:"gecos,omitempty"` - - /* - Login shell - - */ - Loginshell *string `json:"loginshell,omitempty"` - - /* - Principal name - - */ - Krbcanonicalname *string `json:"krbcanonicalname,omitempty"` - - /* - Principal alias - - */ - Krbprincipalname *[]string `json:"krbprincipalname,omitempty"` - - /* - Kerberos principal expiration - - */ - Krbprincipalexpiration *time.Time `json:"krbprincipalexpiration,omitempty"` - - /* - Email address - - */ - Mail *[]string `json:"mail,omitempty"` - - /* - Password - Prompt to set the user password - */ - Userpassword *string `json:"userpassword,omitempty"` - - /* - - Generate a random user password - */ - Random *bool `json:"random,omitempty"` - - /* - Random password - - */ - Randompassword *string `json:"randompassword,omitempty"` - - /* - UID - User ID Number (system will assign one if not provided) - */ - Uidnumber *int `json:"uidnumber,omitempty"` - - /* - GID - Group ID Number - */ - Gidnumber *int `json:"gidnumber,omitempty"` - - /* - Street address - - */ - Street *string `json:"street,omitempty"` - - /* - City - - */ - L *string `json:"l,omitempty"` - - /* - State/Province - - */ - St *string `json:"st,omitempty"` - - /* - ZIP - - */ - Postalcode *string `json:"postalcode,omitempty"` - - /* - Telephone Number - - */ - Telephonenumber *[]string `json:"telephonenumber,omitempty"` - - /* - Mobile Telephone Number - - */ - Mobile *[]string `json:"mobile,omitempty"` - - /* - Pager Number - - */ - Pager *[]string `json:"pager,omitempty"` - - /* - Fax Number - - */ - Facsimiletelephonenumber *[]string `json:"facsimiletelephonenumber,omitempty"` - - /* - Org. Unit - - */ - Ou *string `json:"ou,omitempty"` - - /* - Job Title - - */ - Title *string `json:"title,omitempty"` - - /* - Manager - - */ - Manager *string `json:"manager,omitempty"` - - /* - Car License - - */ - Carlicense *[]string `json:"carlicense,omitempty"` - - /* - SSH public key - - */ - Ipasshpubkey *[]string `json:"ipasshpubkey,omitempty"` - - /* - SSH public key fingerprint - - */ - Sshpubkeyfp *[]string `json:"sshpubkeyfp,omitempty"` - - /* - User authentication types - Types of supported user authentication - */ - Ipauserauthtype *[]string `json:"ipauserauthtype,omitempty"` - - /* - Class - User category (semantics placed on this attribute are for local interpretation) - */ - Userclass *[]string `json:"userclass,omitempty"` - - /* - RADIUS proxy configuration - - */ - Ipatokenradiusconfiglink *string `json:"ipatokenradiusconfiglink,omitempty"` - - /* - RADIUS proxy username - - */ - Ipatokenradiususername *string `json:"ipatokenradiususername,omitempty"` - - /* - Department Number - - */ - Departmentnumber *[]string `json:"departmentnumber,omitempty"` - - /* - Employee Number - - */ - Employeenumber *string `json:"employeenumber,omitempty"` - - /* - Employee Type - - */ - Employeetype *string `json:"employeetype,omitempty"` - - /* - Preferred Language - - */ - Preferredlanguage *string `json:"preferredlanguage,omitempty"` - - /* - Certificate - Base-64 encoded user certificate - */ - Usercertificate *[]string `json:"usercertificate,omitempty"` - - /* - Password - - */ - HasPassword *bool `json:"has_password,omitempty"` - - /* - Member of groups - - */ - MemberofGroup *[]string `json:"memberof_group,omitempty"` - - /* - Roles - - */ - MemberofRole *[]string `json:"memberof_role,omitempty"` - - /* - Member of netgroups - - */ - MemberofNetgroup *[]string `json:"memberof_netgroup,omitempty"` - - /* - Member of Sudo rule - - */ - MemberofSudorule *[]string `json:"memberof_sudorule,omitempty"` - - /* - Member of HBAC rule - - */ - MemberofHbacrule *[]string `json:"memberof_hbacrule,omitempty"` - - /* - Indirect Member of group - - */ - MemberofindirectGroup *string `json:"memberofindirect_group,omitempty"` - - /* - Indirect Member of netgroup - - */ - MemberofindirectNetgroup *string `json:"memberofindirect_netgroup,omitempty"` - - /* - Indirect Member of role - - */ - MemberofindirectRole *string `json:"memberofindirect_role,omitempty"` - - /* - Indirect Member of Sudo rule - - */ - MemberofindirectSudorule *string `json:"memberofindirect_sudorule,omitempty"` - - /* - Indirect Member of HBAC rule - - */ - MemberofindirectHbacrule *string `json:"memberofindirect_hbacrule,omitempty"` - - /* - Kerberos keys available - - */ - HasKeytab *bool `json:"has_keytab,omitempty"` -} - -func (t *Stageuser) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Stageuser[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Stageuser%v", string(b)) -} - -type jsonStageuser struct { - UID interface{} `json:"uid"` - - Givenname interface{} `json:"givenname"` - - Sn interface{} `json:"sn"` - - Cn interface{} `json:"cn"` - - Displayname interface{} `json:"displayname"` - - Initials interface{} `json:"initials"` - - Homedirectory interface{} `json:"homedirectory"` - - Gecos interface{} `json:"gecos"` - - Loginshell interface{} `json:"loginshell"` - - Krbcanonicalname interface{} `json:"krbcanonicalname"` - - Krbprincipalname interface{} `json:"krbprincipalname"` - - Krbprincipalexpiration interface{} `json:"krbprincipalexpiration"` - - Mail interface{} `json:"mail"` - - Userpassword interface{} `json:"userpassword"` - - Random interface{} `json:"random"` - - Randompassword interface{} `json:"randompassword"` - - Uidnumber interface{} `json:"uidnumber"` - - Gidnumber interface{} `json:"gidnumber"` - - Street interface{} `json:"street"` - - L interface{} `json:"l"` - - St interface{} `json:"st"` - - Postalcode interface{} `json:"postalcode"` - - Telephonenumber interface{} `json:"telephonenumber"` - - Mobile interface{} `json:"mobile"` - - Pager interface{} `json:"pager"` - - Facsimiletelephonenumber interface{} `json:"facsimiletelephonenumber"` - - Ou interface{} `json:"ou"` - - Title interface{} `json:"title"` - - Manager interface{} `json:"manager"` - - Carlicense interface{} `json:"carlicense"` - - Ipasshpubkey interface{} `json:"ipasshpubkey"` - - Sshpubkeyfp interface{} `json:"sshpubkeyfp"` - - Ipauserauthtype interface{} `json:"ipauserauthtype"` - - Userclass interface{} `json:"userclass"` - - Ipatokenradiusconfiglink interface{} `json:"ipatokenradiusconfiglink"` - - Ipatokenradiususername interface{} `json:"ipatokenradiususername"` - - Departmentnumber interface{} `json:"departmentnumber"` - - Employeenumber interface{} `json:"employeenumber"` - - Employeetype interface{} `json:"employeetype"` - - Preferredlanguage interface{} `json:"preferredlanguage"` - - Usercertificate interface{} `json:"usercertificate"` - - HasPassword interface{} `json:"has_password"` - - MemberofGroup interface{} `json:"memberof_group"` - - MemberofRole interface{} `json:"memberof_role"` - - MemberofNetgroup interface{} `json:"memberof_netgroup"` - - MemberofSudorule interface{} `json:"memberof_sudorule"` - - MemberofHbacrule interface{} `json:"memberof_hbacrule"` - - MemberofindirectGroup interface{} `json:"memberofindirect_group"` - - MemberofindirectNetgroup interface{} `json:"memberofindirect_netgroup"` - - MemberofindirectRole interface{} `json:"memberofindirect_role"` - - MemberofindirectSudorule interface{} `json:"memberofindirect_sudorule"` - - MemberofindirectHbacrule interface{} `json:"memberofindirect_hbacrule"` - - HasKeytab interface{} `json:"has_keytab"` -} - -func (out *Stageuser) UnmarshalJSON(data []byte) error { - var in jsonStageuser - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.UID - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.UID = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field UID: %v; expected exactly one element", raw) - } - out.UID = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field UID: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Givenname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Givenname = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Givenname: %v; expected exactly one element", raw) - } - out.Givenname = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Givenname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Sn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Sn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Sn: %v; expected exactly one element", raw) - } - out.Sn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Sn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Cn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) - } - out.Cn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Displayname != nil { - raw := in.Displayname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Displayname = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Displayname = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Displayname: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Displayname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Initials != nil { - raw := in.Initials - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Initials = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Initials = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Initials: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Initials: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Homedirectory != nil { - raw := in.Homedirectory - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Homedirectory = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Homedirectory = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Homedirectory: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Homedirectory: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Gecos != nil { - raw := in.Gecos - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Gecos = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Gecos = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Gecos: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Gecos: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Loginshell != nil { - raw := in.Loginshell - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Loginshell = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Loginshell = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Loginshell: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Loginshell: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Krbcanonicalname != nil { - raw := in.Krbcanonicalname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Krbcanonicalname = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Krbcanonicalname = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Krbcanonicalname: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Krbcanonicalname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Krbprincipalname != nil { - raw := in.Krbprincipalname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Krbprincipalname = &[]string{plainV} - } else if sliceOk { - - out.Krbprincipalname = &sliceV - } else { - return fmt.Errorf("unexpected value for field Krbprincipalname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Krbprincipalexpiration != nil { - raw := in.Krbprincipalexpiration - plainV, plainOk := raw.(time.Time) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []time.Time - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(time.Time) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Krbprincipalexpiration = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Krbprincipalexpiration = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Krbprincipalexpiration: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Krbprincipalexpiration: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Mail != nil { - raw := in.Mail - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Mail = &[]string{plainV} - } else if sliceOk { - - out.Mail = &sliceV - } else { - return fmt.Errorf("unexpected value for field Mail: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Userpassword != nil { - raw := in.Userpassword - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Userpassword = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Userpassword = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Userpassword: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Userpassword: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Random != nil { - raw := in.Random - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Random = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Random = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Random: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Random: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Randompassword != nil { - raw := in.Randompassword - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Randompassword = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Randompassword = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Randompassword: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Randompassword: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Uidnumber != nil { - raw := in.Uidnumber - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Uidnumber: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Uidnumber = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Uidnumber = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Uidnumber: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Uidnumber: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Gidnumber != nil { - raw := in.Gidnumber - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Gidnumber: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Gidnumber = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Gidnumber = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Gidnumber: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Gidnumber: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Street != nil { - raw := in.Street - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Street = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Street = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Street: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Street: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.L != nil { - raw := in.L - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.L = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.L = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field L: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field L: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.St != nil { - raw := in.St - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.St = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.St = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field St: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field St: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Postalcode != nil { - raw := in.Postalcode - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Postalcode = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Postalcode = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Postalcode: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Postalcode: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Telephonenumber != nil { - raw := in.Telephonenumber - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Telephonenumber = &[]string{plainV} - } else if sliceOk { - - out.Telephonenumber = &sliceV - } else { - return fmt.Errorf("unexpected value for field Telephonenumber: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Mobile != nil { - raw := in.Mobile - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Mobile = &[]string{plainV} - } else if sliceOk { - - out.Mobile = &sliceV - } else { - return fmt.Errorf("unexpected value for field Mobile: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Pager != nil { - raw := in.Pager - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Pager = &[]string{plainV} - } else if sliceOk { - - out.Pager = &sliceV - } else { - return fmt.Errorf("unexpected value for field Pager: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Facsimiletelephonenumber != nil { - raw := in.Facsimiletelephonenumber - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Facsimiletelephonenumber = &[]string{plainV} - } else if sliceOk { - - out.Facsimiletelephonenumber = &sliceV - } else { - return fmt.Errorf("unexpected value for field Facsimiletelephonenumber: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ou != nil { - raw := in.Ou - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ou = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ou = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ou: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ou: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Title != nil { - raw := in.Title - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Title = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Title = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Title: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Title: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Manager != nil { - raw := in.Manager - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Manager = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Manager = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Manager: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Manager: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Carlicense != nil { - raw := in.Carlicense - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Carlicense = &[]string{plainV} - } else if sliceOk { - - out.Carlicense = &sliceV - } else { - return fmt.Errorf("unexpected value for field Carlicense: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipasshpubkey != nil { - raw := in.Ipasshpubkey - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipasshpubkey = &[]string{plainV} - } else if sliceOk { - - out.Ipasshpubkey = &sliceV - } else { - return fmt.Errorf("unexpected value for field Ipasshpubkey: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Sshpubkeyfp != nil { - raw := in.Sshpubkeyfp - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Sshpubkeyfp = &[]string{plainV} - } else if sliceOk { - - out.Sshpubkeyfp = &sliceV - } else { - return fmt.Errorf("unexpected value for field Sshpubkeyfp: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipauserauthtype != nil { - raw := in.Ipauserauthtype - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipauserauthtype = &[]string{plainV} - } else if sliceOk { - - out.Ipauserauthtype = &sliceV - } else { - return fmt.Errorf("unexpected value for field Ipauserauthtype: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Userclass != nil { - raw := in.Userclass - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Userclass = &[]string{plainV} - } else if sliceOk { - - out.Userclass = &sliceV - } else { - return fmt.Errorf("unexpected value for field Userclass: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipatokenradiusconfiglink != nil { - raw := in.Ipatokenradiusconfiglink - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipatokenradiusconfiglink = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipatokenradiusconfiglink = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipatokenradiusconfiglink: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipatokenradiusconfiglink: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipatokenradiususername != nil { - raw := in.Ipatokenradiususername - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipatokenradiususername = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipatokenradiususername = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipatokenradiususername: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipatokenradiususername: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Departmentnumber != nil { - raw := in.Departmentnumber - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Departmentnumber = &[]string{plainV} - } else if sliceOk { - - out.Departmentnumber = &sliceV - } else { - return fmt.Errorf("unexpected value for field Departmentnumber: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Employeenumber != nil { - raw := in.Employeenumber - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Employeenumber = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Employeenumber = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Employeenumber: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Employeenumber: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Employeetype != nil { - raw := in.Employeetype - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Employeetype = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Employeetype = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Employeetype: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Employeetype: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Preferredlanguage != nil { - raw := in.Preferredlanguage - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Preferredlanguage = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Preferredlanguage = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Preferredlanguage: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Preferredlanguage: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Usercertificate != nil { - raw := in.Usercertificate - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Usercertificate = &[]string{plainV} - } else if sliceOk { - - out.Usercertificate = &sliceV - } else { - return fmt.Errorf("unexpected value for field Usercertificate: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.HasPassword != nil { - raw := in.HasPassword - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.HasPassword = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.HasPassword = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field HasPassword: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field HasPassword: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofGroup != nil { - raw := in.MemberofGroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofGroup = &[]string{plainV} - } else if sliceOk { - - out.MemberofGroup = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberofGroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofRole != nil { - raw := in.MemberofRole - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofRole = &[]string{plainV} - } else if sliceOk { - - out.MemberofRole = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberofRole: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofNetgroup != nil { - raw := in.MemberofNetgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofNetgroup = &[]string{plainV} - } else if sliceOk { - - out.MemberofNetgroup = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberofNetgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofSudorule != nil { - raw := in.MemberofSudorule - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofSudorule = &[]string{plainV} - } else if sliceOk { - - out.MemberofSudorule = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberofSudorule: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofHbacrule != nil { - raw := in.MemberofHbacrule - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofHbacrule = &[]string{plainV} - } else if sliceOk { - - out.MemberofHbacrule = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberofHbacrule: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofindirectGroup != nil { - raw := in.MemberofindirectGroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofindirectGroup = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberofindirectGroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberofindirectGroup: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberofindirectGroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofindirectNetgroup != nil { - raw := in.MemberofindirectNetgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofindirectNetgroup = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberofindirectNetgroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberofindirectNetgroup: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberofindirectNetgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofindirectRole != nil { - raw := in.MemberofindirectRole - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofindirectRole = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberofindirectRole = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberofindirectRole: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberofindirectRole: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofindirectSudorule != nil { - raw := in.MemberofindirectSudorule - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofindirectSudorule = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberofindirectSudorule = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberofindirectSudorule: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberofindirectSudorule: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofindirectHbacrule != nil { - raw := in.MemberofindirectHbacrule - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofindirectHbacrule = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberofindirectHbacrule = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberofindirectHbacrule: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberofindirectHbacrule: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.HasKeytab != nil { - raw := in.HasKeytab - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.HasKeytab = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.HasKeytab = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field HasKeytab: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field HasKeytab: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Sudocmd struct { - - /* - Sudo Command - - */ - Sudocmd string `json:"sudocmd,omitempty"` - - /* - Description - A description of this command - */ - Description *string `json:"description,omitempty"` - - /* - Sudo Command Groups - - */ - MemberofSudocmdgroup *[]string `json:"memberof_sudocmdgroup,omitempty"` -} - -func (t *Sudocmd) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Sudocmd[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Sudocmd%v", string(b)) -} - -type jsonSudocmd struct { - Sudocmd interface{} `json:"sudocmd"` - - Description interface{} `json:"description"` - - MemberofSudocmdgroup interface{} `json:"memberof_sudocmdgroup"` -} - -func (out *Sudocmd) UnmarshalJSON(data []byte) error { - var in jsonSudocmd - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Sudocmd - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Sudocmd = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Sudocmd: %v; expected exactly one element", raw) - } - out.Sudocmd = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Sudocmd: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Description != nil { - raw := in.Description - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Description = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Description = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberofSudocmdgroup != nil { - raw := in.MemberofSudocmdgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberofSudocmdgroup = &[]string{plainV} - } else if sliceOk { - - out.MemberofSudocmdgroup = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberofSudocmdgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Sudocmdgroup struct { - - /* - Sudo Command Group - - */ - Cn string `json:"cn,omitempty"` - - /* - Description - Group description - */ - Description *string `json:"description,omitempty"` - - /* - Commands - - */ - MembercmdSudocmd *string `json:"membercmd_sudocmd,omitempty"` - - /* - Sudo Command Groups - - */ - MembercmdSudocmdgroup *string `json:"membercmd_sudocmdgroup,omitempty"` - - /* - Member Sudo commands - - */ - MemberSudocmd *[]string `json:"member_sudocmd,omitempty"` -} - -func (t *Sudocmdgroup) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Sudocmdgroup[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Sudocmdgroup%v", string(b)) -} - -type jsonSudocmdgroup struct { - Cn interface{} `json:"cn"` - - Description interface{} `json:"description"` - - MembercmdSudocmd interface{} `json:"membercmd_sudocmd"` - - MembercmdSudocmdgroup interface{} `json:"membercmd_sudocmdgroup"` - - MemberSudocmd interface{} `json:"member_sudocmd"` -} - -func (out *Sudocmdgroup) UnmarshalJSON(data []byte) error { - var in jsonSudocmdgroup - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Cn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) - } - out.Cn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Description != nil { - raw := in.Description - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Description = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Description = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MembercmdSudocmd != nil { - raw := in.MembercmdSudocmd - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MembercmdSudocmd = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MembercmdSudocmd = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MembercmdSudocmd: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MembercmdSudocmd: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MembercmdSudocmdgroup != nil { - raw := in.MembercmdSudocmdgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MembercmdSudocmdgroup = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MembercmdSudocmdgroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MembercmdSudocmdgroup: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MembercmdSudocmdgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberSudocmd != nil { - raw := in.MemberSudocmd - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberSudocmd = &[]string{plainV} - } else if sliceOk { - - out.MemberSudocmd = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberSudocmd: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Sudorule struct { - - /* - Rule name - - */ - Cn string `json:"cn,omitempty"` - - /* - Description - - */ - Description *string `json:"description,omitempty"` - - /* - Enabled - - */ - Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` - - /* - User category - User category the rule applies to - */ - Usercategory *string `json:"usercategory,omitempty"` - - /* - Host category - Host category the rule applies to - */ - Hostcategory *string `json:"hostcategory,omitempty"` - - /* - Command category - Command category the rule applies to - */ - Cmdcategory *string `json:"cmdcategory,omitempty"` - - /* - RunAs User category - RunAs User category the rule applies to - */ - Ipasudorunasusercategory *string `json:"ipasudorunasusercategory,omitempty"` - - /* - RunAs Group category - RunAs Group category the rule applies to - */ - Ipasudorunasgroupcategory *string `json:"ipasudorunasgroupcategory,omitempty"` - - /* - Sudo order - integer to order the Sudo rules - */ - Sudoorder *int `json:"sudoorder,omitempty"` - - /* - Users - - */ - MemberuserUser *string `json:"memberuser_user,omitempty"` - - /* - User Groups - - */ - MemberuserGroup *string `json:"memberuser_group,omitempty"` - - /* - External User - External User the rule applies to (sudorule-find only) - */ - Externaluser *string `json:"externaluser,omitempty"` - - /* - Hosts - - */ - MemberhostHost *string `json:"memberhost_host,omitempty"` - - /* - Host Groups - - */ - MemberhostHostgroup *string `json:"memberhost_hostgroup,omitempty"` - - /* - Host Masks - - */ - Hostmask []string `json:"hostmask,omitempty"` - - /* - External host - - */ - Externalhost *[]string `json:"externalhost,omitempty"` - - /* - Sudo Allow Commands - - */ - MemberallowcmdSudocmd *string `json:"memberallowcmd_sudocmd,omitempty"` - - /* - Sudo Deny Commands - - */ - MemberdenycmdSudocmd *string `json:"memberdenycmd_sudocmd,omitempty"` - - /* - Sudo Allow Command Groups - - */ - MemberallowcmdSudocmdgroup *string `json:"memberallowcmd_sudocmdgroup,omitempty"` - - /* - Sudo Deny Command Groups - - */ - MemberdenycmdSudocmdgroup *string `json:"memberdenycmd_sudocmdgroup,omitempty"` - - /* - RunAs Users - Run as a user - */ - IpasudorunasUser *string `json:"ipasudorunas_user,omitempty"` - - /* - Groups of RunAs Users - Run as any user within a specified group - */ - IpasudorunasGroup *string `json:"ipasudorunas_group,omitempty"` - - /* - RunAs External User - External User the commands can run as (sudorule-find only) - */ - Ipasudorunasextuser *string `json:"ipasudorunasextuser,omitempty"` - - /* - External Groups of RunAs Users - External Groups of users that the command can run as - */ - Ipasudorunasextusergroup *string `json:"ipasudorunasextusergroup,omitempty"` - - /* - RunAs Groups - Run with the gid of a specified POSIX group - */ - IpasudorunasgroupGroup *string `json:"ipasudorunasgroup_group,omitempty"` - - /* - RunAs External Group - External Group the commands can run as (sudorule-find only) - */ - Ipasudorunasextgroup *string `json:"ipasudorunasextgroup,omitempty"` - - /* - Sudo Option - - */ - Ipasudoopt *string `json:"ipasudoopt,omitempty"` -} - -func (t *Sudorule) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Sudorule[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Sudorule%v", string(b)) -} - -type jsonSudorule struct { - Cn interface{} `json:"cn"` - - Description interface{} `json:"description"` - - Ipaenabledflag interface{} `json:"ipaenabledflag"` - - Usercategory interface{} `json:"usercategory"` - - Hostcategory interface{} `json:"hostcategory"` - - Cmdcategory interface{} `json:"cmdcategory"` - - Ipasudorunasusercategory interface{} `json:"ipasudorunasusercategory"` - - Ipasudorunasgroupcategory interface{} `json:"ipasudorunasgroupcategory"` - - Sudoorder interface{} `json:"sudoorder"` - - MemberuserUser interface{} `json:"memberuser_user"` - - MemberuserGroup interface{} `json:"memberuser_group"` - - Externaluser interface{} `json:"externaluser"` - - MemberhostHost interface{} `json:"memberhost_host"` - - MemberhostHostgroup interface{} `json:"memberhost_hostgroup"` - - Hostmask interface{} `json:"hostmask"` - - Externalhost interface{} `json:"externalhost"` - - MemberallowcmdSudocmd interface{} `json:"memberallowcmd_sudocmd"` - - MemberdenycmdSudocmd interface{} `json:"memberdenycmd_sudocmd"` - - MemberallowcmdSudocmdgroup interface{} `json:"memberallowcmd_sudocmdgroup"` - - MemberdenycmdSudocmdgroup interface{} `json:"memberdenycmd_sudocmdgroup"` - - IpasudorunasUser interface{} `json:"ipasudorunas_user"` - - IpasudorunasGroup interface{} `json:"ipasudorunas_group"` - - Ipasudorunasextuser interface{} `json:"ipasudorunasextuser"` - - Ipasudorunasextusergroup interface{} `json:"ipasudorunasextusergroup"` - - IpasudorunasgroupGroup interface{} `json:"ipasudorunasgroup_group"` - - Ipasudorunasextgroup interface{} `json:"ipasudorunasextgroup"` - - Ipasudoopt interface{} `json:"ipasudoopt"` -} - -func (out *Sudorule) UnmarshalJSON(data []byte) error { - var in jsonSudorule - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Cn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) - } - out.Cn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Description != nil { - raw := in.Description - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Description = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Description = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipaenabledflag != nil { - raw := in.Ipaenabledflag - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipaenabledflag = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipaenabledflag = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipaenabledflag: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipaenabledflag: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Usercategory != nil { - raw := in.Usercategory - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Usercategory = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Usercategory = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Usercategory: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Usercategory: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Hostcategory != nil { - raw := in.Hostcategory - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Hostcategory = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Hostcategory = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Hostcategory: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Hostcategory: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Cmdcategory != nil { - raw := in.Cmdcategory - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cmdcategory = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Cmdcategory = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Cmdcategory: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Cmdcategory: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipasudorunasusercategory != nil { - raw := in.Ipasudorunasusercategory - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipasudorunasusercategory = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipasudorunasusercategory = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipasudorunasusercategory: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipasudorunasusercategory: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipasudorunasgroupcategory != nil { - raw := in.Ipasudorunasgroupcategory - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipasudorunasgroupcategory = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipasudorunasgroupcategory = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipasudorunasgroupcategory: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipasudorunasgroupcategory: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Sudoorder != nil { - raw := in.Sudoorder - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Sudoorder: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Sudoorder = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Sudoorder = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Sudoorder: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Sudoorder: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberuserUser != nil { - raw := in.MemberuserUser - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberuserUser = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberuserUser = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberuserUser: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberuserUser: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberuserGroup != nil { - raw := in.MemberuserGroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberuserGroup = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberuserGroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberuserGroup: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberuserGroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Externaluser != nil { - raw := in.Externaluser - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Externaluser = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Externaluser = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Externaluser: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Externaluser: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberhostHost != nil { - raw := in.MemberhostHost - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberhostHost = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberhostHost = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberhostHost: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberhostHost: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberhostHostgroup != nil { - raw := in.MemberhostHostgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberhostHostgroup = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberhostHostgroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberhostHostgroup: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberhostHostgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Hostmask - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Hostmask = []string{plainV} - } else if sliceOk { - - if len(sliceV) < 1 { - return fmt.Errorf("unexpected value for field Hostmask: %v; expected at least one element", raw) - } - - out.Hostmask = sliceV - } else { - return fmt.Errorf("unexpected value for field Hostmask: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Externalhost != nil { - raw := in.Externalhost - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Externalhost = &[]string{plainV} - } else if sliceOk { - - out.Externalhost = &sliceV - } else { - return fmt.Errorf("unexpected value for field Externalhost: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberallowcmdSudocmd != nil { - raw := in.MemberallowcmdSudocmd - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberallowcmdSudocmd = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberallowcmdSudocmd = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberallowcmdSudocmd: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberallowcmdSudocmd: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberdenycmdSudocmd != nil { - raw := in.MemberdenycmdSudocmd - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberdenycmdSudocmd = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberdenycmdSudocmd = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberdenycmdSudocmd: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberdenycmdSudocmd: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberallowcmdSudocmdgroup != nil { - raw := in.MemberallowcmdSudocmdgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberallowcmdSudocmdgroup = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberallowcmdSudocmdgroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberallowcmdSudocmdgroup: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberallowcmdSudocmdgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.MemberdenycmdSudocmdgroup != nil { - raw := in.MemberdenycmdSudocmdgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.MemberdenycmdSudocmdgroup = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.MemberdenycmdSudocmdgroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberdenycmdSudocmdgroup: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field MemberdenycmdSudocmdgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.IpasudorunasUser != nil { - raw := in.IpasudorunasUser - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.IpasudorunasUser = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.IpasudorunasUser = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field IpasudorunasUser: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field IpasudorunasUser: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.IpasudorunasGroup != nil { - raw := in.IpasudorunasGroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.IpasudorunasGroup = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.IpasudorunasGroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field IpasudorunasGroup: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field IpasudorunasGroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipasudorunasextuser != nil { - raw := in.Ipasudorunasextuser - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipasudorunasextuser = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipasudorunasextuser = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipasudorunasextuser: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipasudorunasextuser: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipasudorunasextusergroup != nil { - raw := in.Ipasudorunasextusergroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipasudorunasextusergroup = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipasudorunasextusergroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipasudorunasextusergroup: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipasudorunasextusergroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.IpasudorunasgroupGroup != nil { - raw := in.IpasudorunasgroupGroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.IpasudorunasgroupGroup = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.IpasudorunasgroupGroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field IpasudorunasgroupGroup: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field IpasudorunasgroupGroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipasudorunasextgroup != nil { - raw := in.Ipasudorunasextgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipasudorunasextgroup = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipasudorunasextgroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipasudorunasextgroup: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipasudorunasextgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipasudoopt != nil { - raw := in.Ipasudoopt - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipasudoopt = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipasudoopt = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipasudoopt: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipasudoopt: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Topic struct { - - /* - Name - - */ - Name string `json:"name,omitempty"` - - /* - Version - - */ - Version string `json:"version,omitempty"` - - /* - Full name - - */ - FullName string `json:"full_name,omitempty"` - - /* - Documentation - - */ - Doc *string `json:"doc,omitempty"` - - /* - Exclude from - - */ - Exclude *[]string `json:"exclude,omitempty"` - - /* - Include in - - */ - Include *[]string `json:"include,omitempty"` - - /* - Help topic - - */ - TopicTopic *string `json:"topic_topic,omitempty"` -} - -func (t *Topic) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Topic[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Topic%v", string(b)) -} - -type jsonTopic struct { - Name interface{} `json:"name"` - - Version interface{} `json:"version"` - - FullName interface{} `json:"full_name"` - - Doc interface{} `json:"doc"` - - Exclude interface{} `json:"exclude"` - - Include interface{} `json:"include"` - - TopicTopic interface{} `json:"topic_topic"` -} - -func (out *Topic) UnmarshalJSON(data []byte) error { - var in jsonTopic - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Name - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Name = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Name: %v; expected exactly one element", raw) - } - out.Name = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Name: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Version - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Version = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Version: %v; expected exactly one element", raw) - } - out.Version = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Version: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.FullName - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.FullName = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field FullName: %v; expected exactly one element", raw) - } - out.FullName = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field FullName: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Doc != nil { - raw := in.Doc - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Doc = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Doc = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Doc: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Doc: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Exclude != nil { - raw := in.Exclude - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Exclude = &[]string{plainV} - } else if sliceOk { - - out.Exclude = &sliceV - } else { - return fmt.Errorf("unexpected value for field Exclude: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Include != nil { - raw := in.Include - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Include = &[]string{plainV} - } else if sliceOk { - - out.Include = &sliceV - } else { - return fmt.Errorf("unexpected value for field Include: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.TopicTopic != nil { - raw := in.TopicTopic - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.TopicTopic = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.TopicTopic = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field TopicTopic: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field TopicTopic: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Topologysegment struct { - - /* - Segment name - Arbitrary string identifying the segment - */ - Cn string `json:"cn,omitempty"` - - /* - Left node - Left replication node - an IPA server - */ - Iparepltoposegmentleftnode string `json:"iparepltoposegmentleftnode,omitempty"` - - /* - Right node - Right replication node - an IPA server - */ - Iparepltoposegmentrightnode string `json:"iparepltoposegmentrightnode,omitempty"` - - /* - Connectivity - Direction of replication between left and right replication node - */ - Iparepltoposegmentdirection string `json:"iparepltoposegmentdirection,omitempty"` - - /* - Attributes to strip - A space separated list of attributes which are removed from replication updates. - */ - Nsds5replicastripattrs *string `json:"nsds5replicastripattrs,omitempty"` - - /* - Attributes to replicate - Attributes that are not replicated to a consumer server during a fractional update. E.g., `(objectclass=*) $ EXCLUDE accountlockout memberof - */ - Nsds5replicatedattributelist *string `json:"nsds5replicatedattributelist,omitempty"` - - /* - Attributes for total update - Attributes that are not replicated to a consumer server during a total update. E.g. (objectclass=*) $ EXCLUDE accountlockout - */ - Nsds5replicatedattributelisttotal *string `json:"nsds5replicatedattributelisttotal,omitempty"` - - /* - Session timeout - Number of seconds outbound LDAP operations waits for a response from the remote replica before timing out and failing - */ - Nsds5replicatimeout *int `json:"nsds5replicatimeout,omitempty"` - - /* - Replication agreement enabled - Whether a replication agreement is active, meaning whether replication is occurring per that agreement - */ - Nsds5replicaenabled *string `json:"nsds5replicaenabled,omitempty"` -} - -func (t *Topologysegment) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Topologysegment[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Topologysegment%v", string(b)) -} - -type jsonTopologysegment struct { - Cn interface{} `json:"cn"` - - Iparepltoposegmentleftnode interface{} `json:"iparepltoposegmentleftnode"` - - Iparepltoposegmentrightnode interface{} `json:"iparepltoposegmentrightnode"` - - Iparepltoposegmentdirection interface{} `json:"iparepltoposegmentdirection"` - - Nsds5replicastripattrs interface{} `json:"nsds5replicastripattrs"` - - Nsds5replicatedattributelist interface{} `json:"nsds5replicatedattributelist"` - - Nsds5replicatedattributelisttotal interface{} `json:"nsds5replicatedattributelisttotal"` - - Nsds5replicatimeout interface{} `json:"nsds5replicatimeout"` - - Nsds5replicaenabled interface{} `json:"nsds5replicaenabled"` -} - -func (out *Topologysegment) UnmarshalJSON(data []byte) error { - var in jsonTopologysegment - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Cn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) - } - out.Cn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Iparepltoposegmentleftnode - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Iparepltoposegmentleftnode = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Iparepltoposegmentleftnode: %v; expected exactly one element", raw) - } - out.Iparepltoposegmentleftnode = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Iparepltoposegmentleftnode: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Iparepltoposegmentrightnode - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Iparepltoposegmentrightnode = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Iparepltoposegmentrightnode: %v; expected exactly one element", raw) - } - out.Iparepltoposegmentrightnode = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Iparepltoposegmentrightnode: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Iparepltoposegmentdirection - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Iparepltoposegmentdirection = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Iparepltoposegmentdirection: %v; expected exactly one element", raw) - } - out.Iparepltoposegmentdirection = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Iparepltoposegmentdirection: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Nsds5replicastripattrs != nil { - raw := in.Nsds5replicastripattrs - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Nsds5replicastripattrs = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Nsds5replicastripattrs = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Nsds5replicastripattrs: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Nsds5replicastripattrs: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Nsds5replicatedattributelist != nil { - raw := in.Nsds5replicatedattributelist - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Nsds5replicatedattributelist = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Nsds5replicatedattributelist = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Nsds5replicatedattributelist: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Nsds5replicatedattributelist: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Nsds5replicatedattributelisttotal != nil { - raw := in.Nsds5replicatedattributelisttotal - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Nsds5replicatedattributelisttotal = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Nsds5replicatedattributelisttotal = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Nsds5replicatedattributelisttotal: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Nsds5replicatedattributelisttotal: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Nsds5replicatimeout != nil { - raw := in.Nsds5replicatimeout - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Nsds5replicatimeout: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Nsds5replicatimeout = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Nsds5replicatimeout = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Nsds5replicatimeout: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Nsds5replicatimeout: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Nsds5replicaenabled != nil { - raw := in.Nsds5replicaenabled - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Nsds5replicaenabled = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Nsds5replicaenabled = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Nsds5replicaenabled: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Nsds5replicaenabled: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Topologysuffix struct { - - /* - Suffix name - - */ - Cn string `json:"cn,omitempty"` - - /* - Managed LDAP suffix DN - - */ - Iparepltopoconfroot string `json:"iparepltopoconfroot,omitempty"` -} - -func (t *Topologysuffix) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Topologysuffix[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Topologysuffix%v", string(b)) -} - -type jsonTopologysuffix struct { - Cn interface{} `json:"cn"` - - Iparepltopoconfroot interface{} `json:"iparepltopoconfroot"` -} - -func (out *Topologysuffix) UnmarshalJSON(data []byte) error { - var in jsonTopologysuffix - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Cn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) - } - out.Cn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Iparepltopoconfroot - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Iparepltopoconfroot = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Iparepltopoconfroot: %v; expected exactly one element", raw) - } - out.Iparepltopoconfroot = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Iparepltopoconfroot: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Trust struct { - - /* - Realm name - - */ - Cn string `json:"cn,omitempty"` - - /* - Domain NetBIOS name - - */ - Ipantflatname string `json:"ipantflatname,omitempty"` - - /* - Domain Security Identifier - - */ - Ipanttrusteddomainsid string `json:"ipanttrusteddomainsid,omitempty"` - - /* - SID blacklist incoming - - */ - Ipantsidblacklistincoming *[]string `json:"ipantsidblacklistincoming,omitempty"` - - /* - SID blacklist outgoing - - */ - Ipantsidblacklistoutgoing *[]string `json:"ipantsidblacklistoutgoing,omitempty"` - - /* - Trust direction - - */ - Trustdirection string `json:"trustdirection,omitempty"` - - /* - Trust type - - */ - Trusttype string `json:"trusttype,omitempty"` - - /* - Trust status - - */ - Truststatus string `json:"truststatus,omitempty"` - - /* - UPN suffixes - - */ - Ipantadditionalsuffixes *[]string `json:"ipantadditionalsuffixes,omitempty"` -} - -func (t *Trust) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Trust[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Trust%v", string(b)) -} - -type jsonTrust struct { - Cn interface{} `json:"cn"` - - Ipantflatname interface{} `json:"ipantflatname"` - - Ipanttrusteddomainsid interface{} `json:"ipanttrusteddomainsid"` - - Ipantsidblacklistincoming interface{} `json:"ipantsidblacklistincoming"` - - Ipantsidblacklistoutgoing interface{} `json:"ipantsidblacklistoutgoing"` - - Trustdirection interface{} `json:"trustdirection"` - - Trusttype interface{} `json:"trusttype"` - - Truststatus interface{} `json:"truststatus"` - - Ipantadditionalsuffixes interface{} `json:"ipantadditionalsuffixes"` -} - -func (out *Trust) UnmarshalJSON(data []byte) error { - var in jsonTrust - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Cn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) - } - out.Cn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Ipantflatname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipantflatname = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipantflatname: %v; expected exactly one element", raw) - } - out.Ipantflatname = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipantflatname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Ipanttrusteddomainsid - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipanttrusteddomainsid = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipanttrusteddomainsid: %v; expected exactly one element", raw) - } - out.Ipanttrusteddomainsid = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipanttrusteddomainsid: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipantsidblacklistincoming != nil { - raw := in.Ipantsidblacklistincoming - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipantsidblacklistincoming = &[]string{plainV} - } else if sliceOk { - - out.Ipantsidblacklistincoming = &sliceV - } else { - return fmt.Errorf("unexpected value for field Ipantsidblacklistincoming: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipantsidblacklistoutgoing != nil { - raw := in.Ipantsidblacklistoutgoing - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipantsidblacklistoutgoing = &[]string{plainV} - } else if sliceOk { - - out.Ipantsidblacklistoutgoing = &sliceV - } else { - return fmt.Errorf("unexpected value for field Ipantsidblacklistoutgoing: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Trustdirection - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Trustdirection = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Trustdirection: %v; expected exactly one element", raw) - } - out.Trustdirection = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Trustdirection: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Trusttype - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Trusttype = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Trusttype: %v; expected exactly one element", raw) - } - out.Trusttype = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Trusttype: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Truststatus - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Truststatus = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Truststatus: %v; expected exactly one element", raw) - } - out.Truststatus = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Truststatus: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipantadditionalsuffixes != nil { - raw := in.Ipantadditionalsuffixes - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipantadditionalsuffixes = &[]string{plainV} - } else if sliceOk { - - out.Ipantadditionalsuffixes = &sliceV - } else { - return fmt.Errorf("unexpected value for field Ipantadditionalsuffixes: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Trustconfig struct { - - /* - Domain - - */ - Cn string `json:"cn,omitempty"` - - /* - Security Identifier - - */ - Ipantsecurityidentifier string `json:"ipantsecurityidentifier,omitempty"` - - /* - NetBIOS name - - */ - Ipantflatname string `json:"ipantflatname,omitempty"` - - /* - Domain GUID - - */ - Ipantdomainguid string `json:"ipantdomainguid,omitempty"` - - /* - Fallback primary group - - */ - Ipantfallbackprimarygroup string `json:"ipantfallbackprimarygroup,omitempty"` - - /* - IPA AD trust agents - IPA servers configured as AD trust agents - */ - AdTrustAgentServer *[]string `json:"ad_trust_agent_server,omitempty"` - - /* - IPA AD trust controllers - IPA servers configured as AD trust controllers - */ - AdTrustControllerServer *[]string `json:"ad_trust_controller_server,omitempty"` -} - -func (t *Trustconfig) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Trustconfig[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Trustconfig%v", string(b)) -} - -type jsonTrustconfig struct { - Cn interface{} `json:"cn"` - - Ipantsecurityidentifier interface{} `json:"ipantsecurityidentifier"` - - Ipantflatname interface{} `json:"ipantflatname"` - - Ipantdomainguid interface{} `json:"ipantdomainguid"` - - Ipantfallbackprimarygroup interface{} `json:"ipantfallbackprimarygroup"` - - AdTrustAgentServer interface{} `json:"ad_trust_agent_server"` - - AdTrustControllerServer interface{} `json:"ad_trust_controller_server"` -} - -func (out *Trustconfig) UnmarshalJSON(data []byte) error { - var in jsonTrustconfig - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Cn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) - } - out.Cn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Ipantsecurityidentifier - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipantsecurityidentifier = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipantsecurityidentifier: %v; expected exactly one element", raw) - } - out.Ipantsecurityidentifier = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipantsecurityidentifier: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Ipantflatname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipantflatname = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipantflatname: %v; expected exactly one element", raw) - } - out.Ipantflatname = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipantflatname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Ipantdomainguid - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipantdomainguid = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipantdomainguid: %v; expected exactly one element", raw) - } - out.Ipantdomainguid = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipantdomainguid: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Ipantfallbackprimarygroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipantfallbackprimarygroup = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Ipantfallbackprimarygroup: %v; expected exactly one element", raw) - } - out.Ipantfallbackprimarygroup = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Ipantfallbackprimarygroup: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.AdTrustAgentServer != nil { - raw := in.AdTrustAgentServer - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.AdTrustAgentServer = &[]string{plainV} - } else if sliceOk { - - out.AdTrustAgentServer = &sliceV - } else { - return fmt.Errorf("unexpected value for field AdTrustAgentServer: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.AdTrustControllerServer != nil { - raw := in.AdTrustControllerServer - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.AdTrustControllerServer = &[]string{plainV} - } else if sliceOk { - - out.AdTrustControllerServer = &sliceV - } else { - return fmt.Errorf("unexpected value for field AdTrustControllerServer: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type Trustdomain struct { - - /* - Domain name - - */ - Cn string `json:"cn,omitempty"` - - /* - Domain NetBIOS name - - */ - Ipantflatname *string `json:"ipantflatname,omitempty"` - - /* - Domain Security Identifier - - */ - Ipanttrusteddomainsid *string `json:"ipanttrusteddomainsid,omitempty"` - - /* - Domain enabled - - */ - DomainEnabled *bool `json:"domain_enabled,omitempty"` -} - -func (t *Trustdomain) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Trustdomain[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Trustdomain%v", string(b)) -} - -type jsonTrustdomain struct { - Cn interface{} `json:"cn"` - - Ipantflatname interface{} `json:"ipantflatname"` - - Ipanttrusteddomainsid interface{} `json:"ipanttrusteddomainsid"` - - DomainEnabled interface{} `json:"domain_enabled"` -} - -func (out *Trustdomain) UnmarshalJSON(data []byte) error { - var in jsonTrustdomain - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.Cn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) - } - out.Cn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipantflatname != nil { - raw := in.Ipantflatname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipantflatname = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipantflatname = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipantflatname: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipantflatname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipanttrusteddomainsid != nil { - raw := in.Ipanttrusteddomainsid - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipanttrusteddomainsid = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ipanttrusteddomainsid = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipanttrusteddomainsid: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ipanttrusteddomainsid: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.DomainEnabled != nil { - raw := in.DomainEnabled - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.DomainEnabled = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.DomainEnabled = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field DomainEnabled: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field DomainEnabled: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - return nil -} - -type User struct { - - /* - User login - - */ - UID string `json:"uid,omitempty"` - - /* - First name - - */ - Givenname *string `json:"givenname,omitempty"` - - /* - Last name - - */ - Sn string `json:"sn,omitempty"` - - /* - Full name - - */ - Cn *string `json:"cn,omitempty"` - - /* - Display name - - */ - Displayname *string `json:"displayname,omitempty"` - - /* - Initials - - */ - Initials *string `json:"initials,omitempty"` - - /* - Home directory - - */ - Homedirectory *string `json:"homedirectory,omitempty"` - - /* - GECOS - - */ - Gecos *string `json:"gecos,omitempty"` - - /* - Login shell - - */ - Loginshell *string `json:"loginshell,omitempty"` - - /* - Principal name - - */ - Krbcanonicalname *string `json:"krbcanonicalname,omitempty"` - - /* - Principal alias - - */ - Krbprincipalname *[]string `json:"krbprincipalname,omitempty"` - - /* - Kerberos principal expiration - - */ - Krbprincipalexpiration *time.Time `json:"krbprincipalexpiration,omitempty"` - - /* - Email address - - */ - Mail *[]string `json:"mail,omitempty"` - - /* - Password - Prompt to set the user password - */ - Userpassword *string `json:"userpassword,omitempty"` - - /* - - Generate a random user password - */ - Random *bool `json:"random,omitempty"` - - /* - Random password - - */ - Randompassword *string `json:"randompassword,omitempty"` - - /* - UID - User ID Number (system will assign one if not provided) - */ - Uidnumber *int `json:"uidnumber,omitempty"` - - /* - GID - Group ID Number - */ - Gidnumber *int `json:"gidnumber,omitempty"` - - /* - Street address - - */ - Street *string `json:"street,omitempty"` - - /* - City - - */ - L *string `json:"l,omitempty"` - - /* - State/Province - - */ - St *string `json:"st,omitempty"` - - /* - ZIP - - */ - Postalcode *string `json:"postalcode,omitempty"` - - /* - Telephone Number - - */ - Telephonenumber *[]string `json:"telephonenumber,omitempty"` - - /* - Mobile Telephone Number - - */ - Mobile *[]string `json:"mobile,omitempty"` - - /* - Pager Number - - */ - Pager *[]string `json:"pager,omitempty"` - - /* - Fax Number - - */ - Facsimiletelephonenumber *[]string `json:"facsimiletelephonenumber,omitempty"` - - /* - Org. Unit - - */ - Ou *string `json:"ou,omitempty"` - - /* - Job Title - - */ - Title *string `json:"title,omitempty"` - - /* - Manager - - */ - Manager *string `json:"manager,omitempty"` - - /* - Car License - - */ - Carlicense *[]string `json:"carlicense,omitempty"` - - /* - SSH public key - - */ - Ipasshpubkey *[]string `json:"ipasshpubkey,omitempty"` - - /* - SSH public key fingerprint - - */ - Sshpubkeyfp *[]string `json:"sshpubkeyfp,omitempty"` - - /* - User authentication types - Types of supported user authentication - */ - Ipauserauthtype *[]string `json:"ipauserauthtype,omitempty"` - - /* - Class - User category (semantics placed on this attribute are for local interpretation) - */ - Userclass *[]string `json:"userclass,omitempty"` - - /* - RADIUS proxy configuration - - */ - Ipatokenradiusconfiglink *string `json:"ipatokenradiusconfiglink,omitempty"` - - /* - RADIUS proxy username - - */ - Ipatokenradiususername *string `json:"ipatokenradiususername,omitempty"` - - /* - Department Number - - */ - Departmentnumber *[]string `json:"departmentnumber,omitempty"` - - /* - Employee Number - - */ - Employeenumber *string `json:"employeenumber,omitempty"` - - /* - Employee Type - - */ - Employeetype *string `json:"employeetype,omitempty"` - - /* - Preferred Language - - */ - Preferredlanguage *string `json:"preferredlanguage,omitempty"` - - /* - Certificate - Base-64 encoded user certificate - */ - Usercertificate *[]string `json:"usercertificate,omitempty"` - - /* - Account disabled - - */ - Nsaccountlock *bool `json:"nsaccountlock,omitempty"` - - /* - Preserved user - - */ - Preserved *bool `json:"preserved,omitempty"` - - /* - Password - - */ - HasPassword *bool `json:"has_password,omitempty"` - - /* - Member of groups - - */ - MemberofGroup *[]string `json:"memberof_group,omitempty"` - - /* - Roles - - */ - MemberofRole *[]string `json:"memberof_role,omitempty"` - - /* - Member of netgroups - - */ - MemberofNetgroup *[]string `json:"memberof_netgroup,omitempty"` - - /* - Member of Sudo rule - - */ - MemberofSudorule *[]string `json:"memberof_sudorule,omitempty"` - - /* - Member of HBAC rule - - */ - MemberofHbacrule *[]string `json:"memberof_hbacrule,omitempty"` - - /* - Indirect Member of group - - */ - MemberofindirectGroup *string `json:"memberofindirect_group,omitempty"` - - /* - Indirect Member of netgroup - - */ - MemberofindirectNetgroup *string `json:"memberofindirect_netgroup,omitempty"` - - /* - Indirect Member of role - - */ - MemberofindirectRole *string `json:"memberofindirect_role,omitempty"` - - /* - Indirect Member of Sudo rule - - */ - MemberofindirectSudorule *string `json:"memberofindirect_sudorule,omitempty"` - - /* - Indirect Member of HBAC rule - - */ - MemberofindirectHbacrule *string `json:"memberofindirect_hbacrule,omitempty"` - - /* - Kerberos keys available - - */ - HasKeytab *bool `json:"has_keytab,omitempty"` -} - -func (t *User) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("User[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("User%v", string(b)) -} - -type jsonUser struct { - UID interface{} `json:"uid"` - - Givenname interface{} `json:"givenname"` - - Sn interface{} `json:"sn"` - - Cn interface{} `json:"cn"` - - Displayname interface{} `json:"displayname"` - - Initials interface{} `json:"initials"` - - Homedirectory interface{} `json:"homedirectory"` - - Gecos interface{} `json:"gecos"` - - Loginshell interface{} `json:"loginshell"` - - Krbcanonicalname interface{} `json:"krbcanonicalname"` - - Krbprincipalname interface{} `json:"krbprincipalname"` - - Krbprincipalexpiration interface{} `json:"krbprincipalexpiration"` - - Mail interface{} `json:"mail"` - - Userpassword interface{} `json:"userpassword"` - - Random interface{} `json:"random"` - - Randompassword interface{} `json:"randompassword"` - - Uidnumber interface{} `json:"uidnumber"` - - Gidnumber interface{} `json:"gidnumber"` - - Street interface{} `json:"street"` - - L interface{} `json:"l"` - - St interface{} `json:"st"` - - Postalcode interface{} `json:"postalcode"` - - Telephonenumber interface{} `json:"telephonenumber"` - - Mobile interface{} `json:"mobile"` - - Pager interface{} `json:"pager"` - - Facsimiletelephonenumber interface{} `json:"facsimiletelephonenumber"` - - Ou interface{} `json:"ou"` - - Title interface{} `json:"title"` - - Manager interface{} `json:"manager"` - - Carlicense interface{} `json:"carlicense"` - - Ipasshpubkey interface{} `json:"ipasshpubkey"` - - Sshpubkeyfp interface{} `json:"sshpubkeyfp"` - - Ipauserauthtype interface{} `json:"ipauserauthtype"` - - Userclass interface{} `json:"userclass"` - - Ipatokenradiusconfiglink interface{} `json:"ipatokenradiusconfiglink"` - - Ipatokenradiususername interface{} `json:"ipatokenradiususername"` - - Departmentnumber interface{} `json:"departmentnumber"` - - Employeenumber interface{} `json:"employeenumber"` - - Employeetype interface{} `json:"employeetype"` - - Preferredlanguage interface{} `json:"preferredlanguage"` - - Usercertificate interface{} `json:"usercertificate"` - - Nsaccountlock interface{} `json:"nsaccountlock"` - - Preserved interface{} `json:"preserved"` - - HasPassword interface{} `json:"has_password"` - - MemberofGroup interface{} `json:"memberof_group"` - - MemberofRole interface{} `json:"memberof_role"` - - MemberofNetgroup interface{} `json:"memberof_netgroup"` - - MemberofSudorule interface{} `json:"memberof_sudorule"` - - MemberofHbacrule interface{} `json:"memberof_hbacrule"` - - MemberofindirectGroup interface{} `json:"memberofindirect_group"` - - MemberofindirectNetgroup interface{} `json:"memberofindirect_netgroup"` - - MemberofindirectRole interface{} `json:"memberofindirect_role"` - - MemberofindirectSudorule interface{} `json:"memberofindirect_sudorule"` - - MemberofindirectHbacrule interface{} `json:"memberofindirect_hbacrule"` - - HasKeytab interface{} `json:"has_keytab"` -} - -func (out *User) UnmarshalJSON(data []byte) error { - var in jsonUser - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if true { - raw := in.UID - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.UID = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field UID: %v; expected exactly one element", raw) - } - out.UID = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field UID: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Givenname != nil { - raw := in.Givenname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Givenname = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Givenname = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Givenname: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Givenname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if true { - raw := in.Sn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Sn = plainV - } else if sliceOk { - - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Sn: %v; expected exactly one element", raw) - } - out.Sn = sliceV[0] - - } else { - return fmt.Errorf("unexpected value for field Sn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Cn != nil { - raw := in.Cn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Cn = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Cn = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Cn: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Displayname != nil { - raw := in.Displayname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Displayname = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Displayname = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Displayname: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Displayname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Initials != nil { - raw := in.Initials - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Initials = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Initials = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Initials: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Initials: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Homedirectory != nil { - raw := in.Homedirectory - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Homedirectory = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Homedirectory = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Homedirectory: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Homedirectory: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Gecos != nil { - raw := in.Gecos - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Gecos = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Gecos = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Gecos: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Gecos: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Loginshell != nil { - raw := in.Loginshell - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Loginshell = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Loginshell = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Loginshell: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Loginshell: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Krbcanonicalname != nil { - raw := in.Krbcanonicalname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Krbcanonicalname = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Krbcanonicalname = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Krbcanonicalname: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Krbcanonicalname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Krbprincipalname != nil { - raw := in.Krbprincipalname - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Krbprincipalname = &[]string{plainV} - } else if sliceOk { - - out.Krbprincipalname = &sliceV - } else { - return fmt.Errorf("unexpected value for field Krbprincipalname: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Krbprincipalexpiration != nil { - raw := in.Krbprincipalexpiration - plainV, plainOk := raw.(time.Time) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []time.Time - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(time.Time) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Krbprincipalexpiration = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Krbprincipalexpiration = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Krbprincipalexpiration: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Krbprincipalexpiration: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Mail != nil { - raw := in.Mail - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Mail = &[]string{plainV} - } else if sliceOk { - - out.Mail = &sliceV - } else { - return fmt.Errorf("unexpected value for field Mail: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Userpassword != nil { - raw := in.Userpassword - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Userpassword = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Userpassword = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Userpassword: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Userpassword: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Random != nil { - raw := in.Random - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Random = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Random = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Random: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Random: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Randompassword != nil { - raw := in.Randompassword - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Randompassword = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Randompassword = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Randompassword: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Randompassword: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Uidnumber != nil { - raw := in.Uidnumber - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Uidnumber: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Uidnumber = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Uidnumber = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Uidnumber: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Uidnumber: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Gidnumber != nil { - raw := in.Gidnumber - plainV, plainOk := raw.(int) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []int - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - intV, e := strconv.Atoi(itemV) - if e != nil { - return fmt.Errorf("unexpected value for field Gidnumber: %v (hit string which couldn't be converted to int)", raw) - } - sliceV = append(sliceV, intV) - - } - } - - if plainOk { - out.Gidnumber = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Gidnumber = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Gidnumber: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Gidnumber: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Street != nil { - raw := in.Street - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Street = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Street = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Street: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Street: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.L != nil { - raw := in.L - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.L = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.L = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field L: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field L: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.St != nil { - raw := in.St - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.St = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.St = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field St: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field St: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Postalcode != nil { - raw := in.Postalcode - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Postalcode = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Postalcode = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Postalcode: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Postalcode: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Telephonenumber != nil { - raw := in.Telephonenumber - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Telephonenumber = &[]string{plainV} - } else if sliceOk { - - out.Telephonenumber = &sliceV - } else { - return fmt.Errorf("unexpected value for field Telephonenumber: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Mobile != nil { - raw := in.Mobile - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Mobile = &[]string{plainV} - } else if sliceOk { - - out.Mobile = &sliceV - } else { - return fmt.Errorf("unexpected value for field Mobile: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Pager != nil { - raw := in.Pager - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Pager = &[]string{plainV} - } else if sliceOk { - - out.Pager = &sliceV - } else { - return fmt.Errorf("unexpected value for field Pager: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Facsimiletelephonenumber != nil { - raw := in.Facsimiletelephonenumber - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Facsimiletelephonenumber = &[]string{plainV} - } else if sliceOk { - - out.Facsimiletelephonenumber = &sliceV - } else { - return fmt.Errorf("unexpected value for field Facsimiletelephonenumber: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ou != nil { - raw := in.Ou - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ou = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Ou = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ou: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Ou: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Title != nil { - raw := in.Title - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Title = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Title = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Title: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Title: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Manager != nil { - raw := in.Manager - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Manager = &plainV - } else if sliceOk { - - if len(sliceV) == 1 { - out.Manager = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Manager: %v; expected at most one element", raw) - } - - } else { - return fmt.Errorf("unexpected value for field Manager: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Carlicense != nil { - raw := in.Carlicense - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Carlicense = &[]string{plainV} - } else if sliceOk { - - out.Carlicense = &sliceV - } else { - return fmt.Errorf("unexpected value for field Carlicense: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Ipasshpubkey != nil { - raw := in.Ipasshpubkey - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Ipasshpubkey = &[]string{plainV} - } else if sliceOk { - - out.Ipasshpubkey = &sliceV - } else { - return fmt.Errorf("unexpected value for field Ipasshpubkey: %v (%v)", raw, reflect.TypeOf(raw)) - } - - } - - if in.Sshpubkeyfp != nil { - raw := in.Sshpubkeyfp - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(string) - - if !itemOk { - sliceOk = false - break - } - - sliceV = append(sliceV, itemV) - - } - } - - if plainOk { - out.Sshpubkeyfp = &[]string{plainV} - } else if sliceOk { - - out.Sshpubkeyfp = &sliceV - } else { - return fmt.Errorf("unexpected value for field Sshpubkeyfp: %v (%v)", raw, reflect.TypeOf(raw)) - } - +func (c *Client) VaultAddInternal( + reqArgs *VaultAddInternalArgs, + optArgs *VaultAddInternalOptionalArgs, // can be nil +) (*VaultAddInternalResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := vaultAddInternalKwParams{ + VaultAddInternalArgs: reqArgs, + VaultAddInternalOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "vault_add_internal", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res vaultAddInternalResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} + +type VaultAddInternalArgs struct { + + /* +Vault name - if in.Ipauserauthtype != nil { - raw := in.Ipauserauthtype - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { + */ + Cn string `json:"cn,omitempty"` + } - itemV, itemOk := rawItem.(string) +type VaultAddInternalOptionalArgs struct { + + /* +Description +Vault description + */ + Description *string `json:"description,omitempty"` + + /* +Type +Vault type + */ + Ipavaulttype *string `json:"ipavaulttype,omitempty"` + + /* +Salt +Vault salt + */ + Ipavaultsalt *string `json:"ipavaultsalt,omitempty"` + + /* +Public key +Vault public key + */ + Ipavaultpublickey *string `json:"ipavaultpublickey,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Service name of the service vault + */ + Service *string `json:"service,omitempty"` + + /* + +Shared vault + */ + Shared *bool `json:"shared,omitempty"` + + /* + +Username of the user vault + */ + Username *string `json:"username,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } - if !itemOk { - sliceOk = false - break - } +type vaultAddInternalKwParams struct { + *VaultAddInternalArgs + *VaultAddInternalOptionalArgs - sliceV = append(sliceV, itemV) + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - } - } +type vaultAddInternalResponse struct { + Error *Error `json:"error"` + Result *VaultAddInternalResult `json:"result"` +} - if plainOk { - out.Ipauserauthtype = &[]string{plainV} - } else if sliceOk { +type VaultAddInternalResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } - out.Ipauserauthtype = &sliceV - } else { - return fmt.Errorf("unexpected value for field Ipauserauthtype: %v (%v)", raw, reflect.TypeOf(raw)) - } +func (t *VaultAddInternalResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("VaultAddInternalResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("VaultAddInternalResult%v", string(b)) +} +/* +Add members to a vault. +*/ +func (c *Client) VaultAddMember( + reqArgs *VaultAddMemberArgs, + optArgs *VaultAddMemberOptionalArgs, // can be nil +) (*VaultAddMemberResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := vaultAddMemberKwParams{ + VaultAddMemberArgs: reqArgs, + VaultAddMemberOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "vault_add_member", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res vaultAddMemberResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} + +type VaultAddMemberArgs struct { + + /* +Vault name - if in.Userclass != nil { - raw := in.Userclass - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { + */ + Cn string `json:"cn,omitempty"` + } - itemV, itemOk := rawItem.(string) +type VaultAddMemberOptionalArgs struct { + + /* + +Service name of the service vault + */ + Service *string `json:"service,omitempty"` + + /* + +Shared vault + */ + Shared *bool `json:"shared,omitempty"` + + /* + +Username of the user vault + */ + Username *string `json:"username,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member user +users to add + */ + User *[]string `json:"user,omitempty"` + + /* +member group +groups to add + */ + Group *[]string `json:"group,omitempty"` + + /* +member service +services to add + */ + Services *[]string `json:"services,omitempty"` + } - if !itemOk { - sliceOk = false - break - } +type vaultAddMemberKwParams struct { + *VaultAddMemberArgs + *VaultAddMemberOptionalArgs - sliceV = append(sliceV, itemV) + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - } - } +type vaultAddMemberResponse struct { + Error *Error `json:"error"` + Result *VaultAddMemberResult `json:"result"` +} - if plainOk { - out.Userclass = &[]string{plainV} - } else if sliceOk { +type VaultAddMemberResult struct { + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members added + (required) + */ + Completed int `json:"completed,omitempty"` + } - out.Userclass = &sliceV - } else { - return fmt.Errorf("unexpected value for field Userclass: %v (%v)", raw, reflect.TypeOf(raw)) - } +func (t *VaultAddMemberResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("VaultAddMemberResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("VaultAddMemberResult%v", string(b)) +} +/* +Add owners to a vault. +*/ +func (c *Client) VaultAddOwner( + reqArgs *VaultAddOwnerArgs, + optArgs *VaultAddOwnerOptionalArgs, // can be nil +) (*VaultAddOwnerResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := vaultAddOwnerKwParams{ + VaultAddOwnerArgs: reqArgs, + VaultAddOwnerOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "vault_add_owner", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res vaultAddOwnerResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - if in.Ipatokenradiusconfiglink != nil { - raw := in.Ipatokenradiusconfiglink - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +type VaultAddOwnerArgs struct { + + /* +Vault name - itemV, itemOk := rawItem.(string) + */ + Cn string `json:"cn,omitempty"` + } - if !itemOk { - sliceOk = false - break - } +type VaultAddOwnerOptionalArgs struct { + + /* + +Service name of the service vault + */ + Service *string `json:"service,omitempty"` + + /* + +Shared vault + */ + Shared *bool `json:"shared,omitempty"` + + /* + +Username of the user vault + */ + Username *string `json:"username,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +owner user +users to add + */ + User *[]string `json:"user,omitempty"` + + /* +owner group +groups to add + */ + Group *[]string `json:"group,omitempty"` + + /* +owner service +services to add + */ + Services *[]string `json:"services,omitempty"` + } - sliceV = append(sliceV, itemV) +type vaultAddOwnerKwParams struct { + *VaultAddOwnerArgs + *VaultAddOwnerOptionalArgs - } - } + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - if plainOk { - out.Ipatokenradiusconfiglink = &plainV - } else if sliceOk { +type vaultAddOwnerResponse struct { + Error *Error `json:"error"` + Result *VaultAddOwnerResult `json:"result"` +} - if len(sliceV) == 1 { - out.Ipatokenradiusconfiglink = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipatokenradiusconfiglink: %v; expected at most one element", raw) - } +type VaultAddOwnerResult struct { + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Owners that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of owners added + (required) + */ + Completed int `json:"completed,omitempty"` + } - } else { - return fmt.Errorf("unexpected value for field Ipatokenradiusconfiglink: %v (%v)", raw, reflect.TypeOf(raw)) - } +func (t *VaultAddOwnerResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("VaultAddOwnerResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("VaultAddOwnerResult%v", string(b)) +} - } +/* - if in.Ipatokenradiususername != nil { - raw := in.Ipatokenradiususername - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +*/ +func (c *Client) VaultArchiveInternal( + reqArgs *VaultArchiveInternalArgs, + optArgs *VaultArchiveInternalOptionalArgs, // can be nil +) (*VaultArchiveInternalResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := vaultArchiveInternalKwParams{ + VaultArchiveInternalArgs: reqArgs, + VaultArchiveInternalOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "vault_archive_internal", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res vaultArchiveInternalResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - itemV, itemOk := rawItem.(string) +type VaultArchiveInternalArgs struct { + + /* +Vault name + + */ + Cn string `json:"cn,omitempty"` + + /* + +Session key wrapped with transport certificate + */ + SessionKey string `json:"session_key,omitempty"` + + /* + +Vault data encrypted with session key + */ + VaultData string `json:"vault_data,omitempty"` + + /* + +Nonce + */ + Nonce string `json:"nonce,omitempty"` + } - if !itemOk { - sliceOk = false - break - } +type VaultArchiveInternalOptionalArgs struct { + + /* + +Service name of the service vault + */ + Service *string `json:"service,omitempty"` + + /* + +Shared vault + */ + Shared *bool `json:"shared,omitempty"` + + /* + +Username of the user vault + */ + Username *string `json:"username,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } - sliceV = append(sliceV, itemV) +type vaultArchiveInternalKwParams struct { + *VaultArchiveInternalArgs + *VaultArchiveInternalOptionalArgs - } - } + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - if plainOk { - out.Ipatokenradiususername = &plainV - } else if sliceOk { +type vaultArchiveInternalResponse struct { + Error *Error `json:"error"` + Result *VaultArchiveInternalResult `json:"result"` +} - if len(sliceV) == 1 { - out.Ipatokenradiususername = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipatokenradiususername: %v; expected at most one element", raw) - } +type VaultArchiveInternalResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } - } else { - return fmt.Errorf("unexpected value for field Ipatokenradiususername: %v (%v)", raw, reflect.TypeOf(raw)) - } +func (t *VaultArchiveInternalResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("VaultArchiveInternalResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("VaultArchiveInternalResult%v", string(b)) +} +/* +Delete a vault. +*/ +func (c *Client) VaultDel( + reqArgs *VaultDelArgs, + optArgs *VaultDelOptionalArgs, // can be nil +) (*VaultDelResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := vaultDelKwParams{ + VaultDelArgs: reqArgs, + VaultDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "vault_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res vaultDelResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} + +type VaultDelArgs struct { + + /* +Vault name - if in.Departmentnumber != nil { - raw := in.Departmentnumber - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { + */ + Cn []string `json:"cn,omitempty"` + } - itemV, itemOk := rawItem.(string) +type VaultDelOptionalArgs struct { + + /* + +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + + /* + +Service name of the service vault + */ + Service *string `json:"service,omitempty"` + + /* + +Shared vault + */ + Shared *bool `json:"shared,omitempty"` + + /* + +Username of the user vault + */ + Username *string `json:"username,omitempty"` + } - if !itemOk { - sliceOk = false - break - } +type vaultDelKwParams struct { + *VaultDelArgs + *VaultDelOptionalArgs - sliceV = append(sliceV, itemV) + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - } - } +type vaultDelResponse struct { + Error *Error `json:"error"` + Result *VaultDelResult `json:"result"` +} - if plainOk { - out.Departmentnumber = &[]string{plainV} - } else if sliceOk { +type VaultDelResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []string `json:"value,omitempty"` + } - out.Departmentnumber = &sliceV - } else { - return fmt.Errorf("unexpected value for field Departmentnumber: %v (%v)", raw, reflect.TypeOf(raw)) - } +func (t *VaultDelResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("VaultDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("VaultDelResult%v", string(b)) +} +/* +Search for vaults. +*/ +func (c *Client) VaultFind( + criteria string, // A string searched in all relevant object attributes + reqArgs *VaultFindArgs, + optArgs *VaultFindOptionalArgs, // can be nil +) (*VaultFindResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := vaultFindKwParams{ + VaultFindArgs: reqArgs, + VaultFindOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "vault_find", + Params: []interface{}{ + []interface{}{criteria, }, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res vaultFindResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - if in.Employeenumber != nil { - raw := in.Employeenumber - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +type VaultFindArgs struct { + } - itemV, itemOk := rawItem.(string) +type VaultFindOptionalArgs struct { + + /* +Vault name + + */ + Cn *string `json:"cn,omitempty"` + + /* +Description +Vault description + */ + Description *string `json:"description,omitempty"` + + /* +Type +Vault type + */ + Ipavaulttype *string `json:"ipavaulttype,omitempty"` + + /* +Time Limit +Time limit of search in seconds (0 is unlimited) + */ + Timelimit *int `json:"timelimit,omitempty"` + + /* +Size Limit +Maximum number of entries returned (0 is unlimited) + */ + Sizelimit *int `json:"sizelimit,omitempty"` + + /* + +Service name of the service vault + */ + Service *string `json:"service,omitempty"` + + /* + +Shared vault + */ + Shared *bool `json:"shared,omitempty"` + + /* + +Username of the user vault + */ + Username *string `json:"username,omitempty"` + + /* + +List all service vaults + */ + Services *bool `json:"services,omitempty"` + + /* + +List all user vaults + */ + Users *bool `json:"users,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +Primary key only +Results should contain primary key attribute only ("name") + */ + PkeyOnly *bool `json:"pkey_only,omitempty"` + } - if !itemOk { - sliceOk = false - break - } +type vaultFindKwParams struct { + *VaultFindArgs + *VaultFindOptionalArgs - sliceV = append(sliceV, itemV) + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - } - } +type vaultFindResponse struct { + Error *Error `json:"error"` + Result *VaultFindResult `json:"result"` +} - if plainOk { - out.Employeenumber = &plainV - } else if sliceOk { +type VaultFindResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result []Vault `json:"result,omitempty"` + + /* +Number of entries returned + (required) + */ + Count int `json:"count,omitempty"` + + /* +True if not all results were returned + (required) + */ + Truncated bool `json:"truncated,omitempty"` + } - if len(sliceV) == 1 { - out.Employeenumber = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Employeenumber: %v; expected at most one element", raw) - } +func (t *VaultFindResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("VaultFindResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("VaultFindResult%v", string(b)) +} - } else { - return fmt.Errorf("unexpected value for field Employeenumber: %v (%v)", raw, reflect.TypeOf(raw)) - } +/* +*/ +func (c *Client) VaultModInternal( + reqArgs *VaultModInternalArgs, + optArgs *VaultModInternalOptionalArgs, // can be nil +) (*VaultModInternalResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := vaultModInternalKwParams{ + VaultModInternalArgs: reqArgs, + VaultModInternalOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "vault_mod_internal", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res vaultModInternalResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - if in.Employeetype != nil { - raw := in.Employeetype - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +type VaultModInternalArgs struct { + + /* +Vault name - itemV, itemOk := rawItem.(string) + */ + Cn string `json:"cn,omitempty"` + } - if !itemOk { - sliceOk = false - break - } +type VaultModInternalOptionalArgs struct { + + /* +Description +Vault description + */ + Description *string `json:"description,omitempty"` + + /* +Type +Vault type + */ + Ipavaulttype *string `json:"ipavaulttype,omitempty"` + + /* +Salt +Vault salt + */ + Ipavaultsalt *string `json:"ipavaultsalt,omitempty"` + + /* +Public key +Vault public key + */ + Ipavaultpublickey *string `json:"ipavaultpublickey,omitempty"` + + /* + +Set an attribute to a name/value pair. Format is attr=value. +For multi-valued attributes, the command replaces the values already present. + */ + Setattr *[]string `json:"setattr,omitempty"` + + /* + +Add an attribute/value pair. Format is attr=value. The attribute +must be part of the schema. + */ + Addattr *[]string `json:"addattr,omitempty"` + + /* + +Delete an attribute/value pair. The option will be evaluated +last, after all sets and adds. + */ + Delattr *[]string `json:"delattr,omitempty"` + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Service name of the service vault + */ + Service *string `json:"service,omitempty"` + + /* + +Shared vault + */ + Shared *bool `json:"shared,omitempty"` + + /* + +Username of the user vault + */ + Username *string `json:"username,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } - sliceV = append(sliceV, itemV) +type vaultModInternalKwParams struct { + *VaultModInternalArgs + *VaultModInternalOptionalArgs - } - } + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - if plainOk { - out.Employeetype = &plainV - } else if sliceOk { +type vaultModInternalResponse struct { + Error *Error `json:"error"` + Result *VaultModInternalResult `json:"result"` +} - if len(sliceV) == 1 { - out.Employeetype = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Employeetype: %v; expected at most one element", raw) - } +type VaultModInternalResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } - } else { - return fmt.Errorf("unexpected value for field Employeetype: %v (%v)", raw, reflect.TypeOf(raw)) - } +func (t *VaultModInternalResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("VaultModInternalResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("VaultModInternalResult%v", string(b)) +} +/* +Remove members from a vault. +*/ +func (c *Client) VaultRemoveMember( + reqArgs *VaultRemoveMemberArgs, + optArgs *VaultRemoveMemberOptionalArgs, // can be nil +) (*VaultRemoveMemberResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := vaultRemoveMemberKwParams{ + VaultRemoveMemberArgs: reqArgs, + VaultRemoveMemberOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "vault_remove_member", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res vaultRemoveMemberResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - if in.Preferredlanguage != nil { - raw := in.Preferredlanguage - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +type VaultRemoveMemberArgs struct { + + /* +Vault name - itemV, itemOk := rawItem.(string) + */ + Cn string `json:"cn,omitempty"` + } - if !itemOk { - sliceOk = false - break - } +type VaultRemoveMemberOptionalArgs struct { + + /* + +Service name of the service vault + */ + Service *string `json:"service,omitempty"` + + /* + +Shared vault + */ + Shared *bool `json:"shared,omitempty"` + + /* + +Username of the user vault + */ + Username *string `json:"username,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +member user +users to remove + */ + User *[]string `json:"user,omitempty"` + + /* +member group +groups to remove + */ + Group *[]string `json:"group,omitempty"` + + /* +member service +services to remove + */ + Services *[]string `json:"services,omitempty"` + } - sliceV = append(sliceV, itemV) +type vaultRemoveMemberKwParams struct { + *VaultRemoveMemberArgs + *VaultRemoveMemberOptionalArgs - } - } + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - if plainOk { - out.Preferredlanguage = &plainV - } else if sliceOk { +type vaultRemoveMemberResponse struct { + Error *Error `json:"error"` + Result *VaultRemoveMemberResult `json:"result"` +} - if len(sliceV) == 1 { - out.Preferredlanguage = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Preferredlanguage: %v; expected at most one element", raw) - } +type VaultRemoveMemberResult struct { + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Members that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of members removed + (required) + */ + Completed int `json:"completed,omitempty"` + } - } else { - return fmt.Errorf("unexpected value for field Preferredlanguage: %v (%v)", raw, reflect.TypeOf(raw)) - } +func (t *VaultRemoveMemberResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("VaultRemoveMemberResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("VaultRemoveMemberResult%v", string(b)) +} +/* +Remove owners from a vault. +*/ +func (c *Client) VaultRemoveOwner( + reqArgs *VaultRemoveOwnerArgs, + optArgs *VaultRemoveOwnerOptionalArgs, // can be nil +) (*VaultRemoveOwnerResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := vaultRemoveOwnerKwParams{ + VaultRemoveOwnerArgs: reqArgs, + VaultRemoveOwnerOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "vault_remove_owner", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res vaultRemoveOwnerResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} + +type VaultRemoveOwnerArgs struct { + + /* +Vault name + + */ + Cn string `json:"cn,omitempty"` + } - if in.Usercertificate != nil { - raw := in.Usercertificate - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +type VaultRemoveOwnerOptionalArgs struct { + + /* + +Service name of the service vault + */ + Service *string `json:"service,omitempty"` + + /* + +Shared vault + */ + Shared *bool `json:"shared,omitempty"` + + /* + +Username of the user vault + */ + Username *string `json:"username,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +owner user +users to remove + */ + User *[]string `json:"user,omitempty"` + + /* +owner group +groups to remove + */ + Group *[]string `json:"group,omitempty"` + + /* +owner service +services to remove + */ + Services *[]string `json:"services,omitempty"` + } - itemV, itemOk := rawItem.(string) +type vaultRemoveOwnerKwParams struct { + *VaultRemoveOwnerArgs + *VaultRemoveOwnerOptionalArgs - if !itemOk { - sliceOk = false - break - } + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - sliceV = append(sliceV, itemV) +type vaultRemoveOwnerResponse struct { + Error *Error `json:"error"` + Result *VaultRemoveOwnerResult `json:"result"` +} - } - } +type VaultRemoveOwnerResult struct { + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Owners that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of owners removed + (required) + */ + Completed int `json:"completed,omitempty"` + } - if plainOk { - out.Usercertificate = &[]string{plainV} - } else if sliceOk { +func (t *VaultRemoveOwnerResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("VaultRemoveOwnerResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("VaultRemoveOwnerResult%v", string(b)) +} - out.Usercertificate = &sliceV - } else { - return fmt.Errorf("unexpected value for field Usercertificate: %v (%v)", raw, reflect.TypeOf(raw)) - } +/* +*/ +func (c *Client) VaultRetrieveInternal( + reqArgs *VaultRetrieveInternalArgs, + optArgs *VaultRetrieveInternalOptionalArgs, // can be nil +) (*VaultRetrieveInternalResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := vaultRetrieveInternalKwParams{ + VaultRetrieveInternalArgs: reqArgs, + VaultRetrieveInternalOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "vault_retrieve_internal", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res vaultRetrieveInternalResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - if in.Nsaccountlock != nil { - raw := in.Nsaccountlock - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +type VaultRetrieveInternalArgs struct { + + /* +Vault name + + */ + Cn string `json:"cn,omitempty"` + + /* - itemV, itemOk := rawItem.(bool) +Session key wrapped with transport certificate + */ + SessionKey string `json:"session_key,omitempty"` + } - if !itemOk { - sliceOk = false - break - } +type VaultRetrieveInternalOptionalArgs struct { + + /* + +Service name of the service vault + */ + Service *string `json:"service,omitempty"` + + /* + +Shared vault + */ + Shared *bool `json:"shared,omitempty"` + + /* + +Username of the user vault + */ + Username *string `json:"username,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } - sliceV = append(sliceV, itemV) +type vaultRetrieveInternalKwParams struct { + *VaultRetrieveInternalArgs + *VaultRetrieveInternalOptionalArgs - } - } + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - if plainOk { - out.Nsaccountlock = &plainV - } else if sliceOk { +type vaultRetrieveInternalResponse struct { + Error *Error `json:"error"` + Result *VaultRetrieveInternalResult `json:"result"` +} - if len(sliceV) == 1 { - out.Nsaccountlock = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Nsaccountlock: %v; expected at most one element", raw) - } +type VaultRetrieveInternalResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } - } else { - return fmt.Errorf("unexpected value for field Nsaccountlock: %v (%v)", raw, reflect.TypeOf(raw)) - } +func (t *VaultRetrieveInternalResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("VaultRetrieveInternalResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("VaultRetrieveInternalResult%v", string(b)) +} +/* +Display information about a vault. +*/ +func (c *Client) VaultShow( + reqArgs *VaultShowArgs, + optArgs *VaultShowOptionalArgs, // can be nil +) (*VaultShowResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := vaultShowKwParams{ + VaultShowArgs: reqArgs, + VaultShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "vault_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res vaultShowResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - if in.Preserved != nil { - raw := in.Preserved - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +type VaultShowArgs struct { + + /* +Vault name - itemV, itemOk := rawItem.(bool) + */ + Cn string `json:"cn,omitempty"` + } - if !itemOk { - sliceOk = false - break - } +type VaultShowOptionalArgs struct { + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Service name of the service vault + */ + Service *string `json:"service,omitempty"` + + /* + +Shared vault + */ + Shared *bool `json:"shared,omitempty"` + + /* + +Username of the user vault + */ + Username *string `json:"username,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } - sliceV = append(sliceV, itemV) +type vaultShowKwParams struct { + *VaultShowArgs + *VaultShowOptionalArgs - } - } + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - if plainOk { - out.Preserved = &plainV - } else if sliceOk { +type vaultShowResponse struct { + Error *Error `json:"error"` + Result *VaultShowResult `json:"result"` +} - if len(sliceV) == 1 { - out.Preserved = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Preserved: %v; expected at most one element", raw) - } +type VaultShowResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Vault `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value string `json:"value,omitempty"` + } - } else { - return fmt.Errorf("unexpected value for field Preserved: %v (%v)", raw, reflect.TypeOf(raw)) - } +func (t *VaultShowResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("VaultShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("VaultShowResult%v", string(b)) +} +/* +Show vault configuration. +*/ +func (c *Client) VaultconfigShow( + reqArgs *VaultconfigShowArgs, + optArgs *VaultconfigShowOptionalArgs, // can be nil +) (*VaultconfigShowResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := vaultconfigShowKwParams{ + VaultconfigShowArgs: reqArgs, + VaultconfigShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "vaultconfig_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res vaultconfigShowResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - if in.HasPassword != nil { - raw := in.HasPassword - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { - - itemV, itemOk := rawItem.(bool) +type VaultconfigShowArgs struct { + } - if !itemOk { - sliceOk = false - break - } +type VaultconfigShowOptionalArgs struct { + + /* + +Output file to store the transport certificate + */ + TransportOut *string `json:"transport_out,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + } - sliceV = append(sliceV, itemV) +type vaultconfigShowKwParams struct { + *VaultconfigShowArgs + *VaultconfigShowOptionalArgs - } - } + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - if plainOk { - out.HasPassword = &plainV - } else if sliceOk { +type vaultconfigShowResponse struct { + Error *Error `json:"error"` + Result *VaultconfigShowResult `json:"result"` +} - if len(sliceV) == 1 { - out.HasPassword = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field HasPassword: %v; expected at most one element", raw) - } +type VaultconfigShowResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Vaultconfig `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value interface{} `json:"value,omitempty"` + } - } else { - return fmt.Errorf("unexpected value for field HasPassword: %v (%v)", raw, reflect.TypeOf(raw)) - } +func (t *VaultconfigShowResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("VaultconfigShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("VaultconfigShowResult%v", string(b)) +} +/* +Add owners to a vault container. +*/ +func (c *Client) VaultcontainerAddOwner( + reqArgs *VaultcontainerAddOwnerArgs, + optArgs *VaultcontainerAddOwnerOptionalArgs, // can be nil +) (*VaultcontainerAddOwnerResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := vaultcontainerAddOwnerKwParams{ + VaultcontainerAddOwnerArgs: reqArgs, + VaultcontainerAddOwnerOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "vaultcontainer_add_owner", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res vaultcontainerAddOwnerResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - if in.MemberofGroup != nil { - raw := in.MemberofGroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +type VaultcontainerAddOwnerArgs struct { + } - itemV, itemOk := rawItem.(string) +type VaultcontainerAddOwnerOptionalArgs struct { + + /* + +Service name of the service vault + */ + Service *string `json:"service,omitempty"` + + /* + +Shared vault + */ + Shared *bool `json:"shared,omitempty"` + + /* + +Username of the user vault + */ + Username *string `json:"username,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +owner user +users to add + */ + User *[]string `json:"user,omitempty"` + + /* +owner group +groups to add + */ + Group *[]string `json:"group,omitempty"` + + /* +owner service +services to add + */ + Services *[]string `json:"services,omitempty"` + } - if !itemOk { - sliceOk = false - break - } +type vaultcontainerAddOwnerKwParams struct { + *VaultcontainerAddOwnerArgs + *VaultcontainerAddOwnerOptionalArgs - sliceV = append(sliceV, itemV) + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - } - } +type vaultcontainerAddOwnerResponse struct { + Error *Error `json:"error"` + Result *VaultcontainerAddOwnerResult `json:"result"` +} - if plainOk { - out.MemberofGroup = &[]string{plainV} - } else if sliceOk { +type VaultcontainerAddOwnerResult struct { + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Owners that could not be added + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of owners added + (required) + */ + Completed int `json:"completed,omitempty"` + } - out.MemberofGroup = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberofGroup: %v (%v)", raw, reflect.TypeOf(raw)) - } +func (t *VaultcontainerAddOwnerResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("VaultcontainerAddOwnerResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("VaultcontainerAddOwnerResult%v", string(b)) +} +/* +Delete a vault container. +*/ +func (c *Client) VaultcontainerDel( + reqArgs *VaultcontainerDelArgs, + optArgs *VaultcontainerDelOptionalArgs, // can be nil +) (*VaultcontainerDelResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := vaultcontainerDelKwParams{ + VaultcontainerDelArgs: reqArgs, + VaultcontainerDelOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "vaultcontainer_del", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res vaultcontainerDelResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - if in.MemberofRole != nil { - raw := in.MemberofRole - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +type VaultcontainerDelArgs struct { + } - itemV, itemOk := rawItem.(string) +type VaultcontainerDelOptionalArgs struct { + + /* + +Continuous mode: Don't stop on errors. + */ + Continue *bool `json:"continue,omitempty"` + + /* + +Service name of the service vault + */ + Service *string `json:"service,omitempty"` + + /* + +Shared vault + */ + Shared *bool `json:"shared,omitempty"` + + /* + +Username of the user vault + */ + Username *string `json:"username,omitempty"` + } - if !itemOk { - sliceOk = false - break - } +type vaultcontainerDelKwParams struct { + *VaultcontainerDelArgs + *VaultcontainerDelOptionalArgs - sliceV = append(sliceV, itemV) + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - } - } +type vaultcontainerDelResponse struct { + Error *Error `json:"error"` + Result *VaultcontainerDelResult `json:"result"` +} - if plainOk { - out.MemberofRole = &[]string{plainV} - } else if sliceOk { +type VaultcontainerDelResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* +List of deletions that failed + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* + + (required) + */ + Value []interface{} `json:"value,omitempty"` + } - out.MemberofRole = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberofRole: %v (%v)", raw, reflect.TypeOf(raw)) - } +func (t *VaultcontainerDelResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("VaultcontainerDelResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("VaultcontainerDelResult%v", string(b)) +} +/* +Remove owners from a vault container. +*/ +func (c *Client) VaultcontainerRemoveOwner( + reqArgs *VaultcontainerRemoveOwnerArgs, + optArgs *VaultcontainerRemoveOwnerOptionalArgs, // can be nil +) (*VaultcontainerRemoveOwnerResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := vaultcontainerRemoveOwnerKwParams{ + VaultcontainerRemoveOwnerArgs: reqArgs, + VaultcontainerRemoveOwnerOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "vaultcontainer_remove_owner", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res vaultcontainerRemoveOwnerResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e } + if res.Error != nil { + return nil, res.Error + } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - if in.MemberofNetgroup != nil { - raw := in.MemberofNetgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +type VaultcontainerRemoveOwnerArgs struct { + } - itemV, itemOk := rawItem.(string) +type VaultcontainerRemoveOwnerOptionalArgs struct { + + /* + +Service name of the service vault + */ + Service *string `json:"service,omitempty"` + + /* + +Shared vault + */ + Shared *bool `json:"shared,omitempty"` + + /* + +Username of the user vault + */ + Username *string `json:"username,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + + /* +owner user +users to remove + */ + User *[]string `json:"user,omitempty"` + + /* +owner group +groups to remove + */ + Group *[]string `json:"group,omitempty"` + + /* +owner service +services to remove + */ + Services *[]string `json:"services,omitempty"` + } - if !itemOk { - sliceOk = false - break - } +type vaultcontainerRemoveOwnerKwParams struct { + *VaultcontainerRemoveOwnerArgs + *VaultcontainerRemoveOwnerOptionalArgs - sliceV = append(sliceV, itemV) + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - } - } +type vaultcontainerRemoveOwnerResponse struct { + Error *Error `json:"error"` + Result *VaultcontainerRemoveOwnerResult `json:"result"` +} - if plainOk { - out.MemberofNetgroup = &[]string{plainV} - } else if sliceOk { +type VaultcontainerRemoveOwnerResult struct { + + + /* + + (required) + */ + Result interface{} `json:"result,omitempty"` + + /* +Owners that could not be removed + (required) + */ + Failed interface{} `json:"failed,omitempty"` + + /* +Number of owners removed + (required) + */ + Completed int `json:"completed,omitempty"` + } - out.MemberofNetgroup = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberofNetgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } +func (t *VaultcontainerRemoveOwnerResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("VaultcontainerRemoveOwnerResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("VaultcontainerRemoveOwnerResult%v", string(b)) +} +/* +Display information about a vault container. +*/ +func (c *Client) VaultcontainerShow( + reqArgs *VaultcontainerShowArgs, + optArgs *VaultcontainerShowOptionalArgs, // can be nil +) (*VaultcontainerShowResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := vaultcontainerShowKwParams{ + VaultcontainerShowArgs: reqArgs, + VaultcontainerShowOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "vaultcontainer_show", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res vaultcontainerShowResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} - if in.MemberofSudorule != nil { - raw := in.MemberofSudorule - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +type VaultcontainerShowArgs struct { + } - itemV, itemOk := rawItem.(string) +type VaultcontainerShowOptionalArgs struct { + + /* +Rights +Display the access rights of this entry (requires --all). See ipa man page for details. + */ + Rights *bool `json:"rights,omitempty"` + + /* + +Service name of the service vault + */ + Service *string `json:"service,omitempty"` + + /* + +Shared vault + */ + Shared *bool `json:"shared,omitempty"` + + /* + +Username of the user vault + */ + Username *string `json:"username,omitempty"` + + /* + +Retrieve and print all attributes from the server. Affects command output. + */ + All *bool `json:"all,omitempty"` + + /* + +Print entries as stored on the server. Only affects output format. + */ + Raw *bool `json:"raw,omitempty"` + + /* + +Suppress processing of membership attributes. + */ + NoMembers *bool `json:"no_members,omitempty"` + } - if !itemOk { - sliceOk = false - break - } +type vaultcontainerShowKwParams struct { + *VaultcontainerShowArgs + *VaultcontainerShowOptionalArgs - sliceV = append(sliceV, itemV) + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - } - } +type vaultcontainerShowResponse struct { + Error *Error `json:"error"` + Result *VaultcontainerShowResult `json:"result"` +} - if plainOk { - out.MemberofSudorule = &[]string{plainV} - } else if sliceOk { +type VaultcontainerShowResult struct { + + + /* +User-friendly description of action performed + (optional) + */ + Summary *string `json:"summary,omitempty"` + + /* + + (required) + */ + Result Vaultcontainer `json:"result,omitempty"` + + /* +The primary_key value of the entry, e.g. 'jdoe' for a user + (required) + */ + Value interface{} `json:"value,omitempty"` + } - out.MemberofSudorule = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberofSudorule: %v (%v)", raw, reflect.TypeOf(raw)) - } +func (t *VaultcontainerShowResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("VaultcontainerShowResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("VaultcontainerShowResult%v", string(b)) +} +/* +Describe currently authenticated identity. +*/ +func (c *Client) Whoami( + reqArgs *WhoamiArgs, + optArgs *WhoamiOptionalArgs, // can be nil +) (*WhoamiResult, error) { + if reqArgs == nil { + return nil, fmt.Errorf("reqArgs cannot be nil") + } + kwp := whoamiKwParams{ + WhoamiArgs: reqArgs, + WhoamiOptionalArgs: optArgs, + Version: apiVersion, + } + req := request{ + Method: "whoami", + Params: []interface{}{ + []interface{}{}, &kwp}, + } + readCloser, e := c.exec(&req) + if e != nil { + return nil, e + } + defer readCloser.Close() + var res whoamiResponse + if e := json.NewDecoder(readCloser).Decode(&res); e != nil { + return nil, e + } + if res.Error != nil { + return nil, res.Error } + if res.Result == nil { + return nil, fmt.Errorf("missing result in response") + } + return res.Result, nil +} + +type WhoamiArgs struct { + } - if in.MemberofHbacrule != nil { - raw := in.MemberofHbacrule - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +type WhoamiOptionalArgs struct { + } - itemV, itemOk := rawItem.(string) +type whoamiKwParams struct { + *WhoamiArgs + *WhoamiOptionalArgs - if !itemOk { - sliceOk = false - break - } + /* + Automatically set. + Used by the server to determine whether to accept the request. + */ + Version string `json:"version"` +} - sliceV = append(sliceV, itemV) +type whoamiResponse struct { + Error *Error `json:"error"` + Result *WhoamiResult `json:"result"` +} + +type WhoamiResult struct { + + + /* +Object class name + (required) + */ + Object string `json:"object,omitempty"` + + /* +Function to get details + (required) + */ + Command string `json:"command,omitempty"` + + /* +Arguments to details function + (required) + */ + Arguments []interface{} `json:"arguments,omitempty"` + } + +func (t *WhoamiResult) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("WhoamiResult[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("WhoamiResult%v", string(b)) +} - } - } - if plainOk { - out.MemberofHbacrule = &[]string{plainV} - } else if sliceOk { - out.MemberofHbacrule = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberofHbacrule: %v (%v)", raw, reflect.TypeOf(raw)) - } +type Aci struct { + + /* +ACI name + + */ + Aciname string `json:"aciname,omitempty"` + + /* +Permission +Permission ACI grants access to + */ + Permission *string `json:"permission,omitempty"` + + /* +User group +User group ACI grants access to + */ + Group *string `json:"group,omitempty"` + + /* +Permissions +Permissions to grant(read, write, add, delete, all) + */ + Permissions []string `json:"permissions,omitempty"` + + /* +Attributes to which the permission applies +Attributes + */ + Attrs *[]string `json:"attrs,omitempty"` + + /* +Type +type of IPA object (user, group, host, hostgroup, service, netgroup) + */ + Type *string `json:"type,omitempty"` + + /* +Member of +Member of a group + */ + Memberof *string `json:"memberof,omitempty"` + + /* +Filter +Legal LDAP filter (e.g. ou=Engineering) + */ + Filter *string `json:"filter,omitempty"` + + /* +Subtree +Subtree to apply ACI to + */ + Subtree *string `json:"subtree,omitempty"` + + /* +Target group +Group to apply ACI to + */ + Targetgroup *string `json:"targetgroup,omitempty"` + + /* +Target your own entry (self) +Apply ACI to your own entry (self) + */ + Selfaci *bool `json:"selfaci,omitempty"` + + /* +ACI prefix +Prefix used to distinguish ACI types (permission, delegation, selfservice, none) + */ + Aciprefix string `json:"aciprefix,omitempty"` + + /* +ACI + + */ + Aci string `json:"aci,omitempty"` + } - } +func (t *Aci) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Aci[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Aci%v", string(b)) +} - if in.MemberofindirectGroup != nil { - raw := in.MemberofindirectGroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +type jsonAci struct { + + Aciname interface{} `json:"aciname"` + + Permission interface{} `json:"permission"` + + Group interface{} `json:"group"` + + Permissions interface{} `json:"permissions"` + + Attrs interface{} `json:"attrs"` + + Type interface{} `json:"type"` + + Memberof interface{} `json:"memberof"` + + Filter interface{} `json:"filter"` + + Subtree interface{} `json:"subtree"` + + Targetgroup interface{} `json:"targetgroup"` + + Selfaci interface{} `json:"selfaci"` + + Aciprefix interface{} `json:"aciprefix"` + + Aci interface{} `json:"aci"` + } - itemV, itemOk := rawItem.(string) +func (out *Aci) UnmarshalJSON(data []byte) error { + var in jsonAci + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Aciname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Aciname = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Aciname: %v; expected exactly one element", raw) + } + out.Aciname = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Aciname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Permission != nil { + raw := in.Permission + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Permission = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Permission = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Permission: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Permission: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Group != nil { + raw := in.Group + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Group = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Group = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Group: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Group: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Permissions + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Permissions = []string{plainV} + } else if sliceOk { + + if len(sliceV) < 1 { + return fmt.Errorf("unexpected value for field Permissions: %v; expected at least one element", raw) + } + + out.Permissions = sliceV + } else { + return fmt.Errorf("unexpected value for field Permissions: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Attrs != nil { + raw := in.Attrs + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Attrs = &[]string{plainV} + } else if sliceOk { + + out.Attrs = &sliceV + } else { + return fmt.Errorf("unexpected value for field Attrs: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Type != nil { + raw := in.Type + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Type = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Type = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Type: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Type: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Memberof != nil { + raw := in.Memberof + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Memberof = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Memberof = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Memberof: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Memberof: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Filter != nil { + raw := in.Filter + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Filter = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Filter = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Filter: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Filter: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Subtree != nil { + raw := in.Subtree + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Subtree = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Subtree = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Subtree: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Subtree: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Targetgroup != nil { + raw := in.Targetgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Targetgroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Targetgroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Targetgroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Targetgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Selfaci != nil { + raw := in.Selfaci + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Selfaci = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Selfaci = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Selfaci: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Selfaci: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Aciprefix + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Aciprefix = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Aciprefix: %v; expected exactly one element", raw) + } + out.Aciprefix = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Aciprefix: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Aci + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Aci = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Aci: %v; expected exactly one element", raw) + } + out.Aci = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Aci: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - if !itemOk { - sliceOk = false - break - } +type Automember struct { + + /* +Automember Rule +Automember Rule + */ + Cn string `json:"cn,omitempty"` + + /* +Description +A description of this auto member rule + */ + Description *string `json:"description,omitempty"` + + /* +Default (fallback) Group +Default group for entries to land + */ + Automemberdefaultgroup *string `json:"automemberdefaultgroup,omitempty"` + + /* +Inclusive Regex +Inclusive Regex + */ + Automemberinclusiveregex *[]string `json:"automemberinclusiveregex,omitempty"` + + /* +Exclusive Regex +Exclusive Regex + */ + Automemberexclusiveregex *[]string `json:"automemberexclusiveregex,omitempty"` + } - sliceV = append(sliceV, itemV) +func (t *Automember) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Automember[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Automember%v", string(b)) +} - } - } +type jsonAutomember struct { + + Cn interface{} `json:"cn"` + + Description interface{} `json:"description"` + + Automemberdefaultgroup interface{} `json:"automemberdefaultgroup"` + + Automemberinclusiveregex interface{} `json:"automemberinclusiveregex"` + + Automemberexclusiveregex interface{} `json:"automemberexclusiveregex"` + } - if plainOk { - out.MemberofindirectGroup = &plainV - } else if sliceOk { +func (out *Automember) UnmarshalJSON(data []byte) error { + var in jsonAutomember + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Cn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) + } + out.Cn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Description != nil { + raw := in.Description + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Description = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Description = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Automemberdefaultgroup != nil { + raw := in.Automemberdefaultgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Automemberdefaultgroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Automemberdefaultgroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Automemberdefaultgroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Automemberdefaultgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Automemberinclusiveregex != nil { + raw := in.Automemberinclusiveregex + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Automemberinclusiveregex = &[]string{plainV} + } else if sliceOk { + + out.Automemberinclusiveregex = &sliceV + } else { + return fmt.Errorf("unexpected value for field Automemberinclusiveregex: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Automemberexclusiveregex != nil { + raw := in.Automemberexclusiveregex + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Automemberexclusiveregex = &[]string{plainV} + } else if sliceOk { + + out.Automemberexclusiveregex = &sliceV + } else { + return fmt.Errorf("unexpected value for field Automemberexclusiveregex: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - if len(sliceV) == 1 { - out.MemberofindirectGroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberofindirectGroup: %v; expected at most one element", raw) - } +type AutomemberDefaultGroup struct { + + /* +Description +A description of this auto member rule + */ + Description *string `json:"description,omitempty"` + + /* +Default (fallback) Group +Default group for entries to land + */ + Automemberdefaultgroup *string `json:"automemberdefaultgroup,omitempty"` + + /* +Inclusive Regex +Inclusive Regex + */ + Automemberinclusiveregex *[]string `json:"automemberinclusiveregex,omitempty"` + + /* +Exclusive Regex +Exclusive Regex + */ + Automemberexclusiveregex *[]string `json:"automemberexclusiveregex,omitempty"` + } - } else { - return fmt.Errorf("unexpected value for field MemberofindirectGroup: %v (%v)", raw, reflect.TypeOf(raw)) - } +func (t *AutomemberDefaultGroup) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AutomemberDefaultGroup[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AutomemberDefaultGroup%v", string(b)) +} - } +type jsonAutomemberDefaultGroup struct { + + Description interface{} `json:"description"` + + Automemberdefaultgroup interface{} `json:"automemberdefaultgroup"` + + Automemberinclusiveregex interface{} `json:"automemberinclusiveregex"` + + Automemberexclusiveregex interface{} `json:"automemberexclusiveregex"` + } - if in.MemberofindirectNetgroup != nil { - raw := in.MemberofindirectNetgroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +func (out *AutomemberDefaultGroup) UnmarshalJSON(data []byte) error { + var in jsonAutomemberDefaultGroup + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if in.Description != nil { + raw := in.Description + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Description = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Description = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Automemberdefaultgroup != nil { + raw := in.Automemberdefaultgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Automemberdefaultgroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Automemberdefaultgroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Automemberdefaultgroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Automemberdefaultgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Automemberinclusiveregex != nil { + raw := in.Automemberinclusiveregex + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Automemberinclusiveregex = &[]string{plainV} + } else if sliceOk { + + out.Automemberinclusiveregex = &sliceV + } else { + return fmt.Errorf("unexpected value for field Automemberinclusiveregex: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Automemberexclusiveregex != nil { + raw := in.Automemberexclusiveregex + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Automemberexclusiveregex = &[]string{plainV} + } else if sliceOk { + + out.Automemberexclusiveregex = &sliceV + } else { + return fmt.Errorf("unexpected value for field Automemberexclusiveregex: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - itemV, itemOk := rawItem.(string) +type AutomemberTask struct { + + /* +Task DN +DN of the started task + */ + Dn string `json:"dn,omitempty"` + } - if !itemOk { - sliceOk = false - break - } +func (t *AutomemberTask) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("AutomemberTask[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("AutomemberTask%v", string(b)) +} - sliceV = append(sliceV, itemV) +type jsonAutomemberTask struct { + + Dn interface{} `json:"dn"` + } - } - } +func (out *AutomemberTask) UnmarshalJSON(data []byte) error { + var in jsonAutomemberTask + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Dn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Dn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Dn: %v; expected exactly one element", raw) + } + out.Dn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Dn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - if plainOk { - out.MemberofindirectNetgroup = &plainV - } else if sliceOk { +type Automountkey struct { + + /* +Key +Automount key name. + */ + Automountkey string `json:"automountkey,omitempty"` + + /* +Mount information + + */ + Automountinformation string `json:"automountinformation,omitempty"` + + /* +description + + */ + Description *string `json:"description,omitempty"` + } - if len(sliceV) == 1 { - out.MemberofindirectNetgroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberofindirectNetgroup: %v; expected at most one element", raw) - } +func (t *Automountkey) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Automountkey[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Automountkey%v", string(b)) +} - } else { - return fmt.Errorf("unexpected value for field MemberofindirectNetgroup: %v (%v)", raw, reflect.TypeOf(raw)) - } +type jsonAutomountkey struct { + + Automountkey interface{} `json:"automountkey"` + + Automountinformation interface{} `json:"automountinformation"` + + Description interface{} `json:"description"` + } - } +func (out *Automountkey) UnmarshalJSON(data []byte) error { + var in jsonAutomountkey + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Automountkey + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Automountkey = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Automountkey: %v; expected exactly one element", raw) + } + out.Automountkey = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Automountkey: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Automountinformation + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Automountinformation = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Automountinformation: %v; expected exactly one element", raw) + } + out.Automountinformation = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Automountinformation: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Description != nil { + raw := in.Description + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Description = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Description = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - if in.MemberofindirectRole != nil { - raw := in.MemberofindirectRole - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +type Automountlocation struct { + + /* +Location +Automount location name. + */ + Cn string `json:"cn,omitempty"` + } - itemV, itemOk := rawItem.(string) +func (t *Automountlocation) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Automountlocation[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Automountlocation%v", string(b)) +} - if !itemOk { - sliceOk = false - break - } +type jsonAutomountlocation struct { + + Cn interface{} `json:"cn"` + } - sliceV = append(sliceV, itemV) +func (out *Automountlocation) UnmarshalJSON(data []byte) error { + var in jsonAutomountlocation + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Cn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) + } + out.Cn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - } - } +type Automountmap struct { + + /* +Map +Automount map name. + */ + Automountmapname string `json:"automountmapname,omitempty"` + + /* +Description + + */ + Description *string `json:"description,omitempty"` + } - if plainOk { - out.MemberofindirectRole = &plainV - } else if sliceOk { +func (t *Automountmap) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Automountmap[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Automountmap%v", string(b)) +} - if len(sliceV) == 1 { - out.MemberofindirectRole = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberofindirectRole: %v; expected at most one element", raw) - } +type jsonAutomountmap struct { + + Automountmapname interface{} `json:"automountmapname"` + + Description interface{} `json:"description"` + } - } else { - return fmt.Errorf("unexpected value for field MemberofindirectRole: %v (%v)", raw, reflect.TypeOf(raw)) - } +func (out *Automountmap) UnmarshalJSON(data []byte) error { + var in jsonAutomountmap + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Automountmapname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Automountmapname = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Automountmapname: %v; expected exactly one element", raw) + } + out.Automountmapname = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Automountmapname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Description != nil { + raw := in.Description + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Description = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Description = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - } +type Ca struct { + + /* +Name +Name for referencing the CA + */ + Cn string `json:"cn,omitempty"` + + /* +Description +Description of the purpose of the CA + */ + Description *string `json:"description,omitempty"` + + /* +Authority ID +Dogtag Authority ID + */ + Ipacaid string `json:"ipacaid,omitempty"` + + /* +Subject DN +Subject Distinguished Name + */ + Ipacasubjectdn string `json:"ipacasubjectdn,omitempty"` + + /* +Issuer DN +Issuer Distinguished Name + */ + Ipacaissuerdn string `json:"ipacaissuerdn,omitempty"` + + /* +Certificate +Base-64 encoded certificate. + */ + Certificate string `json:"certificate,omitempty"` + + /* +Certificate chain +X.509 certificate chain + */ + CertificateChain *[]string `json:"certificate_chain,omitempty"` + } - if in.MemberofindirectSudorule != nil { - raw := in.MemberofindirectSudorule - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +func (t *Ca) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Ca[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Ca%v", string(b)) +} - itemV, itemOk := rawItem.(string) +type jsonCa struct { + + Cn interface{} `json:"cn"` + + Description interface{} `json:"description"` + + Ipacaid interface{} `json:"ipacaid"` + + Ipacasubjectdn interface{} `json:"ipacasubjectdn"` + + Ipacaissuerdn interface{} `json:"ipacaissuerdn"` + + Certificate interface{} `json:"certificate"` + + CertificateChain interface{} `json:"certificate_chain"` + } - if !itemOk { - sliceOk = false - break - } +func (out *Ca) UnmarshalJSON(data []byte) error { + var in jsonCa + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Cn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) + } + out.Cn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Description != nil { + raw := in.Description + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Description = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Description = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Ipacaid + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipacaid = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipacaid: %v; expected exactly one element", raw) + } + out.Ipacaid = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipacaid: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Ipacasubjectdn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipacasubjectdn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipacasubjectdn: %v; expected exactly one element", raw) + } + out.Ipacasubjectdn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipacasubjectdn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Ipacaissuerdn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipacaissuerdn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipacaissuerdn: %v; expected exactly one element", raw) + } + out.Ipacaissuerdn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipacaissuerdn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Certificate + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Certificate = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Certificate: %v; expected exactly one element", raw) + } + out.Certificate = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Certificate: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.CertificateChain != nil { + raw := in.CertificateChain + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.CertificateChain = &[]string{plainV} + } else if sliceOk { + + out.CertificateChain = &sliceV + } else { + return fmt.Errorf("unexpected value for field CertificateChain: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - sliceV = append(sliceV, itemV) +type Caacl struct { + + /* +ACL name + + */ + Cn string `json:"cn,omitempty"` + + /* +Description + + */ + Description *string `json:"description,omitempty"` + + /* +Enabled + + */ + Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` + + /* +CA category +CA category the ACL applies to + */ + Ipacacategory *string `json:"ipacacategory,omitempty"` + + /* +Profile category +Profile category the ACL applies to + */ + Ipacertprofilecategory *string `json:"ipacertprofilecategory,omitempty"` + + /* +User category +User category the ACL applies to + */ + Usercategory *string `json:"usercategory,omitempty"` + + /* +Host category +Host category the ACL applies to + */ + Hostcategory *string `json:"hostcategory,omitempty"` + + /* +Service category +Service category the ACL applies to + */ + Servicecategory *string `json:"servicecategory,omitempty"` + + /* +CAs + + */ + IpamembercaCa *string `json:"ipamemberca_ca,omitempty"` + + /* +Profiles + + */ + IpamembercertprofileCertprofile *string `json:"ipamembercertprofile_certprofile,omitempty"` + + /* +Users + + */ + MemberuserUser *string `json:"memberuser_user,omitempty"` + + /* +User Groups + + */ + MemberuserGroup *string `json:"memberuser_group,omitempty"` + + /* +Hosts + + */ + MemberhostHost *string `json:"memberhost_host,omitempty"` + + /* +Host Groups + + */ + MemberhostHostgroup *string `json:"memberhost_hostgroup,omitempty"` + + /* +Services + + */ + MemberserviceService *string `json:"memberservice_service,omitempty"` + } - } - } +func (t *Caacl) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Caacl[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Caacl%v", string(b)) +} - if plainOk { - out.MemberofindirectSudorule = &plainV - } else if sliceOk { +type jsonCaacl struct { + + Cn interface{} `json:"cn"` + + Description interface{} `json:"description"` + + Ipaenabledflag interface{} `json:"ipaenabledflag"` + + Ipacacategory interface{} `json:"ipacacategory"` + + Ipacertprofilecategory interface{} `json:"ipacertprofilecategory"` + + Usercategory interface{} `json:"usercategory"` + + Hostcategory interface{} `json:"hostcategory"` + + Servicecategory interface{} `json:"servicecategory"` + + IpamembercaCa interface{} `json:"ipamemberca_ca"` + + IpamembercertprofileCertprofile interface{} `json:"ipamembercertprofile_certprofile"` + + MemberuserUser interface{} `json:"memberuser_user"` + + MemberuserGroup interface{} `json:"memberuser_group"` + + MemberhostHost interface{} `json:"memberhost_host"` + + MemberhostHostgroup interface{} `json:"memberhost_hostgroup"` + + MemberserviceService interface{} `json:"memberservice_service"` + } - if len(sliceV) == 1 { - out.MemberofindirectSudorule = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberofindirectSudorule: %v; expected at most one element", raw) - } +func (out *Caacl) UnmarshalJSON(data []byte) error { + var in jsonCaacl + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Cn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) + } + out.Cn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Description != nil { + raw := in.Description + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Description = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Description = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipaenabledflag != nil { + raw := in.Ipaenabledflag + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipaenabledflag = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipaenabledflag = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipaenabledflag: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipaenabledflag: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipacacategory != nil { + raw := in.Ipacacategory + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipacacategory = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipacacategory = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipacacategory: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipacacategory: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipacertprofilecategory != nil { + raw := in.Ipacertprofilecategory + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipacertprofilecategory = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipacertprofilecategory = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipacertprofilecategory: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipacertprofilecategory: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Usercategory != nil { + raw := in.Usercategory + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Usercategory = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Usercategory = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Usercategory: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Usercategory: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Hostcategory != nil { + raw := in.Hostcategory + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Hostcategory = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Hostcategory = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Hostcategory: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Hostcategory: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Servicecategory != nil { + raw := in.Servicecategory + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Servicecategory = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Servicecategory = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Servicecategory: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Servicecategory: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.IpamembercaCa != nil { + raw := in.IpamembercaCa + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.IpamembercaCa = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.IpamembercaCa = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field IpamembercaCa: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field IpamembercaCa: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.IpamembercertprofileCertprofile != nil { + raw := in.IpamembercertprofileCertprofile + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.IpamembercertprofileCertprofile = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.IpamembercertprofileCertprofile = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field IpamembercertprofileCertprofile: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field IpamembercertprofileCertprofile: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberuserUser != nil { + raw := in.MemberuserUser + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberuserUser = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberuserUser = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberuserUser: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberuserUser: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberuserGroup != nil { + raw := in.MemberuserGroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberuserGroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberuserGroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberuserGroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberuserGroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberhostHost != nil { + raw := in.MemberhostHost + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberhostHost = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberhostHost = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberhostHost: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberhostHost: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberhostHostgroup != nil { + raw := in.MemberhostHostgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberhostHostgroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberhostHostgroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberhostHostgroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberhostHostgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberserviceService != nil { + raw := in.MemberserviceService + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberserviceService = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberserviceService = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberserviceService: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberserviceService: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - } else { - return fmt.Errorf("unexpected value for field MemberofindirectSudorule: %v (%v)", raw, reflect.TypeOf(raw)) - } +type Cert struct { + + /* +Issuing CA +Name of issuing CA + */ + Cacn *string `json:"cacn,omitempty"` + + /* +Certificate +Base-64 encoded certificate. + */ + Certificate interface{} `json:"certificate,omitempty"` + + /* +Certificate chain +X.509 certificate chain + */ + CertificateChain *[]string `json:"certificate_chain,omitempty"` + + /* +Subject + + */ + Subject string `json:"subject,omitempty"` + + /* +Subject email address + + */ + SanRfc822name *[]string `json:"san_rfc822name,omitempty"` + + /* +Subject DNS name + + */ + SanDnsname *[]string `json:"san_dnsname,omitempty"` + + /* +Subject X.400 address + + */ + SanX400address *[]string `json:"san_x400address,omitempty"` + + /* +Subject directory name + + */ + SanDirectoryname *[]string `json:"san_directoryname,omitempty"` + + /* +Subject EDI Party name + + */ + SanEdipartyname *[]string `json:"san_edipartyname,omitempty"` + + /* +Subject URI + + */ + SanURI *[]string `json:"san_uri,omitempty"` + + /* +Subject IP Address + + */ + SanIpaddress *[]string `json:"san_ipaddress,omitempty"` + + /* +Subject OID + + */ + SanOid *[]string `json:"san_oid,omitempty"` + + /* +Subject UPN + + */ + SanOtherUpn *[]string `json:"san_other_upn,omitempty"` + + /* +Subject Kerberos principal name + + */ + SanOtherKpn *[]string `json:"san_other_kpn,omitempty"` + + /* +Subject Other Name + + */ + SanOther *[]string `json:"san_other,omitempty"` + + /* +Issuer +Issuer DN + */ + Issuer string `json:"issuer,omitempty"` + + /* +Not Before + + */ + ValidNotBefore time.Time `json:"valid_not_before,omitempty"` + + /* +Not After + + */ + ValidNotAfter time.Time `json:"valid_not_after,omitempty"` + + /* +Fingerprint (SHA1) + + */ + Sha1Fingerprint string `json:"sha1_fingerprint,omitempty"` + + /* +Fingerprint (SHA256) + + */ + Sha256Fingerprint string `json:"sha256_fingerprint,omitempty"` + + /* +Serial number +Serial number in decimal or if prefixed with 0x in hexadecimal + */ + SerialNumber int `json:"serial_number,omitempty"` + + /* +Serial number (hex) + + */ + SerialNumberHex string `json:"serial_number_hex,omitempty"` + + /* +Status + + */ + Status string `json:"status,omitempty"` + + /* +Revoked + + */ + Revoked *bool `json:"revoked,omitempty"` + + /* +Revocation reason +Reason for revoking the certificate (0-10). Type "ipa help cert" for revocation reason details. + */ + RevocationReason int `json:"revocation_reason,omitempty"` + + /* +Owner user + + */ + OwnerUser *[]string `json:"owner_user,omitempty"` + + /* +Owner host + + */ + OwnerHost *[]string `json:"owner_host,omitempty"` + + /* +Owner service +Service principal alias + */ + OwnerService *[]string `json:"owner_service,omitempty"` + } - } +func (t *Cert) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Cert[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Cert%v", string(b)) +} - if in.MemberofindirectHbacrule != nil { - raw := in.MemberofindirectHbacrule - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +type jsonCert struct { + + Cacn interface{} `json:"cacn"` + + Certificate interface{} `json:"certificate"` + + CertificateChain interface{} `json:"certificate_chain"` + + Subject interface{} `json:"subject"` + + SanRfc822name interface{} `json:"san_rfc822name"` + + SanDnsname interface{} `json:"san_dnsname"` + + SanX400address interface{} `json:"san_x400address"` + + SanDirectoryname interface{} `json:"san_directoryname"` + + SanEdipartyname interface{} `json:"san_edipartyname"` + + SanURI interface{} `json:"san_uri"` + + SanIpaddress interface{} `json:"san_ipaddress"` + + SanOid interface{} `json:"san_oid"` + + SanOtherUpn interface{} `json:"san_other_upn"` + + SanOtherKpn interface{} `json:"san_other_kpn"` + + SanOther interface{} `json:"san_other"` + + Issuer interface{} `json:"issuer"` + + ValidNotBefore interface{} `json:"valid_not_before"` + + ValidNotAfter interface{} `json:"valid_not_after"` + + Sha1Fingerprint interface{} `json:"sha1_fingerprint"` + + Sha256Fingerprint interface{} `json:"sha256_fingerprint"` + + SerialNumber interface{} `json:"serial_number"` + + SerialNumberHex interface{} `json:"serial_number_hex"` + + Status interface{} `json:"status"` + + Revoked interface{} `json:"revoked"` + + RevocationReason interface{} `json:"revocation_reason"` + + OwnerUser interface{} `json:"owner_user"` + + OwnerHost interface{} `json:"owner_host"` + + OwnerService interface{} `json:"owner_service"` + } - itemV, itemOk := rawItem.(string) +func (out *Cert) UnmarshalJSON(data []byte) error { + var in jsonCert + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if in.Cacn != nil { + raw := in.Cacn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cacn = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Cacn = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Cacn: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Cacn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Certificate + plainV, plainOk := raw.(interface{}) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []interface{} + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(interface{}) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Certificate = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Certificate: %v; expected exactly one element", raw) + } + out.Certificate = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Certificate: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.CertificateChain != nil { + raw := in.CertificateChain + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.CertificateChain = &[]string{plainV} + } else if sliceOk { + + out.CertificateChain = &sliceV + } else { + return fmt.Errorf("unexpected value for field CertificateChain: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Subject + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Subject = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Subject: %v; expected exactly one element", raw) + } + out.Subject = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Subject: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.SanRfc822name != nil { + raw := in.SanRfc822name + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.SanRfc822name = &[]string{plainV} + } else if sliceOk { + + out.SanRfc822name = &sliceV + } else { + return fmt.Errorf("unexpected value for field SanRfc822name: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.SanDnsname != nil { + raw := in.SanDnsname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.SanDnsname = &[]string{plainV} + } else if sliceOk { + + out.SanDnsname = &sliceV + } else { + return fmt.Errorf("unexpected value for field SanDnsname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.SanX400address != nil { + raw := in.SanX400address + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.SanX400address = &[]string{plainV} + } else if sliceOk { + + out.SanX400address = &sliceV + } else { + return fmt.Errorf("unexpected value for field SanX400address: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.SanDirectoryname != nil { + raw := in.SanDirectoryname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.SanDirectoryname = &[]string{plainV} + } else if sliceOk { + + out.SanDirectoryname = &sliceV + } else { + return fmt.Errorf("unexpected value for field SanDirectoryname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.SanEdipartyname != nil { + raw := in.SanEdipartyname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.SanEdipartyname = &[]string{plainV} + } else if sliceOk { + + out.SanEdipartyname = &sliceV + } else { + return fmt.Errorf("unexpected value for field SanEdipartyname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.SanURI != nil { + raw := in.SanURI + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.SanURI = &[]string{plainV} + } else if sliceOk { + + out.SanURI = &sliceV + } else { + return fmt.Errorf("unexpected value for field SanURI: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.SanIpaddress != nil { + raw := in.SanIpaddress + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.SanIpaddress = &[]string{plainV} + } else if sliceOk { + + out.SanIpaddress = &sliceV + } else { + return fmt.Errorf("unexpected value for field SanIpaddress: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.SanOid != nil { + raw := in.SanOid + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.SanOid = &[]string{plainV} + } else if sliceOk { + + out.SanOid = &sliceV + } else { + return fmt.Errorf("unexpected value for field SanOid: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.SanOtherUpn != nil { + raw := in.SanOtherUpn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.SanOtherUpn = &[]string{plainV} + } else if sliceOk { + + out.SanOtherUpn = &sliceV + } else { + return fmt.Errorf("unexpected value for field SanOtherUpn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.SanOtherKpn != nil { + raw := in.SanOtherKpn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.SanOtherKpn = &[]string{plainV} + } else if sliceOk { + + out.SanOtherKpn = &sliceV + } else { + return fmt.Errorf("unexpected value for field SanOtherKpn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.SanOther != nil { + raw := in.SanOther + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.SanOther = &[]string{plainV} + } else if sliceOk { + + out.SanOther = &sliceV + } else { + return fmt.Errorf("unexpected value for field SanOther: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Issuer + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Issuer = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Issuer: %v; expected exactly one element", raw) + } + out.Issuer = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Issuer: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.ValidNotBefore + plainV, plainOk := raw.(time.Time) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []time.Time + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(time.Time) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.ValidNotBefore = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field ValidNotBefore: %v; expected exactly one element", raw) + } + out.ValidNotBefore = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field ValidNotBefore: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.ValidNotAfter + plainV, plainOk := raw.(time.Time) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []time.Time + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(time.Time) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.ValidNotAfter = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field ValidNotAfter: %v; expected exactly one element", raw) + } + out.ValidNotAfter = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field ValidNotAfter: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Sha1Fingerprint + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Sha1Fingerprint = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Sha1Fingerprint: %v; expected exactly one element", raw) + } + out.Sha1Fingerprint = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Sha1Fingerprint: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Sha256Fingerprint + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Sha256Fingerprint = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Sha256Fingerprint: %v; expected exactly one element", raw) + } + out.Sha256Fingerprint = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Sha256Fingerprint: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.SerialNumber + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field SerialNumber: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.SerialNumber = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field SerialNumber: %v; expected exactly one element", raw) + } + out.SerialNumber = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field SerialNumber: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.SerialNumberHex + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.SerialNumberHex = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field SerialNumberHex: %v; expected exactly one element", raw) + } + out.SerialNumberHex = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field SerialNumberHex: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Status + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Status = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Status: %v; expected exactly one element", raw) + } + out.Status = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Status: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Revoked != nil { + raw := in.Revoked + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Revoked = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Revoked = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Revoked: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Revoked: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.RevocationReason + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field RevocationReason: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.RevocationReason = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field RevocationReason: %v; expected exactly one element", raw) + } + out.RevocationReason = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field RevocationReason: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.OwnerUser != nil { + raw := in.OwnerUser + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.OwnerUser = &[]string{plainV} + } else if sliceOk { + + out.OwnerUser = &sliceV + } else { + return fmt.Errorf("unexpected value for field OwnerUser: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.OwnerHost != nil { + raw := in.OwnerHost + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.OwnerHost = &[]string{plainV} + } else if sliceOk { + + out.OwnerHost = &sliceV + } else { + return fmt.Errorf("unexpected value for field OwnerHost: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.OwnerService != nil { + raw := in.OwnerService + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.OwnerService = &[]string{plainV} + } else if sliceOk { + + out.OwnerService = &sliceV + } else { + return fmt.Errorf("unexpected value for field OwnerService: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} + +type Certmap struct { + + /* +Domain + + */ + Domain string `json:"domain,omitempty"` + + /* +User logins + + */ + UID *[]string `json:"uid,omitempty"` + } + +func (t *Certmap) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Certmap[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Certmap%v", string(b)) +} + +type jsonCertmap struct { + + Domain interface{} `json:"domain"` + + UID interface{} `json:"uid"` + } + +func (out *Certmap) UnmarshalJSON(data []byte) error { + var in jsonCertmap + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Domain + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Domain = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Domain: %v; expected exactly one element", raw) + } + out.Domain = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Domain: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.UID != nil { + raw := in.UID + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.UID = &[]string{plainV} + } else if sliceOk { + + out.UID = &sliceV + } else { + return fmt.Errorf("unexpected value for field UID: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} + +type Certmapconfig struct { + + /* +Prompt for the username +Prompt for the username when multiple identities are mapped to a certificate + */ + Ipacertmappromptusername *bool `json:"ipacertmappromptusername,omitempty"` + } + +func (t *Certmapconfig) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Certmapconfig[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Certmapconfig%v", string(b)) +} + +type jsonCertmapconfig struct { + + Ipacertmappromptusername interface{} `json:"ipacertmappromptusername"` + } + +func (out *Certmapconfig) UnmarshalJSON(data []byte) error { + var in jsonCertmapconfig + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if in.Ipacertmappromptusername != nil { + raw := in.Ipacertmappromptusername + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipacertmappromptusername = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipacertmappromptusername = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipacertmappromptusername: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipacertmappromptusername: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} + +type Certmaprule struct { + + /* +Rule name +Certificate Identity Mapping Rule name + */ + Cn string `json:"cn,omitempty"` + + /* +Description +Certificate Identity Mapping Rule description + */ + Description *string `json:"description,omitempty"` + + /* +Mapping rule +Rule used to map the certificate with a user entry + */ + Ipacertmapmaprule *string `json:"ipacertmapmaprule,omitempty"` + + /* +Matching rule +Rule used to check if a certificate can be used for authentication + */ + Ipacertmapmatchrule *string `json:"ipacertmapmatchrule,omitempty"` + + /* +Domain name +Domain where the user entry will be searched + */ + Associateddomain *[]string `json:"associateddomain,omitempty"` + + /* +Priority +Priority of the rule (higher number means lower priority + */ + Ipacertmappriority *int `json:"ipacertmappriority,omitempty"` + + /* +Enabled + + */ + Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` + } + +func (t *Certmaprule) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Certmaprule[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Certmaprule%v", string(b)) +} + +type jsonCertmaprule struct { + + Cn interface{} `json:"cn"` + + Description interface{} `json:"description"` + + Ipacertmapmaprule interface{} `json:"ipacertmapmaprule"` + + Ipacertmapmatchrule interface{} `json:"ipacertmapmatchrule"` + + Associateddomain interface{} `json:"associateddomain"` + + Ipacertmappriority interface{} `json:"ipacertmappriority"` + + Ipaenabledflag interface{} `json:"ipaenabledflag"` + } + +func (out *Certmaprule) UnmarshalJSON(data []byte) error { + var in jsonCertmaprule + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Cn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) + } + out.Cn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Description != nil { + raw := in.Description + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Description = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Description = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipacertmapmaprule != nil { + raw := in.Ipacertmapmaprule + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipacertmapmaprule = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipacertmapmaprule = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipacertmapmaprule: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipacertmapmaprule: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipacertmapmatchrule != nil { + raw := in.Ipacertmapmatchrule + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipacertmapmatchrule = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipacertmapmatchrule = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipacertmapmatchrule: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipacertmapmatchrule: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Associateddomain != nil { + raw := in.Associateddomain + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Associateddomain = &[]string{plainV} + } else if sliceOk { + + out.Associateddomain = &sliceV + } else { + return fmt.Errorf("unexpected value for field Associateddomain: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipacertmappriority != nil { + raw := in.Ipacertmappriority + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Ipacertmappriority: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Ipacertmappriority = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipacertmappriority = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipacertmappriority: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipacertmappriority: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipaenabledflag != nil { + raw := in.Ipaenabledflag + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipaenabledflag = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipaenabledflag = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipaenabledflag: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipaenabledflag: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - if !itemOk { - sliceOk = false - break - } +type Certprofile struct { + + /* +Profile ID +Profile ID for referring to this profile + */ + Cn string `json:"cn,omitempty"` + + /* +Profile configuration + + */ + Config string `json:"config,omitempty"` + + /* +Profile description +Brief description of this profile + */ + Description string `json:"description,omitempty"` + + /* +Store issued certificates +Whether to store certs issued using this profile + */ + Ipacertprofilestoreissued *bool `json:"ipacertprofilestoreissued,omitempty"` + } - sliceV = append(sliceV, itemV) +func (t *Certprofile) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Certprofile[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Certprofile%v", string(b)) +} - } - } +type jsonCertprofile struct { + + Cn interface{} `json:"cn"` + + Config interface{} `json:"config"` + + Description interface{} `json:"description"` + + Ipacertprofilestoreissued interface{} `json:"ipacertprofilestoreissued"` + } - if plainOk { - out.MemberofindirectHbacrule = &plainV - } else if sliceOk { +func (out *Certprofile) UnmarshalJSON(data []byte) error { + var in jsonCertprofile + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Cn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) + } + out.Cn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Config + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Config = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Config: %v; expected exactly one element", raw) + } + out.Config = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Config: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Description + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Description = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Description: %v; expected exactly one element", raw) + } + out.Description = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipacertprofilestoreissued != nil { + raw := in.Ipacertprofilestoreissued + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipacertprofilestoreissued = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipacertprofilestoreissued = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipacertprofilestoreissued: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipacertprofilestoreissued: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - if len(sliceV) == 1 { - out.MemberofindirectHbacrule = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field MemberofindirectHbacrule: %v; expected at most one element", raw) - } +type Certreq struct { + + /* +Issuing CA +Name of issuing CA + */ + Cacn *string `json:"cacn,omitempty"` + + /* +Certificate +Base-64 encoded certificate. + */ + Certificate interface{} `json:"certificate,omitempty"` + + /* +Certificate chain +X.509 certificate chain + */ + CertificateChain *[]string `json:"certificate_chain,omitempty"` + + /* +Subject + + */ + Subject string `json:"subject,omitempty"` + + /* +Subject email address + + */ + SanRfc822name *[]string `json:"san_rfc822name,omitempty"` + + /* +Subject DNS name + + */ + SanDnsname *[]string `json:"san_dnsname,omitempty"` + + /* +Subject X.400 address + + */ + SanX400address *[]string `json:"san_x400address,omitempty"` + + /* +Subject directory name + + */ + SanDirectoryname *[]string `json:"san_directoryname,omitempty"` + + /* +Subject EDI Party name + + */ + SanEdipartyname *[]string `json:"san_edipartyname,omitempty"` + + /* +Subject URI + + */ + SanURI *[]string `json:"san_uri,omitempty"` + + /* +Subject IP Address + + */ + SanIpaddress *[]string `json:"san_ipaddress,omitempty"` + + /* +Subject OID + + */ + SanOid *[]string `json:"san_oid,omitempty"` + + /* +Subject UPN + + */ + SanOtherUpn *[]string `json:"san_other_upn,omitempty"` + + /* +Subject Kerberos principal name + + */ + SanOtherKpn *[]string `json:"san_other_kpn,omitempty"` + + /* +Subject Other Name + + */ + SanOther *[]string `json:"san_other,omitempty"` + + /* +Issuer +Issuer DN + */ + Issuer string `json:"issuer,omitempty"` + + /* +Not Before + + */ + ValidNotBefore time.Time `json:"valid_not_before,omitempty"` + + /* +Not After + + */ + ValidNotAfter time.Time `json:"valid_not_after,omitempty"` + + /* +Fingerprint (SHA1) + + */ + Sha1Fingerprint string `json:"sha1_fingerprint,omitempty"` + + /* +Fingerprint (SHA256) + + */ + Sha256Fingerprint string `json:"sha256_fingerprint,omitempty"` + + /* +Serial number +Serial number in decimal or if prefixed with 0x in hexadecimal + */ + SerialNumber int `json:"serial_number,omitempty"` + + /* +Serial number (hex) + + */ + SerialNumberHex string `json:"serial_number_hex,omitempty"` + + /* + + + */ + RequestType string `json:"request_type,omitempty"` + + /* +Profile ID +Certificate Profile to use + */ + ProfileID *string `json:"profile_id,omitempty"` + + /* +Request status + + */ + CertRequestStatus string `json:"cert_request_status,omitempty"` + + /* +Request id + + */ + RequestID int `json:"request_id,omitempty"` + } - } else { - return fmt.Errorf("unexpected value for field MemberofindirectHbacrule: %v (%v)", raw, reflect.TypeOf(raw)) - } +func (t *Certreq) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Certreq[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Certreq%v", string(b)) +} - } +type jsonCertreq struct { + + Cacn interface{} `json:"cacn"` + + Certificate interface{} `json:"certificate"` + + CertificateChain interface{} `json:"certificate_chain"` + + Subject interface{} `json:"subject"` + + SanRfc822name interface{} `json:"san_rfc822name"` + + SanDnsname interface{} `json:"san_dnsname"` + + SanX400address interface{} `json:"san_x400address"` + + SanDirectoryname interface{} `json:"san_directoryname"` + + SanEdipartyname interface{} `json:"san_edipartyname"` + + SanURI interface{} `json:"san_uri"` + + SanIpaddress interface{} `json:"san_ipaddress"` + + SanOid interface{} `json:"san_oid"` + + SanOtherUpn interface{} `json:"san_other_upn"` + + SanOtherKpn interface{} `json:"san_other_kpn"` + + SanOther interface{} `json:"san_other"` + + Issuer interface{} `json:"issuer"` + + ValidNotBefore interface{} `json:"valid_not_before"` + + ValidNotAfter interface{} `json:"valid_not_after"` + + Sha1Fingerprint interface{} `json:"sha1_fingerprint"` + + Sha256Fingerprint interface{} `json:"sha256_fingerprint"` + + SerialNumber interface{} `json:"serial_number"` + + SerialNumberHex interface{} `json:"serial_number_hex"` + + RequestType interface{} `json:"request_type"` + + ProfileID interface{} `json:"profile_id"` + + CertRequestStatus interface{} `json:"cert_request_status"` + + RequestID interface{} `json:"request_id"` + } - if in.HasKeytab != nil { - raw := in.HasKeytab - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +func (out *Certreq) UnmarshalJSON(data []byte) error { + var in jsonCertreq + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if in.Cacn != nil { + raw := in.Cacn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cacn = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Cacn = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Cacn: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Cacn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Certificate + plainV, plainOk := raw.(interface{}) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []interface{} + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(interface{}) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Certificate = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Certificate: %v; expected exactly one element", raw) + } + out.Certificate = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Certificate: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.CertificateChain != nil { + raw := in.CertificateChain + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.CertificateChain = &[]string{plainV} + } else if sliceOk { + + out.CertificateChain = &sliceV + } else { + return fmt.Errorf("unexpected value for field CertificateChain: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Subject + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Subject = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Subject: %v; expected exactly one element", raw) + } + out.Subject = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Subject: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.SanRfc822name != nil { + raw := in.SanRfc822name + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.SanRfc822name = &[]string{plainV} + } else if sliceOk { + + out.SanRfc822name = &sliceV + } else { + return fmt.Errorf("unexpected value for field SanRfc822name: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.SanDnsname != nil { + raw := in.SanDnsname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.SanDnsname = &[]string{plainV} + } else if sliceOk { + + out.SanDnsname = &sliceV + } else { + return fmt.Errorf("unexpected value for field SanDnsname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.SanX400address != nil { + raw := in.SanX400address + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.SanX400address = &[]string{plainV} + } else if sliceOk { + + out.SanX400address = &sliceV + } else { + return fmt.Errorf("unexpected value for field SanX400address: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.SanDirectoryname != nil { + raw := in.SanDirectoryname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.SanDirectoryname = &[]string{plainV} + } else if sliceOk { + + out.SanDirectoryname = &sliceV + } else { + return fmt.Errorf("unexpected value for field SanDirectoryname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.SanEdipartyname != nil { + raw := in.SanEdipartyname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.SanEdipartyname = &[]string{plainV} + } else if sliceOk { + + out.SanEdipartyname = &sliceV + } else { + return fmt.Errorf("unexpected value for field SanEdipartyname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.SanURI != nil { + raw := in.SanURI + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.SanURI = &[]string{plainV} + } else if sliceOk { + + out.SanURI = &sliceV + } else { + return fmt.Errorf("unexpected value for field SanURI: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.SanIpaddress != nil { + raw := in.SanIpaddress + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.SanIpaddress = &[]string{plainV} + } else if sliceOk { + + out.SanIpaddress = &sliceV + } else { + return fmt.Errorf("unexpected value for field SanIpaddress: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.SanOid != nil { + raw := in.SanOid + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.SanOid = &[]string{plainV} + } else if sliceOk { + + out.SanOid = &sliceV + } else { + return fmt.Errorf("unexpected value for field SanOid: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.SanOtherUpn != nil { + raw := in.SanOtherUpn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.SanOtherUpn = &[]string{plainV} + } else if sliceOk { + + out.SanOtherUpn = &sliceV + } else { + return fmt.Errorf("unexpected value for field SanOtherUpn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.SanOtherKpn != nil { + raw := in.SanOtherKpn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.SanOtherKpn = &[]string{plainV} + } else if sliceOk { + + out.SanOtherKpn = &sliceV + } else { + return fmt.Errorf("unexpected value for field SanOtherKpn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.SanOther != nil { + raw := in.SanOther + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.SanOther = &[]string{plainV} + } else if sliceOk { + + out.SanOther = &sliceV + } else { + return fmt.Errorf("unexpected value for field SanOther: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Issuer + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Issuer = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Issuer: %v; expected exactly one element", raw) + } + out.Issuer = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Issuer: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.ValidNotBefore + plainV, plainOk := raw.(time.Time) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []time.Time + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(time.Time) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.ValidNotBefore = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field ValidNotBefore: %v; expected exactly one element", raw) + } + out.ValidNotBefore = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field ValidNotBefore: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.ValidNotAfter + plainV, plainOk := raw.(time.Time) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []time.Time + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(time.Time) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.ValidNotAfter = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field ValidNotAfter: %v; expected exactly one element", raw) + } + out.ValidNotAfter = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field ValidNotAfter: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Sha1Fingerprint + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Sha1Fingerprint = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Sha1Fingerprint: %v; expected exactly one element", raw) + } + out.Sha1Fingerprint = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Sha1Fingerprint: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Sha256Fingerprint + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Sha256Fingerprint = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Sha256Fingerprint: %v; expected exactly one element", raw) + } + out.Sha256Fingerprint = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Sha256Fingerprint: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.SerialNumber + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field SerialNumber: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.SerialNumber = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field SerialNumber: %v; expected exactly one element", raw) + } + out.SerialNumber = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field SerialNumber: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.SerialNumberHex + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.SerialNumberHex = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field SerialNumberHex: %v; expected exactly one element", raw) + } + out.SerialNumberHex = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field SerialNumberHex: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.RequestType + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.RequestType = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field RequestType: %v; expected exactly one element", raw) + } + out.RequestType = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field RequestType: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.ProfileID != nil { + raw := in.ProfileID + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.ProfileID = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.ProfileID = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field ProfileID: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field ProfileID: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.CertRequestStatus + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.CertRequestStatus = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field CertRequestStatus: %v; expected exactly one element", raw) + } + out.CertRequestStatus = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field CertRequestStatus: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.RequestID + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field RequestID: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.RequestID = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field RequestID: %v; expected exactly one element", raw) + } + out.RequestID = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field RequestID: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - itemV, itemOk := rawItem.(bool) +type Class struct { + + /* +Name + + */ + Name string `json:"name,omitempty"` + + /* +Version + + */ + Version string `json:"version,omitempty"` + + /* +Full name + + */ + FullName string `json:"full_name,omitempty"` + + /* +Documentation + + */ + Doc *string `json:"doc,omitempty"` + + /* +Exclude from + + */ + Exclude *[]string `json:"exclude,omitempty"` + + /* +Include in + + */ + Include *[]string `json:"include,omitempty"` + + /* +Help topic + + */ + TopicTopic *string `json:"topic_topic,omitempty"` + + /* +Parameters + + */ + ParamsParam *[]string `json:"params_param,omitempty"` + } - if !itemOk { - sliceOk = false - break - } +func (t *Class) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Class[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Class%v", string(b)) +} - sliceV = append(sliceV, itemV) +type jsonClass struct { + + Name interface{} `json:"name"` + + Version interface{} `json:"version"` + + FullName interface{} `json:"full_name"` + + Doc interface{} `json:"doc"` + + Exclude interface{} `json:"exclude"` + + Include interface{} `json:"include"` + + TopicTopic interface{} `json:"topic_topic"` + + ParamsParam interface{} `json:"params_param"` + } - } - } +func (out *Class) UnmarshalJSON(data []byte) error { + var in jsonClass + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Name + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Name = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Name: %v; expected exactly one element", raw) + } + out.Name = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Name: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Version + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Version = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Version: %v; expected exactly one element", raw) + } + out.Version = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Version: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.FullName + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.FullName = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field FullName: %v; expected exactly one element", raw) + } + out.FullName = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field FullName: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Doc != nil { + raw := in.Doc + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Doc = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Doc = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Doc: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Doc: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Exclude != nil { + raw := in.Exclude + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Exclude = &[]string{plainV} + } else if sliceOk { + + out.Exclude = &sliceV + } else { + return fmt.Errorf("unexpected value for field Exclude: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Include != nil { + raw := in.Include + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Include = &[]string{plainV} + } else if sliceOk { + + out.Include = &sliceV + } else { + return fmt.Errorf("unexpected value for field Include: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.TopicTopic != nil { + raw := in.TopicTopic + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.TopicTopic = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.TopicTopic = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field TopicTopic: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field TopicTopic: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.ParamsParam != nil { + raw := in.ParamsParam + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.ParamsParam = &[]string{plainV} + } else if sliceOk { + + out.ParamsParam = &sliceV + } else { + return fmt.Errorf("unexpected value for field ParamsParam: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - if plainOk { - out.HasKeytab = &plainV - } else if sliceOk { +type Command struct { + + /* +Name + + */ + Name string `json:"name,omitempty"` + + /* +Version + + */ + Version string `json:"version,omitempty"` + + /* +Full name + + */ + FullName string `json:"full_name,omitempty"` + + /* +Documentation + + */ + Doc *string `json:"doc,omitempty"` + + /* +Exclude from + + */ + Exclude *[]string `json:"exclude,omitempty"` + + /* +Include in + + */ + Include *[]string `json:"include,omitempty"` + + /* +Help topic + + */ + TopicTopic *string `json:"topic_topic,omitempty"` + + /* +Parameters + + */ + ParamsParam *[]string `json:"params_param,omitempty"` + + /* +Method of + + */ + ObjClass *string `json:"obj_class,omitempty"` + + /* +Method name + + */ + AttrName *string `json:"attr_name,omitempty"` + } - if len(sliceV) == 1 { - out.HasKeytab = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field HasKeytab: %v; expected at most one element", raw) - } +func (t *Command) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Command[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Command%v", string(b)) +} - } else { - return fmt.Errorf("unexpected value for field HasKeytab: %v (%v)", raw, reflect.TypeOf(raw)) - } +type jsonCommand struct { + + Name interface{} `json:"name"` + + Version interface{} `json:"version"` + + FullName interface{} `json:"full_name"` + + Doc interface{} `json:"doc"` + + Exclude interface{} `json:"exclude"` + + Include interface{} `json:"include"` + + TopicTopic interface{} `json:"topic_topic"` + + ParamsParam interface{} `json:"params_param"` + + ObjClass interface{} `json:"obj_class"` + + AttrName interface{} `json:"attr_name"` + } - } - return nil +func (out *Command) UnmarshalJSON(data []byte) error { + var in jsonCommand + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Name + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Name = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Name: %v; expected exactly one element", raw) + } + out.Name = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Name: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Version + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Version = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Version: %v; expected exactly one element", raw) + } + out.Version = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Version: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.FullName + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.FullName = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field FullName: %v; expected exactly one element", raw) + } + out.FullName = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field FullName: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Doc != nil { + raw := in.Doc + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Doc = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Doc = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Doc: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Doc: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Exclude != nil { + raw := in.Exclude + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Exclude = &[]string{plainV} + } else if sliceOk { + + out.Exclude = &sliceV + } else { + return fmt.Errorf("unexpected value for field Exclude: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Include != nil { + raw := in.Include + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Include = &[]string{plainV} + } else if sliceOk { + + out.Include = &sliceV + } else { + return fmt.Errorf("unexpected value for field Include: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.TopicTopic != nil { + raw := in.TopicTopic + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.TopicTopic = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.TopicTopic = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field TopicTopic: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field TopicTopic: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.ParamsParam != nil { + raw := in.ParamsParam + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.ParamsParam = &[]string{plainV} + } else if sliceOk { + + out.ParamsParam = &sliceV + } else { + return fmt.Errorf("unexpected value for field ParamsParam: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.ObjClass != nil { + raw := in.ObjClass + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.ObjClass = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.ObjClass = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field ObjClass: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field ObjClass: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.AttrName != nil { + raw := in.AttrName + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.AttrName = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.AttrName = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field AttrName: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field AttrName: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil } -type Userstatus struct { +type Config struct { + + /* +Maximum username length + + */ + Ipamaxusernamelength int `json:"ipamaxusernamelength,omitempty"` + + /* +Home directory base +Default location of home directories + */ + Ipahomesrootdir string `json:"ipahomesrootdir,omitempty"` + + /* +Default shell +Default shell for new users + */ + Ipadefaultloginshell string `json:"ipadefaultloginshell,omitempty"` + + /* +Default users group +Default group for new users + */ + Ipadefaultprimarygroup string `json:"ipadefaultprimarygroup,omitempty"` + + /* +Default e-mail domain +Default e-mail domain + */ + Ipadefaultemaildomain *string `json:"ipadefaultemaildomain,omitempty"` + + /* +Search time limit +Maximum amount of time (seconds) for a search (-1 or 0 is unlimited) + */ + Ipasearchtimelimit int `json:"ipasearchtimelimit,omitempty"` + + /* +Search size limit +Maximum number of records to search (-1 or 0 is unlimited) + */ + Ipasearchrecordslimit int `json:"ipasearchrecordslimit,omitempty"` + + /* +User search fields +A comma-separated list of fields to search in when searching for users + */ + Ipausersearchfields string `json:"ipausersearchfields,omitempty"` + + /* +Group search fields +A comma-separated list of fields to search in when searching for groups + */ + Ipagroupsearchfields string `json:"ipagroupsearchfields,omitempty"` + + /* +Enable migration mode +Enable migration mode + */ + Ipamigrationenabled *bool `json:"ipamigrationenabled,omitempty"` + + /* +Certificate Subject base +Base for certificate subjects (OU=Test,O=Example) + */ + Ipacertificatesubjectbase string `json:"ipacertificatesubjectbase,omitempty"` + + /* +Default group objectclasses +Default group objectclasses (comma-separated list) + */ + Ipagroupobjectclasses []string `json:"ipagroupobjectclasses,omitempty"` + + /* +Default user objectclasses +Default user objectclasses (comma-separated list) + */ + Ipauserobjectclasses []string `json:"ipauserobjectclasses,omitempty"` + + /* +Password Expiration Notification (days) +Number of days's notice of impending password expiration + */ + Ipapwdexpadvnotify int `json:"ipapwdexpadvnotify,omitempty"` + + /* +Password plugin features +Extra hashes to generate in password plug-in + */ + Ipaconfigstring *[]string `json:"ipaconfigstring,omitempty"` + + /* +SELinux user map order +Order in increasing priority of SELinux users, delimited by $ + */ + Ipaselinuxusermaporder string `json:"ipaselinuxusermaporder,omitempty"` + + /* +Default SELinux user +Default SELinux user when no match is found in SELinux map rule + */ + Ipaselinuxusermapdefault *string `json:"ipaselinuxusermapdefault,omitempty"` + + /* +Default PAC types +Default types of PAC supported for services + */ + Ipakrbauthzdata *[]string `json:"ipakrbauthzdata,omitempty"` + + /* +Default user authentication types +Default types of supported user authentication + */ + Ipauserauthtype *[]string `json:"ipauserauthtype,omitempty"` + + /* +IPA masters +List of all IPA masters + */ + IpaMasterServer *[]string `json:"ipa_master_server,omitempty"` + + /* +Hidden IPA masters +List of all hidden IPA masters + */ + IpaMasterHiddenServer *[]string `json:"ipa_master_hidden_server,omitempty"` + + /* +IPA master capable of PKINIT +IPA master which can process PKINIT requests + */ + PkinitServerServer *[]string `json:"pkinit_server_server,omitempty"` + + /* +IPA CA servers +IPA servers configured as certificate authority + */ + CaServerServer *[]string `json:"ca_server_server,omitempty"` + + /* +IPA NTP servers +IPA servers with enabled NTP + */ + NtpServerServer *[]string `json:"ntp_server_server,omitempty"` + + /* +Hidden IPA CA servers +Hidden IPA servers configured as certificate authority + */ + CaServerHiddenServer *[]string `json:"ca_server_hidden_server,omitempty"` + + /* +IPA CA renewal master +Renewal master for IPA certificate authority + */ + CaRenewalMasterServer *string `json:"ca_renewal_master_server,omitempty"` + + /* +IPA KRA servers +IPA servers configured as key recovery agent + */ + KraServerServer *[]string `json:"kra_server_server,omitempty"` + + /* +Hidden IPA KRA servers +Hidden IPA servers configured as key recovery agent + */ + KraServerHiddenServer *[]string `json:"kra_server_hidden_server,omitempty"` + + /* +Domain resolution order +colon-separated list of domains used for short name qualification + */ + Ipadomainresolutionorder *string `json:"ipadomainresolutionorder,omitempty"` + + /* +IPA DNS servers +IPA servers configured as domain name server + */ + DNSServerServer *[]string `json:"dns_server_server,omitempty"` + + /* +Hidden IPA DNS servers +Hidden IPA servers configured as domain name server + */ + DNSServerHiddenServer *[]string `json:"dns_server_hidden_server,omitempty"` + + /* +IPA DNSSec key master +DNSec key master + */ + DnssecKeyMasterServer *string `json:"dnssec_key_master_server,omitempty"` + } + +func (t *Config) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Config[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Config%v", string(b)) +} - /* - Preserved user +type jsonConfig struct { + + Ipamaxusernamelength interface{} `json:"ipamaxusernamelength"` + + Ipahomesrootdir interface{} `json:"ipahomesrootdir"` + + Ipadefaultloginshell interface{} `json:"ipadefaultloginshell"` + + Ipadefaultprimarygroup interface{} `json:"ipadefaultprimarygroup"` + + Ipadefaultemaildomain interface{} `json:"ipadefaultemaildomain"` + + Ipasearchtimelimit interface{} `json:"ipasearchtimelimit"` + + Ipasearchrecordslimit interface{} `json:"ipasearchrecordslimit"` + + Ipausersearchfields interface{} `json:"ipausersearchfields"` + + Ipagroupsearchfields interface{} `json:"ipagroupsearchfields"` + + Ipamigrationenabled interface{} `json:"ipamigrationenabled"` + + Ipacertificatesubjectbase interface{} `json:"ipacertificatesubjectbase"` + + Ipagroupobjectclasses interface{} `json:"ipagroupobjectclasses"` + + Ipauserobjectclasses interface{} `json:"ipauserobjectclasses"` + + Ipapwdexpadvnotify interface{} `json:"ipapwdexpadvnotify"` + + Ipaconfigstring interface{} `json:"ipaconfigstring"` + + Ipaselinuxusermaporder interface{} `json:"ipaselinuxusermaporder"` + + Ipaselinuxusermapdefault interface{} `json:"ipaselinuxusermapdefault"` + + Ipakrbauthzdata interface{} `json:"ipakrbauthzdata"` + + Ipauserauthtype interface{} `json:"ipauserauthtype"` + + IpaMasterServer interface{} `json:"ipa_master_server"` + + IpaMasterHiddenServer interface{} `json:"ipa_master_hidden_server"` + + PkinitServerServer interface{} `json:"pkinit_server_server"` + + CaServerServer interface{} `json:"ca_server_server"` + + NtpServerServer interface{} `json:"ntp_server_server"` + + CaServerHiddenServer interface{} `json:"ca_server_hidden_server"` + + CaRenewalMasterServer interface{} `json:"ca_renewal_master_server"` + + KraServerServer interface{} `json:"kra_server_server"` + + KraServerHiddenServer interface{} `json:"kra_server_hidden_server"` + + Ipadomainresolutionorder interface{} `json:"ipadomainresolutionorder"` + + DNSServerServer interface{} `json:"dns_server_server"` + + DNSServerHiddenServer interface{} `json:"dns_server_hidden_server"` + + DnssecKeyMasterServer interface{} `json:"dnssec_key_master_server"` + } - */ - Preserved *bool `json:"preserved,omitempty"` +func (out *Config) UnmarshalJSON(data []byte) error { + var in jsonConfig + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Ipamaxusernamelength + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Ipamaxusernamelength: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Ipamaxusernamelength = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipamaxusernamelength: %v; expected exactly one element", raw) + } + out.Ipamaxusernamelength = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipamaxusernamelength: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Ipahomesrootdir + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipahomesrootdir = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipahomesrootdir: %v; expected exactly one element", raw) + } + out.Ipahomesrootdir = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipahomesrootdir: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Ipadefaultloginshell + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipadefaultloginshell = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipadefaultloginshell: %v; expected exactly one element", raw) + } + out.Ipadefaultloginshell = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipadefaultloginshell: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Ipadefaultprimarygroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipadefaultprimarygroup = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipadefaultprimarygroup: %v; expected exactly one element", raw) + } + out.Ipadefaultprimarygroup = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipadefaultprimarygroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipadefaultemaildomain != nil { + raw := in.Ipadefaultemaildomain + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipadefaultemaildomain = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipadefaultemaildomain = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipadefaultemaildomain: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipadefaultemaildomain: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Ipasearchtimelimit + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Ipasearchtimelimit: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Ipasearchtimelimit = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipasearchtimelimit: %v; expected exactly one element", raw) + } + out.Ipasearchtimelimit = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipasearchtimelimit: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Ipasearchrecordslimit + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Ipasearchrecordslimit: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Ipasearchrecordslimit = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipasearchrecordslimit: %v; expected exactly one element", raw) + } + out.Ipasearchrecordslimit = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipasearchrecordslimit: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Ipausersearchfields + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipausersearchfields = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipausersearchfields: %v; expected exactly one element", raw) + } + out.Ipausersearchfields = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipausersearchfields: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Ipagroupsearchfields + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipagroupsearchfields = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipagroupsearchfields: %v; expected exactly one element", raw) + } + out.Ipagroupsearchfields = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipagroupsearchfields: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipamigrationenabled != nil { + raw := in.Ipamigrationenabled + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipamigrationenabled = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipamigrationenabled = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipamigrationenabled: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipamigrationenabled: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Ipacertificatesubjectbase + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipacertificatesubjectbase = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipacertificatesubjectbase: %v; expected exactly one element", raw) + } + out.Ipacertificatesubjectbase = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipacertificatesubjectbase: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Ipagroupobjectclasses + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipagroupobjectclasses = []string{plainV} + } else if sliceOk { + + if len(sliceV) < 1 { + return fmt.Errorf("unexpected value for field Ipagroupobjectclasses: %v; expected at least one element", raw) + } + + out.Ipagroupobjectclasses = sliceV + } else { + return fmt.Errorf("unexpected value for field Ipagroupobjectclasses: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Ipauserobjectclasses + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipauserobjectclasses = []string{plainV} + } else if sliceOk { + + if len(sliceV) < 1 { + return fmt.Errorf("unexpected value for field Ipauserobjectclasses: %v; expected at least one element", raw) + } + + out.Ipauserobjectclasses = sliceV + } else { + return fmt.Errorf("unexpected value for field Ipauserobjectclasses: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Ipapwdexpadvnotify + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Ipapwdexpadvnotify: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Ipapwdexpadvnotify = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipapwdexpadvnotify: %v; expected exactly one element", raw) + } + out.Ipapwdexpadvnotify = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipapwdexpadvnotify: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipaconfigstring != nil { + raw := in.Ipaconfigstring + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipaconfigstring = &[]string{plainV} + } else if sliceOk { + + out.Ipaconfigstring = &sliceV + } else { + return fmt.Errorf("unexpected value for field Ipaconfigstring: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Ipaselinuxusermaporder + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipaselinuxusermaporder = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipaselinuxusermaporder: %v; expected exactly one element", raw) + } + out.Ipaselinuxusermaporder = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipaselinuxusermaporder: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipaselinuxusermapdefault != nil { + raw := in.Ipaselinuxusermapdefault + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipaselinuxusermapdefault = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipaselinuxusermapdefault = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipaselinuxusermapdefault: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipaselinuxusermapdefault: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipakrbauthzdata != nil { + raw := in.Ipakrbauthzdata + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipakrbauthzdata = &[]string{plainV} + } else if sliceOk { + + out.Ipakrbauthzdata = &sliceV + } else { + return fmt.Errorf("unexpected value for field Ipakrbauthzdata: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipauserauthtype != nil { + raw := in.Ipauserauthtype + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipauserauthtype = &[]string{plainV} + } else if sliceOk { + + out.Ipauserauthtype = &sliceV + } else { + return fmt.Errorf("unexpected value for field Ipauserauthtype: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.IpaMasterServer != nil { + raw := in.IpaMasterServer + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.IpaMasterServer = &[]string{plainV} + } else if sliceOk { + + out.IpaMasterServer = &sliceV + } else { + return fmt.Errorf("unexpected value for field IpaMasterServer: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.IpaMasterHiddenServer != nil { + raw := in.IpaMasterHiddenServer + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.IpaMasterHiddenServer = &[]string{plainV} + } else if sliceOk { + + out.IpaMasterHiddenServer = &sliceV + } else { + return fmt.Errorf("unexpected value for field IpaMasterHiddenServer: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.PkinitServerServer != nil { + raw := in.PkinitServerServer + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.PkinitServerServer = &[]string{plainV} + } else if sliceOk { + + out.PkinitServerServer = &sliceV + } else { + return fmt.Errorf("unexpected value for field PkinitServerServer: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.CaServerServer != nil { + raw := in.CaServerServer + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.CaServerServer = &[]string{plainV} + } else if sliceOk { + + out.CaServerServer = &sliceV + } else { + return fmt.Errorf("unexpected value for field CaServerServer: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.NtpServerServer != nil { + raw := in.NtpServerServer + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.NtpServerServer = &[]string{plainV} + } else if sliceOk { + + out.NtpServerServer = &sliceV + } else { + return fmt.Errorf("unexpected value for field NtpServerServer: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.CaServerHiddenServer != nil { + raw := in.CaServerHiddenServer + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.CaServerHiddenServer = &[]string{plainV} + } else if sliceOk { + + out.CaServerHiddenServer = &sliceV + } else { + return fmt.Errorf("unexpected value for field CaServerHiddenServer: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.CaRenewalMasterServer != nil { + raw := in.CaRenewalMasterServer + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.CaRenewalMasterServer = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.CaRenewalMasterServer = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field CaRenewalMasterServer: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field CaRenewalMasterServer: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.KraServerServer != nil { + raw := in.KraServerServer + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.KraServerServer = &[]string{plainV} + } else if sliceOk { + + out.KraServerServer = &sliceV + } else { + return fmt.Errorf("unexpected value for field KraServerServer: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.KraServerHiddenServer != nil { + raw := in.KraServerHiddenServer + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.KraServerHiddenServer = &[]string{plainV} + } else if sliceOk { + + out.KraServerHiddenServer = &sliceV + } else { + return fmt.Errorf("unexpected value for field KraServerHiddenServer: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipadomainresolutionorder != nil { + raw := in.Ipadomainresolutionorder + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipadomainresolutionorder = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipadomainresolutionorder = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipadomainresolutionorder: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipadomainresolutionorder: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.DNSServerServer != nil { + raw := in.DNSServerServer + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.DNSServerServer = &[]string{plainV} + } else if sliceOk { + + out.DNSServerServer = &sliceV + } else { + return fmt.Errorf("unexpected value for field DNSServerServer: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.DNSServerHiddenServer != nil { + raw := in.DNSServerHiddenServer + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.DNSServerHiddenServer = &[]string{plainV} + } else if sliceOk { + + out.DNSServerHiddenServer = &sliceV + } else { + return fmt.Errorf("unexpected value for field DNSServerHiddenServer: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.DnssecKeyMasterServer != nil { + raw := in.DnssecKeyMasterServer + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.DnssecKeyMasterServer = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.DnssecKeyMasterServer = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field DnssecKeyMasterServer: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field DnssecKeyMasterServer: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - /* - Server +type Cosentry struct { + + /* - */ - Server string `json:"server,omitempty"` - /* - Failed logins + */ + Cn string `json:"cn,omitempty"` + + /* - */ - Krbloginfailedcount string `json:"krbloginfailedcount,omitempty"` - /* - Last successful authentication + */ + Krbpwdpolicyreference string `json:"krbpwdpolicyreference,omitempty"` + + /* - */ - Krblastsuccessfulauth string `json:"krblastsuccessfulauth,omitempty"` - /* - Last failed authentication + */ + Cospriority int `json:"cospriority,omitempty"` + } - */ - Krblastfailedauth string `json:"krblastfailedauth,omitempty"` +func (t *Cosentry) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Cosentry[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Cosentry%v", string(b)) +} - /* - Time now +type jsonCosentry struct { + + Cn interface{} `json:"cn"` + + Krbpwdpolicyreference interface{} `json:"krbpwdpolicyreference"` + + Cospriority interface{} `json:"cospriority"` + } - */ - Now string `json:"now,omitempty"` +func (out *Cosentry) UnmarshalJSON(data []byte) error { + var in jsonCosentry + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Cn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) + } + out.Cn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Krbpwdpolicyreference + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Krbpwdpolicyreference = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Krbpwdpolicyreference: %v; expected exactly one element", raw) + } + out.Krbpwdpolicyreference = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Krbpwdpolicyreference: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Cospriority + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Cospriority: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Cospriority = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Cospriority: %v; expected exactly one element", raw) + } + out.Cospriority = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Cospriority: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil } -func (t *Userstatus) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Userstatus[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Userstatus%v", string(b)) +type Delegation struct { + + /* +Delegation name +Delegation name + */ + Aciname string `json:"aciname,omitempty"` + + /* +Permissions +Permissions to grant (read, write). Default is write. + */ + Permissions *[]string `json:"permissions,omitempty"` + + /* +Attributes +Attributes to which the delegation applies + */ + Attrs []string `json:"attrs,omitempty"` + + /* +Member user group +User group to apply delegation to + */ + Memberof string `json:"memberof,omitempty"` + + /* +User group +User group ACI grants access to + */ + Group string `json:"group,omitempty"` + + /* +ACI + + */ + Aci string `json:"aci,omitempty"` + } + +func (t *Delegation) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Delegation[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Delegation%v", string(b)) } -type jsonUserstatus struct { - Preserved interface{} `json:"preserved"` +type jsonDelegation struct { + + Aciname interface{} `json:"aciname"` + + Permissions interface{} `json:"permissions"` + + Attrs interface{} `json:"attrs"` + + Memberof interface{} `json:"memberof"` + + Group interface{} `json:"group"` + + Aci interface{} `json:"aci"` + } - Server interface{} `json:"server"` +func (out *Delegation) UnmarshalJSON(data []byte) error { + var in jsonDelegation + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Aciname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Aciname = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Aciname: %v; expected exactly one element", raw) + } + out.Aciname = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Aciname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Permissions != nil { + raw := in.Permissions + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Permissions = &[]string{plainV} + } else if sliceOk { + + out.Permissions = &sliceV + } else { + return fmt.Errorf("unexpected value for field Permissions: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Attrs + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Attrs = []string{plainV} + } else if sliceOk { + + if len(sliceV) < 1 { + return fmt.Errorf("unexpected value for field Attrs: %v; expected at least one element", raw) + } + + out.Attrs = sliceV + } else { + return fmt.Errorf("unexpected value for field Attrs: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Memberof + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Memberof = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Memberof: %v; expected exactly one element", raw) + } + out.Memberof = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Memberof: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Group + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Group = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Group: %v; expected exactly one element", raw) + } + out.Group = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Group: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Aci + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Aci = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Aci: %v; expected exactly one element", raw) + } + out.Aci = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Aci: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - Krbloginfailedcount interface{} `json:"krbloginfailedcount"` +type DNSSystemRecords struct { + + /* +IPA DNS records - Krblastsuccessfulauth interface{} `json:"krblastsuccessfulauth"` + */ + IpaRecords *[]string `json:"ipa_records,omitempty"` + + /* +IPA location records - Krblastfailedauth interface{} `json:"krblastfailedauth"` + */ + LocationRecords *[]string `json:"location_records,omitempty"` + } - Now interface{} `json:"now"` +func (t *DNSSystemRecords) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("DNSSystemRecords[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("DNSSystemRecords%v", string(b)) } -func (out *Userstatus) UnmarshalJSON(data []byte) error { - var in jsonUserstatus - if e := json.Unmarshal(data, &in); e != nil { - return e - } - - if in.Preserved != nil { - raw := in.Preserved - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +type jsonDNSSystemRecords struct { + + IpaRecords interface{} `json:"ipa_records"` + + LocationRecords interface{} `json:"location_records"` + } - itemV, itemOk := rawItem.(bool) +func (out *DNSSystemRecords) UnmarshalJSON(data []byte) error { + var in jsonDNSSystemRecords + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if in.IpaRecords != nil { + raw := in.IpaRecords + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.IpaRecords = &[]string{plainV} + } else if sliceOk { + + out.IpaRecords = &sliceV + } else { + return fmt.Errorf("unexpected value for field IpaRecords: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.LocationRecords != nil { + raw := in.LocationRecords + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.LocationRecords = &[]string{plainV} + } else if sliceOk { + + out.LocationRecords = &sliceV + } else { + return fmt.Errorf("unexpected value for field LocationRecords: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - if !itemOk { - sliceOk = false - break - } +type Dnsa6record struct { + + /* +Record data - sliceV = append(sliceV, itemV) + */ + Data string `json:"data,omitempty"` + } - } - } +func (t *Dnsa6record) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Dnsa6record[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Dnsa6record%v", string(b)) +} - if plainOk { - out.Preserved = &plainV - } else if sliceOk { +type jsonDnsa6record struct { + + Data interface{} `json:"data"` + } - if len(sliceV) == 1 { - out.Preserved = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Preserved: %v; expected at most one element", raw) - } +func (out *Dnsa6record) UnmarshalJSON(data []byte) error { + var in jsonDnsa6record + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Data + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Data = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Data: %v; expected exactly one element", raw) + } + out.Data = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Data: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - } else { - return fmt.Errorf("unexpected value for field Preserved: %v (%v)", raw, reflect.TypeOf(raw)) - } +type Dnsaaaarecord struct { + + /* +IP Address - } + */ + IPAddress string `json:"ip_address,omitempty"` + } - if true { - raw := in.Server - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +func (t *Dnsaaaarecord) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Dnsaaaarecord[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Dnsaaaarecord%v", string(b)) +} - itemV, itemOk := rawItem.(string) +type jsonDnsaaaarecord struct { + + IPAddress interface{} `json:"ip_address"` + } - if !itemOk { - sliceOk = false - break - } +func (out *Dnsaaaarecord) UnmarshalJSON(data []byte) error { + var in jsonDnsaaaarecord + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.IPAddress + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.IPAddress = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field IPAddress: %v; expected exactly one element", raw) + } + out.IPAddress = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field IPAddress: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - sliceV = append(sliceV, itemV) +type Dnsafsdbrecord struct { + + /* +Subtype - } - } + */ + Subtype *int `json:"subtype,omitempty"` + + /* +Hostname - if plainOk { - out.Server = plainV - } else if sliceOk { + */ + Hostname string `json:"hostname,omitempty"` + } - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Server: %v; expected exactly one element", raw) - } - out.Server = sliceV[0] +func (t *Dnsafsdbrecord) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Dnsafsdbrecord[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Dnsafsdbrecord%v", string(b)) +} - } else { - return fmt.Errorf("unexpected value for field Server: %v (%v)", raw, reflect.TypeOf(raw)) - } +type jsonDnsafsdbrecord struct { + + Subtype interface{} `json:"subtype"` + + Hostname interface{} `json:"hostname"` + } - } +func (out *Dnsafsdbrecord) UnmarshalJSON(data []byte) error { + var in jsonDnsafsdbrecord + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if in.Subtype != nil { + raw := in.Subtype + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Subtype: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Subtype = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Subtype = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Subtype: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Subtype: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Hostname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Hostname = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Hostname: %v; expected exactly one element", raw) + } + out.Hostname = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Hostname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - if true { - raw := in.Krbloginfailedcount - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +type Dnsaplrecord struct { + } - itemV, itemOk := rawItem.(string) +func (t *Dnsaplrecord) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Dnsaplrecord[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Dnsaplrecord%v", string(b)) +} - if !itemOk { - sliceOk = false - break - } +type jsonDnsaplrecord struct { + } - sliceV = append(sliceV, itemV) +func (out *Dnsaplrecord) UnmarshalJSON(data []byte) error { + var in jsonDnsaplrecord + if e := json.Unmarshal(data, &in); e != nil { + return e + } + return nil +} - } - } +type Dnsarecord struct { + + /* +IP Address - if plainOk { - out.Krbloginfailedcount = plainV - } else if sliceOk { + */ + IPAddress string `json:"ip_address,omitempty"` + } - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Krbloginfailedcount: %v; expected exactly one element", raw) - } - out.Krbloginfailedcount = sliceV[0] +func (t *Dnsarecord) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Dnsarecord[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Dnsarecord%v", string(b)) +} - } else { - return fmt.Errorf("unexpected value for field Krbloginfailedcount: %v (%v)", raw, reflect.TypeOf(raw)) - } +type jsonDnsarecord struct { + + IPAddress interface{} `json:"ip_address"` + } - } +func (out *Dnsarecord) UnmarshalJSON(data []byte) error { + var in jsonDnsarecord + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.IPAddress + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.IPAddress = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field IPAddress: %v; expected exactly one element", raw) + } + out.IPAddress = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field IPAddress: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - if true { - raw := in.Krblastsuccessfulauth - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +type Dnscertrecord struct { + + /* +Certificate Type + + */ + Type int `json:"type,omitempty"` + + /* +Key Tag + + */ + KeyTag int `json:"key_tag,omitempty"` + + /* +Algorithm + + */ + Algorithm int `json:"algorithm,omitempty"` + + /* +Certificate/CRL + + */ + CertificateOrCrl string `json:"certificate_or_crl,omitempty"` + } - itemV, itemOk := rawItem.(string) +func (t *Dnscertrecord) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Dnscertrecord[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Dnscertrecord%v", string(b)) +} - if !itemOk { - sliceOk = false - break - } +type jsonDnscertrecord struct { + + Type interface{} `json:"type"` + + KeyTag interface{} `json:"key_tag"` + + Algorithm interface{} `json:"algorithm"` + + CertificateOrCrl interface{} `json:"certificate_or_crl"` + } - sliceV = append(sliceV, itemV) +func (out *Dnscertrecord) UnmarshalJSON(data []byte) error { + var in jsonDnscertrecord + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Type + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Type: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Type = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Type: %v; expected exactly one element", raw) + } + out.Type = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Type: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.KeyTag + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field KeyTag: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.KeyTag = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field KeyTag: %v; expected exactly one element", raw) + } + out.KeyTag = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field KeyTag: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Algorithm + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Algorithm: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Algorithm = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Algorithm: %v; expected exactly one element", raw) + } + out.Algorithm = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Algorithm: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.CertificateOrCrl + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.CertificateOrCrl = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field CertificateOrCrl: %v; expected exactly one element", raw) + } + out.CertificateOrCrl = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field CertificateOrCrl: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - } - } +type Dnscnamerecord struct { + + /* +Hostname +A hostname which this alias hostname points to + */ + Hostname string `json:"hostname,omitempty"` + } - if plainOk { - out.Krblastsuccessfulauth = plainV - } else if sliceOk { +func (t *Dnscnamerecord) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Dnscnamerecord[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Dnscnamerecord%v", string(b)) +} - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Krblastsuccessfulauth: %v; expected exactly one element", raw) - } - out.Krblastsuccessfulauth = sliceV[0] +type jsonDnscnamerecord struct { + + Hostname interface{} `json:"hostname"` + } - } else { - return fmt.Errorf("unexpected value for field Krblastsuccessfulauth: %v (%v)", raw, reflect.TypeOf(raw)) - } +func (out *Dnscnamerecord) UnmarshalJSON(data []byte) error { + var in jsonDnscnamerecord + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Hostname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Hostname = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Hostname: %v; expected exactly one element", raw) + } + out.Hostname = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Hostname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - } +type Dnsconfig struct { + + /* +Global forwarders +Global forwarders. A custom port can be specified for each forwarder using a standard format "IP_ADDRESS port PORT" + */ + Idnsforwarders *[]string `json:"idnsforwarders,omitempty"` + + /* +Forward policy +Global forwarding policy. Set to "none" to disable any configured global forwarders. + */ + Idnsforwardpolicy *string `json:"idnsforwardpolicy,omitempty"` + + /* +Allow PTR sync +Allow synchronization of forward (A, AAAA) and reverse (PTR) records + */ + Idnsallowsyncptr *bool `json:"idnsallowsyncptr,omitempty"` + + /* +Zone refresh interval +An interval between regular polls of the name server for new DNS zones + */ + Idnszonerefresh *int `json:"idnszonerefresh,omitempty"` + + /* +IPA DNS version + + */ + Ipadnsversion *int `json:"ipadnsversion,omitempty"` + + /* +IPA DNS servers +List of IPA masters configured as DNS servers + */ + DNSServerServer *[]string `json:"dns_server_server,omitempty"` + + /* +IPA DNSSec key master +IPA server configured as DNSSec key master + */ + DnssecKeyMasterServer *string `json:"dnssec_key_master_server,omitempty"` + } - if true { - raw := in.Krblastfailedauth - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +func (t *Dnsconfig) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Dnsconfig[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Dnsconfig%v", string(b)) +} - itemV, itemOk := rawItem.(string) +type jsonDnsconfig struct { + + Idnsforwarders interface{} `json:"idnsforwarders"` + + Idnsforwardpolicy interface{} `json:"idnsforwardpolicy"` + + Idnsallowsyncptr interface{} `json:"idnsallowsyncptr"` + + Idnszonerefresh interface{} `json:"idnszonerefresh"` + + Ipadnsversion interface{} `json:"ipadnsversion"` + + DNSServerServer interface{} `json:"dns_server_server"` + + DnssecKeyMasterServer interface{} `json:"dnssec_key_master_server"` + } - if !itemOk { - sliceOk = false - break - } +func (out *Dnsconfig) UnmarshalJSON(data []byte) error { + var in jsonDnsconfig + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if in.Idnsforwarders != nil { + raw := in.Idnsforwarders + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Idnsforwarders = &[]string{plainV} + } else if sliceOk { + + out.Idnsforwarders = &sliceV + } else { + return fmt.Errorf("unexpected value for field Idnsforwarders: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Idnsforwardpolicy != nil { + raw := in.Idnsforwardpolicy + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Idnsforwardpolicy = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Idnsforwardpolicy = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Idnsforwardpolicy: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Idnsforwardpolicy: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Idnsallowsyncptr != nil { + raw := in.Idnsallowsyncptr + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Idnsallowsyncptr = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Idnsallowsyncptr = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Idnsallowsyncptr: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Idnsallowsyncptr: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Idnszonerefresh != nil { + raw := in.Idnszonerefresh + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Idnszonerefresh: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Idnszonerefresh = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Idnszonerefresh = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Idnszonerefresh: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Idnszonerefresh: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipadnsversion != nil { + raw := in.Ipadnsversion + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Ipadnsversion: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Ipadnsversion = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipadnsversion = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipadnsversion: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipadnsversion: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.DNSServerServer != nil { + raw := in.DNSServerServer + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.DNSServerServer = &[]string{plainV} + } else if sliceOk { + + out.DNSServerServer = &sliceV + } else { + return fmt.Errorf("unexpected value for field DNSServerServer: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.DnssecKeyMasterServer != nil { + raw := in.DnssecKeyMasterServer + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.DnssecKeyMasterServer = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.DnssecKeyMasterServer = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field DnssecKeyMasterServer: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field DnssecKeyMasterServer: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - sliceV = append(sliceV, itemV) +type Dnsdhcidrecord struct { + } - } - } +func (t *Dnsdhcidrecord) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Dnsdhcidrecord[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Dnsdhcidrecord%v", string(b)) +} - if plainOk { - out.Krblastfailedauth = plainV - } else if sliceOk { +type jsonDnsdhcidrecord struct { + } - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Krblastfailedauth: %v; expected exactly one element", raw) - } - out.Krblastfailedauth = sliceV[0] +func (out *Dnsdhcidrecord) UnmarshalJSON(data []byte) error { + var in jsonDnsdhcidrecord + if e := json.Unmarshal(data, &in); e != nil { + return e + } + return nil +} - } else { - return fmt.Errorf("unexpected value for field Krblastfailedauth: %v (%v)", raw, reflect.TypeOf(raw)) - } +type Dnsdlvrecord struct { + + /* +Key Tag + + */ + KeyTag int `json:"key_tag,omitempty"` + + /* +Algorithm + + */ + Algorithm int `json:"algorithm,omitempty"` + + /* +Digest Type + + */ + DigestType int `json:"digest_type,omitempty"` + + /* +Digest + + */ + Digest string `json:"digest,omitempty"` + } - } +func (t *Dnsdlvrecord) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Dnsdlvrecord[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Dnsdlvrecord%v", string(b)) +} - if true { - raw := in.Now - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +type jsonDnsdlvrecord struct { + + KeyTag interface{} `json:"key_tag"` + + Algorithm interface{} `json:"algorithm"` + + DigestType interface{} `json:"digest_type"` + + Digest interface{} `json:"digest"` + } - itemV, itemOk := rawItem.(string) +func (out *Dnsdlvrecord) UnmarshalJSON(data []byte) error { + var in jsonDnsdlvrecord + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.KeyTag + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field KeyTag: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.KeyTag = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field KeyTag: %v; expected exactly one element", raw) + } + out.KeyTag = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field KeyTag: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Algorithm + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Algorithm: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Algorithm = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Algorithm: %v; expected exactly one element", raw) + } + out.Algorithm = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Algorithm: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.DigestType + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field DigestType: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.DigestType = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field DigestType: %v; expected exactly one element", raw) + } + out.DigestType = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field DigestType: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Digest + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Digest = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Digest: %v; expected exactly one element", raw) + } + out.Digest = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Digest: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - if !itemOk { - sliceOk = false - break - } +type Dnsdnamerecord struct { + + /* +Target - sliceV = append(sliceV, itemV) + */ + Target string `json:"target,omitempty"` + } - } - } +func (t *Dnsdnamerecord) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Dnsdnamerecord[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Dnsdnamerecord%v", string(b)) +} - if plainOk { - out.Now = plainV - } else if sliceOk { +type jsonDnsdnamerecord struct { + + Target interface{} `json:"target"` + } - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Now: %v; expected exactly one element", raw) - } - out.Now = sliceV[0] +func (out *Dnsdnamerecord) UnmarshalJSON(data []byte) error { + var in jsonDnsdnamerecord + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Target + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Target = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Target: %v; expected exactly one element", raw) + } + out.Target = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Target: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - } else { - return fmt.Errorf("unexpected value for field Now: %v (%v)", raw, reflect.TypeOf(raw)) - } +type Dnsdsrecord struct { + + /* +Key Tag + + */ + KeyTag int `json:"key_tag,omitempty"` + + /* +Algorithm + + */ + Algorithm int `json:"algorithm,omitempty"` + + /* +Digest Type + + */ + DigestType int `json:"digest_type,omitempty"` + + /* +Digest + + */ + Digest string `json:"digest,omitempty"` + } - } - return nil +func (t *Dnsdsrecord) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Dnsdsrecord[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Dnsdsrecord%v", string(b)) } -type Vault struct { - - /* - Vault name +type jsonDnsdsrecord struct { + + KeyTag interface{} `json:"key_tag"` + + Algorithm interface{} `json:"algorithm"` + + DigestType interface{} `json:"digest_type"` + + Digest interface{} `json:"digest"` + } - */ - Cn string `json:"cn,omitempty"` +func (out *Dnsdsrecord) UnmarshalJSON(data []byte) error { + var in jsonDnsdsrecord + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.KeyTag + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field KeyTag: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.KeyTag = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field KeyTag: %v; expected exactly one element", raw) + } + out.KeyTag = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field KeyTag: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Algorithm + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Algorithm: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Algorithm = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Algorithm: %v; expected exactly one element", raw) + } + out.Algorithm = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Algorithm: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.DigestType + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field DigestType: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.DigestType = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field DigestType: %v; expected exactly one element", raw) + } + out.DigestType = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field DigestType: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Digest + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Digest = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Digest: %v; expected exactly one element", raw) + } + out.Digest = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Digest: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - /* - Description - Vault description - */ - Description *string `json:"description,omitempty"` +type Dnsforwardzone struct { + + /* +Zone name +Zone name (FQDN) + */ + Idnsname string `json:"idnsname,omitempty"` + + /* +Reverse zone IP network +IP network to create reverse zone name from + */ + NameFromIP *string `json:"name_from_ip,omitempty"` + + /* +Active zone +Is zone active? + */ + Idnszoneactive *bool `json:"idnszoneactive,omitempty"` + + /* +Zone forwarders +Per-zone forwarders. A custom port can be specified for each forwarder using a standard format "IP_ADDRESS port PORT" + */ + Idnsforwarders *[]string `json:"idnsforwarders,omitempty"` + + /* +Forward policy +Per-zone conditional forwarding policy. Set to "none" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded. + */ + Idnsforwardpolicy *string `json:"idnsforwardpolicy,omitempty"` + + /* +Managedby permission + + */ + Managedby string `json:"managedby,omitempty"` + } - /* - Type - Vault type - */ - Ipavaulttype *string `json:"ipavaulttype,omitempty"` +func (t *Dnsforwardzone) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Dnsforwardzone[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Dnsforwardzone%v", string(b)) +} - /* - Salt - Vault salt - */ - Ipavaultsalt *string `json:"ipavaultsalt,omitempty"` +type jsonDnsforwardzone struct { + + Idnsname interface{} `json:"idnsname"` + + NameFromIP interface{} `json:"name_from_ip"` + + Idnszoneactive interface{} `json:"idnszoneactive"` + + Idnsforwarders interface{} `json:"idnsforwarders"` + + Idnsforwardpolicy interface{} `json:"idnsforwardpolicy"` + + Managedby interface{} `json:"managedby"` + } - /* - Public key - Vault public key - */ - Ipavaultpublickey *string `json:"ipavaultpublickey,omitempty"` +func (out *Dnsforwardzone) UnmarshalJSON(data []byte) error { + var in jsonDnsforwardzone + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Idnsname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Idnsname = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Idnsname: %v; expected exactly one element", raw) + } + out.Idnsname = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Idnsname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.NameFromIP != nil { + raw := in.NameFromIP + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.NameFromIP = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.NameFromIP = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field NameFromIP: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field NameFromIP: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Idnszoneactive != nil { + raw := in.Idnszoneactive + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Idnszoneactive = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Idnszoneactive = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Idnszoneactive: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Idnszoneactive: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Idnsforwarders != nil { + raw := in.Idnsforwarders + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Idnsforwarders = &[]string{plainV} + } else if sliceOk { + + out.Idnsforwarders = &sliceV + } else { + return fmt.Errorf("unexpected value for field Idnsforwarders: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Idnsforwardpolicy != nil { + raw := in.Idnsforwardpolicy + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Idnsforwardpolicy = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Idnsforwardpolicy = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Idnsforwardpolicy: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Idnsforwardpolicy: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Managedby + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Managedby = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Managedby: %v; expected exactly one element", raw) + } + out.Managedby = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Managedby: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - /* - Owner users +type Dnshiprecord struct { + } - */ - OwnerUser *string `json:"owner_user,omitempty"` +func (t *Dnshiprecord) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Dnshiprecord[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Dnshiprecord%v", string(b)) +} - /* - Owner groups +type jsonDnshiprecord struct { + } - */ - OwnerGroup *string `json:"owner_group,omitempty"` +func (out *Dnshiprecord) UnmarshalJSON(data []byte) error { + var in jsonDnshiprecord + if e := json.Unmarshal(data, &in); e != nil { + return e + } + return nil +} - /* - Owner services +type Dnsipseckeyrecord struct { + } - */ - OwnerService *string `json:"owner_service,omitempty"` +func (t *Dnsipseckeyrecord) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Dnsipseckeyrecord[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Dnsipseckeyrecord%v", string(b)) +} - /* - Failed owners +type jsonDnsipseckeyrecord struct { + } - */ - Owner *string `json:"owner,omitempty"` +func (out *Dnsipseckeyrecord) UnmarshalJSON(data []byte) error { + var in jsonDnsipseckeyrecord + if e := json.Unmarshal(data, &in); e != nil { + return e + } + return nil +} - /* - Vault service +type Dnskeyrecord struct { + } - */ - Service *string `json:"service,omitempty"` +func (t *Dnskeyrecord) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Dnskeyrecord[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Dnskeyrecord%v", string(b)) +} - /* - Shared vault +type jsonDnskeyrecord struct { + } - */ - Shared *bool `json:"shared,omitempty"` +func (out *Dnskeyrecord) UnmarshalJSON(data []byte) error { + var in jsonDnskeyrecord + if e := json.Unmarshal(data, &in); e != nil { + return e + } + return nil +} - /* - Vault user +type Dnskxrecord struct { + + /* +Preference +Preference given to this exchanger. Lower values are more preferred + */ + Preference int `json:"preference,omitempty"` + + /* +Exchanger +A host willing to act as a key exchanger + */ + Exchanger string `json:"exchanger,omitempty"` + } - */ - Username *string `json:"username,omitempty"` +func (t *Dnskxrecord) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Dnskxrecord[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Dnskxrecord%v", string(b)) +} - /* - Member users +type jsonDnskxrecord struct { + + Preference interface{} `json:"preference"` + + Exchanger interface{} `json:"exchanger"` + } - */ - MemberUser *[]string `json:"member_user,omitempty"` +func (out *Dnskxrecord) UnmarshalJSON(data []byte) error { + var in jsonDnskxrecord + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Preference + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Preference: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Preference = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Preference: %v; expected exactly one element", raw) + } + out.Preference = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Preference: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Exchanger + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Exchanger = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Exchanger: %v; expected exactly one element", raw) + } + out.Exchanger = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Exchanger: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - /* - Member groups +type Dnslocrecord struct { + + /* +Degrees Latitude + + */ + LatDeg int `json:"lat_deg,omitempty"` + + /* +Minutes Latitude + + */ + LatMin *int `json:"lat_min,omitempty"` + + /* +Seconds Latitude + + */ + LatSec *float64 `json:"lat_sec,omitempty"` + + /* +Direction Latitude + + */ + LatDir string `json:"lat_dir,omitempty"` + + /* +Degrees Longitude + + */ + LonDeg int `json:"lon_deg,omitempty"` + + /* +Minutes Longitude + + */ + LonMin *int `json:"lon_min,omitempty"` + + /* +Seconds Longitude + + */ + LonSec *float64 `json:"lon_sec,omitempty"` + + /* +Direction Longitude + + */ + LonDir string `json:"lon_dir,omitempty"` + + /* +Altitude + + */ + Altitude float64 `json:"altitude,omitempty"` + + /* +Size + + */ + Size *float64 `json:"size,omitempty"` + + /* +Horizontal Precision + + */ + HPrecision *float64 `json:"h_precision,omitempty"` + + /* +Vertical Precision + + */ + VPrecision *float64 `json:"v_precision,omitempty"` + } - */ - MemberGroup *[]string `json:"member_group,omitempty"` +func (t *Dnslocrecord) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Dnslocrecord[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Dnslocrecord%v", string(b)) +} - /* - Member services +type jsonDnslocrecord struct { + + LatDeg interface{} `json:"lat_deg"` + + LatMin interface{} `json:"lat_min"` + + LatSec interface{} `json:"lat_sec"` + + LatDir interface{} `json:"lat_dir"` + + LonDeg interface{} `json:"lon_deg"` + + LonMin interface{} `json:"lon_min"` + + LonSec interface{} `json:"lon_sec"` + + LonDir interface{} `json:"lon_dir"` + + Altitude interface{} `json:"altitude"` + + Size interface{} `json:"size"` + + HPrecision interface{} `json:"h_precision"` + + VPrecision interface{} `json:"v_precision"` + } - */ - MemberService *[]string `json:"member_service,omitempty"` +func (out *Dnslocrecord) UnmarshalJSON(data []byte) error { + var in jsonDnslocrecord + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.LatDeg + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field LatDeg: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.LatDeg = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field LatDeg: %v; expected exactly one element", raw) + } + out.LatDeg = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field LatDeg: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.LatMin != nil { + raw := in.LatMin + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field LatMin: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.LatMin = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.LatMin = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field LatMin: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field LatMin: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.LatSec != nil { + raw := in.LatSec + plainV, plainOk := raw.(float64) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []float64 + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(float64) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.LatSec = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.LatSec = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field LatSec: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field LatSec: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.LatDir + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.LatDir = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field LatDir: %v; expected exactly one element", raw) + } + out.LatDir = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field LatDir: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.LonDeg + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field LonDeg: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.LonDeg = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field LonDeg: %v; expected exactly one element", raw) + } + out.LonDeg = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field LonDeg: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.LonMin != nil { + raw := in.LonMin + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field LonMin: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.LonMin = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.LonMin = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field LonMin: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field LonMin: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.LonSec != nil { + raw := in.LonSec + plainV, plainOk := raw.(float64) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []float64 + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(float64) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.LonSec = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.LonSec = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field LonSec: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field LonSec: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.LonDir + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.LonDir = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field LonDir: %v; expected exactly one element", raw) + } + out.LonDir = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field LonDir: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Altitude + plainV, plainOk := raw.(float64) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []float64 + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(float64) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Altitude = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Altitude: %v; expected exactly one element", raw) + } + out.Altitude = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Altitude: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Size != nil { + raw := in.Size + plainV, plainOk := raw.(float64) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []float64 + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(float64) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Size = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Size = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Size: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Size: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.HPrecision != nil { + raw := in.HPrecision + plainV, plainOk := raw.(float64) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []float64 + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(float64) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.HPrecision = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.HPrecision = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field HPrecision: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field HPrecision: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.VPrecision != nil { + raw := in.VPrecision + plainV, plainOk := raw.(float64) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []float64 + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(float64) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.VPrecision = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.VPrecision = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field VPrecision: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field VPrecision: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil } -func (t *Vault) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Vault[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Vault%v", string(b)) +type Dnsmxrecord struct { + + /* +Preference +Preference given to this exchanger. Lower values are more preferred + */ + Preference int `json:"preference,omitempty"` + + /* +Exchanger +A host willing to act as a mail exchanger + */ + Exchanger string `json:"exchanger,omitempty"` + } + +func (t *Dnsmxrecord) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Dnsmxrecord[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Dnsmxrecord%v", string(b)) } -type jsonVault struct { - Cn interface{} `json:"cn"` +type jsonDnsmxrecord struct { + + Preference interface{} `json:"preference"` + + Exchanger interface{} `json:"exchanger"` + } - Description interface{} `json:"description"` +func (out *Dnsmxrecord) UnmarshalJSON(data []byte) error { + var in jsonDnsmxrecord + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Preference + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Preference: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Preference = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Preference: %v; expected exactly one element", raw) + } + out.Preference = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Preference: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Exchanger + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Exchanger = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Exchanger: %v; expected exactly one element", raw) + } + out.Exchanger = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Exchanger: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - Ipavaulttype interface{} `json:"ipavaulttype"` +type Dnsnaptrrecord struct { + + /* +Order + + */ + Order int `json:"order,omitempty"` + + /* +Preference + + */ + Preference int `json:"preference,omitempty"` + + /* +Flags + + */ + Flags string `json:"flags,omitempty"` + + /* +Service + + */ + Service string `json:"service,omitempty"` + + /* +Regular Expression + + */ + Regexp string `json:"regexp,omitempty"` + + /* +Replacement + + */ + Replacement string `json:"replacement,omitempty"` + } - Ipavaultsalt interface{} `json:"ipavaultsalt"` +func (t *Dnsnaptrrecord) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Dnsnaptrrecord[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Dnsnaptrrecord%v", string(b)) +} - Ipavaultpublickey interface{} `json:"ipavaultpublickey"` +type jsonDnsnaptrrecord struct { + + Order interface{} `json:"order"` + + Preference interface{} `json:"preference"` + + Flags interface{} `json:"flags"` + + Service interface{} `json:"service"` + + Regexp interface{} `json:"regexp"` + + Replacement interface{} `json:"replacement"` + } - OwnerUser interface{} `json:"owner_user"` +func (out *Dnsnaptrrecord) UnmarshalJSON(data []byte) error { + var in jsonDnsnaptrrecord + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Order + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Order: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Order = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Order: %v; expected exactly one element", raw) + } + out.Order = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Order: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Preference + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Preference: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Preference = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Preference: %v; expected exactly one element", raw) + } + out.Preference = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Preference: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Flags + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Flags = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Flags: %v; expected exactly one element", raw) + } + out.Flags = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Flags: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Service + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Service = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Service: %v; expected exactly one element", raw) + } + out.Service = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Service: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Regexp + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Regexp = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Regexp: %v; expected exactly one element", raw) + } + out.Regexp = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Regexp: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Replacement + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Replacement = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Replacement: %v; expected exactly one element", raw) + } + out.Replacement = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Replacement: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - OwnerGroup interface{} `json:"owner_group"` +type Dnsnsecrecord struct { + } - OwnerService interface{} `json:"owner_service"` +func (t *Dnsnsecrecord) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Dnsnsecrecord[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Dnsnsecrecord%v", string(b)) +} - Owner interface{} `json:"owner"` +type jsonDnsnsecrecord struct { + } - Service interface{} `json:"service"` +func (out *Dnsnsecrecord) UnmarshalJSON(data []byte) error { + var in jsonDnsnsecrecord + if e := json.Unmarshal(data, &in); e != nil { + return e + } + return nil +} - Shared interface{} `json:"shared"` +type Dnsnsrecord struct { + + /* +Hostname - Username interface{} `json:"username"` + */ + Hostname string `json:"hostname,omitempty"` + } - MemberUser interface{} `json:"member_user"` +func (t *Dnsnsrecord) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Dnsnsrecord[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Dnsnsrecord%v", string(b)) +} - MemberGroup interface{} `json:"member_group"` +type jsonDnsnsrecord struct { + + Hostname interface{} `json:"hostname"` + } - MemberService interface{} `json:"member_service"` +func (out *Dnsnsrecord) UnmarshalJSON(data []byte) error { + var in jsonDnsnsrecord + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Hostname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Hostname = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Hostname: %v; expected exactly one element", raw) + } + out.Hostname = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Hostname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil } -func (out *Vault) UnmarshalJSON(data []byte) error { - var in jsonVault - if e := json.Unmarshal(data, &in); e != nil { - return e - } +type Dnsptrrecord struct { + + /* +Hostname +The hostname this reverse record points to + */ + Hostname string `json:"hostname,omitempty"` + } - if true { - raw := in.Cn - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +func (t *Dnsptrrecord) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Dnsptrrecord[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Dnsptrrecord%v", string(b)) +} - itemV, itemOk := rawItem.(string) +type jsonDnsptrrecord struct { + + Hostname interface{} `json:"hostname"` + } - if !itemOk { - sliceOk = false - break - } +func (out *Dnsptrrecord) UnmarshalJSON(data []byte) error { + var in jsonDnsptrrecord + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Hostname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Hostname = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Hostname: %v; expected exactly one element", raw) + } + out.Hostname = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Hostname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - sliceV = append(sliceV, itemV) +type Dnsrecord struct { + + /* +Record name +Record name + */ + Idnsname string `json:"idnsname,omitempty"` + + /* +Time to live +Time to live + */ + Dnsttl *int `json:"dnsttl,omitempty"` + + /* + + + */ + Dnsclass *string `json:"dnsclass,omitempty"` + + /* +Records + + */ + Dnsrecords *interface{} `json:"dnsrecords,omitempty"` + + /* +Record type + + */ + Dnstype *string `json:"dnstype,omitempty"` + + /* +Record data + + */ + Dnsdata *string `json:"dnsdata,omitempty"` + + /* +A record +Raw A records + */ + Arecord *[]string `json:"arecord,omitempty"` + + /* +A IP Address + + */ + APartIPAddress *string `json:"a_part_ip_address,omitempty"` + + /* +A Create reverse +Create reverse record for this IP Address + */ + AExtraCreateReverse *bool `json:"a_extra_create_reverse,omitempty"` + + /* +AAAA record +Raw AAAA records + */ + Aaaarecord *[]string `json:"aaaarecord,omitempty"` + + /* +AAAA IP Address + + */ + AaaaPartIPAddress *string `json:"aaaa_part_ip_address,omitempty"` + + /* +AAAA Create reverse +Create reverse record for this IP Address + */ + AaaaExtraCreateReverse *bool `json:"aaaa_extra_create_reverse,omitempty"` + + /* +A6 record +Raw A6 records + */ + A6record *[]string `json:"a6record,omitempty"` + + /* +A6 Record data + + */ + A6PartData *string `json:"a6_part_data,omitempty"` + + /* +AFSDB record +Raw AFSDB records + */ + Afsdbrecord *[]string `json:"afsdbrecord,omitempty"` + + /* +AFSDB Subtype + + */ + AfsdbPartSubtype *int `json:"afsdb_part_subtype,omitempty"` + + /* +AFSDB Hostname + + */ + AfsdbPartHostname *string `json:"afsdb_part_hostname,omitempty"` + + /* +APL record +Raw APL records + */ + Aplrecord *[]string `json:"aplrecord,omitempty"` + + /* +CERT record +Raw CERT records + */ + Certrecord *[]string `json:"certrecord,omitempty"` + + /* +CERT Certificate Type + + */ + CertPartType *int `json:"cert_part_type,omitempty"` + + /* +CERT Key Tag + + */ + CertPartKeyTag *int `json:"cert_part_key_tag,omitempty"` + + /* +CERT Algorithm + + */ + CertPartAlgorithm *int `json:"cert_part_algorithm,omitempty"` + + /* +CERT Certificate/CRL + + */ + CertPartCertificateOrCrl *string `json:"cert_part_certificate_or_crl,omitempty"` + + /* +CNAME record +Raw CNAME records + */ + Cnamerecord *[]string `json:"cnamerecord,omitempty"` + + /* +CNAME Hostname +A hostname which this alias hostname points to + */ + CnamePartHostname *string `json:"cname_part_hostname,omitempty"` + + /* +DHCID record +Raw DHCID records + */ + Dhcidrecord *[]string `json:"dhcidrecord,omitempty"` + + /* +DLV record +Raw DLV records + */ + Dlvrecord *[]string `json:"dlvrecord,omitempty"` + + /* +DLV Key Tag + + */ + DlvPartKeyTag *int `json:"dlv_part_key_tag,omitempty"` + + /* +DLV Algorithm + + */ + DlvPartAlgorithm *int `json:"dlv_part_algorithm,omitempty"` + + /* +DLV Digest Type + + */ + DlvPartDigestType *int `json:"dlv_part_digest_type,omitempty"` + + /* +DLV Digest + + */ + DlvPartDigest *string `json:"dlv_part_digest,omitempty"` + + /* +DNAME record +Raw DNAME records + */ + Dnamerecord *[]string `json:"dnamerecord,omitempty"` + + /* +DNAME Target + + */ + DnamePartTarget *string `json:"dname_part_target,omitempty"` + + /* +DS record +Raw DS records + */ + Dsrecord *[]string `json:"dsrecord,omitempty"` + + /* +DS Key Tag + + */ + DsPartKeyTag *int `json:"ds_part_key_tag,omitempty"` + + /* +DS Algorithm + + */ + DsPartAlgorithm *int `json:"ds_part_algorithm,omitempty"` + + /* +DS Digest Type + + */ + DsPartDigestType *int `json:"ds_part_digest_type,omitempty"` + + /* +DS Digest + + */ + DsPartDigest *string `json:"ds_part_digest,omitempty"` + + /* +HIP record +Raw HIP records + */ + Hiprecord *[]string `json:"hiprecord,omitempty"` + + /* +IPSECKEY record +Raw IPSECKEY records + */ + Ipseckeyrecord *[]string `json:"ipseckeyrecord,omitempty"` + + /* +KEY record +Raw KEY records + */ + Keyrecord *[]string `json:"keyrecord,omitempty"` + + /* +KX record +Raw KX records + */ + Kxrecord *[]string `json:"kxrecord,omitempty"` + + /* +KX Preference +Preference given to this exchanger. Lower values are more preferred + */ + KxPartPreference *int `json:"kx_part_preference,omitempty"` + + /* +KX Exchanger +A host willing to act as a key exchanger + */ + KxPartExchanger *string `json:"kx_part_exchanger,omitempty"` + + /* +LOC record +Raw LOC records + */ + Locrecord *[]string `json:"locrecord,omitempty"` + + /* +LOC Degrees Latitude + + */ + LocPartLatDeg *int `json:"loc_part_lat_deg,omitempty"` + + /* +LOC Minutes Latitude + + */ + LocPartLatMin *int `json:"loc_part_lat_min,omitempty"` + + /* +LOC Seconds Latitude + + */ + LocPartLatSec *float64 `json:"loc_part_lat_sec,omitempty"` + + /* +LOC Direction Latitude + + */ + LocPartLatDir *string `json:"loc_part_lat_dir,omitempty"` + + /* +LOC Degrees Longitude + + */ + LocPartLonDeg *int `json:"loc_part_lon_deg,omitempty"` + + /* +LOC Minutes Longitude + + */ + LocPartLonMin *int `json:"loc_part_lon_min,omitempty"` + + /* +LOC Seconds Longitude + + */ + LocPartLonSec *float64 `json:"loc_part_lon_sec,omitempty"` + + /* +LOC Direction Longitude + + */ + LocPartLonDir *string `json:"loc_part_lon_dir,omitempty"` + + /* +LOC Altitude + + */ + LocPartAltitude *float64 `json:"loc_part_altitude,omitempty"` + + /* +LOC Size + + */ + LocPartSize *float64 `json:"loc_part_size,omitempty"` + + /* +LOC Horizontal Precision + + */ + LocPartHPrecision *float64 `json:"loc_part_h_precision,omitempty"` + + /* +LOC Vertical Precision + + */ + LocPartVPrecision *float64 `json:"loc_part_v_precision,omitempty"` + + /* +MX record +Raw MX records + */ + Mxrecord *[]string `json:"mxrecord,omitempty"` + + /* +MX Preference +Preference given to this exchanger. Lower values are more preferred + */ + MxPartPreference *int `json:"mx_part_preference,omitempty"` + + /* +MX Exchanger +A host willing to act as a mail exchanger + */ + MxPartExchanger *string `json:"mx_part_exchanger,omitempty"` + + /* +NAPTR record +Raw NAPTR records + */ + Naptrrecord *[]string `json:"naptrrecord,omitempty"` + + /* +NAPTR Order + + */ + NaptrPartOrder *int `json:"naptr_part_order,omitempty"` + + /* +NAPTR Preference + + */ + NaptrPartPreference *int `json:"naptr_part_preference,omitempty"` + + /* +NAPTR Flags + + */ + NaptrPartFlags *string `json:"naptr_part_flags,omitempty"` + + /* +NAPTR Service + + */ + NaptrPartService *string `json:"naptr_part_service,omitempty"` + + /* +NAPTR Regular Expression + + */ + NaptrPartRegexp *string `json:"naptr_part_regexp,omitempty"` + + /* +NAPTR Replacement + + */ + NaptrPartReplacement *string `json:"naptr_part_replacement,omitempty"` + + /* +NS record +Raw NS records + */ + Nsrecord *[]string `json:"nsrecord,omitempty"` + + /* +NS Hostname + + */ + NsPartHostname *string `json:"ns_part_hostname,omitempty"` + + /* +NSEC record +Raw NSEC records + */ + Nsecrecord *[]string `json:"nsecrecord,omitempty"` + + /* +PTR record +Raw PTR records + */ + Ptrrecord *[]string `json:"ptrrecord,omitempty"` + + /* +PTR Hostname +The hostname this reverse record points to + */ + PtrPartHostname *string `json:"ptr_part_hostname,omitempty"` + + /* +RRSIG record +Raw RRSIG records + */ + Rrsigrecord *[]string `json:"rrsigrecord,omitempty"` + + /* +RP record +Raw RP records + */ + Rprecord *[]string `json:"rprecord,omitempty"` + + /* +SIG record +Raw SIG records + */ + Sigrecord *[]string `json:"sigrecord,omitempty"` + + /* +SPF record +Raw SPF records + */ + Spfrecord *[]string `json:"spfrecord,omitempty"` + + /* +SRV record +Raw SRV records + */ + Srvrecord *[]string `json:"srvrecord,omitempty"` + + /* +SRV Priority (order) +Lower number means higher priority. Clients will attempt to contact the server with the lowest-numbered priority they can reach. + */ + SrvPartPriority *int `json:"srv_part_priority,omitempty"` + + /* +SRV Weight +Relative weight for entries with the same priority. + */ + SrvPartWeight *int `json:"srv_part_weight,omitempty"` + + /* +SRV Port + + */ + SrvPartPort *int `json:"srv_part_port,omitempty"` + + /* +SRV Target +The domain name of the target host or '.' if the service is decidedly not available at this domain + */ + SrvPartTarget *string `json:"srv_part_target,omitempty"` + + /* +SSHFP record +Raw SSHFP records + */ + Sshfprecord *[]string `json:"sshfprecord,omitempty"` + + /* +SSHFP Algorithm + + */ + SshfpPartAlgorithm *int `json:"sshfp_part_algorithm,omitempty"` + + /* +SSHFP Fingerprint Type + + */ + SshfpPartFpType *int `json:"sshfp_part_fp_type,omitempty"` + + /* +SSHFP Fingerprint + + */ + SshfpPartFingerprint *string `json:"sshfp_part_fingerprint,omitempty"` + + /* +TLSA record +Raw TLSA records + */ + Tlsarecord *[]string `json:"tlsarecord,omitempty"` + + /* +TLSA Certificate Usage + + */ + TlsaPartCertUsage *int `json:"tlsa_part_cert_usage,omitempty"` + + /* +TLSA Selector + + */ + TlsaPartSelector *int `json:"tlsa_part_selector,omitempty"` + + /* +TLSA Matching Type + + */ + TlsaPartMatchingType *int `json:"tlsa_part_matching_type,omitempty"` + + /* +TLSA Certificate Association Data + + */ + TlsaPartCertAssociationData *string `json:"tlsa_part_cert_association_data,omitempty"` + + /* +TXT record +Raw TXT records + */ + Txtrecord *[]string `json:"txtrecord,omitempty"` + + /* +TXT Text Data + + */ + TxtPartData *string `json:"txt_part_data,omitempty"` + + /* +URI record +Raw URI records + */ + Urirecord *[]string `json:"urirecord,omitempty"` + + /* +URI Priority (order) +Lower number means higher priority. Clients will attempt to contact the URI with the lowest-numbered priority they can reach. + */ + URIPartPriority *int `json:"uri_part_priority,omitempty"` + + /* +URI Weight +Relative weight for entries with the same priority. + */ + URIPartWeight *int `json:"uri_part_weight,omitempty"` + + /* +URI Target Uniform Resource Identifier +Target Uniform Resource Identifier according to RFC 3986 + */ + URIPartTarget *string `json:"uri_part_target,omitempty"` + } - } - } +func (t *Dnsrecord) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Dnsrecord[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Dnsrecord%v", string(b)) +} - if plainOk { - out.Cn = plainV - } else if sliceOk { +type jsonDnsrecord struct { + + Idnsname interface{} `json:"idnsname"` + + Dnsttl interface{} `json:"dnsttl"` + + Dnsclass interface{} `json:"dnsclass"` + + Dnsrecords interface{} `json:"dnsrecords"` + + Dnstype interface{} `json:"dnstype"` + + Dnsdata interface{} `json:"dnsdata"` + + Arecord interface{} `json:"arecord"` + + APartIPAddress interface{} `json:"a_part_ip_address"` + + AExtraCreateReverse interface{} `json:"a_extra_create_reverse"` + + Aaaarecord interface{} `json:"aaaarecord"` + + AaaaPartIPAddress interface{} `json:"aaaa_part_ip_address"` + + AaaaExtraCreateReverse interface{} `json:"aaaa_extra_create_reverse"` + + A6record interface{} `json:"a6record"` + + A6PartData interface{} `json:"a6_part_data"` + + Afsdbrecord interface{} `json:"afsdbrecord"` + + AfsdbPartSubtype interface{} `json:"afsdb_part_subtype"` + + AfsdbPartHostname interface{} `json:"afsdb_part_hostname"` + + Aplrecord interface{} `json:"aplrecord"` + + Certrecord interface{} `json:"certrecord"` + + CertPartType interface{} `json:"cert_part_type"` + + CertPartKeyTag interface{} `json:"cert_part_key_tag"` + + CertPartAlgorithm interface{} `json:"cert_part_algorithm"` + + CertPartCertificateOrCrl interface{} `json:"cert_part_certificate_or_crl"` + + Cnamerecord interface{} `json:"cnamerecord"` + + CnamePartHostname interface{} `json:"cname_part_hostname"` + + Dhcidrecord interface{} `json:"dhcidrecord"` + + Dlvrecord interface{} `json:"dlvrecord"` + + DlvPartKeyTag interface{} `json:"dlv_part_key_tag"` + + DlvPartAlgorithm interface{} `json:"dlv_part_algorithm"` + + DlvPartDigestType interface{} `json:"dlv_part_digest_type"` + + DlvPartDigest interface{} `json:"dlv_part_digest"` + + Dnamerecord interface{} `json:"dnamerecord"` + + DnamePartTarget interface{} `json:"dname_part_target"` + + Dsrecord interface{} `json:"dsrecord"` + + DsPartKeyTag interface{} `json:"ds_part_key_tag"` + + DsPartAlgorithm interface{} `json:"ds_part_algorithm"` + + DsPartDigestType interface{} `json:"ds_part_digest_type"` + + DsPartDigest interface{} `json:"ds_part_digest"` + + Hiprecord interface{} `json:"hiprecord"` + + Ipseckeyrecord interface{} `json:"ipseckeyrecord"` + + Keyrecord interface{} `json:"keyrecord"` + + Kxrecord interface{} `json:"kxrecord"` + + KxPartPreference interface{} `json:"kx_part_preference"` + + KxPartExchanger interface{} `json:"kx_part_exchanger"` + + Locrecord interface{} `json:"locrecord"` + + LocPartLatDeg interface{} `json:"loc_part_lat_deg"` + + LocPartLatMin interface{} `json:"loc_part_lat_min"` + + LocPartLatSec interface{} `json:"loc_part_lat_sec"` + + LocPartLatDir interface{} `json:"loc_part_lat_dir"` + + LocPartLonDeg interface{} `json:"loc_part_lon_deg"` + + LocPartLonMin interface{} `json:"loc_part_lon_min"` + + LocPartLonSec interface{} `json:"loc_part_lon_sec"` + + LocPartLonDir interface{} `json:"loc_part_lon_dir"` + + LocPartAltitude interface{} `json:"loc_part_altitude"` + + LocPartSize interface{} `json:"loc_part_size"` + + LocPartHPrecision interface{} `json:"loc_part_h_precision"` + + LocPartVPrecision interface{} `json:"loc_part_v_precision"` + + Mxrecord interface{} `json:"mxrecord"` + + MxPartPreference interface{} `json:"mx_part_preference"` + + MxPartExchanger interface{} `json:"mx_part_exchanger"` + + Naptrrecord interface{} `json:"naptrrecord"` + + NaptrPartOrder interface{} `json:"naptr_part_order"` + + NaptrPartPreference interface{} `json:"naptr_part_preference"` + + NaptrPartFlags interface{} `json:"naptr_part_flags"` + + NaptrPartService interface{} `json:"naptr_part_service"` + + NaptrPartRegexp interface{} `json:"naptr_part_regexp"` + + NaptrPartReplacement interface{} `json:"naptr_part_replacement"` + + Nsrecord interface{} `json:"nsrecord"` + + NsPartHostname interface{} `json:"ns_part_hostname"` + + Nsecrecord interface{} `json:"nsecrecord"` + + Ptrrecord interface{} `json:"ptrrecord"` + + PtrPartHostname interface{} `json:"ptr_part_hostname"` + + Rrsigrecord interface{} `json:"rrsigrecord"` + + Rprecord interface{} `json:"rprecord"` + + Sigrecord interface{} `json:"sigrecord"` + + Spfrecord interface{} `json:"spfrecord"` + + Srvrecord interface{} `json:"srvrecord"` + + SrvPartPriority interface{} `json:"srv_part_priority"` + + SrvPartWeight interface{} `json:"srv_part_weight"` + + SrvPartPort interface{} `json:"srv_part_port"` + + SrvPartTarget interface{} `json:"srv_part_target"` + + Sshfprecord interface{} `json:"sshfprecord"` + + SshfpPartAlgorithm interface{} `json:"sshfp_part_algorithm"` + + SshfpPartFpType interface{} `json:"sshfp_part_fp_type"` + + SshfpPartFingerprint interface{} `json:"sshfp_part_fingerprint"` + + Tlsarecord interface{} `json:"tlsarecord"` + + TlsaPartCertUsage interface{} `json:"tlsa_part_cert_usage"` + + TlsaPartSelector interface{} `json:"tlsa_part_selector"` + + TlsaPartMatchingType interface{} `json:"tlsa_part_matching_type"` + + TlsaPartCertAssociationData interface{} `json:"tlsa_part_cert_association_data"` + + Txtrecord interface{} `json:"txtrecord"` + + TxtPartData interface{} `json:"txt_part_data"` + + Urirecord interface{} `json:"urirecord"` + + URIPartPriority interface{} `json:"uri_part_priority"` + + URIPartWeight interface{} `json:"uri_part_weight"` + + URIPartTarget interface{} `json:"uri_part_target"` + } - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) - } - out.Cn = sliceV[0] +func (out *Dnsrecord) UnmarshalJSON(data []byte) error { + var in jsonDnsrecord + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Idnsname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Idnsname = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Idnsname: %v; expected exactly one element", raw) + } + out.Idnsname = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Idnsname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Dnsttl != nil { + raw := in.Dnsttl + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Dnsttl: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Dnsttl = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Dnsttl = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Dnsttl: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Dnsttl: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Dnsclass != nil { + raw := in.Dnsclass + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Dnsclass = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Dnsclass = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Dnsclass: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Dnsclass: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Dnsrecords != nil { + raw := in.Dnsrecords + plainV, plainOk := raw.(interface{}) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []interface{} + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(interface{}) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Dnsrecords = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Dnsrecords = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Dnsrecords: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Dnsrecords: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Dnstype != nil { + raw := in.Dnstype + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Dnstype = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Dnstype = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Dnstype: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Dnstype: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Dnsdata != nil { + raw := in.Dnsdata + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Dnsdata = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Dnsdata = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Dnsdata: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Dnsdata: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Arecord != nil { + raw := in.Arecord + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Arecord = &[]string{plainV} + } else if sliceOk { + + out.Arecord = &sliceV + } else { + return fmt.Errorf("unexpected value for field Arecord: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.APartIPAddress != nil { + raw := in.APartIPAddress + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.APartIPAddress = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.APartIPAddress = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field APartIPAddress: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field APartIPAddress: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.AExtraCreateReverse != nil { + raw := in.AExtraCreateReverse + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.AExtraCreateReverse = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.AExtraCreateReverse = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field AExtraCreateReverse: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field AExtraCreateReverse: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Aaaarecord != nil { + raw := in.Aaaarecord + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Aaaarecord = &[]string{plainV} + } else if sliceOk { + + out.Aaaarecord = &sliceV + } else { + return fmt.Errorf("unexpected value for field Aaaarecord: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.AaaaPartIPAddress != nil { + raw := in.AaaaPartIPAddress + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.AaaaPartIPAddress = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.AaaaPartIPAddress = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field AaaaPartIPAddress: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field AaaaPartIPAddress: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.AaaaExtraCreateReverse != nil { + raw := in.AaaaExtraCreateReverse + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.AaaaExtraCreateReverse = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.AaaaExtraCreateReverse = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field AaaaExtraCreateReverse: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field AaaaExtraCreateReverse: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.A6record != nil { + raw := in.A6record + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.A6record = &[]string{plainV} + } else if sliceOk { + + out.A6record = &sliceV + } else { + return fmt.Errorf("unexpected value for field A6record: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.A6PartData != nil { + raw := in.A6PartData + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.A6PartData = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.A6PartData = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field A6PartData: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field A6PartData: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Afsdbrecord != nil { + raw := in.Afsdbrecord + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Afsdbrecord = &[]string{plainV} + } else if sliceOk { + + out.Afsdbrecord = &sliceV + } else { + return fmt.Errorf("unexpected value for field Afsdbrecord: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.AfsdbPartSubtype != nil { + raw := in.AfsdbPartSubtype + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field AfsdbPartSubtype: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.AfsdbPartSubtype = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.AfsdbPartSubtype = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field AfsdbPartSubtype: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field AfsdbPartSubtype: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.AfsdbPartHostname != nil { + raw := in.AfsdbPartHostname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.AfsdbPartHostname = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.AfsdbPartHostname = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field AfsdbPartHostname: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field AfsdbPartHostname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Aplrecord != nil { + raw := in.Aplrecord + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Aplrecord = &[]string{plainV} + } else if sliceOk { + + out.Aplrecord = &sliceV + } else { + return fmt.Errorf("unexpected value for field Aplrecord: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Certrecord != nil { + raw := in.Certrecord + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Certrecord = &[]string{plainV} + } else if sliceOk { + + out.Certrecord = &sliceV + } else { + return fmt.Errorf("unexpected value for field Certrecord: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.CertPartType != nil { + raw := in.CertPartType + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field CertPartType: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.CertPartType = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.CertPartType = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field CertPartType: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field CertPartType: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.CertPartKeyTag != nil { + raw := in.CertPartKeyTag + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field CertPartKeyTag: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.CertPartKeyTag = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.CertPartKeyTag = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field CertPartKeyTag: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field CertPartKeyTag: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.CertPartAlgorithm != nil { + raw := in.CertPartAlgorithm + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field CertPartAlgorithm: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.CertPartAlgorithm = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.CertPartAlgorithm = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field CertPartAlgorithm: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field CertPartAlgorithm: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.CertPartCertificateOrCrl != nil { + raw := in.CertPartCertificateOrCrl + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.CertPartCertificateOrCrl = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.CertPartCertificateOrCrl = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field CertPartCertificateOrCrl: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field CertPartCertificateOrCrl: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Cnamerecord != nil { + raw := in.Cnamerecord + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cnamerecord = &[]string{plainV} + } else if sliceOk { + + out.Cnamerecord = &sliceV + } else { + return fmt.Errorf("unexpected value for field Cnamerecord: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.CnamePartHostname != nil { + raw := in.CnamePartHostname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.CnamePartHostname = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.CnamePartHostname = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field CnamePartHostname: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field CnamePartHostname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Dhcidrecord != nil { + raw := in.Dhcidrecord + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Dhcidrecord = &[]string{plainV} + } else if sliceOk { + + out.Dhcidrecord = &sliceV + } else { + return fmt.Errorf("unexpected value for field Dhcidrecord: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Dlvrecord != nil { + raw := in.Dlvrecord + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Dlvrecord = &[]string{plainV} + } else if sliceOk { + + out.Dlvrecord = &sliceV + } else { + return fmt.Errorf("unexpected value for field Dlvrecord: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.DlvPartKeyTag != nil { + raw := in.DlvPartKeyTag + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field DlvPartKeyTag: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.DlvPartKeyTag = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.DlvPartKeyTag = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field DlvPartKeyTag: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field DlvPartKeyTag: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.DlvPartAlgorithm != nil { + raw := in.DlvPartAlgorithm + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field DlvPartAlgorithm: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.DlvPartAlgorithm = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.DlvPartAlgorithm = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field DlvPartAlgorithm: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field DlvPartAlgorithm: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.DlvPartDigestType != nil { + raw := in.DlvPartDigestType + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field DlvPartDigestType: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.DlvPartDigestType = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.DlvPartDigestType = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field DlvPartDigestType: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field DlvPartDigestType: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.DlvPartDigest != nil { + raw := in.DlvPartDigest + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.DlvPartDigest = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.DlvPartDigest = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field DlvPartDigest: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field DlvPartDigest: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Dnamerecord != nil { + raw := in.Dnamerecord + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Dnamerecord = &[]string{plainV} + } else if sliceOk { + + out.Dnamerecord = &sliceV + } else { + return fmt.Errorf("unexpected value for field Dnamerecord: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.DnamePartTarget != nil { + raw := in.DnamePartTarget + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.DnamePartTarget = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.DnamePartTarget = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field DnamePartTarget: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field DnamePartTarget: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Dsrecord != nil { + raw := in.Dsrecord + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Dsrecord = &[]string{plainV} + } else if sliceOk { + + out.Dsrecord = &sliceV + } else { + return fmt.Errorf("unexpected value for field Dsrecord: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.DsPartKeyTag != nil { + raw := in.DsPartKeyTag + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field DsPartKeyTag: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.DsPartKeyTag = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.DsPartKeyTag = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field DsPartKeyTag: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field DsPartKeyTag: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.DsPartAlgorithm != nil { + raw := in.DsPartAlgorithm + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field DsPartAlgorithm: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.DsPartAlgorithm = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.DsPartAlgorithm = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field DsPartAlgorithm: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field DsPartAlgorithm: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.DsPartDigestType != nil { + raw := in.DsPartDigestType + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field DsPartDigestType: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.DsPartDigestType = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.DsPartDigestType = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field DsPartDigestType: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field DsPartDigestType: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.DsPartDigest != nil { + raw := in.DsPartDigest + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.DsPartDigest = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.DsPartDigest = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field DsPartDigest: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field DsPartDigest: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Hiprecord != nil { + raw := in.Hiprecord + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Hiprecord = &[]string{plainV} + } else if sliceOk { + + out.Hiprecord = &sliceV + } else { + return fmt.Errorf("unexpected value for field Hiprecord: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipseckeyrecord != nil { + raw := in.Ipseckeyrecord + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipseckeyrecord = &[]string{plainV} + } else if sliceOk { + + out.Ipseckeyrecord = &sliceV + } else { + return fmt.Errorf("unexpected value for field Ipseckeyrecord: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Keyrecord != nil { + raw := in.Keyrecord + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Keyrecord = &[]string{plainV} + } else if sliceOk { + + out.Keyrecord = &sliceV + } else { + return fmt.Errorf("unexpected value for field Keyrecord: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Kxrecord != nil { + raw := in.Kxrecord + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Kxrecord = &[]string{plainV} + } else if sliceOk { + + out.Kxrecord = &sliceV + } else { + return fmt.Errorf("unexpected value for field Kxrecord: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.KxPartPreference != nil { + raw := in.KxPartPreference + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field KxPartPreference: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.KxPartPreference = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.KxPartPreference = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field KxPartPreference: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field KxPartPreference: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.KxPartExchanger != nil { + raw := in.KxPartExchanger + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.KxPartExchanger = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.KxPartExchanger = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field KxPartExchanger: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field KxPartExchanger: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Locrecord != nil { + raw := in.Locrecord + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Locrecord = &[]string{plainV} + } else if sliceOk { + + out.Locrecord = &sliceV + } else { + return fmt.Errorf("unexpected value for field Locrecord: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.LocPartLatDeg != nil { + raw := in.LocPartLatDeg + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field LocPartLatDeg: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.LocPartLatDeg = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.LocPartLatDeg = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field LocPartLatDeg: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field LocPartLatDeg: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.LocPartLatMin != nil { + raw := in.LocPartLatMin + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field LocPartLatMin: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.LocPartLatMin = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.LocPartLatMin = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field LocPartLatMin: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field LocPartLatMin: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.LocPartLatSec != nil { + raw := in.LocPartLatSec + plainV, plainOk := raw.(float64) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []float64 + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(float64) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.LocPartLatSec = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.LocPartLatSec = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field LocPartLatSec: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field LocPartLatSec: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.LocPartLatDir != nil { + raw := in.LocPartLatDir + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.LocPartLatDir = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.LocPartLatDir = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field LocPartLatDir: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field LocPartLatDir: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.LocPartLonDeg != nil { + raw := in.LocPartLonDeg + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field LocPartLonDeg: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.LocPartLonDeg = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.LocPartLonDeg = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field LocPartLonDeg: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field LocPartLonDeg: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.LocPartLonMin != nil { + raw := in.LocPartLonMin + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field LocPartLonMin: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.LocPartLonMin = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.LocPartLonMin = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field LocPartLonMin: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field LocPartLonMin: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.LocPartLonSec != nil { + raw := in.LocPartLonSec + plainV, plainOk := raw.(float64) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []float64 + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(float64) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.LocPartLonSec = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.LocPartLonSec = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field LocPartLonSec: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field LocPartLonSec: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.LocPartLonDir != nil { + raw := in.LocPartLonDir + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.LocPartLonDir = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.LocPartLonDir = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field LocPartLonDir: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field LocPartLonDir: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.LocPartAltitude != nil { + raw := in.LocPartAltitude + plainV, plainOk := raw.(float64) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []float64 + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(float64) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.LocPartAltitude = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.LocPartAltitude = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field LocPartAltitude: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field LocPartAltitude: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.LocPartSize != nil { + raw := in.LocPartSize + plainV, plainOk := raw.(float64) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []float64 + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(float64) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.LocPartSize = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.LocPartSize = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field LocPartSize: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field LocPartSize: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.LocPartHPrecision != nil { + raw := in.LocPartHPrecision + plainV, plainOk := raw.(float64) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []float64 + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(float64) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.LocPartHPrecision = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.LocPartHPrecision = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field LocPartHPrecision: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field LocPartHPrecision: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.LocPartVPrecision != nil { + raw := in.LocPartVPrecision + plainV, plainOk := raw.(float64) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []float64 + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(float64) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.LocPartVPrecision = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.LocPartVPrecision = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field LocPartVPrecision: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field LocPartVPrecision: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Mxrecord != nil { + raw := in.Mxrecord + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Mxrecord = &[]string{plainV} + } else if sliceOk { + + out.Mxrecord = &sliceV + } else { + return fmt.Errorf("unexpected value for field Mxrecord: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MxPartPreference != nil { + raw := in.MxPartPreference + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field MxPartPreference: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.MxPartPreference = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MxPartPreference = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MxPartPreference: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MxPartPreference: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MxPartExchanger != nil { + raw := in.MxPartExchanger + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MxPartExchanger = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MxPartExchanger = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MxPartExchanger: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MxPartExchanger: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Naptrrecord != nil { + raw := in.Naptrrecord + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Naptrrecord = &[]string{plainV} + } else if sliceOk { + + out.Naptrrecord = &sliceV + } else { + return fmt.Errorf("unexpected value for field Naptrrecord: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.NaptrPartOrder != nil { + raw := in.NaptrPartOrder + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field NaptrPartOrder: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.NaptrPartOrder = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.NaptrPartOrder = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field NaptrPartOrder: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field NaptrPartOrder: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.NaptrPartPreference != nil { + raw := in.NaptrPartPreference + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field NaptrPartPreference: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.NaptrPartPreference = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.NaptrPartPreference = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field NaptrPartPreference: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field NaptrPartPreference: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.NaptrPartFlags != nil { + raw := in.NaptrPartFlags + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.NaptrPartFlags = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.NaptrPartFlags = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field NaptrPartFlags: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field NaptrPartFlags: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.NaptrPartService != nil { + raw := in.NaptrPartService + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.NaptrPartService = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.NaptrPartService = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field NaptrPartService: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field NaptrPartService: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.NaptrPartRegexp != nil { + raw := in.NaptrPartRegexp + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.NaptrPartRegexp = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.NaptrPartRegexp = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field NaptrPartRegexp: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field NaptrPartRegexp: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.NaptrPartReplacement != nil { + raw := in.NaptrPartReplacement + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.NaptrPartReplacement = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.NaptrPartReplacement = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field NaptrPartReplacement: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field NaptrPartReplacement: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Nsrecord != nil { + raw := in.Nsrecord + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Nsrecord = &[]string{plainV} + } else if sliceOk { + + out.Nsrecord = &sliceV + } else { + return fmt.Errorf("unexpected value for field Nsrecord: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.NsPartHostname != nil { + raw := in.NsPartHostname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.NsPartHostname = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.NsPartHostname = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field NsPartHostname: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field NsPartHostname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Nsecrecord != nil { + raw := in.Nsecrecord + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Nsecrecord = &[]string{plainV} + } else if sliceOk { + + out.Nsecrecord = &sliceV + } else { + return fmt.Errorf("unexpected value for field Nsecrecord: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ptrrecord != nil { + raw := in.Ptrrecord + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ptrrecord = &[]string{plainV} + } else if sliceOk { + + out.Ptrrecord = &sliceV + } else { + return fmt.Errorf("unexpected value for field Ptrrecord: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.PtrPartHostname != nil { + raw := in.PtrPartHostname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.PtrPartHostname = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.PtrPartHostname = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field PtrPartHostname: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field PtrPartHostname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Rrsigrecord != nil { + raw := in.Rrsigrecord + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Rrsigrecord = &[]string{plainV} + } else if sliceOk { + + out.Rrsigrecord = &sliceV + } else { + return fmt.Errorf("unexpected value for field Rrsigrecord: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Rprecord != nil { + raw := in.Rprecord + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Rprecord = &[]string{plainV} + } else if sliceOk { + + out.Rprecord = &sliceV + } else { + return fmt.Errorf("unexpected value for field Rprecord: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Sigrecord != nil { + raw := in.Sigrecord + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Sigrecord = &[]string{plainV} + } else if sliceOk { + + out.Sigrecord = &sliceV + } else { + return fmt.Errorf("unexpected value for field Sigrecord: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Spfrecord != nil { + raw := in.Spfrecord + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Spfrecord = &[]string{plainV} + } else if sliceOk { + + out.Spfrecord = &sliceV + } else { + return fmt.Errorf("unexpected value for field Spfrecord: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Srvrecord != nil { + raw := in.Srvrecord + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Srvrecord = &[]string{plainV} + } else if sliceOk { + + out.Srvrecord = &sliceV + } else { + return fmt.Errorf("unexpected value for field Srvrecord: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.SrvPartPriority != nil { + raw := in.SrvPartPriority + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field SrvPartPriority: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.SrvPartPriority = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.SrvPartPriority = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field SrvPartPriority: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field SrvPartPriority: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.SrvPartWeight != nil { + raw := in.SrvPartWeight + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field SrvPartWeight: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.SrvPartWeight = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.SrvPartWeight = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field SrvPartWeight: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field SrvPartWeight: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.SrvPartPort != nil { + raw := in.SrvPartPort + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field SrvPartPort: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.SrvPartPort = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.SrvPartPort = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field SrvPartPort: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field SrvPartPort: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.SrvPartTarget != nil { + raw := in.SrvPartTarget + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.SrvPartTarget = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.SrvPartTarget = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field SrvPartTarget: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field SrvPartTarget: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Sshfprecord != nil { + raw := in.Sshfprecord + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Sshfprecord = &[]string{plainV} + } else if sliceOk { + + out.Sshfprecord = &sliceV + } else { + return fmt.Errorf("unexpected value for field Sshfprecord: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.SshfpPartAlgorithm != nil { + raw := in.SshfpPartAlgorithm + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field SshfpPartAlgorithm: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.SshfpPartAlgorithm = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.SshfpPartAlgorithm = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field SshfpPartAlgorithm: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field SshfpPartAlgorithm: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.SshfpPartFpType != nil { + raw := in.SshfpPartFpType + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field SshfpPartFpType: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.SshfpPartFpType = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.SshfpPartFpType = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field SshfpPartFpType: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field SshfpPartFpType: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.SshfpPartFingerprint != nil { + raw := in.SshfpPartFingerprint + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.SshfpPartFingerprint = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.SshfpPartFingerprint = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field SshfpPartFingerprint: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field SshfpPartFingerprint: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Tlsarecord != nil { + raw := in.Tlsarecord + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Tlsarecord = &[]string{plainV} + } else if sliceOk { + + out.Tlsarecord = &sliceV + } else { + return fmt.Errorf("unexpected value for field Tlsarecord: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.TlsaPartCertUsage != nil { + raw := in.TlsaPartCertUsage + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field TlsaPartCertUsage: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.TlsaPartCertUsage = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.TlsaPartCertUsage = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field TlsaPartCertUsage: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field TlsaPartCertUsage: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.TlsaPartSelector != nil { + raw := in.TlsaPartSelector + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field TlsaPartSelector: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.TlsaPartSelector = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.TlsaPartSelector = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field TlsaPartSelector: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field TlsaPartSelector: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.TlsaPartMatchingType != nil { + raw := in.TlsaPartMatchingType + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field TlsaPartMatchingType: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.TlsaPartMatchingType = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.TlsaPartMatchingType = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field TlsaPartMatchingType: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field TlsaPartMatchingType: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.TlsaPartCertAssociationData != nil { + raw := in.TlsaPartCertAssociationData + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.TlsaPartCertAssociationData = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.TlsaPartCertAssociationData = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field TlsaPartCertAssociationData: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field TlsaPartCertAssociationData: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Txtrecord != nil { + raw := in.Txtrecord + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Txtrecord = &[]string{plainV} + } else if sliceOk { + + out.Txtrecord = &sliceV + } else { + return fmt.Errorf("unexpected value for field Txtrecord: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.TxtPartData != nil { + raw := in.TxtPartData + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.TxtPartData = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.TxtPartData = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field TxtPartData: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field TxtPartData: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Urirecord != nil { + raw := in.Urirecord + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Urirecord = &[]string{plainV} + } else if sliceOk { + + out.Urirecord = &sliceV + } else { + return fmt.Errorf("unexpected value for field Urirecord: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.URIPartPriority != nil { + raw := in.URIPartPriority + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field URIPartPriority: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.URIPartPriority = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.URIPartPriority = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field URIPartPriority: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field URIPartPriority: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.URIPartWeight != nil { + raw := in.URIPartWeight + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field URIPartWeight: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.URIPartWeight = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.URIPartWeight = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field URIPartWeight: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field URIPartWeight: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.URIPartTarget != nil { + raw := in.URIPartTarget + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.URIPartTarget = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.URIPartTarget = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field URIPartTarget: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field URIPartTarget: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - } else { - return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) - } +type Dnsrprecord struct { + } - } +func (t *Dnsrprecord) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Dnsrprecord[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Dnsrprecord%v", string(b)) +} - if in.Description != nil { - raw := in.Description - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +type jsonDnsrprecord struct { + } - itemV, itemOk := rawItem.(string) +func (out *Dnsrprecord) UnmarshalJSON(data []byte) error { + var in jsonDnsrprecord + if e := json.Unmarshal(data, &in); e != nil { + return e + } + return nil +} - if !itemOk { - sliceOk = false - break - } +type Dnsrrsigrecord struct { + } - sliceV = append(sliceV, itemV) +func (t *Dnsrrsigrecord) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Dnsrrsigrecord[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Dnsrrsigrecord%v", string(b)) +} - } - } +type jsonDnsrrsigrecord struct { + } - if plainOk { - out.Description = &plainV - } else if sliceOk { +func (out *Dnsrrsigrecord) UnmarshalJSON(data []byte) error { + var in jsonDnsrrsigrecord + if e := json.Unmarshal(data, &in); e != nil { + return e + } + return nil +} - if len(sliceV) == 1 { - out.Description = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) - } +type Dnsserver struct { + + /* +Server name +DNS Server name + */ + Idnsserverid string `json:"idnsserverid,omitempty"` + + /* +SOA mname override +SOA mname (authoritative server) override + */ + Idnssoamname *string `json:"idnssoamname,omitempty"` + + /* +Forwarders +Per-server forwarders. A custom port can be specified for each forwarder using a standard format "IP_ADDRESS port PORT" + */ + Idnsforwarders *[]string `json:"idnsforwarders,omitempty"` + + /* +Forward policy +Per-server conditional forwarding policy. Set to "none" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded. + */ + Idnsforwardpolicy *string `json:"idnsforwardpolicy,omitempty"` + } - } else { - return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) - } +func (t *Dnsserver) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Dnsserver[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Dnsserver%v", string(b)) +} - } +type jsonDnsserver struct { + + Idnsserverid interface{} `json:"idnsserverid"` + + Idnssoamname interface{} `json:"idnssoamname"` + + Idnsforwarders interface{} `json:"idnsforwarders"` + + Idnsforwardpolicy interface{} `json:"idnsforwardpolicy"` + } - if in.Ipavaulttype != nil { - raw := in.Ipavaulttype - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +func (out *Dnsserver) UnmarshalJSON(data []byte) error { + var in jsonDnsserver + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Idnsserverid + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Idnsserverid = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Idnsserverid: %v; expected exactly one element", raw) + } + out.Idnsserverid = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Idnsserverid: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Idnssoamname != nil { + raw := in.Idnssoamname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Idnssoamname = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Idnssoamname = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Idnssoamname: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Idnssoamname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Idnsforwarders != nil { + raw := in.Idnsforwarders + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Idnsforwarders = &[]string{plainV} + } else if sliceOk { + + out.Idnsforwarders = &sliceV + } else { + return fmt.Errorf("unexpected value for field Idnsforwarders: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Idnsforwardpolicy != nil { + raw := in.Idnsforwardpolicy + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Idnsforwardpolicy = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Idnsforwardpolicy = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Idnsforwardpolicy: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Idnsforwardpolicy: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - itemV, itemOk := rawItem.(string) +type Dnssigrecord struct { + } - if !itemOk { - sliceOk = false - break - } +func (t *Dnssigrecord) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Dnssigrecord[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Dnssigrecord%v", string(b)) +} - sliceV = append(sliceV, itemV) +type jsonDnssigrecord struct { + } - } - } +func (out *Dnssigrecord) UnmarshalJSON(data []byte) error { + var in jsonDnssigrecord + if e := json.Unmarshal(data, &in); e != nil { + return e + } + return nil +} - if plainOk { - out.Ipavaulttype = &plainV - } else if sliceOk { +type Dnsspfrecord struct { + } - if len(sliceV) == 1 { - out.Ipavaulttype = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipavaulttype: %v; expected at most one element", raw) - } +func (t *Dnsspfrecord) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Dnsspfrecord[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Dnsspfrecord%v", string(b)) +} - } else { - return fmt.Errorf("unexpected value for field Ipavaulttype: %v (%v)", raw, reflect.TypeOf(raw)) - } +type jsonDnsspfrecord struct { + } - } +func (out *Dnsspfrecord) UnmarshalJSON(data []byte) error { + var in jsonDnsspfrecord + if e := json.Unmarshal(data, &in); e != nil { + return e + } + return nil +} - if in.Ipavaultsalt != nil { - raw := in.Ipavaultsalt - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +type Dnssrvrecord struct { + + /* +Priority (order) +Lower number means higher priority. Clients will attempt to contact the server with the lowest-numbered priority they can reach. + */ + Priority int `json:"priority,omitempty"` + + /* +Weight +Relative weight for entries with the same priority. + */ + Weight int `json:"weight,omitempty"` + + /* +Port + + */ + Port int `json:"port,omitempty"` + + /* +Target +The domain name of the target host or '.' if the service is decidedly not available at this domain + */ + Target string `json:"target,omitempty"` + } - itemV, itemOk := rawItem.(string) +func (t *Dnssrvrecord) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Dnssrvrecord[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Dnssrvrecord%v", string(b)) +} - if !itemOk { - sliceOk = false - break - } +type jsonDnssrvrecord struct { + + Priority interface{} `json:"priority"` + + Weight interface{} `json:"weight"` + + Port interface{} `json:"port"` + + Target interface{} `json:"target"` + } - sliceV = append(sliceV, itemV) +func (out *Dnssrvrecord) UnmarshalJSON(data []byte) error { + var in jsonDnssrvrecord + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Priority + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Priority: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Priority = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Priority: %v; expected exactly one element", raw) + } + out.Priority = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Priority: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Weight + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Weight: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Weight = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Weight: %v; expected exactly one element", raw) + } + out.Weight = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Weight: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Port + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Port: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Port = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Port: %v; expected exactly one element", raw) + } + out.Port = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Port: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Target + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Target = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Target: %v; expected exactly one element", raw) + } + out.Target = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Target: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - } - } +type Dnssshfprecord struct { + + /* +Algorithm + + */ + Algorithm int `json:"algorithm,omitempty"` + + /* +Fingerprint Type + + */ + FpType int `json:"fp_type,omitempty"` + + /* +Fingerprint + + */ + Fingerprint string `json:"fingerprint,omitempty"` + } - if plainOk { - out.Ipavaultsalt = &plainV - } else if sliceOk { +func (t *Dnssshfprecord) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Dnssshfprecord[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Dnssshfprecord%v", string(b)) +} - if len(sliceV) == 1 { - out.Ipavaultsalt = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipavaultsalt: %v; expected at most one element", raw) - } +type jsonDnssshfprecord struct { + + Algorithm interface{} `json:"algorithm"` + + FpType interface{} `json:"fp_type"` + + Fingerprint interface{} `json:"fingerprint"` + } - } else { - return fmt.Errorf("unexpected value for field Ipavaultsalt: %v (%v)", raw, reflect.TypeOf(raw)) - } +func (out *Dnssshfprecord) UnmarshalJSON(data []byte) error { + var in jsonDnssshfprecord + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Algorithm + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Algorithm: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Algorithm = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Algorithm: %v; expected exactly one element", raw) + } + out.Algorithm = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Algorithm: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.FpType + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field FpType: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.FpType = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field FpType: %v; expected exactly one element", raw) + } + out.FpType = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field FpType: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Fingerprint + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Fingerprint = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Fingerprint: %v; expected exactly one element", raw) + } + out.Fingerprint = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Fingerprint: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - } +type Dnstlsarecord struct { + + /* +Certificate Usage + + */ + CertUsage int `json:"cert_usage,omitempty"` + + /* +Selector + + */ + Selector int `json:"selector,omitempty"` + + /* +Matching Type + + */ + MatchingType int `json:"matching_type,omitempty"` + + /* +Certificate Association Data + + */ + CertAssociationData string `json:"cert_association_data,omitempty"` + } - if in.Ipavaultpublickey != nil { - raw := in.Ipavaultpublickey - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +func (t *Dnstlsarecord) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Dnstlsarecord[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Dnstlsarecord%v", string(b)) +} - itemV, itemOk := rawItem.(string) +type jsonDnstlsarecord struct { + + CertUsage interface{} `json:"cert_usage"` + + Selector interface{} `json:"selector"` + + MatchingType interface{} `json:"matching_type"` + + CertAssociationData interface{} `json:"cert_association_data"` + } - if !itemOk { - sliceOk = false - break - } +func (out *Dnstlsarecord) UnmarshalJSON(data []byte) error { + var in jsonDnstlsarecord + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.CertUsage + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field CertUsage: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.CertUsage = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field CertUsage: %v; expected exactly one element", raw) + } + out.CertUsage = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field CertUsage: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Selector + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Selector: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Selector = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Selector: %v; expected exactly one element", raw) + } + out.Selector = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Selector: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.MatchingType + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field MatchingType: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.MatchingType = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field MatchingType: %v; expected exactly one element", raw) + } + out.MatchingType = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field MatchingType: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.CertAssociationData + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.CertAssociationData = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field CertAssociationData: %v; expected exactly one element", raw) + } + out.CertAssociationData = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field CertAssociationData: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - sliceV = append(sliceV, itemV) +type Dnstxtrecord struct { + + /* +Text Data - } - } + */ + Data string `json:"data,omitempty"` + } - if plainOk { - out.Ipavaultpublickey = &plainV - } else if sliceOk { +func (t *Dnstxtrecord) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Dnstxtrecord[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Dnstxtrecord%v", string(b)) +} - if len(sliceV) == 1 { - out.Ipavaultpublickey = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Ipavaultpublickey: %v; expected at most one element", raw) - } +type jsonDnstxtrecord struct { + + Data interface{} `json:"data"` + } - } else { - return fmt.Errorf("unexpected value for field Ipavaultpublickey: %v (%v)", raw, reflect.TypeOf(raw)) - } +func (out *Dnstxtrecord) UnmarshalJSON(data []byte) error { + var in jsonDnstxtrecord + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Data + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Data = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Data: %v; expected exactly one element", raw) + } + out.Data = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Data: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} + +type Dnsurirecord struct { + + /* +Priority (order) +Lower number means higher priority. Clients will attempt to contact the URI with the lowest-numbered priority they can reach. + */ + Priority int `json:"priority,omitempty"` + + /* +Weight +Relative weight for entries with the same priority. + */ + Weight int `json:"weight,omitempty"` + + /* +Target Uniform Resource Identifier +Target Uniform Resource Identifier according to RFC 3986 + */ + Target string `json:"target,omitempty"` + } + +func (t *Dnsurirecord) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Dnsurirecord[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Dnsurirecord%v", string(b)) +} + +type jsonDnsurirecord struct { + + Priority interface{} `json:"priority"` + + Weight interface{} `json:"weight"` + + Target interface{} `json:"target"` + } + +func (out *Dnsurirecord) UnmarshalJSON(data []byte) error { + var in jsonDnsurirecord + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Priority + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Priority: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Priority = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Priority: %v; expected exactly one element", raw) + } + out.Priority = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Priority: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Weight + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Weight: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Weight = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Weight: %v; expected exactly one element", raw) + } + out.Weight = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Weight: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Target + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Target = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Target: %v; expected exactly one element", raw) + } + out.Target = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Target: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - } +type Dnszone struct { + + /* +Zone name +Zone name (FQDN) + */ + Idnsname string `json:"idnsname,omitempty"` + + /* +Reverse zone IP network +IP network to create reverse zone name from + */ + NameFromIP *string `json:"name_from_ip,omitempty"` + + /* +Active zone +Is zone active? + */ + Idnszoneactive *bool `json:"idnszoneactive,omitempty"` + + /* +Zone forwarders +Per-zone forwarders. A custom port can be specified for each forwarder using a standard format "IP_ADDRESS port PORT" + */ + Idnsforwarders *[]string `json:"idnsforwarders,omitempty"` + + /* +Forward policy +Per-zone conditional forwarding policy. Set to "none" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded. + */ + Idnsforwardpolicy *string `json:"idnsforwardpolicy,omitempty"` + + /* +Managedby permission + + */ + Managedby string `json:"managedby,omitempty"` + + /* +Authoritative nameserver +Authoritative nameserver domain name + */ + Idnssoamname *string `json:"idnssoamname,omitempty"` + + /* +Administrator e-mail address +Administrator e-mail address + */ + Idnssoarname string `json:"idnssoarname,omitempty"` + + /* +SOA serial +SOA record serial number + */ + Idnssoaserial int `json:"idnssoaserial,omitempty"` + + /* +SOA refresh +SOA record refresh time + */ + Idnssoarefresh int `json:"idnssoarefresh,omitempty"` + + /* +SOA retry +SOA record retry time + */ + Idnssoaretry int `json:"idnssoaretry,omitempty"` + + /* +SOA expire +SOA record expire time + */ + Idnssoaexpire int `json:"idnssoaexpire,omitempty"` + + /* +SOA minimum +How long should negative responses be cached + */ + Idnssoaminimum int `json:"idnssoaminimum,omitempty"` + + /* +Time to live +Time to live for records at zone apex + */ + Dnsttl *int `json:"dnsttl,omitempty"` + + /* +Default time to live +Time to live for records without explicit TTL definition + */ + Dnsdefaultttl *int `json:"dnsdefaultttl,omitempty"` + + /* + + + */ + Dnsclass *string `json:"dnsclass,omitempty"` + + /* +BIND update policy +BIND update policy + */ + Idnsupdatepolicy *string `json:"idnsupdatepolicy,omitempty"` + + /* +Dynamic update +Allow dynamic updates. + */ + Idnsallowdynupdate *bool `json:"idnsallowdynupdate,omitempty"` + + /* +Allow query +Semicolon separated list of IP addresses or networks which are allowed to issue queries + */ + Idnsallowquery *string `json:"idnsallowquery,omitempty"` + + /* +Allow transfer +Semicolon separated list of IP addresses or networks which are allowed to transfer the zone + */ + Idnsallowtransfer *string `json:"idnsallowtransfer,omitempty"` + + /* +Allow PTR sync +Allow synchronization of forward (A, AAAA) and reverse (PTR) records in the zone + */ + Idnsallowsyncptr *bool `json:"idnsallowsyncptr,omitempty"` + + /* +Allow in-line DNSSEC signing +Allow inline DNSSEC signing of records in the zone + */ + Idnssecinlinesigning *bool `json:"idnssecinlinesigning,omitempty"` + + /* +NSEC3PARAM record +NSEC3PARAM record for zone in format: hash_algorithm flags iterations salt + */ + Nsec3paramrecord *string `json:"nsec3paramrecord,omitempty"` + } - if in.OwnerUser != nil { - raw := in.OwnerUser - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +func (t *Dnszone) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Dnszone[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Dnszone%v", string(b)) +} - itemV, itemOk := rawItem.(string) +type jsonDnszone struct { + + Idnsname interface{} `json:"idnsname"` + + NameFromIP interface{} `json:"name_from_ip"` + + Idnszoneactive interface{} `json:"idnszoneactive"` + + Idnsforwarders interface{} `json:"idnsforwarders"` + + Idnsforwardpolicy interface{} `json:"idnsforwardpolicy"` + + Managedby interface{} `json:"managedby"` + + Idnssoamname interface{} `json:"idnssoamname"` + + Idnssoarname interface{} `json:"idnssoarname"` + + Idnssoaserial interface{} `json:"idnssoaserial"` + + Idnssoarefresh interface{} `json:"idnssoarefresh"` + + Idnssoaretry interface{} `json:"idnssoaretry"` + + Idnssoaexpire interface{} `json:"idnssoaexpire"` + + Idnssoaminimum interface{} `json:"idnssoaminimum"` + + Dnsttl interface{} `json:"dnsttl"` + + Dnsdefaultttl interface{} `json:"dnsdefaultttl"` + + Dnsclass interface{} `json:"dnsclass"` + + Idnsupdatepolicy interface{} `json:"idnsupdatepolicy"` + + Idnsallowdynupdate interface{} `json:"idnsallowdynupdate"` + + Idnsallowquery interface{} `json:"idnsallowquery"` + + Idnsallowtransfer interface{} `json:"idnsallowtransfer"` + + Idnsallowsyncptr interface{} `json:"idnsallowsyncptr"` + + Idnssecinlinesigning interface{} `json:"idnssecinlinesigning"` + + Nsec3paramrecord interface{} `json:"nsec3paramrecord"` + } - if !itemOk { - sliceOk = false - break - } +func (out *Dnszone) UnmarshalJSON(data []byte) error { + var in jsonDnszone + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Idnsname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Idnsname = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Idnsname: %v; expected exactly one element", raw) + } + out.Idnsname = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Idnsname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.NameFromIP != nil { + raw := in.NameFromIP + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.NameFromIP = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.NameFromIP = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field NameFromIP: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field NameFromIP: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Idnszoneactive != nil { + raw := in.Idnszoneactive + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Idnszoneactive = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Idnszoneactive = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Idnszoneactive: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Idnszoneactive: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Idnsforwarders != nil { + raw := in.Idnsforwarders + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Idnsforwarders = &[]string{plainV} + } else if sliceOk { + + out.Idnsforwarders = &sliceV + } else { + return fmt.Errorf("unexpected value for field Idnsforwarders: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Idnsforwardpolicy != nil { + raw := in.Idnsforwardpolicy + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Idnsforwardpolicy = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Idnsforwardpolicy = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Idnsforwardpolicy: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Idnsforwardpolicy: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Managedby + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Managedby = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Managedby: %v; expected exactly one element", raw) + } + out.Managedby = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Managedby: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Idnssoamname != nil { + raw := in.Idnssoamname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Idnssoamname = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Idnssoamname = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Idnssoamname: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Idnssoamname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Idnssoarname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Idnssoarname = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Idnssoarname: %v; expected exactly one element", raw) + } + out.Idnssoarname = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Idnssoarname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Idnssoaserial + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Idnssoaserial: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Idnssoaserial = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Idnssoaserial: %v; expected exactly one element", raw) + } + out.Idnssoaserial = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Idnssoaserial: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Idnssoarefresh + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Idnssoarefresh: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Idnssoarefresh = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Idnssoarefresh: %v; expected exactly one element", raw) + } + out.Idnssoarefresh = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Idnssoarefresh: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Idnssoaretry + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Idnssoaretry: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Idnssoaretry = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Idnssoaretry: %v; expected exactly one element", raw) + } + out.Idnssoaretry = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Idnssoaretry: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Idnssoaexpire + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Idnssoaexpire: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Idnssoaexpire = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Idnssoaexpire: %v; expected exactly one element", raw) + } + out.Idnssoaexpire = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Idnssoaexpire: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Idnssoaminimum + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Idnssoaminimum: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Idnssoaminimum = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Idnssoaminimum: %v; expected exactly one element", raw) + } + out.Idnssoaminimum = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Idnssoaminimum: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Dnsttl != nil { + raw := in.Dnsttl + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Dnsttl: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Dnsttl = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Dnsttl = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Dnsttl: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Dnsttl: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Dnsdefaultttl != nil { + raw := in.Dnsdefaultttl + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Dnsdefaultttl: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Dnsdefaultttl = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Dnsdefaultttl = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Dnsdefaultttl: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Dnsdefaultttl: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Dnsclass != nil { + raw := in.Dnsclass + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Dnsclass = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Dnsclass = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Dnsclass: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Dnsclass: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Idnsupdatepolicy != nil { + raw := in.Idnsupdatepolicy + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Idnsupdatepolicy = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Idnsupdatepolicy = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Idnsupdatepolicy: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Idnsupdatepolicy: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Idnsallowdynupdate != nil { + raw := in.Idnsallowdynupdate + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Idnsallowdynupdate = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Idnsallowdynupdate = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Idnsallowdynupdate: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Idnsallowdynupdate: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Idnsallowquery != nil { + raw := in.Idnsallowquery + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Idnsallowquery = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Idnsallowquery = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Idnsallowquery: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Idnsallowquery: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Idnsallowtransfer != nil { + raw := in.Idnsallowtransfer + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Idnsallowtransfer = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Idnsallowtransfer = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Idnsallowtransfer: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Idnsallowtransfer: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Idnsallowsyncptr != nil { + raw := in.Idnsallowsyncptr + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Idnsallowsyncptr = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Idnsallowsyncptr = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Idnsallowsyncptr: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Idnsallowsyncptr: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Idnssecinlinesigning != nil { + raw := in.Idnssecinlinesigning + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Idnssecinlinesigning = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Idnssecinlinesigning = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Idnssecinlinesigning: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Idnssecinlinesigning: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Nsec3paramrecord != nil { + raw := in.Nsec3paramrecord + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Nsec3paramrecord = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Nsec3paramrecord = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Nsec3paramrecord: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Nsec3paramrecord: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - sliceV = append(sliceV, itemV) +type Group struct { + + /* +Group name + + */ + Cn string `json:"cn,omitempty"` + + /* +Description +Group description + */ + Description *string `json:"description,omitempty"` + + /* +GID +GID (use this option to set it manually) + */ + Gidnumber *int `json:"gidnumber,omitempty"` + + /* +External member +Members of a trusted domain in DOM\name or name@domain form + */ + Ipaexternalmember *[]string `json:"ipaexternalmember,omitempty"` + + /* +Member users + + */ + MemberUser *[]string `json:"member_user,omitempty"` + + /* +Member groups + + */ + MemberGroup *[]string `json:"member_group,omitempty"` + + /* +Member of groups + + */ + MemberofGroup *[]string `json:"memberof_group,omitempty"` + + /* +Roles + + */ + MemberofRole *[]string `json:"memberof_role,omitempty"` + + /* +Member of netgroups + + */ + MemberofNetgroup *[]string `json:"memberof_netgroup,omitempty"` + + /* +Member of Sudo rule + + */ + MemberofSudorule *[]string `json:"memberof_sudorule,omitempty"` + + /* +Member of HBAC rule + + */ + MemberofHbacrule *[]string `json:"memberof_hbacrule,omitempty"` + + /* +Indirect Member users + + */ + MemberindirectUser *string `json:"memberindirect_user,omitempty"` + + /* +Indirect Member groups + + */ + MemberindirectGroup *string `json:"memberindirect_group,omitempty"` + + /* +Indirect Member of group + + */ + MemberofindirectGroup *string `json:"memberofindirect_group,omitempty"` + + /* +Indirect Member of netgroup + + */ + MemberofindirectNetgroup *string `json:"memberofindirect_netgroup,omitempty"` + + /* +Indirect Member of role + + */ + MemberofindirectRole *string `json:"memberofindirect_role,omitempty"` + + /* +Indirect Member of Sudo rule + + */ + MemberofindirectSudorule *string `json:"memberofindirect_sudorule,omitempty"` + + /* +Indirect Member of HBAC rule + + */ + MemberofindirectHbacrule *string `json:"memberofindirect_hbacrule,omitempty"` + } - } - } +func (t *Group) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Group[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Group%v", string(b)) +} - if plainOk { - out.OwnerUser = &plainV - } else if sliceOk { +type jsonGroup struct { + + Cn interface{} `json:"cn"` + + Description interface{} `json:"description"` + + Gidnumber interface{} `json:"gidnumber"` + + Ipaexternalmember interface{} `json:"ipaexternalmember"` + + MemberUser interface{} `json:"member_user"` + + MemberGroup interface{} `json:"member_group"` + + MemberofGroup interface{} `json:"memberof_group"` + + MemberofRole interface{} `json:"memberof_role"` + + MemberofNetgroup interface{} `json:"memberof_netgroup"` + + MemberofSudorule interface{} `json:"memberof_sudorule"` + + MemberofHbacrule interface{} `json:"memberof_hbacrule"` + + MemberindirectUser interface{} `json:"memberindirect_user"` + + MemberindirectGroup interface{} `json:"memberindirect_group"` + + MemberofindirectGroup interface{} `json:"memberofindirect_group"` + + MemberofindirectNetgroup interface{} `json:"memberofindirect_netgroup"` + + MemberofindirectRole interface{} `json:"memberofindirect_role"` + + MemberofindirectSudorule interface{} `json:"memberofindirect_sudorule"` + + MemberofindirectHbacrule interface{} `json:"memberofindirect_hbacrule"` + } - if len(sliceV) == 1 { - out.OwnerUser = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field OwnerUser: %v; expected at most one element", raw) - } +func (out *Group) UnmarshalJSON(data []byte) error { + var in jsonGroup + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Cn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) + } + out.Cn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Description != nil { + raw := in.Description + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Description = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Description = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Gidnumber != nil { + raw := in.Gidnumber + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Gidnumber: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Gidnumber = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Gidnumber = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Gidnumber: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Gidnumber: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipaexternalmember != nil { + raw := in.Ipaexternalmember + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipaexternalmember = &[]string{plainV} + } else if sliceOk { + + out.Ipaexternalmember = &sliceV + } else { + return fmt.Errorf("unexpected value for field Ipaexternalmember: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberUser != nil { + raw := in.MemberUser + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberUser = &[]string{plainV} + } else if sliceOk { + + out.MemberUser = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberUser: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberGroup != nil { + raw := in.MemberGroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberGroup = &[]string{plainV} + } else if sliceOk { + + out.MemberGroup = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberGroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofGroup != nil { + raw := in.MemberofGroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofGroup = &[]string{plainV} + } else if sliceOk { + + out.MemberofGroup = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberofGroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofRole != nil { + raw := in.MemberofRole + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofRole = &[]string{plainV} + } else if sliceOk { + + out.MemberofRole = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberofRole: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofNetgroup != nil { + raw := in.MemberofNetgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofNetgroup = &[]string{plainV} + } else if sliceOk { + + out.MemberofNetgroup = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberofNetgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofSudorule != nil { + raw := in.MemberofSudorule + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofSudorule = &[]string{plainV} + } else if sliceOk { + + out.MemberofSudorule = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberofSudorule: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofHbacrule != nil { + raw := in.MemberofHbacrule + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofHbacrule = &[]string{plainV} + } else if sliceOk { + + out.MemberofHbacrule = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberofHbacrule: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberindirectUser != nil { + raw := in.MemberindirectUser + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberindirectUser = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberindirectUser = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberindirectUser: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberindirectUser: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberindirectGroup != nil { + raw := in.MemberindirectGroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberindirectGroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberindirectGroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberindirectGroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberindirectGroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofindirectGroup != nil { + raw := in.MemberofindirectGroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofindirectGroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberofindirectGroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberofindirectGroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberofindirectGroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofindirectNetgroup != nil { + raw := in.MemberofindirectNetgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofindirectNetgroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberofindirectNetgroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberofindirectNetgroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberofindirectNetgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofindirectRole != nil { + raw := in.MemberofindirectRole + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofindirectRole = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberofindirectRole = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberofindirectRole: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberofindirectRole: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofindirectSudorule != nil { + raw := in.MemberofindirectSudorule + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofindirectSudorule = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberofindirectSudorule = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberofindirectSudorule: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberofindirectSudorule: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofindirectHbacrule != nil { + raw := in.MemberofindirectHbacrule + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofindirectHbacrule = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberofindirectHbacrule = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberofindirectHbacrule: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberofindirectHbacrule: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - } else { - return fmt.Errorf("unexpected value for field OwnerUser: %v (%v)", raw, reflect.TypeOf(raw)) - } +type Hbacrule struct { + + /* +Rule name + + */ + Cn string `json:"cn,omitempty"` + + /* +Rule type +Rule type (allow) + */ + Accessruletype string `json:"accessruletype,omitempty"` + + /* +User category +User category the rule applies to + */ + Usercategory *string `json:"usercategory,omitempty"` + + /* +Host category +Host category the rule applies to + */ + Hostcategory *string `json:"hostcategory,omitempty"` + + /* +Source host category +Source host category the rule applies to + */ + Sourcehostcategory *string `json:"sourcehostcategory,omitempty"` + + /* +Service category +Service category the rule applies to + */ + Servicecategory *string `json:"servicecategory,omitempty"` + + /* +Description + + */ + Description *string `json:"description,omitempty"` + + /* +Enabled + + */ + Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` + + /* +Users + + */ + MemberuserUser *string `json:"memberuser_user,omitempty"` + + /* +User Groups + + */ + MemberuserGroup *string `json:"memberuser_group,omitempty"` + + /* +Hosts + + */ + MemberhostHost *string `json:"memberhost_host,omitempty"` + + /* +Host Groups + + */ + MemberhostHostgroup *string `json:"memberhost_hostgroup,omitempty"` + + /* +Source Hosts + + */ + SourcehostHost *string `json:"sourcehost_host,omitempty"` + + /* +Source Host Groups + + */ + SourcehostHostgroup *string `json:"sourcehost_hostgroup,omitempty"` + + /* +Services + + */ + MemberserviceHbacsvc *string `json:"memberservice_hbacsvc,omitempty"` + + /* +Service Groups + + */ + MemberserviceHbacsvcgroup *string `json:"memberservice_hbacsvcgroup,omitempty"` + + /* +External host + + */ + Externalhost *[]string `json:"externalhost,omitempty"` + } - } +func (t *Hbacrule) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Hbacrule[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Hbacrule%v", string(b)) +} - if in.OwnerGroup != nil { - raw := in.OwnerGroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +type jsonHbacrule struct { + + Cn interface{} `json:"cn"` + + Accessruletype interface{} `json:"accessruletype"` + + Usercategory interface{} `json:"usercategory"` + + Hostcategory interface{} `json:"hostcategory"` + + Sourcehostcategory interface{} `json:"sourcehostcategory"` + + Servicecategory interface{} `json:"servicecategory"` + + Description interface{} `json:"description"` + + Ipaenabledflag interface{} `json:"ipaenabledflag"` + + MemberuserUser interface{} `json:"memberuser_user"` + + MemberuserGroup interface{} `json:"memberuser_group"` + + MemberhostHost interface{} `json:"memberhost_host"` + + MemberhostHostgroup interface{} `json:"memberhost_hostgroup"` + + SourcehostHost interface{} `json:"sourcehost_host"` + + SourcehostHostgroup interface{} `json:"sourcehost_hostgroup"` + + MemberserviceHbacsvc interface{} `json:"memberservice_hbacsvc"` + + MemberserviceHbacsvcgroup interface{} `json:"memberservice_hbacsvcgroup"` + + Externalhost interface{} `json:"externalhost"` + } - itemV, itemOk := rawItem.(string) +func (out *Hbacrule) UnmarshalJSON(data []byte) error { + var in jsonHbacrule + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Cn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) + } + out.Cn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Accessruletype + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Accessruletype = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Accessruletype: %v; expected exactly one element", raw) + } + out.Accessruletype = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Accessruletype: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Usercategory != nil { + raw := in.Usercategory + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Usercategory = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Usercategory = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Usercategory: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Usercategory: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Hostcategory != nil { + raw := in.Hostcategory + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Hostcategory = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Hostcategory = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Hostcategory: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Hostcategory: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Sourcehostcategory != nil { + raw := in.Sourcehostcategory + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Sourcehostcategory = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Sourcehostcategory = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Sourcehostcategory: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Sourcehostcategory: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Servicecategory != nil { + raw := in.Servicecategory + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Servicecategory = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Servicecategory = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Servicecategory: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Servicecategory: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Description != nil { + raw := in.Description + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Description = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Description = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipaenabledflag != nil { + raw := in.Ipaenabledflag + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipaenabledflag = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipaenabledflag = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipaenabledflag: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipaenabledflag: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberuserUser != nil { + raw := in.MemberuserUser + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberuserUser = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberuserUser = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberuserUser: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberuserUser: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberuserGroup != nil { + raw := in.MemberuserGroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberuserGroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberuserGroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberuserGroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberuserGroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberhostHost != nil { + raw := in.MemberhostHost + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberhostHost = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberhostHost = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberhostHost: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberhostHost: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberhostHostgroup != nil { + raw := in.MemberhostHostgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberhostHostgroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberhostHostgroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberhostHostgroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberhostHostgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.SourcehostHost != nil { + raw := in.SourcehostHost + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.SourcehostHost = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.SourcehostHost = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field SourcehostHost: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field SourcehostHost: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.SourcehostHostgroup != nil { + raw := in.SourcehostHostgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.SourcehostHostgroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.SourcehostHostgroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field SourcehostHostgroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field SourcehostHostgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberserviceHbacsvc != nil { + raw := in.MemberserviceHbacsvc + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberserviceHbacsvc = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberserviceHbacsvc = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberserviceHbacsvc: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberserviceHbacsvc: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberserviceHbacsvcgroup != nil { + raw := in.MemberserviceHbacsvcgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberserviceHbacsvcgroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberserviceHbacsvcgroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberserviceHbacsvcgroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberserviceHbacsvcgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Externalhost != nil { + raw := in.Externalhost + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Externalhost = &[]string{plainV} + } else if sliceOk { + + out.Externalhost = &sliceV + } else { + return fmt.Errorf("unexpected value for field Externalhost: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - if !itemOk { - sliceOk = false - break - } +type Hbacsvc struct { + + /* +Service name +HBAC service + */ + Cn string `json:"cn,omitempty"` + + /* +Description +HBAC service description + */ + Description *string `json:"description,omitempty"` + + /* +Member of HBAC service groups + + */ + MemberofHbacsvcgroup *[]string `json:"memberof_hbacsvcgroup,omitempty"` + } - sliceV = append(sliceV, itemV) +func (t *Hbacsvc) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Hbacsvc[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Hbacsvc%v", string(b)) +} - } - } +type jsonHbacsvc struct { + + Cn interface{} `json:"cn"` + + Description interface{} `json:"description"` + + MemberofHbacsvcgroup interface{} `json:"memberof_hbacsvcgroup"` + } - if plainOk { - out.OwnerGroup = &plainV - } else if sliceOk { +func (out *Hbacsvc) UnmarshalJSON(data []byte) error { + var in jsonHbacsvc + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Cn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) + } + out.Cn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Description != nil { + raw := in.Description + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Description = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Description = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofHbacsvcgroup != nil { + raw := in.MemberofHbacsvcgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofHbacsvcgroup = &[]string{plainV} + } else if sliceOk { + + out.MemberofHbacsvcgroup = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberofHbacsvcgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - if len(sliceV) == 1 { - out.OwnerGroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field OwnerGroup: %v; expected at most one element", raw) - } +type Hbacsvcgroup struct { + + /* +Service group name + + */ + Cn string `json:"cn,omitempty"` + + /* +Description +HBAC service group description + */ + Description *string `json:"description,omitempty"` + + /* +Member HBAC service + + */ + MemberHbacsvc *[]string `json:"member_hbacsvc,omitempty"` + } - } else { - return fmt.Errorf("unexpected value for field OwnerGroup: %v (%v)", raw, reflect.TypeOf(raw)) - } +func (t *Hbacsvcgroup) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Hbacsvcgroup[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Hbacsvcgroup%v", string(b)) +} - } +type jsonHbacsvcgroup struct { + + Cn interface{} `json:"cn"` + + Description interface{} `json:"description"` + + MemberHbacsvc interface{} `json:"member_hbacsvc"` + } - if in.OwnerService != nil { - raw := in.OwnerService - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +func (out *Hbacsvcgroup) UnmarshalJSON(data []byte) error { + var in jsonHbacsvcgroup + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Cn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) + } + out.Cn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Description != nil { + raw := in.Description + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Description = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Description = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberHbacsvc != nil { + raw := in.MemberHbacsvc + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberHbacsvc = &[]string{plainV} + } else if sliceOk { + + out.MemberHbacsvc = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberHbacsvc: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - itemV, itemOk := rawItem.(string) +type Host struct { + + /* +Host name + + */ + Fqdn string `json:"fqdn,omitempty"` + + /* +Description +A description of this host + */ + Description *string `json:"description,omitempty"` + + /* +Locality +Host locality (e.g. "Baltimore, MD") + */ + L *string `json:"l,omitempty"` + + /* +Location +Host location (e.g. "Lab 2") + */ + Nshostlocation *string `json:"nshostlocation,omitempty"` + + /* +Platform +Host hardware platform (e.g. "Lenovo T61") + */ + Nshardwareplatform *string `json:"nshardwareplatform,omitempty"` + + /* +Operating system +Host operating system and version (e.g. "Fedora 9") + */ + Nsosversion *string `json:"nsosversion,omitempty"` + + /* +User password +Password used in bulk enrollment + */ + Userpassword *string `json:"userpassword,omitempty"` + + /* + +Generate a random password to be used in bulk enrollment + */ + Random *bool `json:"random,omitempty"` + + /* +Random password + + */ + Randompassword *string `json:"randompassword,omitempty"` + + /* +Certificate +Base-64 encoded host certificate + */ + Usercertificate *[]interface{} `json:"usercertificate,omitempty"` + + /* +Subject + + */ + Subject *string `json:"subject,omitempty"` + + /* +Serial Number + + */ + SerialNumber *string `json:"serial_number,omitempty"` + + /* +Serial Number (hex) + + */ + SerialNumberHex *string `json:"serial_number_hex,omitempty"` + + /* +Issuer + + */ + Issuer *string `json:"issuer,omitempty"` + + /* +Not Before + + */ + ValidNotBefore *string `json:"valid_not_before,omitempty"` + + /* +Not After + + */ + ValidNotAfter *string `json:"valid_not_after,omitempty"` + + /* +Fingerprint (SHA1) + + */ + Sha1Fingerprint *string `json:"sha1_fingerprint,omitempty"` + + /* +Fingerprint (SHA256) + + */ + Sha256Fingerprint *string `json:"sha256_fingerprint,omitempty"` + + /* +Revocation reason + + */ + RevocationReason *string `json:"revocation_reason,omitempty"` + + /* +Principal name + + */ + Krbcanonicalname *string `json:"krbcanonicalname,omitempty"` + + /* +Principal alias + + */ + Krbprincipalname *[]string `json:"krbprincipalname,omitempty"` + + /* +MAC address +Hardware MAC address(es) on this host + */ + Macaddress *[]string `json:"macaddress,omitempty"` + + /* +SSH public key + + */ + Ipasshpubkey *[]string `json:"ipasshpubkey,omitempty"` + + /* +SSH public key fingerprint + + */ + Sshpubkeyfp *[]string `json:"sshpubkeyfp,omitempty"` + + /* +Class +Host category (semantics placed on this attribute are for local interpretation) + */ + Userclass *[]string `json:"userclass,omitempty"` + + /* +Assigned ID View + + */ + Ipaassignedidview *string `json:"ipaassignedidview,omitempty"` + + /* +Authentication Indicators +Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations. + */ + Krbprincipalauthind *[]string `json:"krbprincipalauthind,omitempty"` + + /* +Requires pre-authentication +Pre-authentication is required for the service + */ + Ipakrbrequirespreauth *bool `json:"ipakrbrequirespreauth,omitempty"` + + /* +Trusted for delegation +Client credentials may be delegated to the service + */ + Ipakrbokasdelegate *bool `json:"ipakrbokasdelegate,omitempty"` + + /* +Trusted to authenticate as user +The service is allowed to authenticate on behalf of a client + */ + Ipakrboktoauthasdelegate *bool `json:"ipakrboktoauthasdelegate,omitempty"` + + /* +Password + + */ + HasPassword *bool `json:"has_password,omitempty"` + + /* +Member of host-groups + + */ + MemberofHostgroup *[]string `json:"memberof_hostgroup,omitempty"` + + /* +Roles + + */ + MemberofRole *[]string `json:"memberof_role,omitempty"` + + /* +Member of netgroups + + */ + MemberofNetgroup *[]string `json:"memberof_netgroup,omitempty"` + + /* +Member of Sudo rule + + */ + MemberofSudorule *[]string `json:"memberof_sudorule,omitempty"` + + /* +Member of HBAC rule + + */ + MemberofHbacrule *[]string `json:"memberof_hbacrule,omitempty"` + + /* +Indirect Member of netgroup + + */ + MemberofindirectNetgroup *string `json:"memberofindirect_netgroup,omitempty"` + + /* +Indirect Member of host-group + + */ + MemberofindirectHostgroup *string `json:"memberofindirect_hostgroup,omitempty"` + + /* +Indirect Member of role + + */ + MemberofindirectRole *string `json:"memberofindirect_role,omitempty"` + + /* +Indirect Member of Sudo rule + + */ + MemberofindirectSudorule *string `json:"memberofindirect_sudorule,omitempty"` + + /* +Indirect Member of HBAC rule + + */ + MemberofindirectHbacrule *string `json:"memberofindirect_hbacrule,omitempty"` + + /* +Keytab + + */ + HasKeytab *bool `json:"has_keytab,omitempty"` + + /* +Managed by + + */ + ManagedbyHost string `json:"managedby_host,omitempty"` + + /* +Managing + + */ + ManagingHost *string `json:"managing_host,omitempty"` + + /* +Users allowed to retrieve keytab + + */ + IpaallowedtoperformReadKeysUser *string `json:"ipaallowedtoperform_read_keys_user,omitempty"` + + /* +Groups allowed to retrieve keytab + + */ + IpaallowedtoperformReadKeysGroup *string `json:"ipaallowedtoperform_read_keys_group,omitempty"` + + /* +Hosts allowed to retrieve keytab + + */ + IpaallowedtoperformReadKeysHost *string `json:"ipaallowedtoperform_read_keys_host,omitempty"` + + /* +Host Groups allowed to retrieve keytab + + */ + IpaallowedtoperformReadKeysHostgroup *string `json:"ipaallowedtoperform_read_keys_hostgroup,omitempty"` + + /* +Users allowed to create keytab + + */ + IpaallowedtoperformWriteKeysUser *string `json:"ipaallowedtoperform_write_keys_user,omitempty"` + + /* +Groups allowed to create keytab + + */ + IpaallowedtoperformWriteKeysGroup *string `json:"ipaallowedtoperform_write_keys_group,omitempty"` + + /* +Hosts allowed to create keytab + + */ + IpaallowedtoperformWriteKeysHost *string `json:"ipaallowedtoperform_write_keys_host,omitempty"` + + /* +Host Groups allowed to create keytab + + */ + IpaallowedtoperformWriteKeysHostgroup *string `json:"ipaallowedtoperform_write_keys_hostgroup,omitempty"` + } - if !itemOk { - sliceOk = false - break - } +func (t *Host) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Host[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Host%v", string(b)) +} - sliceV = append(sliceV, itemV) +type jsonHost struct { + + Fqdn interface{} `json:"fqdn"` + + Description interface{} `json:"description"` + + L interface{} `json:"l"` + + Nshostlocation interface{} `json:"nshostlocation"` + + Nshardwareplatform interface{} `json:"nshardwareplatform"` + + Nsosversion interface{} `json:"nsosversion"` + + Userpassword interface{} `json:"userpassword"` + + Random interface{} `json:"random"` + + Randompassword interface{} `json:"randompassword"` + + Usercertificate interface{} `json:"usercertificate"` + + Subject interface{} `json:"subject"` + + SerialNumber interface{} `json:"serial_number"` + + SerialNumberHex interface{} `json:"serial_number_hex"` + + Issuer interface{} `json:"issuer"` + + ValidNotBefore interface{} `json:"valid_not_before"` + + ValidNotAfter interface{} `json:"valid_not_after"` + + Sha1Fingerprint interface{} `json:"sha1_fingerprint"` + + Sha256Fingerprint interface{} `json:"sha256_fingerprint"` + + RevocationReason interface{} `json:"revocation_reason"` + + Krbcanonicalname interface{} `json:"krbcanonicalname"` + + Krbprincipalname interface{} `json:"krbprincipalname"` + + Macaddress interface{} `json:"macaddress"` + + Ipasshpubkey interface{} `json:"ipasshpubkey"` + + Sshpubkeyfp interface{} `json:"sshpubkeyfp"` + + Userclass interface{} `json:"userclass"` + + Ipaassignedidview interface{} `json:"ipaassignedidview"` + + Krbprincipalauthind interface{} `json:"krbprincipalauthind"` + + Ipakrbrequirespreauth interface{} `json:"ipakrbrequirespreauth"` + + Ipakrbokasdelegate interface{} `json:"ipakrbokasdelegate"` + + Ipakrboktoauthasdelegate interface{} `json:"ipakrboktoauthasdelegate"` + + HasPassword interface{} `json:"has_password"` + + MemberofHostgroup interface{} `json:"memberof_hostgroup"` + + MemberofRole interface{} `json:"memberof_role"` + + MemberofNetgroup interface{} `json:"memberof_netgroup"` + + MemberofSudorule interface{} `json:"memberof_sudorule"` + + MemberofHbacrule interface{} `json:"memberof_hbacrule"` + + MemberofindirectNetgroup interface{} `json:"memberofindirect_netgroup"` + + MemberofindirectHostgroup interface{} `json:"memberofindirect_hostgroup"` + + MemberofindirectRole interface{} `json:"memberofindirect_role"` + + MemberofindirectSudorule interface{} `json:"memberofindirect_sudorule"` + + MemberofindirectHbacrule interface{} `json:"memberofindirect_hbacrule"` + + HasKeytab interface{} `json:"has_keytab"` + + ManagedbyHost interface{} `json:"managedby_host"` + + ManagingHost interface{} `json:"managing_host"` + + IpaallowedtoperformReadKeysUser interface{} `json:"ipaallowedtoperform_read_keys_user"` + + IpaallowedtoperformReadKeysGroup interface{} `json:"ipaallowedtoperform_read_keys_group"` + + IpaallowedtoperformReadKeysHost interface{} `json:"ipaallowedtoperform_read_keys_host"` + + IpaallowedtoperformReadKeysHostgroup interface{} `json:"ipaallowedtoperform_read_keys_hostgroup"` + + IpaallowedtoperformWriteKeysUser interface{} `json:"ipaallowedtoperform_write_keys_user"` + + IpaallowedtoperformWriteKeysGroup interface{} `json:"ipaallowedtoperform_write_keys_group"` + + IpaallowedtoperformWriteKeysHost interface{} `json:"ipaallowedtoperform_write_keys_host"` + + IpaallowedtoperformWriteKeysHostgroup interface{} `json:"ipaallowedtoperform_write_keys_hostgroup"` + } - } - } +func (out *Host) UnmarshalJSON(data []byte) error { + var in jsonHost + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Fqdn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Fqdn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Fqdn: %v; expected exactly one element", raw) + } + out.Fqdn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Fqdn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Description != nil { + raw := in.Description + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Description = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Description = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.L != nil { + raw := in.L + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.L = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.L = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field L: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field L: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Nshostlocation != nil { + raw := in.Nshostlocation + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Nshostlocation = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Nshostlocation = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Nshostlocation: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Nshostlocation: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Nshardwareplatform != nil { + raw := in.Nshardwareplatform + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Nshardwareplatform = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Nshardwareplatform = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Nshardwareplatform: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Nshardwareplatform: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Nsosversion != nil { + raw := in.Nsosversion + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Nsosversion = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Nsosversion = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Nsosversion: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Nsosversion: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Userpassword != nil { + raw := in.Userpassword + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Userpassword = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Userpassword = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Userpassword: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Userpassword: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Random != nil { + raw := in.Random + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Random = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Random = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Random: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Random: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Randompassword != nil { + raw := in.Randompassword + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Randompassword = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Randompassword = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Randompassword: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Randompassword: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Usercertificate != nil { + raw := in.Usercertificate + plainV, plainOk := raw.(interface{}) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []interface{} + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(interface{}) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Usercertificate = &[]interface{}{plainV} + } else if sliceOk { + + out.Usercertificate = &sliceV + } else { + return fmt.Errorf("unexpected value for field Usercertificate: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Subject != nil { + raw := in.Subject + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Subject = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Subject = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Subject: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Subject: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.SerialNumber != nil { + raw := in.SerialNumber + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.SerialNumber = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.SerialNumber = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field SerialNumber: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field SerialNumber: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.SerialNumberHex != nil { + raw := in.SerialNumberHex + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.SerialNumberHex = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.SerialNumberHex = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field SerialNumberHex: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field SerialNumberHex: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Issuer != nil { + raw := in.Issuer + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Issuer = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Issuer = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Issuer: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Issuer: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.ValidNotBefore != nil { + raw := in.ValidNotBefore + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.ValidNotBefore = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.ValidNotBefore = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field ValidNotBefore: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field ValidNotBefore: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.ValidNotAfter != nil { + raw := in.ValidNotAfter + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.ValidNotAfter = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.ValidNotAfter = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field ValidNotAfter: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field ValidNotAfter: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Sha1Fingerprint != nil { + raw := in.Sha1Fingerprint + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Sha1Fingerprint = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Sha1Fingerprint = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Sha1Fingerprint: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Sha1Fingerprint: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Sha256Fingerprint != nil { + raw := in.Sha256Fingerprint + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Sha256Fingerprint = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Sha256Fingerprint = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Sha256Fingerprint: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Sha256Fingerprint: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.RevocationReason != nil { + raw := in.RevocationReason + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.RevocationReason = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.RevocationReason = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field RevocationReason: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field RevocationReason: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Krbcanonicalname != nil { + raw := in.Krbcanonicalname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Krbcanonicalname = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Krbcanonicalname = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Krbcanonicalname: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Krbcanonicalname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Krbprincipalname != nil { + raw := in.Krbprincipalname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Krbprincipalname = &[]string{plainV} + } else if sliceOk { + + out.Krbprincipalname = &sliceV + } else { + return fmt.Errorf("unexpected value for field Krbprincipalname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Macaddress != nil { + raw := in.Macaddress + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Macaddress = &[]string{plainV} + } else if sliceOk { + + out.Macaddress = &sliceV + } else { + return fmt.Errorf("unexpected value for field Macaddress: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipasshpubkey != nil { + raw := in.Ipasshpubkey + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipasshpubkey = &[]string{plainV} + } else if sliceOk { + + out.Ipasshpubkey = &sliceV + } else { + return fmt.Errorf("unexpected value for field Ipasshpubkey: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Sshpubkeyfp != nil { + raw := in.Sshpubkeyfp + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Sshpubkeyfp = &[]string{plainV} + } else if sliceOk { + + out.Sshpubkeyfp = &sliceV + } else { + return fmt.Errorf("unexpected value for field Sshpubkeyfp: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Userclass != nil { + raw := in.Userclass + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Userclass = &[]string{plainV} + } else if sliceOk { + + out.Userclass = &sliceV + } else { + return fmt.Errorf("unexpected value for field Userclass: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipaassignedidview != nil { + raw := in.Ipaassignedidview + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipaassignedidview = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipaassignedidview = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipaassignedidview: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipaassignedidview: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Krbprincipalauthind != nil { + raw := in.Krbprincipalauthind + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Krbprincipalauthind = &[]string{plainV} + } else if sliceOk { + + out.Krbprincipalauthind = &sliceV + } else { + return fmt.Errorf("unexpected value for field Krbprincipalauthind: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipakrbrequirespreauth != nil { + raw := in.Ipakrbrequirespreauth + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipakrbrequirespreauth = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipakrbrequirespreauth = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipakrbrequirespreauth: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipakrbrequirespreauth: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipakrbokasdelegate != nil { + raw := in.Ipakrbokasdelegate + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipakrbokasdelegate = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipakrbokasdelegate = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipakrbokasdelegate: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipakrbokasdelegate: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipakrboktoauthasdelegate != nil { + raw := in.Ipakrboktoauthasdelegate + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipakrboktoauthasdelegate = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipakrboktoauthasdelegate = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipakrboktoauthasdelegate: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipakrboktoauthasdelegate: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.HasPassword != nil { + raw := in.HasPassword + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.HasPassword = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.HasPassword = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field HasPassword: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field HasPassword: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofHostgroup != nil { + raw := in.MemberofHostgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofHostgroup = &[]string{plainV} + } else if sliceOk { + + out.MemberofHostgroup = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberofHostgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofRole != nil { + raw := in.MemberofRole + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofRole = &[]string{plainV} + } else if sliceOk { + + out.MemberofRole = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberofRole: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofNetgroup != nil { + raw := in.MemberofNetgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofNetgroup = &[]string{plainV} + } else if sliceOk { + + out.MemberofNetgroup = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberofNetgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofSudorule != nil { + raw := in.MemberofSudorule + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofSudorule = &[]string{plainV} + } else if sliceOk { + + out.MemberofSudorule = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberofSudorule: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofHbacrule != nil { + raw := in.MemberofHbacrule + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofHbacrule = &[]string{plainV} + } else if sliceOk { + + out.MemberofHbacrule = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberofHbacrule: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofindirectNetgroup != nil { + raw := in.MemberofindirectNetgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofindirectNetgroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberofindirectNetgroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberofindirectNetgroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberofindirectNetgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofindirectHostgroup != nil { + raw := in.MemberofindirectHostgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofindirectHostgroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberofindirectHostgroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberofindirectHostgroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberofindirectHostgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofindirectRole != nil { + raw := in.MemberofindirectRole + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofindirectRole = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberofindirectRole = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberofindirectRole: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberofindirectRole: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofindirectSudorule != nil { + raw := in.MemberofindirectSudorule + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofindirectSudorule = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberofindirectSudorule = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberofindirectSudorule: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberofindirectSudorule: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofindirectHbacrule != nil { + raw := in.MemberofindirectHbacrule + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofindirectHbacrule = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberofindirectHbacrule = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberofindirectHbacrule: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberofindirectHbacrule: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.HasKeytab != nil { + raw := in.HasKeytab + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.HasKeytab = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.HasKeytab = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field HasKeytab: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field HasKeytab: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.ManagedbyHost + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.ManagedbyHost = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field ManagedbyHost: %v; expected exactly one element", raw) + } + out.ManagedbyHost = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field ManagedbyHost: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.ManagingHost != nil { + raw := in.ManagingHost + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.ManagingHost = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.ManagingHost = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field ManagingHost: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field ManagingHost: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.IpaallowedtoperformReadKeysUser != nil { + raw := in.IpaallowedtoperformReadKeysUser + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.IpaallowedtoperformReadKeysUser = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.IpaallowedtoperformReadKeysUser = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field IpaallowedtoperformReadKeysUser: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field IpaallowedtoperformReadKeysUser: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.IpaallowedtoperformReadKeysGroup != nil { + raw := in.IpaallowedtoperformReadKeysGroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.IpaallowedtoperformReadKeysGroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.IpaallowedtoperformReadKeysGroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field IpaallowedtoperformReadKeysGroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field IpaallowedtoperformReadKeysGroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.IpaallowedtoperformReadKeysHost != nil { + raw := in.IpaallowedtoperformReadKeysHost + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.IpaallowedtoperformReadKeysHost = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.IpaallowedtoperformReadKeysHost = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field IpaallowedtoperformReadKeysHost: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field IpaallowedtoperformReadKeysHost: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.IpaallowedtoperformReadKeysHostgroup != nil { + raw := in.IpaallowedtoperformReadKeysHostgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.IpaallowedtoperformReadKeysHostgroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.IpaallowedtoperformReadKeysHostgroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field IpaallowedtoperformReadKeysHostgroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field IpaallowedtoperformReadKeysHostgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.IpaallowedtoperformWriteKeysUser != nil { + raw := in.IpaallowedtoperformWriteKeysUser + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.IpaallowedtoperformWriteKeysUser = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.IpaallowedtoperformWriteKeysUser = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field IpaallowedtoperformWriteKeysUser: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field IpaallowedtoperformWriteKeysUser: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.IpaallowedtoperformWriteKeysGroup != nil { + raw := in.IpaallowedtoperformWriteKeysGroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.IpaallowedtoperformWriteKeysGroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.IpaallowedtoperformWriteKeysGroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field IpaallowedtoperformWriteKeysGroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field IpaallowedtoperformWriteKeysGroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.IpaallowedtoperformWriteKeysHost != nil { + raw := in.IpaallowedtoperformWriteKeysHost + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.IpaallowedtoperformWriteKeysHost = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.IpaallowedtoperformWriteKeysHost = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field IpaallowedtoperformWriteKeysHost: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field IpaallowedtoperformWriteKeysHost: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.IpaallowedtoperformWriteKeysHostgroup != nil { + raw := in.IpaallowedtoperformWriteKeysHostgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.IpaallowedtoperformWriteKeysHostgroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.IpaallowedtoperformWriteKeysHostgroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field IpaallowedtoperformWriteKeysHostgroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field IpaallowedtoperformWriteKeysHostgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - if plainOk { - out.OwnerService = &plainV - } else if sliceOk { +type Hostgroup struct { + + /* +Host-group +Name of host-group + */ + Cn string `json:"cn,omitempty"` + + /* +Description +A description of this host-group + */ + Description *string `json:"description,omitempty"` + + /* +Member hosts + + */ + MemberHost *[]string `json:"member_host,omitempty"` + + /* +Member host-groups + + */ + MemberHostgroup *[]string `json:"member_hostgroup,omitempty"` + + /* +Member of host-groups + + */ + MemberofHostgroup *[]string `json:"memberof_hostgroup,omitempty"` + + /* +Member of netgroups + + */ + MemberofNetgroup *[]string `json:"memberof_netgroup,omitempty"` + + /* +Member of Sudo rule + + */ + MemberofSudorule *[]string `json:"memberof_sudorule,omitempty"` + + /* +Member of HBAC rule + + */ + MemberofHbacrule *[]string `json:"memberof_hbacrule,omitempty"` + + /* +Indirect Member hosts + + */ + MemberindirectHost *string `json:"memberindirect_host,omitempty"` + + /* +Indirect Member host-groups + + */ + MemberindirectHostgroup *string `json:"memberindirect_hostgroup,omitempty"` + + /* +Indirect Member of host-group + + */ + MemberofindirectHostgroup *string `json:"memberofindirect_hostgroup,omitempty"` + + /* +Indirect Member of Sudo rule + + */ + MemberofindirectSudorule *string `json:"memberofindirect_sudorule,omitempty"` + + /* +Indirect Member of HBAC rule + + */ + MemberofindirectHbacrule *string `json:"memberofindirect_hbacrule,omitempty"` + } - if len(sliceV) == 1 { - out.OwnerService = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field OwnerService: %v; expected at most one element", raw) - } +func (t *Hostgroup) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Hostgroup[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Hostgroup%v", string(b)) +} - } else { - return fmt.Errorf("unexpected value for field OwnerService: %v (%v)", raw, reflect.TypeOf(raw)) - } +type jsonHostgroup struct { + + Cn interface{} `json:"cn"` + + Description interface{} `json:"description"` + + MemberHost interface{} `json:"member_host"` + + MemberHostgroup interface{} `json:"member_hostgroup"` + + MemberofHostgroup interface{} `json:"memberof_hostgroup"` + + MemberofNetgroup interface{} `json:"memberof_netgroup"` + + MemberofSudorule interface{} `json:"memberof_sudorule"` + + MemberofHbacrule interface{} `json:"memberof_hbacrule"` + + MemberindirectHost interface{} `json:"memberindirect_host"` + + MemberindirectHostgroup interface{} `json:"memberindirect_hostgroup"` + + MemberofindirectHostgroup interface{} `json:"memberofindirect_hostgroup"` + + MemberofindirectSudorule interface{} `json:"memberofindirect_sudorule"` + + MemberofindirectHbacrule interface{} `json:"memberofindirect_hbacrule"` + } - } +func (out *Hostgroup) UnmarshalJSON(data []byte) error { + var in jsonHostgroup + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Cn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) + } + out.Cn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Description != nil { + raw := in.Description + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Description = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Description = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberHost != nil { + raw := in.MemberHost + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberHost = &[]string{plainV} + } else if sliceOk { + + out.MemberHost = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberHost: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberHostgroup != nil { + raw := in.MemberHostgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberHostgroup = &[]string{plainV} + } else if sliceOk { + + out.MemberHostgroup = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberHostgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofHostgroup != nil { + raw := in.MemberofHostgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofHostgroup = &[]string{plainV} + } else if sliceOk { + + out.MemberofHostgroup = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberofHostgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofNetgroup != nil { + raw := in.MemberofNetgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofNetgroup = &[]string{plainV} + } else if sliceOk { + + out.MemberofNetgroup = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberofNetgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofSudorule != nil { + raw := in.MemberofSudorule + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofSudorule = &[]string{plainV} + } else if sliceOk { + + out.MemberofSudorule = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberofSudorule: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofHbacrule != nil { + raw := in.MemberofHbacrule + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofHbacrule = &[]string{plainV} + } else if sliceOk { + + out.MemberofHbacrule = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberofHbacrule: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberindirectHost != nil { + raw := in.MemberindirectHost + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberindirectHost = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberindirectHost = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberindirectHost: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberindirectHost: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberindirectHostgroup != nil { + raw := in.MemberindirectHostgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberindirectHostgroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberindirectHostgroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberindirectHostgroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberindirectHostgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofindirectHostgroup != nil { + raw := in.MemberofindirectHostgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofindirectHostgroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberofindirectHostgroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberofindirectHostgroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberofindirectHostgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofindirectSudorule != nil { + raw := in.MemberofindirectSudorule + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofindirectSudorule = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberofindirectSudorule = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberofindirectSudorule: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberofindirectSudorule: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofindirectHbacrule != nil { + raw := in.MemberofindirectHbacrule + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofindirectHbacrule = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberofindirectHbacrule = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberofindirectHbacrule: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberofindirectHbacrule: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - if in.Owner != nil { - raw := in.Owner - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +type Idoverridegroup struct { + + /* +Anchor to override + + */ + Ipaanchoruuid string `json:"ipaanchoruuid,omitempty"` + + /* +Description + + */ + Description *string `json:"description,omitempty"` + + /* +Group name + + */ + Cn *string `json:"cn,omitempty"` + + /* +GID +Group ID Number + */ + Gidnumber *int `json:"gidnumber,omitempty"` + } - itemV, itemOk := rawItem.(string) +func (t *Idoverridegroup) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Idoverridegroup[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Idoverridegroup%v", string(b)) +} - if !itemOk { - sliceOk = false - break - } +type jsonIdoverridegroup struct { + + Ipaanchoruuid interface{} `json:"ipaanchoruuid"` + + Description interface{} `json:"description"` + + Cn interface{} `json:"cn"` + + Gidnumber interface{} `json:"gidnumber"` + } - sliceV = append(sliceV, itemV) +func (out *Idoverridegroup) UnmarshalJSON(data []byte) error { + var in jsonIdoverridegroup + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Ipaanchoruuid + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipaanchoruuid = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipaanchoruuid: %v; expected exactly one element", raw) + } + out.Ipaanchoruuid = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipaanchoruuid: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Description != nil { + raw := in.Description + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Description = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Description = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Cn != nil { + raw := in.Cn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cn = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Cn = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Cn: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Gidnumber != nil { + raw := in.Gidnumber + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Gidnumber: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Gidnumber = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Gidnumber = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Gidnumber: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Gidnumber: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - } - } +type Idoverrideuser struct { + + /* +Anchor to override + + */ + Ipaanchoruuid string `json:"ipaanchoruuid,omitempty"` + + /* +Description + + */ + Description *string `json:"description,omitempty"` + + /* +User login + + */ + UID *string `json:"uid,omitempty"` + + /* +UID +User ID Number + */ + Uidnumber *int `json:"uidnumber,omitempty"` + + /* +GECOS + + */ + Gecos *string `json:"gecos,omitempty"` + + /* +GID +Group ID Number + */ + Gidnumber *int `json:"gidnumber,omitempty"` + + /* +Home directory + + */ + Homedirectory *string `json:"homedirectory,omitempty"` + + /* +Login shell + + */ + Loginshell *string `json:"loginshell,omitempty"` + + /* + + + */ + Ipaoriginaluid *string `json:"ipaoriginaluid,omitempty"` + + /* +SSH public key + + */ + Ipasshpubkey *[]string `json:"ipasshpubkey,omitempty"` + + /* +Certificate +Base-64 encoded user certificate + */ + Usercertificate *[]interface{} `json:"usercertificate,omitempty"` + } - if plainOk { - out.Owner = &plainV - } else if sliceOk { +func (t *Idoverrideuser) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Idoverrideuser[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Idoverrideuser%v", string(b)) +} - if len(sliceV) == 1 { - out.Owner = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Owner: %v; expected at most one element", raw) - } +type jsonIdoverrideuser struct { + + Ipaanchoruuid interface{} `json:"ipaanchoruuid"` + + Description interface{} `json:"description"` + + UID interface{} `json:"uid"` + + Uidnumber interface{} `json:"uidnumber"` + + Gecos interface{} `json:"gecos"` + + Gidnumber interface{} `json:"gidnumber"` + + Homedirectory interface{} `json:"homedirectory"` + + Loginshell interface{} `json:"loginshell"` + + Ipaoriginaluid interface{} `json:"ipaoriginaluid"` + + Ipasshpubkey interface{} `json:"ipasshpubkey"` + + Usercertificate interface{} `json:"usercertificate"` + } - } else { - return fmt.Errorf("unexpected value for field Owner: %v (%v)", raw, reflect.TypeOf(raw)) - } +func (out *Idoverrideuser) UnmarshalJSON(data []byte) error { + var in jsonIdoverrideuser + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Ipaanchoruuid + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipaanchoruuid = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipaanchoruuid: %v; expected exactly one element", raw) + } + out.Ipaanchoruuid = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipaanchoruuid: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Description != nil { + raw := in.Description + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Description = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Description = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.UID != nil { + raw := in.UID + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.UID = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.UID = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field UID: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field UID: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Uidnumber != nil { + raw := in.Uidnumber + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Uidnumber: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Uidnumber = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Uidnumber = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Uidnumber: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Uidnumber: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Gecos != nil { + raw := in.Gecos + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Gecos = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Gecos = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Gecos: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Gecos: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Gidnumber != nil { + raw := in.Gidnumber + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Gidnumber: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Gidnumber = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Gidnumber = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Gidnumber: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Gidnumber: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Homedirectory != nil { + raw := in.Homedirectory + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Homedirectory = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Homedirectory = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Homedirectory: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Homedirectory: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Loginshell != nil { + raw := in.Loginshell + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Loginshell = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Loginshell = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Loginshell: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Loginshell: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipaoriginaluid != nil { + raw := in.Ipaoriginaluid + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipaoriginaluid = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipaoriginaluid = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipaoriginaluid: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipaoriginaluid: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipasshpubkey != nil { + raw := in.Ipasshpubkey + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipasshpubkey = &[]string{plainV} + } else if sliceOk { + + out.Ipasshpubkey = &sliceV + } else { + return fmt.Errorf("unexpected value for field Ipasshpubkey: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Usercertificate != nil { + raw := in.Usercertificate + plainV, plainOk := raw.(interface{}) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []interface{} + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(interface{}) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Usercertificate = &[]interface{}{plainV} + } else if sliceOk { + + out.Usercertificate = &sliceV + } else { + return fmt.Errorf("unexpected value for field Usercertificate: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - } +type Idrange struct { + + /* +Range name + + */ + Cn string `json:"cn,omitempty"` + + /* +First Posix ID of the range + + */ + Ipabaseid int `json:"ipabaseid,omitempty"` + + /* +Number of IDs in the range + + */ + Ipaidrangesize int `json:"ipaidrangesize,omitempty"` + + /* +First RID of the corresponding RID range + + */ + Ipabaserid *int `json:"ipabaserid,omitempty"` + + /* +First RID of the secondary RID range + + */ + Ipasecondarybaserid *int `json:"ipasecondarybaserid,omitempty"` + + /* +Domain SID of the trusted domain + + */ + Ipanttrusteddomainsid *string `json:"ipanttrusteddomainsid,omitempty"` + + /* +Name of the trusted domain + + */ + Ipanttrusteddomainname *string `json:"ipanttrusteddomainname,omitempty"` + + /* +Range type +ID range type, one of ipa-ad-trust, ipa-ad-trust-posix, ipa-local + */ + Iparangetype *string `json:"iparangetype,omitempty"` + } - if in.Service != nil { - raw := in.Service - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +func (t *Idrange) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Idrange[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Idrange%v", string(b)) +} - itemV, itemOk := rawItem.(string) +type jsonIdrange struct { + + Cn interface{} `json:"cn"` + + Ipabaseid interface{} `json:"ipabaseid"` + + Ipaidrangesize interface{} `json:"ipaidrangesize"` + + Ipabaserid interface{} `json:"ipabaserid"` + + Ipasecondarybaserid interface{} `json:"ipasecondarybaserid"` + + Ipanttrusteddomainsid interface{} `json:"ipanttrusteddomainsid"` + + Ipanttrusteddomainname interface{} `json:"ipanttrusteddomainname"` + + Iparangetype interface{} `json:"iparangetype"` + } - if !itemOk { - sliceOk = false - break - } +func (out *Idrange) UnmarshalJSON(data []byte) error { + var in jsonIdrange + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Cn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) + } + out.Cn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Ipabaseid + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Ipabaseid: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Ipabaseid = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipabaseid: %v; expected exactly one element", raw) + } + out.Ipabaseid = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipabaseid: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Ipaidrangesize + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Ipaidrangesize: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Ipaidrangesize = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipaidrangesize: %v; expected exactly one element", raw) + } + out.Ipaidrangesize = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipaidrangesize: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipabaserid != nil { + raw := in.Ipabaserid + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Ipabaserid: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Ipabaserid = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipabaserid = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipabaserid: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipabaserid: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipasecondarybaserid != nil { + raw := in.Ipasecondarybaserid + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Ipasecondarybaserid: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Ipasecondarybaserid = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipasecondarybaserid = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipasecondarybaserid: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipasecondarybaserid: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipanttrusteddomainsid != nil { + raw := in.Ipanttrusteddomainsid + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipanttrusteddomainsid = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipanttrusteddomainsid = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipanttrusteddomainsid: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipanttrusteddomainsid: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipanttrusteddomainname != nil { + raw := in.Ipanttrusteddomainname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipanttrusteddomainname = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipanttrusteddomainname = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipanttrusteddomainname: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipanttrusteddomainname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Iparangetype != nil { + raw := in.Iparangetype + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Iparangetype = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Iparangetype = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Iparangetype: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Iparangetype: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - sliceV = append(sliceV, itemV) +type Idview struct { + + /* +ID View Name + + */ + Cn string `json:"cn,omitempty"` + + /* +Description + + */ + Description *string `json:"description,omitempty"` + + /* +User object overrides + + */ + Useroverrides string `json:"useroverrides,omitempty"` + + /* +Group object overrides + + */ + Groupoverrides string `json:"groupoverrides,omitempty"` + + /* +Hosts the view applies to + + */ + Appliedtohosts string `json:"appliedtohosts,omitempty"` + + /* +Domain resolution order +colon-separated list of domains used for short name qualification + */ + Ipadomainresolutionorder *string `json:"ipadomainresolutionorder,omitempty"` + } - } - } +func (t *Idview) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Idview[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Idview%v", string(b)) +} - if plainOk { - out.Service = &plainV - } else if sliceOk { +type jsonIdview struct { + + Cn interface{} `json:"cn"` + + Description interface{} `json:"description"` + + Useroverrides interface{} `json:"useroverrides"` + + Groupoverrides interface{} `json:"groupoverrides"` + + Appliedtohosts interface{} `json:"appliedtohosts"` + + Ipadomainresolutionorder interface{} `json:"ipadomainresolutionorder"` + } - if len(sliceV) == 1 { - out.Service = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Service: %v; expected at most one element", raw) - } +func (out *Idview) UnmarshalJSON(data []byte) error { + var in jsonIdview + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Cn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) + } + out.Cn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Description != nil { + raw := in.Description + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Description = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Description = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Useroverrides + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Useroverrides = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Useroverrides: %v; expected exactly one element", raw) + } + out.Useroverrides = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Useroverrides: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Groupoverrides + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Groupoverrides = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Groupoverrides: %v; expected exactly one element", raw) + } + out.Groupoverrides = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Groupoverrides: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Appliedtohosts + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Appliedtohosts = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Appliedtohosts: %v; expected exactly one element", raw) + } + out.Appliedtohosts = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Appliedtohosts: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipadomainresolutionorder != nil { + raw := in.Ipadomainresolutionorder + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipadomainresolutionorder = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipadomainresolutionorder = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipadomainresolutionorder: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipadomainresolutionorder: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - } else { - return fmt.Errorf("unexpected value for field Service: %v (%v)", raw, reflect.TypeOf(raw)) - } +type Krbtpolicy struct { + + /* +User name +Manage ticket policy for specific user + */ + UID *string `json:"uid,omitempty"` + + /* +Max life +Maximum ticket life (seconds) + */ + Krbmaxticketlife *int `json:"krbmaxticketlife,omitempty"` + + /* +Max renew +Maximum renewable age (seconds) + */ + Krbmaxrenewableage *int `json:"krbmaxrenewableage,omitempty"` + } - } +func (t *Krbtpolicy) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Krbtpolicy[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Krbtpolicy%v", string(b)) +} - if in.Shared != nil { - raw := in.Shared - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +type jsonKrbtpolicy struct { + + UID interface{} `json:"uid"` + + Krbmaxticketlife interface{} `json:"krbmaxticketlife"` + + Krbmaxrenewableage interface{} `json:"krbmaxrenewableage"` + } - itemV, itemOk := rawItem.(bool) +func (out *Krbtpolicy) UnmarshalJSON(data []byte) error { + var in jsonKrbtpolicy + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if in.UID != nil { + raw := in.UID + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.UID = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.UID = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field UID: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field UID: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Krbmaxticketlife != nil { + raw := in.Krbmaxticketlife + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Krbmaxticketlife: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Krbmaxticketlife = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Krbmaxticketlife = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Krbmaxticketlife: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Krbmaxticketlife: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Krbmaxrenewableage != nil { + raw := in.Krbmaxrenewableage + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Krbmaxrenewableage: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Krbmaxrenewableage = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Krbmaxrenewableage = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Krbmaxrenewableage: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Krbmaxrenewableage: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - if !itemOk { - sliceOk = false - break - } +type Location struct { + + /* +Location name +IPA location name + */ + Idnsname string `json:"idnsname,omitempty"` + + /* +Description +IPA Location description + */ + Description *string `json:"description,omitempty"` + + /* +Servers +Servers that belongs to the IPA location + */ + ServersServer *[]string `json:"servers_server,omitempty"` + + /* +Advertised by servers +List of servers which advertise the given location + */ + DNSServer *[]string `json:"dns_server,omitempty"` + } - sliceV = append(sliceV, itemV) +func (t *Location) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Location[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Location%v", string(b)) +} - } - } +type jsonLocation struct { + + Idnsname interface{} `json:"idnsname"` + + Description interface{} `json:"description"` + + ServersServer interface{} `json:"servers_server"` + + DNSServer interface{} `json:"dns_server"` + } - if plainOk { - out.Shared = &plainV - } else if sliceOk { +func (out *Location) UnmarshalJSON(data []byte) error { + var in jsonLocation + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Idnsname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Idnsname = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Idnsname: %v; expected exactly one element", raw) + } + out.Idnsname = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Idnsname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Description != nil { + raw := in.Description + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Description = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Description = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.ServersServer != nil { + raw := in.ServersServer + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.ServersServer = &[]string{plainV} + } else if sliceOk { + + out.ServersServer = &sliceV + } else { + return fmt.Errorf("unexpected value for field ServersServer: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.DNSServer != nil { + raw := in.DNSServer + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.DNSServer = &[]string{plainV} + } else if sliceOk { + + out.DNSServer = &sliceV + } else { + return fmt.Errorf("unexpected value for field DNSServer: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - if len(sliceV) == 1 { - out.Shared = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Shared: %v; expected at most one element", raw) - } +type Metaobject struct { + + /* +Name + + */ + Name string `json:"name,omitempty"` + + /* +Version + + */ + Version string `json:"version,omitempty"` + + /* +Full name + + */ + FullName string `json:"full_name,omitempty"` + + /* +Documentation + + */ + Doc *string `json:"doc,omitempty"` + + /* +Exclude from + + */ + Exclude *[]string `json:"exclude,omitempty"` + + /* +Include in + + */ + Include *[]string `json:"include,omitempty"` + + /* +Help topic + + */ + TopicTopic *string `json:"topic_topic,omitempty"` + + /* +Parameters + + */ + ParamsParam *[]string `json:"params_param,omitempty"` + } - } else { - return fmt.Errorf("unexpected value for field Shared: %v (%v)", raw, reflect.TypeOf(raw)) - } +func (t *Metaobject) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Metaobject[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Metaobject%v", string(b)) +} - } +type jsonMetaobject struct { + + Name interface{} `json:"name"` + + Version interface{} `json:"version"` + + FullName interface{} `json:"full_name"` + + Doc interface{} `json:"doc"` + + Exclude interface{} `json:"exclude"` + + Include interface{} `json:"include"` + + TopicTopic interface{} `json:"topic_topic"` + + ParamsParam interface{} `json:"params_param"` + } - if in.Username != nil { - raw := in.Username - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +func (out *Metaobject) UnmarshalJSON(data []byte) error { + var in jsonMetaobject + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Name + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Name = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Name: %v; expected exactly one element", raw) + } + out.Name = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Name: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Version + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Version = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Version: %v; expected exactly one element", raw) + } + out.Version = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Version: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.FullName + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.FullName = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field FullName: %v; expected exactly one element", raw) + } + out.FullName = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field FullName: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Doc != nil { + raw := in.Doc + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Doc = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Doc = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Doc: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Doc: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Exclude != nil { + raw := in.Exclude + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Exclude = &[]string{plainV} + } else if sliceOk { + + out.Exclude = &sliceV + } else { + return fmt.Errorf("unexpected value for field Exclude: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Include != nil { + raw := in.Include + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Include = &[]string{plainV} + } else if sliceOk { + + out.Include = &sliceV + } else { + return fmt.Errorf("unexpected value for field Include: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.TopicTopic != nil { + raw := in.TopicTopic + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.TopicTopic = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.TopicTopic = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field TopicTopic: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field TopicTopic: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.ParamsParam != nil { + raw := in.ParamsParam + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.ParamsParam = &[]string{plainV} + } else if sliceOk { + + out.ParamsParam = &sliceV + } else { + return fmt.Errorf("unexpected value for field ParamsParam: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - itemV, itemOk := rawItem.(string) +type Netgroup struct { + + /* +Netgroup name + + */ + Cn string `json:"cn,omitempty"` + + /* +Description +Netgroup description + */ + Description *string `json:"description,omitempty"` + + /* +NIS domain name + + */ + Nisdomainname *string `json:"nisdomainname,omitempty"` + + /* +IPA unique ID +IPA unique ID + */ + Ipauniqueid *string `json:"ipauniqueid,omitempty"` + + /* +User category +User category the rule applies to + */ + Usercategory *string `json:"usercategory,omitempty"` + + /* +Host category +Host category the rule applies to + */ + Hostcategory *string `json:"hostcategory,omitempty"` + + /* +External host + + */ + Externalhost *[]string `json:"externalhost,omitempty"` + + /* +Member netgroups + + */ + MemberNetgroup *[]string `json:"member_netgroup,omitempty"` + + /* +Member of netgroups + + */ + MemberofNetgroup *[]string `json:"memberof_netgroup,omitempty"` + + /* +Indirect Member netgroups + + */ + MemberindirectNetgroup *string `json:"memberindirect_netgroup,omitempty"` + + /* +Member User + + */ + MemberuserUser *string `json:"memberuser_user,omitempty"` + + /* +Member Group + + */ + MemberuserGroup *string `json:"memberuser_group,omitempty"` + + /* +Member Host + + */ + MemberhostHost *string `json:"memberhost_host,omitempty"` + + /* +Member Hostgroup + + */ + MemberhostHostgroup *string `json:"memberhost_hostgroup,omitempty"` + } - if !itemOk { - sliceOk = false - break - } +func (t *Netgroup) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Netgroup[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Netgroup%v", string(b)) +} - sliceV = append(sliceV, itemV) +type jsonNetgroup struct { + + Cn interface{} `json:"cn"` + + Description interface{} `json:"description"` + + Nisdomainname interface{} `json:"nisdomainname"` + + Ipauniqueid interface{} `json:"ipauniqueid"` + + Usercategory interface{} `json:"usercategory"` + + Hostcategory interface{} `json:"hostcategory"` + + Externalhost interface{} `json:"externalhost"` + + MemberNetgroup interface{} `json:"member_netgroup"` + + MemberofNetgroup interface{} `json:"memberof_netgroup"` + + MemberindirectNetgroup interface{} `json:"memberindirect_netgroup"` + + MemberuserUser interface{} `json:"memberuser_user"` + + MemberuserGroup interface{} `json:"memberuser_group"` + + MemberhostHost interface{} `json:"memberhost_host"` + + MemberhostHostgroup interface{} `json:"memberhost_hostgroup"` + } - } - } +func (out *Netgroup) UnmarshalJSON(data []byte) error { + var in jsonNetgroup + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Cn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) + } + out.Cn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Description != nil { + raw := in.Description + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Description = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Description = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Nisdomainname != nil { + raw := in.Nisdomainname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Nisdomainname = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Nisdomainname = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Nisdomainname: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Nisdomainname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipauniqueid != nil { + raw := in.Ipauniqueid + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipauniqueid = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipauniqueid = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipauniqueid: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipauniqueid: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Usercategory != nil { + raw := in.Usercategory + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Usercategory = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Usercategory = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Usercategory: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Usercategory: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Hostcategory != nil { + raw := in.Hostcategory + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Hostcategory = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Hostcategory = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Hostcategory: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Hostcategory: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Externalhost != nil { + raw := in.Externalhost + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Externalhost = &[]string{plainV} + } else if sliceOk { + + out.Externalhost = &sliceV + } else { + return fmt.Errorf("unexpected value for field Externalhost: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberNetgroup != nil { + raw := in.MemberNetgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberNetgroup = &[]string{plainV} + } else if sliceOk { + + out.MemberNetgroup = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberNetgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofNetgroup != nil { + raw := in.MemberofNetgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofNetgroup = &[]string{plainV} + } else if sliceOk { + + out.MemberofNetgroup = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberofNetgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberindirectNetgroup != nil { + raw := in.MemberindirectNetgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberindirectNetgroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberindirectNetgroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberindirectNetgroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberindirectNetgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberuserUser != nil { + raw := in.MemberuserUser + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberuserUser = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberuserUser = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberuserUser: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberuserUser: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberuserGroup != nil { + raw := in.MemberuserGroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberuserGroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberuserGroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberuserGroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberuserGroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberhostHost != nil { + raw := in.MemberhostHost + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberhostHost = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberhostHost = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberhostHost: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberhostHost: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberhostHostgroup != nil { + raw := in.MemberhostHostgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberhostHostgroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberhostHostgroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberhostHostgroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberhostHostgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - if plainOk { - out.Username = &plainV - } else if sliceOk { +type Otpconfig struct { + + /* +TOTP authentication Window +TOTP authentication time variance (seconds) + */ + Ipatokentotpauthwindow int `json:"ipatokentotpauthwindow,omitempty"` + + /* +TOTP Synchronization Window +TOTP synchronization time variance (seconds) + */ + Ipatokentotpsyncwindow int `json:"ipatokentotpsyncwindow,omitempty"` + + /* +HOTP Authentication Window +HOTP authentication skip-ahead + */ + Ipatokenhotpauthwindow int `json:"ipatokenhotpauthwindow,omitempty"` + + /* +HOTP Synchronization Window +HOTP synchronization skip-ahead + */ + Ipatokenhotpsyncwindow int `json:"ipatokenhotpsyncwindow,omitempty"` + } - if len(sliceV) == 1 { - out.Username = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Username: %v; expected at most one element", raw) - } +func (t *Otpconfig) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Otpconfig[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Otpconfig%v", string(b)) +} - } else { - return fmt.Errorf("unexpected value for field Username: %v (%v)", raw, reflect.TypeOf(raw)) - } +type jsonOtpconfig struct { + + Ipatokentotpauthwindow interface{} `json:"ipatokentotpauthwindow"` + + Ipatokentotpsyncwindow interface{} `json:"ipatokentotpsyncwindow"` + + Ipatokenhotpauthwindow interface{} `json:"ipatokenhotpauthwindow"` + + Ipatokenhotpsyncwindow interface{} `json:"ipatokenhotpsyncwindow"` + } - } +func (out *Otpconfig) UnmarshalJSON(data []byte) error { + var in jsonOtpconfig + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Ipatokentotpauthwindow + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Ipatokentotpauthwindow: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Ipatokentotpauthwindow = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipatokentotpauthwindow: %v; expected exactly one element", raw) + } + out.Ipatokentotpauthwindow = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipatokentotpauthwindow: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Ipatokentotpsyncwindow + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Ipatokentotpsyncwindow: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Ipatokentotpsyncwindow = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipatokentotpsyncwindow: %v; expected exactly one element", raw) + } + out.Ipatokentotpsyncwindow = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipatokentotpsyncwindow: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Ipatokenhotpauthwindow + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Ipatokenhotpauthwindow: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Ipatokenhotpauthwindow = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipatokenhotpauthwindow: %v; expected exactly one element", raw) + } + out.Ipatokenhotpauthwindow = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipatokenhotpauthwindow: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Ipatokenhotpsyncwindow + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Ipatokenhotpsyncwindow: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Ipatokenhotpsyncwindow = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipatokenhotpsyncwindow: %v; expected exactly one element", raw) + } + out.Ipatokenhotpsyncwindow = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipatokenhotpsyncwindow: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - if in.MemberUser != nil { - raw := in.MemberUser - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +type Otptoken struct { + + /* +Unique ID + + */ + Ipatokenuniqueid string `json:"ipatokenuniqueid,omitempty"` + + /* +Type +Type of the token + */ + Type *string `json:"type,omitempty"` + + /* +Description +Token description (informational only) + */ + Description *string `json:"description,omitempty"` + + /* +Owner +Assigned user of the token (default: self) + */ + Ipatokenowner *string `json:"ipatokenowner,omitempty"` + + /* +Manager +Assigned manager of the token (default: self) + */ + ManagedbyUser *string `json:"managedby_user,omitempty"` + + /* +Disabled +Mark the token as disabled (default: false) + */ + Ipatokendisabled *bool `json:"ipatokendisabled,omitempty"` + + /* +Validity start +First date/time the token can be used + */ + Ipatokennotbefore *time.Time `json:"ipatokennotbefore,omitempty"` + + /* +Validity end +Last date/time the token can be used + */ + Ipatokennotafter *time.Time `json:"ipatokennotafter,omitempty"` + + /* +Vendor +Token vendor name (informational only) + */ + Ipatokenvendor *string `json:"ipatokenvendor,omitempty"` + + /* +Model +Token model (informational only) + */ + Ipatokenmodel *string `json:"ipatokenmodel,omitempty"` + + /* +Serial +Token serial (informational only) + */ + Ipatokenserial *string `json:"ipatokenserial,omitempty"` + + /* +Key +Token secret (Base32; default: random) + */ + Ipatokenotpkey *string `json:"ipatokenotpkey,omitempty"` + + /* +Algorithm +Token hash algorithm + */ + Ipatokenotpalgorithm *string `json:"ipatokenotpalgorithm,omitempty"` + + /* +Digits +Number of digits each token code will have + */ + Ipatokenotpdigits *int `json:"ipatokenotpdigits,omitempty"` + + /* +Clock offset +TOTP token / FreeIPA server time difference + */ + Ipatokentotpclockoffset *int `json:"ipatokentotpclockoffset,omitempty"` + + /* +Clock interval +Length of TOTP token code validity + */ + Ipatokentotptimestep *int `json:"ipatokentotptimestep,omitempty"` + + /* +Counter +Initial counter for the HOTP token + */ + Ipatokenhotpcounter *int `json:"ipatokenhotpcounter,omitempty"` + + /* +URI + + */ + URI *string `json:"uri,omitempty"` + } - itemV, itemOk := rawItem.(string) +func (t *Otptoken) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Otptoken[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Otptoken%v", string(b)) +} - if !itemOk { - sliceOk = false - break - } +type jsonOtptoken struct { + + Ipatokenuniqueid interface{} `json:"ipatokenuniqueid"` + + Type interface{} `json:"type"` + + Description interface{} `json:"description"` + + Ipatokenowner interface{} `json:"ipatokenowner"` + + ManagedbyUser interface{} `json:"managedby_user"` + + Ipatokendisabled interface{} `json:"ipatokendisabled"` + + Ipatokennotbefore interface{} `json:"ipatokennotbefore"` + + Ipatokennotafter interface{} `json:"ipatokennotafter"` + + Ipatokenvendor interface{} `json:"ipatokenvendor"` + + Ipatokenmodel interface{} `json:"ipatokenmodel"` + + Ipatokenserial interface{} `json:"ipatokenserial"` + + Ipatokenotpkey interface{} `json:"ipatokenotpkey"` + + Ipatokenotpalgorithm interface{} `json:"ipatokenotpalgorithm"` + + Ipatokenotpdigits interface{} `json:"ipatokenotpdigits"` + + Ipatokentotpclockoffset interface{} `json:"ipatokentotpclockoffset"` + + Ipatokentotptimestep interface{} `json:"ipatokentotptimestep"` + + Ipatokenhotpcounter interface{} `json:"ipatokenhotpcounter"` + + URI interface{} `json:"uri"` + } - sliceV = append(sliceV, itemV) +func (out *Otptoken) UnmarshalJSON(data []byte) error { + var in jsonOtptoken + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Ipatokenuniqueid + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipatokenuniqueid = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipatokenuniqueid: %v; expected exactly one element", raw) + } + out.Ipatokenuniqueid = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipatokenuniqueid: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Type != nil { + raw := in.Type + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Type = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Type = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Type: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Type: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Description != nil { + raw := in.Description + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Description = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Description = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipatokenowner != nil { + raw := in.Ipatokenowner + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipatokenowner = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipatokenowner = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipatokenowner: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipatokenowner: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.ManagedbyUser != nil { + raw := in.ManagedbyUser + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.ManagedbyUser = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.ManagedbyUser = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field ManagedbyUser: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field ManagedbyUser: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipatokendisabled != nil { + raw := in.Ipatokendisabled + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipatokendisabled = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipatokendisabled = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipatokendisabled: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipatokendisabled: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipatokennotbefore != nil { + raw := in.Ipatokennotbefore + plainV, plainOk := raw.(time.Time) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []time.Time + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(time.Time) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipatokennotbefore = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipatokennotbefore = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipatokennotbefore: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipatokennotbefore: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipatokennotafter != nil { + raw := in.Ipatokennotafter + plainV, plainOk := raw.(time.Time) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []time.Time + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(time.Time) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipatokennotafter = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipatokennotafter = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipatokennotafter: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipatokennotafter: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipatokenvendor != nil { + raw := in.Ipatokenvendor + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipatokenvendor = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipatokenvendor = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipatokenvendor: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipatokenvendor: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipatokenmodel != nil { + raw := in.Ipatokenmodel + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipatokenmodel = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipatokenmodel = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipatokenmodel: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipatokenmodel: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipatokenserial != nil { + raw := in.Ipatokenserial + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipatokenserial = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipatokenserial = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipatokenserial: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipatokenserial: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipatokenotpkey != nil { + raw := in.Ipatokenotpkey + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipatokenotpkey = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipatokenotpkey = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipatokenotpkey: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipatokenotpkey: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipatokenotpalgorithm != nil { + raw := in.Ipatokenotpalgorithm + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipatokenotpalgorithm = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipatokenotpalgorithm = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipatokenotpalgorithm: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipatokenotpalgorithm: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipatokenotpdigits != nil { + raw := in.Ipatokenotpdigits + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Ipatokenotpdigits: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Ipatokenotpdigits = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipatokenotpdigits = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipatokenotpdigits: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipatokenotpdigits: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipatokentotpclockoffset != nil { + raw := in.Ipatokentotpclockoffset + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Ipatokentotpclockoffset: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Ipatokentotpclockoffset = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipatokentotpclockoffset = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipatokentotpclockoffset: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipatokentotpclockoffset: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipatokentotptimestep != nil { + raw := in.Ipatokentotptimestep + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Ipatokentotptimestep: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Ipatokentotptimestep = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipatokentotptimestep = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipatokentotptimestep: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipatokentotptimestep: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipatokenhotpcounter != nil { + raw := in.Ipatokenhotpcounter + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Ipatokenhotpcounter: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Ipatokenhotpcounter = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipatokenhotpcounter = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipatokenhotpcounter: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipatokenhotpcounter: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.URI != nil { + raw := in.URI + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.URI = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.URI = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field URI: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field URI: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - } - } +type Output struct { + + /* +Name + + */ + Name string `json:"name,omitempty"` + + /* +Documentation + + */ + Doc *string `json:"doc,omitempty"` + + /* +Exclude from + + */ + Exclude *[]string `json:"exclude,omitempty"` + + /* +Include in + + */ + Include *[]string `json:"include,omitempty"` + + /* +Type + + */ + Type *string `json:"type,omitempty"` + + /* +Required + + */ + Required *bool `json:"required,omitempty"` + + /* +Multi-value + + */ + Multivalue *bool `json:"multivalue,omitempty"` + } - if plainOk { - out.MemberUser = &[]string{plainV} - } else if sliceOk { +func (t *Output) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Output[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Output%v", string(b)) +} - out.MemberUser = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberUser: %v (%v)", raw, reflect.TypeOf(raw)) - } +type jsonOutput struct { + + Name interface{} `json:"name"` + + Doc interface{} `json:"doc"` + + Exclude interface{} `json:"exclude"` + + Include interface{} `json:"include"` + + Type interface{} `json:"type"` + + Required interface{} `json:"required"` + + Multivalue interface{} `json:"multivalue"` + } - } +func (out *Output) UnmarshalJSON(data []byte) error { + var in jsonOutput + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Name + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Name = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Name: %v; expected exactly one element", raw) + } + out.Name = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Name: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Doc != nil { + raw := in.Doc + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Doc = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Doc = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Doc: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Doc: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Exclude != nil { + raw := in.Exclude + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Exclude = &[]string{plainV} + } else if sliceOk { + + out.Exclude = &sliceV + } else { + return fmt.Errorf("unexpected value for field Exclude: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Include != nil { + raw := in.Include + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Include = &[]string{plainV} + } else if sliceOk { + + out.Include = &sliceV + } else { + return fmt.Errorf("unexpected value for field Include: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Type != nil { + raw := in.Type + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Type = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Type = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Type: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Type: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Required != nil { + raw := in.Required + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Required = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Required = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Required: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Required: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Multivalue != nil { + raw := in.Multivalue + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Multivalue = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Multivalue = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Multivalue: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Multivalue: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - if in.MemberGroup != nil { - raw := in.MemberGroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +type Param struct { + + /* +Name + + */ + Name string `json:"name,omitempty"` + + /* +Documentation + + */ + Doc *string `json:"doc,omitempty"` + + /* +Exclude from + + */ + Exclude *[]string `json:"exclude,omitempty"` + + /* +Include in + + */ + Include *[]string `json:"include,omitempty"` + + /* +Type + + */ + Type *string `json:"type,omitempty"` + + /* +Required + + */ + Required *bool `json:"required,omitempty"` + + /* +Multi-value + + */ + Multivalue *bool `json:"multivalue,omitempty"` + + /* +Always ask + + */ + Alwaysask *bool `json:"alwaysask,omitempty"` + + /* +CLI metavar + + */ + CliMetavar *string `json:"cli_metavar,omitempty"` + + /* +CLI name + + */ + CliName *string `json:"cli_name,omitempty"` + + /* +Confirm (password) + + */ + Confirm *bool `json:"confirm,omitempty"` + + /* +Default + + */ + Default *[]string `json:"default,omitempty"` + + /* +Default from + + */ + DefaultFromParam *[]string `json:"default_from_param,omitempty"` + + /* +Label + + */ + Label *string `json:"label,omitempty"` + + /* +Convert on server + + */ + NoConvert *bool `json:"no_convert,omitempty"` + + /* +Option group + + */ + OptionGroup *string `json:"option_group,omitempty"` + + /* +Sensitive + + */ + Sensitive *bool `json:"sensitive,omitempty"` + + /* +Positional argument + + */ + Positional *bool `json:"positional,omitempty"` + } - itemV, itemOk := rawItem.(string) +func (t *Param) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Param[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Param%v", string(b)) +} - if !itemOk { - sliceOk = false - break - } +type jsonParam struct { + + Name interface{} `json:"name"` + + Doc interface{} `json:"doc"` + + Exclude interface{} `json:"exclude"` + + Include interface{} `json:"include"` + + Type interface{} `json:"type"` + + Required interface{} `json:"required"` + + Multivalue interface{} `json:"multivalue"` + + Alwaysask interface{} `json:"alwaysask"` + + CliMetavar interface{} `json:"cli_metavar"` + + CliName interface{} `json:"cli_name"` + + Confirm interface{} `json:"confirm"` + + Default interface{} `json:"default"` + + DefaultFromParam interface{} `json:"default_from_param"` + + Label interface{} `json:"label"` + + NoConvert interface{} `json:"no_convert"` + + OptionGroup interface{} `json:"option_group"` + + Sensitive interface{} `json:"sensitive"` + + Positional interface{} `json:"positional"` + } - sliceV = append(sliceV, itemV) +func (out *Param) UnmarshalJSON(data []byte) error { + var in jsonParam + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Name + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Name = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Name: %v; expected exactly one element", raw) + } + out.Name = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Name: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Doc != nil { + raw := in.Doc + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Doc = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Doc = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Doc: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Doc: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Exclude != nil { + raw := in.Exclude + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Exclude = &[]string{plainV} + } else if sliceOk { + + out.Exclude = &sliceV + } else { + return fmt.Errorf("unexpected value for field Exclude: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Include != nil { + raw := in.Include + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Include = &[]string{plainV} + } else if sliceOk { + + out.Include = &sliceV + } else { + return fmt.Errorf("unexpected value for field Include: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Type != nil { + raw := in.Type + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Type = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Type = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Type: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Type: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Required != nil { + raw := in.Required + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Required = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Required = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Required: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Required: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Multivalue != nil { + raw := in.Multivalue + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Multivalue = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Multivalue = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Multivalue: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Multivalue: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Alwaysask != nil { + raw := in.Alwaysask + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Alwaysask = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Alwaysask = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Alwaysask: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Alwaysask: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.CliMetavar != nil { + raw := in.CliMetavar + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.CliMetavar = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.CliMetavar = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field CliMetavar: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field CliMetavar: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.CliName != nil { + raw := in.CliName + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.CliName = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.CliName = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field CliName: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field CliName: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Confirm != nil { + raw := in.Confirm + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Confirm = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Confirm = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Confirm: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Confirm: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Default != nil { + raw := in.Default + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Default = &[]string{plainV} + } else if sliceOk { + + out.Default = &sliceV + } else { + return fmt.Errorf("unexpected value for field Default: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.DefaultFromParam != nil { + raw := in.DefaultFromParam + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.DefaultFromParam = &[]string{plainV} + } else if sliceOk { + + out.DefaultFromParam = &sliceV + } else { + return fmt.Errorf("unexpected value for field DefaultFromParam: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Label != nil { + raw := in.Label + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Label = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Label = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Label: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Label: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.NoConvert != nil { + raw := in.NoConvert + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.NoConvert = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.NoConvert = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field NoConvert: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field NoConvert: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.OptionGroup != nil { + raw := in.OptionGroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.OptionGroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.OptionGroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field OptionGroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field OptionGroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Sensitive != nil { + raw := in.Sensitive + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Sensitive = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Sensitive = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Sensitive: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Sensitive: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Positional != nil { + raw := in.Positional + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Positional = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Positional = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Positional: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Positional: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - } - } +type Permission struct { + + /* +Permission name + + */ + Cn string `json:"cn,omitempty"` + + /* +Granted rights +Rights to grant (read, search, compare, write, add, delete, all) + */ + Ipapermright *[]string `json:"ipapermright,omitempty"` + + /* +Effective attributes +All attributes to which the permission applies + */ + Attrs *[]string `json:"attrs,omitempty"` + + /* +Included attributes +User-specified attributes to which the permission applies + */ + Ipapermincludedattr *[]string `json:"ipapermincludedattr,omitempty"` + + /* +Excluded attributes +User-specified attributes to which the permission explicitly does not apply + */ + Ipapermexcludedattr *[]string `json:"ipapermexcludedattr,omitempty"` + + /* +Default attributes +Attributes to which the permission applies by default + */ + Ipapermdefaultattr *[]string `json:"ipapermdefaultattr,omitempty"` + + /* +Bind rule type +Bind rule type + */ + Ipapermbindruletype string `json:"ipapermbindruletype,omitempty"` + + /* +Subtree +Subtree to apply permissions to + */ + Ipapermlocation *string `json:"ipapermlocation,omitempty"` + + /* +Extra target filter +Extra target filter + */ + Extratargetfilter *[]string `json:"extratargetfilter,omitempty"` + + /* +Raw target filter +All target filters, including those implied by type and memberof + */ + Ipapermtargetfilter *[]string `json:"ipapermtargetfilter,omitempty"` + + /* +Target DN +Optional DN to apply the permission to (must be in the subtree, but may not yet exist) + */ + Ipapermtarget *string `json:"ipapermtarget,omitempty"` + + /* +Target DN subtree +Optional DN subtree where an entry can be moved to (must be in the subtree, but may not yet exist) + */ + Ipapermtargetto *string `json:"ipapermtargetto,omitempty"` + + /* +Origin DN subtree +Optional DN subtree from where an entry can be moved (must be in the subtree, but may not yet exist) + */ + Ipapermtargetfrom *string `json:"ipapermtargetfrom,omitempty"` + + /* +Member of group +Target members of a group (sets memberOf targetfilter) + */ + Memberof *[]string `json:"memberof,omitempty"` + + /* +Target group +User group to apply permissions to (sets target) + */ + Targetgroup *string `json:"targetgroup,omitempty"` + + /* +Type +Type of IPA object (sets subtree and objectClass targetfilter) + */ + Type *string `json:"type,omitempty"` + + /* + +Deprecated; use extratargetfilter + */ + Filter *[]string `json:"filter,omitempty"` + + /* + +Deprecated; use ipapermlocation + */ + Subtree *[]string `json:"subtree,omitempty"` + + /* + +Deprecated; use ipapermright + */ + Permissions *[]string `json:"permissions,omitempty"` + + /* +Permission flags + + */ + Ipapermissiontype []string `json:"ipapermissiontype,omitempty"` + + /* +ACI + + */ + Aci string `json:"aci,omitempty"` + + /* +Granted to Privilege + + */ + MemberPrivilege *[]string `json:"member_privilege,omitempty"` + + /* +Indirect Member of roles + + */ + MemberindirectRole *string `json:"memberindirect_role,omitempty"` + } - if plainOk { - out.MemberGroup = &[]string{plainV} - } else if sliceOk { +func (t *Permission) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Permission[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Permission%v", string(b)) +} - out.MemberGroup = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberGroup: %v (%v)", raw, reflect.TypeOf(raw)) - } +type jsonPermission struct { + + Cn interface{} `json:"cn"` + + Ipapermright interface{} `json:"ipapermright"` + + Attrs interface{} `json:"attrs"` + + Ipapermincludedattr interface{} `json:"ipapermincludedattr"` + + Ipapermexcludedattr interface{} `json:"ipapermexcludedattr"` + + Ipapermdefaultattr interface{} `json:"ipapermdefaultattr"` + + Ipapermbindruletype interface{} `json:"ipapermbindruletype"` + + Ipapermlocation interface{} `json:"ipapermlocation"` + + Extratargetfilter interface{} `json:"extratargetfilter"` + + Ipapermtargetfilter interface{} `json:"ipapermtargetfilter"` + + Ipapermtarget interface{} `json:"ipapermtarget"` + + Ipapermtargetto interface{} `json:"ipapermtargetto"` + + Ipapermtargetfrom interface{} `json:"ipapermtargetfrom"` + + Memberof interface{} `json:"memberof"` + + Targetgroup interface{} `json:"targetgroup"` + + Type interface{} `json:"type"` + + Filter interface{} `json:"filter"` + + Subtree interface{} `json:"subtree"` + + Permissions interface{} `json:"permissions"` + + Ipapermissiontype interface{} `json:"ipapermissiontype"` + + Aci interface{} `json:"aci"` + + MemberPrivilege interface{} `json:"member_privilege"` + + MemberindirectRole interface{} `json:"memberindirect_role"` + } - } +func (out *Permission) UnmarshalJSON(data []byte) error { + var in jsonPermission + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Cn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) + } + out.Cn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipapermright != nil { + raw := in.Ipapermright + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipapermright = &[]string{plainV} + } else if sliceOk { + + out.Ipapermright = &sliceV + } else { + return fmt.Errorf("unexpected value for field Ipapermright: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Attrs != nil { + raw := in.Attrs + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Attrs = &[]string{plainV} + } else if sliceOk { + + out.Attrs = &sliceV + } else { + return fmt.Errorf("unexpected value for field Attrs: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipapermincludedattr != nil { + raw := in.Ipapermincludedattr + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipapermincludedattr = &[]string{plainV} + } else if sliceOk { + + out.Ipapermincludedattr = &sliceV + } else { + return fmt.Errorf("unexpected value for field Ipapermincludedattr: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipapermexcludedattr != nil { + raw := in.Ipapermexcludedattr + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipapermexcludedattr = &[]string{plainV} + } else if sliceOk { + + out.Ipapermexcludedattr = &sliceV + } else { + return fmt.Errorf("unexpected value for field Ipapermexcludedattr: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipapermdefaultattr != nil { + raw := in.Ipapermdefaultattr + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipapermdefaultattr = &[]string{plainV} + } else if sliceOk { + + out.Ipapermdefaultattr = &sliceV + } else { + return fmt.Errorf("unexpected value for field Ipapermdefaultattr: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Ipapermbindruletype + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipapermbindruletype = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipapermbindruletype: %v; expected exactly one element", raw) + } + out.Ipapermbindruletype = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipapermbindruletype: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipapermlocation != nil { + raw := in.Ipapermlocation + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipapermlocation = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipapermlocation = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipapermlocation: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipapermlocation: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Extratargetfilter != nil { + raw := in.Extratargetfilter + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Extratargetfilter = &[]string{plainV} + } else if sliceOk { + + out.Extratargetfilter = &sliceV + } else { + return fmt.Errorf("unexpected value for field Extratargetfilter: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipapermtargetfilter != nil { + raw := in.Ipapermtargetfilter + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipapermtargetfilter = &[]string{plainV} + } else if sliceOk { + + out.Ipapermtargetfilter = &sliceV + } else { + return fmt.Errorf("unexpected value for field Ipapermtargetfilter: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipapermtarget != nil { + raw := in.Ipapermtarget + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipapermtarget = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipapermtarget = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipapermtarget: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipapermtarget: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipapermtargetto != nil { + raw := in.Ipapermtargetto + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipapermtargetto = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipapermtargetto = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipapermtargetto: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipapermtargetto: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipapermtargetfrom != nil { + raw := in.Ipapermtargetfrom + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipapermtargetfrom = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipapermtargetfrom = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipapermtargetfrom: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipapermtargetfrom: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Memberof != nil { + raw := in.Memberof + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Memberof = &[]string{plainV} + } else if sliceOk { + + out.Memberof = &sliceV + } else { + return fmt.Errorf("unexpected value for field Memberof: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Targetgroup != nil { + raw := in.Targetgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Targetgroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Targetgroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Targetgroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Targetgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Type != nil { + raw := in.Type + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Type = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Type = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Type: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Type: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Filter != nil { + raw := in.Filter + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Filter = &[]string{plainV} + } else if sliceOk { + + out.Filter = &sliceV + } else { + return fmt.Errorf("unexpected value for field Filter: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Subtree != nil { + raw := in.Subtree + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Subtree = &[]string{plainV} + } else if sliceOk { + + out.Subtree = &sliceV + } else { + return fmt.Errorf("unexpected value for field Subtree: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Permissions != nil { + raw := in.Permissions + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Permissions = &[]string{plainV} + } else if sliceOk { + + out.Permissions = &sliceV + } else { + return fmt.Errorf("unexpected value for field Permissions: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Ipapermissiontype + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipapermissiontype = []string{plainV} + } else if sliceOk { + + if len(sliceV) < 1 { + return fmt.Errorf("unexpected value for field Ipapermissiontype: %v; expected at least one element", raw) + } + + out.Ipapermissiontype = sliceV + } else { + return fmt.Errorf("unexpected value for field Ipapermissiontype: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Aci + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Aci = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Aci: %v; expected exactly one element", raw) + } + out.Aci = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Aci: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberPrivilege != nil { + raw := in.MemberPrivilege + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberPrivilege = &[]string{plainV} + } else if sliceOk { + + out.MemberPrivilege = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberPrivilege: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberindirectRole != nil { + raw := in.MemberindirectRole + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberindirectRole = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberindirectRole = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberindirectRole: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberindirectRole: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - if in.MemberService != nil { - raw := in.MemberService - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +type Pkinit struct { + + /* +Server name +IPA server hostname + */ + ServerServer *string `json:"server_server,omitempty"` + + /* +PKINIT status +Whether PKINIT is enabled or disabled + */ + Status *string `json:"status,omitempty"` + } - itemV, itemOk := rawItem.(string) +func (t *Pkinit) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Pkinit[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Pkinit%v", string(b)) +} - if !itemOk { - sliceOk = false - break - } +type jsonPkinit struct { + + ServerServer interface{} `json:"server_server"` + + Status interface{} `json:"status"` + } - sliceV = append(sliceV, itemV) +func (out *Pkinit) UnmarshalJSON(data []byte) error { + var in jsonPkinit + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if in.ServerServer != nil { + raw := in.ServerServer + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.ServerServer = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.ServerServer = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field ServerServer: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field ServerServer: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Status != nil { + raw := in.Status + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Status = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Status = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Status: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Status: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - } - } +type Privilege struct { + + /* +Privilege name + + */ + Cn string `json:"cn,omitempty"` + + /* +Description +Privilege description + */ + Description *string `json:"description,omitempty"` + + /* +Permissions + + */ + MemberofPermission *[]string `json:"memberof_permission,omitempty"` + + /* +Granting privilege to roles + + */ + MemberRole *[]string `json:"member_role,omitempty"` + } - if plainOk { - out.MemberService = &[]string{plainV} - } else if sliceOk { +func (t *Privilege) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Privilege[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Privilege%v", string(b)) +} - out.MemberService = &sliceV - } else { - return fmt.Errorf("unexpected value for field MemberService: %v (%v)", raw, reflect.TypeOf(raw)) - } +type jsonPrivilege struct { + + Cn interface{} `json:"cn"` + + Description interface{} `json:"description"` + + MemberofPermission interface{} `json:"memberof_permission"` + + MemberRole interface{} `json:"member_role"` + } - } - return nil +func (out *Privilege) UnmarshalJSON(data []byte) error { + var in jsonPrivilege + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Cn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) + } + out.Cn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Description != nil { + raw := in.Description + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Description = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Description = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofPermission != nil { + raw := in.MemberofPermission + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofPermission = &[]string{plainV} + } else if sliceOk { + + out.MemberofPermission = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberofPermission: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberRole != nil { + raw := in.MemberRole + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberRole = &[]string{plainV} + } else if sliceOk { + + out.MemberRole = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberRole: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil } -type Vaultconfig struct { +type Pwpolicy struct { + + /* +Group +Manage password policy for specific group + */ + Cn *string `json:"cn,omitempty"` + + /* +Max lifetime (days) +Maximum password lifetime (in days) + */ + Krbmaxpwdlife *int `json:"krbmaxpwdlife,omitempty"` + + /* +Min lifetime (hours) +Minimum password lifetime (in hours) + */ + Krbminpwdlife *int `json:"krbminpwdlife,omitempty"` + + /* +History size +Password history size + */ + Krbpwdhistorylength *int `json:"krbpwdhistorylength,omitempty"` + + /* +Character classes +Minimum number of character classes + */ + Krbpwdmindiffchars *int `json:"krbpwdmindiffchars,omitempty"` + + /* +Min length +Minimum length of password + */ + Krbpwdminlength *int `json:"krbpwdminlength,omitempty"` + + /* +Priority +Priority of the policy (higher number means lower priority + */ + Cospriority int `json:"cospriority,omitempty"` + + /* +Max failures +Consecutive failures before lockout + */ + Krbpwdmaxfailure *int `json:"krbpwdmaxfailure,omitempty"` + + /* +Failure reset interval +Period after which failure count will be reset (seconds) + */ + Krbpwdfailurecountinterval *int `json:"krbpwdfailurecountinterval,omitempty"` + + /* +Lockout duration +Period for which lockout is enforced (seconds) + */ + Krbpwdlockoutduration *int `json:"krbpwdlockoutduration,omitempty"` + } - /* - Transport Certificate +func (t *Pwpolicy) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Pwpolicy[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Pwpolicy%v", string(b)) +} - */ - TransportCert string `json:"transport_cert,omitempty"` +type jsonPwpolicy struct { + + Cn interface{} `json:"cn"` + + Krbmaxpwdlife interface{} `json:"krbmaxpwdlife"` + + Krbminpwdlife interface{} `json:"krbminpwdlife"` + + Krbpwdhistorylength interface{} `json:"krbpwdhistorylength"` + + Krbpwdmindiffchars interface{} `json:"krbpwdmindiffchars"` + + Krbpwdminlength interface{} `json:"krbpwdminlength"` + + Cospriority interface{} `json:"cospriority"` + + Krbpwdmaxfailure interface{} `json:"krbpwdmaxfailure"` + + Krbpwdfailurecountinterval interface{} `json:"krbpwdfailurecountinterval"` + + Krbpwdlockoutduration interface{} `json:"krbpwdlockoutduration"` + } - /* - IPA KRA servers - IPA servers configured as key recovery agents - */ - KraServerServer *[]string `json:"kra_server_server,omitempty"` +func (out *Pwpolicy) UnmarshalJSON(data []byte) error { + var in jsonPwpolicy + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if in.Cn != nil { + raw := in.Cn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cn = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Cn = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Cn: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Krbmaxpwdlife != nil { + raw := in.Krbmaxpwdlife + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Krbmaxpwdlife: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Krbmaxpwdlife = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Krbmaxpwdlife = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Krbmaxpwdlife: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Krbmaxpwdlife: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Krbminpwdlife != nil { + raw := in.Krbminpwdlife + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Krbminpwdlife: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Krbminpwdlife = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Krbminpwdlife = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Krbminpwdlife: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Krbminpwdlife: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Krbpwdhistorylength != nil { + raw := in.Krbpwdhistorylength + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Krbpwdhistorylength: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Krbpwdhistorylength = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Krbpwdhistorylength = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Krbpwdhistorylength: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Krbpwdhistorylength: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Krbpwdmindiffchars != nil { + raw := in.Krbpwdmindiffchars + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Krbpwdmindiffchars: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Krbpwdmindiffchars = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Krbpwdmindiffchars = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Krbpwdmindiffchars: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Krbpwdmindiffchars: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Krbpwdminlength != nil { + raw := in.Krbpwdminlength + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Krbpwdminlength: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Krbpwdminlength = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Krbpwdminlength = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Krbpwdminlength: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Krbpwdminlength: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Cospriority + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Cospriority: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Cospriority = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Cospriority: %v; expected exactly one element", raw) + } + out.Cospriority = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Cospriority: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Krbpwdmaxfailure != nil { + raw := in.Krbpwdmaxfailure + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Krbpwdmaxfailure: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Krbpwdmaxfailure = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Krbpwdmaxfailure = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Krbpwdmaxfailure: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Krbpwdmaxfailure: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Krbpwdfailurecountinterval != nil { + raw := in.Krbpwdfailurecountinterval + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Krbpwdfailurecountinterval: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Krbpwdfailurecountinterval = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Krbpwdfailurecountinterval = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Krbpwdfailurecountinterval: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Krbpwdfailurecountinterval: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Krbpwdlockoutduration != nil { + raw := in.Krbpwdlockoutduration + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Krbpwdlockoutduration: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Krbpwdlockoutduration = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Krbpwdlockoutduration = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Krbpwdlockoutduration: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Krbpwdlockoutduration: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil } -func (t *Vaultconfig) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Vaultconfig[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Vaultconfig%v", string(b)) +type Radiusproxy struct { + + /* +RADIUS proxy server name + + */ + Cn string `json:"cn,omitempty"` + + /* +Description +A description of this RADIUS proxy server + */ + Description *string `json:"description,omitempty"` + + /* +Server +The hostname or IP (with or without port) + */ + Ipatokenradiusserver string `json:"ipatokenradiusserver,omitempty"` + + /* +Secret +The secret used to encrypt data + */ + Ipatokenradiussecret string `json:"ipatokenradiussecret,omitempty"` + + /* +Timeout +The total timeout across all retries (in seconds) + */ + Ipatokenradiustimeout *int `json:"ipatokenradiustimeout,omitempty"` + + /* +Retries +The number of times to retry authentication + */ + Ipatokenradiusretries *int `json:"ipatokenradiusretries,omitempty"` + + /* +User attribute +The username attribute on the user object + */ + Ipatokenusermapattribute *string `json:"ipatokenusermapattribute,omitempty"` + } + +func (t *Radiusproxy) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Radiusproxy[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Radiusproxy%v", string(b)) } -type jsonVaultconfig struct { - TransportCert interface{} `json:"transport_cert"` +type jsonRadiusproxy struct { + + Cn interface{} `json:"cn"` + + Description interface{} `json:"description"` + + Ipatokenradiusserver interface{} `json:"ipatokenradiusserver"` + + Ipatokenradiussecret interface{} `json:"ipatokenradiussecret"` + + Ipatokenradiustimeout interface{} `json:"ipatokenradiustimeout"` + + Ipatokenradiusretries interface{} `json:"ipatokenradiusretries"` + + Ipatokenusermapattribute interface{} `json:"ipatokenusermapattribute"` + } - KraServerServer interface{} `json:"kra_server_server"` +func (out *Radiusproxy) UnmarshalJSON(data []byte) error { + var in jsonRadiusproxy + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Cn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) + } + out.Cn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Description != nil { + raw := in.Description + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Description = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Description = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Ipatokenradiusserver + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipatokenradiusserver = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipatokenradiusserver: %v; expected exactly one element", raw) + } + out.Ipatokenradiusserver = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipatokenradiusserver: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Ipatokenradiussecret + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipatokenradiussecret = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipatokenradiussecret: %v; expected exactly one element", raw) + } + out.Ipatokenradiussecret = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipatokenradiussecret: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipatokenradiustimeout != nil { + raw := in.Ipatokenradiustimeout + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Ipatokenradiustimeout: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Ipatokenradiustimeout = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipatokenradiustimeout = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipatokenradiustimeout: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipatokenradiustimeout: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipatokenradiusretries != nil { + raw := in.Ipatokenradiusretries + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Ipatokenradiusretries: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Ipatokenradiusretries = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipatokenradiusretries = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipatokenradiusretries: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipatokenradiusretries: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipatokenusermapattribute != nil { + raw := in.Ipatokenusermapattribute + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipatokenusermapattribute = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipatokenusermapattribute = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipatokenusermapattribute: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipatokenusermapattribute: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil } -func (out *Vaultconfig) UnmarshalJSON(data []byte) error { - var in jsonVaultconfig - if e := json.Unmarshal(data, &in); e != nil { - return e - } +type Realmdomains struct { + + /* +Domain + + */ + Associateddomain []string `json:"associateddomain,omitempty"` + + /* +Add domain + + */ + AddDomain *string `json:"add_domain,omitempty"` + + /* +Delete domain + + */ + DelDomain *string `json:"del_domain,omitempty"` + } - if true { - raw := in.TransportCert - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +func (t *Realmdomains) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Realmdomains[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Realmdomains%v", string(b)) +} - itemV, itemOk := rawItem.(string) +type jsonRealmdomains struct { + + Associateddomain interface{} `json:"associateddomain"` + + AddDomain interface{} `json:"add_domain"` + + DelDomain interface{} `json:"del_domain"` + } - if !itemOk { - sliceOk = false - break - } +func (out *Realmdomains) UnmarshalJSON(data []byte) error { + var in jsonRealmdomains + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Associateddomain + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Associateddomain = []string{plainV} + } else if sliceOk { + + if len(sliceV) < 1 { + return fmt.Errorf("unexpected value for field Associateddomain: %v; expected at least one element", raw) + } + + out.Associateddomain = sliceV + } else { + return fmt.Errorf("unexpected value for field Associateddomain: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.AddDomain != nil { + raw := in.AddDomain + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.AddDomain = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.AddDomain = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field AddDomain: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field AddDomain: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.DelDomain != nil { + raw := in.DelDomain + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.DelDomain = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.DelDomain = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field DelDomain: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field DelDomain: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - sliceV = append(sliceV, itemV) +type Role struct { + + /* +Role name + + */ + Cn string `json:"cn,omitempty"` + + /* +Description +A description of this role-group + */ + Description *string `json:"description,omitempty"` + + /* +Member users + + */ + MemberUser *[]string `json:"member_user,omitempty"` + + /* +Member groups + + */ + MemberGroup *[]string `json:"member_group,omitempty"` + + /* +Member hosts + + */ + MemberHost *[]string `json:"member_host,omitempty"` + + /* +Member host-groups + + */ + MemberHostgroup *[]string `json:"member_hostgroup,omitempty"` + + /* +Privileges + + */ + MemberofPrivilege *[]string `json:"memberof_privilege,omitempty"` + + /* +Member services + + */ + MemberService *[]string `json:"member_service,omitempty"` + } - } - } +func (t *Role) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Role[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Role%v", string(b)) +} - if plainOk { - out.TransportCert = plainV - } else if sliceOk { +type jsonRole struct { + + Cn interface{} `json:"cn"` + + Description interface{} `json:"description"` + + MemberUser interface{} `json:"member_user"` + + MemberGroup interface{} `json:"member_group"` + + MemberHost interface{} `json:"member_host"` + + MemberHostgroup interface{} `json:"member_hostgroup"` + + MemberofPrivilege interface{} `json:"memberof_privilege"` + + MemberService interface{} `json:"member_service"` + } - if len(sliceV) != 1 { - return fmt.Errorf("unexpected value for field TransportCert: %v; expected exactly one element", raw) - } - out.TransportCert = sliceV[0] +func (out *Role) UnmarshalJSON(data []byte) error { + var in jsonRole + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Cn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) + } + out.Cn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Description != nil { + raw := in.Description + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Description = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Description = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberUser != nil { + raw := in.MemberUser + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberUser = &[]string{plainV} + } else if sliceOk { + + out.MemberUser = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberUser: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberGroup != nil { + raw := in.MemberGroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberGroup = &[]string{plainV} + } else if sliceOk { + + out.MemberGroup = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberGroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberHost != nil { + raw := in.MemberHost + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberHost = &[]string{plainV} + } else if sliceOk { + + out.MemberHost = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberHost: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberHostgroup != nil { + raw := in.MemberHostgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberHostgroup = &[]string{plainV} + } else if sliceOk { + + out.MemberHostgroup = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberHostgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofPrivilege != nil { + raw := in.MemberofPrivilege + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofPrivilege = &[]string{plainV} + } else if sliceOk { + + out.MemberofPrivilege = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberofPrivilege: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberService != nil { + raw := in.MemberService + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberService = &[]string{plainV} + } else if sliceOk { + + out.MemberService = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberService: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - } else { - return fmt.Errorf("unexpected value for field TransportCert: %v (%v)", raw, reflect.TypeOf(raw)) - } +type Selfservice struct { + + /* +Self-service name +Self-service name + */ + Aciname string `json:"aciname,omitempty"` + + /* +Permissions +Permissions to grant (read, write). Default is write. + */ + Permissions *[]string `json:"permissions,omitempty"` + + /* +Attributes +Attributes to which the permission applies. + */ + Attrs []string `json:"attrs,omitempty"` + + /* +ACI + + */ + Aci string `json:"aci,omitempty"` + } - } +func (t *Selfservice) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Selfservice[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Selfservice%v", string(b)) +} - if in.KraServerServer != nil { - raw := in.KraServerServer - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +type jsonSelfservice struct { + + Aciname interface{} `json:"aciname"` + + Permissions interface{} `json:"permissions"` + + Attrs interface{} `json:"attrs"` + + Aci interface{} `json:"aci"` + } - itemV, itemOk := rawItem.(string) +func (out *Selfservice) UnmarshalJSON(data []byte) error { + var in jsonSelfservice + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Aciname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Aciname = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Aciname: %v; expected exactly one element", raw) + } + out.Aciname = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Aciname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Permissions != nil { + raw := in.Permissions + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Permissions = &[]string{plainV} + } else if sliceOk { + + out.Permissions = &sliceV + } else { + return fmt.Errorf("unexpected value for field Permissions: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Attrs + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Attrs = []string{plainV} + } else if sliceOk { + + if len(sliceV) < 1 { + return fmt.Errorf("unexpected value for field Attrs: %v; expected at least one element", raw) + } + + out.Attrs = sliceV + } else { + return fmt.Errorf("unexpected value for field Attrs: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Aci + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Aci = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Aci: %v; expected exactly one element", raw) + } + out.Aci = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Aci: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - if !itemOk { - sliceOk = false - break - } +type Selinuxusermap struct { + + /* +Rule name + + */ + Cn string `json:"cn,omitempty"` + + /* +SELinux User + + */ + Ipaselinuxuser string `json:"ipaselinuxuser,omitempty"` + + /* +HBAC Rule +HBAC Rule that defines the users, groups and hostgroups + */ + Seealso *string `json:"seealso,omitempty"` + + /* +User category +User category the rule applies to + */ + Usercategory *string `json:"usercategory,omitempty"` + + /* +Host category +Host category the rule applies to + */ + Hostcategory *string `json:"hostcategory,omitempty"` + + /* +Description + + */ + Description *string `json:"description,omitempty"` + + /* +Enabled + + */ + Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` + + /* +Users + + */ + MemberuserUser *string `json:"memberuser_user,omitempty"` + + /* +User Groups + + */ + MemberuserGroup *string `json:"memberuser_group,omitempty"` + + /* +Hosts + + */ + MemberhostHost *string `json:"memberhost_host,omitempty"` + + /* +Host Groups + + */ + MemberhostHostgroup *string `json:"memberhost_hostgroup,omitempty"` + } - sliceV = append(sliceV, itemV) +func (t *Selinuxusermap) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Selinuxusermap[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Selinuxusermap%v", string(b)) +} - } - } +type jsonSelinuxusermap struct { + + Cn interface{} `json:"cn"` + + Ipaselinuxuser interface{} `json:"ipaselinuxuser"` + + Seealso interface{} `json:"seealso"` + + Usercategory interface{} `json:"usercategory"` + + Hostcategory interface{} `json:"hostcategory"` + + Description interface{} `json:"description"` + + Ipaenabledflag interface{} `json:"ipaenabledflag"` + + MemberuserUser interface{} `json:"memberuser_user"` + + MemberuserGroup interface{} `json:"memberuser_group"` + + MemberhostHost interface{} `json:"memberhost_host"` + + MemberhostHostgroup interface{} `json:"memberhost_hostgroup"` + } - if plainOk { - out.KraServerServer = &[]string{plainV} - } else if sliceOk { +func (out *Selinuxusermap) UnmarshalJSON(data []byte) error { + var in jsonSelinuxusermap + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Cn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) + } + out.Cn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Ipaselinuxuser + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipaselinuxuser = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipaselinuxuser: %v; expected exactly one element", raw) + } + out.Ipaselinuxuser = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipaselinuxuser: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Seealso != nil { + raw := in.Seealso + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Seealso = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Seealso = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Seealso: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Seealso: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Usercategory != nil { + raw := in.Usercategory + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Usercategory = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Usercategory = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Usercategory: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Usercategory: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Hostcategory != nil { + raw := in.Hostcategory + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Hostcategory = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Hostcategory = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Hostcategory: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Hostcategory: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Description != nil { + raw := in.Description + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Description = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Description = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipaenabledflag != nil { + raw := in.Ipaenabledflag + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipaenabledflag = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipaenabledflag = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipaenabledflag: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipaenabledflag: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberuserUser != nil { + raw := in.MemberuserUser + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberuserUser = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberuserUser = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberuserUser: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberuserUser: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberuserGroup != nil { + raw := in.MemberuserGroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberuserGroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberuserGroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberuserGroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberuserGroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberhostHost != nil { + raw := in.MemberhostHost + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberhostHost = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberhostHost = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberhostHost: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberhostHost: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberhostHostgroup != nil { + raw := in.MemberhostHostgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberhostHostgroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberhostHostgroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberhostHostgroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberhostHostgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - out.KraServerServer = &sliceV - } else { - return fmt.Errorf("unexpected value for field KraServerServer: %v (%v)", raw, reflect.TypeOf(raw)) - } +type Server struct { + + /* +Server name +IPA server hostname + */ + Cn string `json:"cn,omitempty"` + + /* + + + */ + Iparepltopomanagedsuffix *[]string `json:"iparepltopomanagedsuffix,omitempty"` + + /* +Managed suffixes + + */ + IparepltopomanagedsuffixTopologysuffix *[]string `json:"iparepltopomanagedsuffix_topologysuffix,omitempty"` + + /* +Min domain level +Minimum domain level + */ + Ipamindomainlevel int `json:"ipamindomainlevel,omitempty"` + + /* +Max domain level +Maximum domain level + */ + Ipamaxdomainlevel int `json:"ipamaxdomainlevel,omitempty"` + + /* +Location +Server location + */ + IpalocationLocation *string `json:"ipalocation_location,omitempty"` + + /* +Service weight +Weight for server services + */ + Ipaserviceweight *int `json:"ipaserviceweight,omitempty"` + + /* +Service relative weight +Relative weight for server services (counts per location) + */ + ServiceRelativeWeight string `json:"service_relative_weight,omitempty"` + + /* +Enabled server roles +List of enabled roles + */ + EnabledRoleServrole *[]string `json:"enabled_role_servrole,omitempty"` + } - } - return nil +func (t *Server) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Server[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Server%v", string(b)) } -type Vaultcontainer struct { - - /* - Owner users +type jsonServer struct { + + Cn interface{} `json:"cn"` + + Iparepltopomanagedsuffix interface{} `json:"iparepltopomanagedsuffix"` + + IparepltopomanagedsuffixTopologysuffix interface{} `json:"iparepltopomanagedsuffix_topologysuffix"` + + Ipamindomainlevel interface{} `json:"ipamindomainlevel"` + + Ipamaxdomainlevel interface{} `json:"ipamaxdomainlevel"` + + IpalocationLocation interface{} `json:"ipalocation_location"` + + Ipaserviceweight interface{} `json:"ipaserviceweight"` + + ServiceRelativeWeight interface{} `json:"service_relative_weight"` + + EnabledRoleServrole interface{} `json:"enabled_role_servrole"` + } - */ - OwnerUser *string `json:"owner_user,omitempty"` +func (out *Server) UnmarshalJSON(data []byte) error { + var in jsonServer + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Cn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) + } + out.Cn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Iparepltopomanagedsuffix != nil { + raw := in.Iparepltopomanagedsuffix + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Iparepltopomanagedsuffix = &[]string{plainV} + } else if sliceOk { + + out.Iparepltopomanagedsuffix = &sliceV + } else { + return fmt.Errorf("unexpected value for field Iparepltopomanagedsuffix: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.IparepltopomanagedsuffixTopologysuffix != nil { + raw := in.IparepltopomanagedsuffixTopologysuffix + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.IparepltopomanagedsuffixTopologysuffix = &[]string{plainV} + } else if sliceOk { + + out.IparepltopomanagedsuffixTopologysuffix = &sliceV + } else { + return fmt.Errorf("unexpected value for field IparepltopomanagedsuffixTopologysuffix: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Ipamindomainlevel + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Ipamindomainlevel: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Ipamindomainlevel = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipamindomainlevel: %v; expected exactly one element", raw) + } + out.Ipamindomainlevel = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipamindomainlevel: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Ipamaxdomainlevel + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Ipamaxdomainlevel: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Ipamaxdomainlevel = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipamaxdomainlevel: %v; expected exactly one element", raw) + } + out.Ipamaxdomainlevel = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipamaxdomainlevel: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.IpalocationLocation != nil { + raw := in.IpalocationLocation + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.IpalocationLocation = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.IpalocationLocation = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field IpalocationLocation: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field IpalocationLocation: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipaserviceweight != nil { + raw := in.Ipaserviceweight + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Ipaserviceweight: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Ipaserviceweight = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipaserviceweight = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipaserviceweight: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipaserviceweight: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.ServiceRelativeWeight + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.ServiceRelativeWeight = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field ServiceRelativeWeight: %v; expected exactly one element", raw) + } + out.ServiceRelativeWeight = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field ServiceRelativeWeight: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.EnabledRoleServrole != nil { + raw := in.EnabledRoleServrole + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.EnabledRoleServrole = &[]string{plainV} + } else if sliceOk { + + out.EnabledRoleServrole = &sliceV + } else { + return fmt.Errorf("unexpected value for field EnabledRoleServrole: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - /* - Owner groups +type ServerRole struct { + + /* +Server name +IPA server hostname + */ + ServerServer string `json:"server_server,omitempty"` + + /* +Role name +IPA server role name + */ + RoleServrole string `json:"role_servrole,omitempty"` + + /* +Role status +Status of the role + */ + Status *string `json:"status,omitempty"` + } - */ - OwnerGroup *string `json:"owner_group,omitempty"` +func (t *ServerRole) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("ServerRole[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("ServerRole%v", string(b)) +} - /* - Owner services +type jsonServerRole struct { + + ServerServer interface{} `json:"server_server"` + + RoleServrole interface{} `json:"role_servrole"` + + Status interface{} `json:"status"` + } - */ - OwnerService *string `json:"owner_service,omitempty"` +func (out *ServerRole) UnmarshalJSON(data []byte) error { + var in jsonServerRole + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.ServerServer + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.ServerServer = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field ServerServer: %v; expected exactly one element", raw) + } + out.ServerServer = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field ServerServer: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.RoleServrole + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.RoleServrole = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field RoleServrole: %v; expected exactly one element", raw) + } + out.RoleServrole = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field RoleServrole: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Status != nil { + raw := in.Status + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Status = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Status = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Status: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Status: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - /* - Failed owners +type Service struct { + + /* +Principal name +Service principal + */ + Krbcanonicalname string `json:"krbcanonicalname,omitempty"` + + /* +Principal alias +Service principal alias + */ + Krbprincipalname *[]string `json:"krbprincipalname,omitempty"` + + /* +Certificate +Base-64 encoded service certificate + */ + Usercertificate *[]interface{} `json:"usercertificate,omitempty"` + + /* +Subject + + */ + Subject string `json:"subject,omitempty"` + + /* +Serial Number + + */ + SerialNumber string `json:"serial_number,omitempty"` + + /* +Serial Number (hex) + + */ + SerialNumberHex string `json:"serial_number_hex,omitempty"` + + /* +Issuer + + */ + Issuer string `json:"issuer,omitempty"` + + /* +Not Before + + */ + ValidNotBefore string `json:"valid_not_before,omitempty"` + + /* +Not After + + */ + ValidNotAfter string `json:"valid_not_after,omitempty"` + + /* +Fingerprint (SHA1) + + */ + Sha1Fingerprint string `json:"sha1_fingerprint,omitempty"` + + /* +Fingerprint (SHA256) + + */ + Sha256Fingerprint string `json:"sha256_fingerprint,omitempty"` + + /* +Revocation reason + + */ + RevocationReason *string `json:"revocation_reason,omitempty"` + + /* +PAC type +Override default list of supported PAC types. Use 'NONE' to disable PAC support for this service, e.g. this might be necessary for NFS services. + */ + Ipakrbauthzdata *[]string `json:"ipakrbauthzdata,omitempty"` + + /* +Authentication Indicators +Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations. + */ + Krbprincipalauthind *[]string `json:"krbprincipalauthind,omitempty"` + + /* +Requires pre-authentication +Pre-authentication is required for the service + */ + Ipakrbrequirespreauth *bool `json:"ipakrbrequirespreauth,omitempty"` + + /* +Trusted for delegation +Client credentials may be delegated to the service + */ + Ipakrbokasdelegate *bool `json:"ipakrbokasdelegate,omitempty"` + + /* +Trusted to authenticate as user +The service is allowed to authenticate on behalf of a client + */ + Ipakrboktoauthasdelegate *bool `json:"ipakrboktoauthasdelegate,omitempty"` + + /* +Roles + + */ + MemberofRole *[]string `json:"memberof_role,omitempty"` + + /* +Keytab + + */ + HasKeytab *bool `json:"has_keytab,omitempty"` + + /* +Managed by + + */ + ManagedbyHost string `json:"managedby_host,omitempty"` + + /* +Users allowed to retrieve keytab + + */ + IpaallowedtoperformReadKeysUser string `json:"ipaallowedtoperform_read_keys_user,omitempty"` + + /* +Groups allowed to retrieve keytab + + */ + IpaallowedtoperformReadKeysGroup string `json:"ipaallowedtoperform_read_keys_group,omitempty"` + + /* +Hosts allowed to retrieve keytab + + */ + IpaallowedtoperformReadKeysHost string `json:"ipaallowedtoperform_read_keys_host,omitempty"` + + /* +Host Groups allowed to retrieve keytab + + */ + IpaallowedtoperformReadKeysHostgroup string `json:"ipaallowedtoperform_read_keys_hostgroup,omitempty"` + + /* +Users allowed to create keytab + + */ + IpaallowedtoperformWriteKeysUser string `json:"ipaallowedtoperform_write_keys_user,omitempty"` + + /* +Groups allowed to create keytab + + */ + IpaallowedtoperformWriteKeysGroup string `json:"ipaallowedtoperform_write_keys_group,omitempty"` + + /* +Hosts allowed to create keytab + + */ + IpaallowedtoperformWriteKeysHost string `json:"ipaallowedtoperform_write_keys_host,omitempty"` + + /* +Host Groups allowed to create keytab + + */ + IpaallowedtoperformWriteKeysHostgroup string `json:"ipaallowedtoperform_write_keys_hostgroup,omitempty"` + } - */ - Owner *string `json:"owner,omitempty"` +func (t *Service) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Service[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Service%v", string(b)) +} - /* - Vault service +type jsonService struct { + + Krbcanonicalname interface{} `json:"krbcanonicalname"` + + Krbprincipalname interface{} `json:"krbprincipalname"` + + Usercertificate interface{} `json:"usercertificate"` + + Subject interface{} `json:"subject"` + + SerialNumber interface{} `json:"serial_number"` + + SerialNumberHex interface{} `json:"serial_number_hex"` + + Issuer interface{} `json:"issuer"` + + ValidNotBefore interface{} `json:"valid_not_before"` + + ValidNotAfter interface{} `json:"valid_not_after"` + + Sha1Fingerprint interface{} `json:"sha1_fingerprint"` + + Sha256Fingerprint interface{} `json:"sha256_fingerprint"` + + RevocationReason interface{} `json:"revocation_reason"` + + Ipakrbauthzdata interface{} `json:"ipakrbauthzdata"` + + Krbprincipalauthind interface{} `json:"krbprincipalauthind"` + + Ipakrbrequirespreauth interface{} `json:"ipakrbrequirespreauth"` + + Ipakrbokasdelegate interface{} `json:"ipakrbokasdelegate"` + + Ipakrboktoauthasdelegate interface{} `json:"ipakrboktoauthasdelegate"` + + MemberofRole interface{} `json:"memberof_role"` + + HasKeytab interface{} `json:"has_keytab"` + + ManagedbyHost interface{} `json:"managedby_host"` + + IpaallowedtoperformReadKeysUser interface{} `json:"ipaallowedtoperform_read_keys_user"` + + IpaallowedtoperformReadKeysGroup interface{} `json:"ipaallowedtoperform_read_keys_group"` + + IpaallowedtoperformReadKeysHost interface{} `json:"ipaallowedtoperform_read_keys_host"` + + IpaallowedtoperformReadKeysHostgroup interface{} `json:"ipaallowedtoperform_read_keys_hostgroup"` + + IpaallowedtoperformWriteKeysUser interface{} `json:"ipaallowedtoperform_write_keys_user"` + + IpaallowedtoperformWriteKeysGroup interface{} `json:"ipaallowedtoperform_write_keys_group"` + + IpaallowedtoperformWriteKeysHost interface{} `json:"ipaallowedtoperform_write_keys_host"` + + IpaallowedtoperformWriteKeysHostgroup interface{} `json:"ipaallowedtoperform_write_keys_hostgroup"` + } - */ - Service *string `json:"service,omitempty"` +func (out *Service) UnmarshalJSON(data []byte) error { + var in jsonService + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Krbcanonicalname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Krbcanonicalname = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Krbcanonicalname: %v; expected exactly one element", raw) + } + out.Krbcanonicalname = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Krbcanonicalname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Krbprincipalname != nil { + raw := in.Krbprincipalname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Krbprincipalname = &[]string{plainV} + } else if sliceOk { + + out.Krbprincipalname = &sliceV + } else { + return fmt.Errorf("unexpected value for field Krbprincipalname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Usercertificate != nil { + raw := in.Usercertificate + plainV, plainOk := raw.(interface{}) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []interface{} + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(interface{}) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Usercertificate = &[]interface{}{plainV} + } else if sliceOk { + + out.Usercertificate = &sliceV + } else { + return fmt.Errorf("unexpected value for field Usercertificate: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Subject + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Subject = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Subject: %v; expected exactly one element", raw) + } + out.Subject = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Subject: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.SerialNumber + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.SerialNumber = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field SerialNumber: %v; expected exactly one element", raw) + } + out.SerialNumber = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field SerialNumber: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.SerialNumberHex + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.SerialNumberHex = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field SerialNumberHex: %v; expected exactly one element", raw) + } + out.SerialNumberHex = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field SerialNumberHex: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Issuer + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Issuer = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Issuer: %v; expected exactly one element", raw) + } + out.Issuer = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Issuer: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.ValidNotBefore + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.ValidNotBefore = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field ValidNotBefore: %v; expected exactly one element", raw) + } + out.ValidNotBefore = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field ValidNotBefore: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.ValidNotAfter + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.ValidNotAfter = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field ValidNotAfter: %v; expected exactly one element", raw) + } + out.ValidNotAfter = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field ValidNotAfter: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Sha1Fingerprint + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Sha1Fingerprint = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Sha1Fingerprint: %v; expected exactly one element", raw) + } + out.Sha1Fingerprint = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Sha1Fingerprint: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Sha256Fingerprint + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Sha256Fingerprint = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Sha256Fingerprint: %v; expected exactly one element", raw) + } + out.Sha256Fingerprint = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Sha256Fingerprint: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.RevocationReason != nil { + raw := in.RevocationReason + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.RevocationReason = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.RevocationReason = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field RevocationReason: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field RevocationReason: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipakrbauthzdata != nil { + raw := in.Ipakrbauthzdata + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipakrbauthzdata = &[]string{plainV} + } else if sliceOk { + + out.Ipakrbauthzdata = &sliceV + } else { + return fmt.Errorf("unexpected value for field Ipakrbauthzdata: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Krbprincipalauthind != nil { + raw := in.Krbprincipalauthind + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Krbprincipalauthind = &[]string{plainV} + } else if sliceOk { + + out.Krbprincipalauthind = &sliceV + } else { + return fmt.Errorf("unexpected value for field Krbprincipalauthind: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipakrbrequirespreauth != nil { + raw := in.Ipakrbrequirespreauth + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipakrbrequirespreauth = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipakrbrequirespreauth = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipakrbrequirespreauth: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipakrbrequirespreauth: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipakrbokasdelegate != nil { + raw := in.Ipakrbokasdelegate + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipakrbokasdelegate = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipakrbokasdelegate = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipakrbokasdelegate: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipakrbokasdelegate: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipakrboktoauthasdelegate != nil { + raw := in.Ipakrboktoauthasdelegate + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipakrboktoauthasdelegate = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipakrboktoauthasdelegate = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipakrboktoauthasdelegate: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipakrboktoauthasdelegate: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofRole != nil { + raw := in.MemberofRole + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofRole = &[]string{plainV} + } else if sliceOk { + + out.MemberofRole = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberofRole: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.HasKeytab != nil { + raw := in.HasKeytab + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.HasKeytab = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.HasKeytab = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field HasKeytab: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field HasKeytab: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.ManagedbyHost + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.ManagedbyHost = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field ManagedbyHost: %v; expected exactly one element", raw) + } + out.ManagedbyHost = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field ManagedbyHost: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.IpaallowedtoperformReadKeysUser + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.IpaallowedtoperformReadKeysUser = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field IpaallowedtoperformReadKeysUser: %v; expected exactly one element", raw) + } + out.IpaallowedtoperformReadKeysUser = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field IpaallowedtoperformReadKeysUser: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.IpaallowedtoperformReadKeysGroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.IpaallowedtoperformReadKeysGroup = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field IpaallowedtoperformReadKeysGroup: %v; expected exactly one element", raw) + } + out.IpaallowedtoperformReadKeysGroup = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field IpaallowedtoperformReadKeysGroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.IpaallowedtoperformReadKeysHost + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.IpaallowedtoperformReadKeysHost = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field IpaallowedtoperformReadKeysHost: %v; expected exactly one element", raw) + } + out.IpaallowedtoperformReadKeysHost = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field IpaallowedtoperformReadKeysHost: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.IpaallowedtoperformReadKeysHostgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.IpaallowedtoperformReadKeysHostgroup = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field IpaallowedtoperformReadKeysHostgroup: %v; expected exactly one element", raw) + } + out.IpaallowedtoperformReadKeysHostgroup = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field IpaallowedtoperformReadKeysHostgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.IpaallowedtoperformWriteKeysUser + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.IpaallowedtoperformWriteKeysUser = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field IpaallowedtoperformWriteKeysUser: %v; expected exactly one element", raw) + } + out.IpaallowedtoperformWriteKeysUser = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field IpaallowedtoperformWriteKeysUser: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.IpaallowedtoperformWriteKeysGroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.IpaallowedtoperformWriteKeysGroup = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field IpaallowedtoperformWriteKeysGroup: %v; expected exactly one element", raw) + } + out.IpaallowedtoperformWriteKeysGroup = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field IpaallowedtoperformWriteKeysGroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.IpaallowedtoperformWriteKeysHost + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.IpaallowedtoperformWriteKeysHost = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field IpaallowedtoperformWriteKeysHost: %v; expected exactly one element", raw) + } + out.IpaallowedtoperformWriteKeysHost = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field IpaallowedtoperformWriteKeysHost: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.IpaallowedtoperformWriteKeysHostgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.IpaallowedtoperformWriteKeysHostgroup = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field IpaallowedtoperformWriteKeysHostgroup: %v; expected exactly one element", raw) + } + out.IpaallowedtoperformWriteKeysHostgroup = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field IpaallowedtoperformWriteKeysHostgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - /* - Shared vault +type Servicedelegationrule struct { + + /* +Delegation name + + */ + Cn string `json:"cn,omitempty"` + + /* +Allowed Target + + */ + IpaallowedtargetServicedelegationtarget string `json:"ipaallowedtarget_servicedelegationtarget,omitempty"` + + /* +Allowed to Impersonate + + */ + Ipaallowedtoimpersonate string `json:"ipaallowedtoimpersonate,omitempty"` + + /* +Member principals + + */ + Memberprincipal string `json:"memberprincipal,omitempty"` + } - */ - Shared *bool `json:"shared,omitempty"` +func (t *Servicedelegationrule) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Servicedelegationrule[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Servicedelegationrule%v", string(b)) +} - /* - Vault user +type jsonServicedelegationrule struct { + + Cn interface{} `json:"cn"` + + IpaallowedtargetServicedelegationtarget interface{} `json:"ipaallowedtarget_servicedelegationtarget"` + + Ipaallowedtoimpersonate interface{} `json:"ipaallowedtoimpersonate"` + + Memberprincipal interface{} `json:"memberprincipal"` + } - */ - Username *string `json:"username,omitempty"` +func (out *Servicedelegationrule) UnmarshalJSON(data []byte) error { + var in jsonServicedelegationrule + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Cn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) + } + out.Cn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.IpaallowedtargetServicedelegationtarget + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.IpaallowedtargetServicedelegationtarget = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field IpaallowedtargetServicedelegationtarget: %v; expected exactly one element", raw) + } + out.IpaallowedtargetServicedelegationtarget = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field IpaallowedtargetServicedelegationtarget: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Ipaallowedtoimpersonate + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipaallowedtoimpersonate = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipaallowedtoimpersonate: %v; expected exactly one element", raw) + } + out.Ipaallowedtoimpersonate = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipaallowedtoimpersonate: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Memberprincipal + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Memberprincipal = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Memberprincipal: %v; expected exactly one element", raw) + } + out.Memberprincipal = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Memberprincipal: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil } -func (t *Vaultcontainer) String() string { - if t == nil { - return "" - } - b, e := json.Marshal(t) - if e != nil { - return fmt.Sprintf("Vaultcontainer[failed json.Marshal: %v]", e) - } - return fmt.Sprintf("Vaultcontainer%v", string(b)) -} +type Servicedelegationtarget struct { + + /* +Delegation name + + */ + Cn string `json:"cn,omitempty"` + + /* +Allowed Target + + */ + IpaallowedtargetServicedelegationtarget string `json:"ipaallowedtarget_servicedelegationtarget,omitempty"` + + /* +Allowed to Impersonate + + */ + Ipaallowedtoimpersonate string `json:"ipaallowedtoimpersonate,omitempty"` + + /* +Member principals + + */ + Memberprincipal string `json:"memberprincipal,omitempty"` + } -type jsonVaultcontainer struct { - OwnerUser interface{} `json:"owner_user"` +func (t *Servicedelegationtarget) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Servicedelegationtarget[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Servicedelegationtarget%v", string(b)) +} - OwnerGroup interface{} `json:"owner_group"` +type jsonServicedelegationtarget struct { + + Cn interface{} `json:"cn"` + + IpaallowedtargetServicedelegationtarget interface{} `json:"ipaallowedtarget_servicedelegationtarget"` + + Ipaallowedtoimpersonate interface{} `json:"ipaallowedtoimpersonate"` + + Memberprincipal interface{} `json:"memberprincipal"` + } - OwnerService interface{} `json:"owner_service"` +func (out *Servicedelegationtarget) UnmarshalJSON(data []byte) error { + var in jsonServicedelegationtarget + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Cn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) + } + out.Cn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.IpaallowedtargetServicedelegationtarget + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.IpaallowedtargetServicedelegationtarget = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field IpaallowedtargetServicedelegationtarget: %v; expected exactly one element", raw) + } + out.IpaallowedtargetServicedelegationtarget = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field IpaallowedtargetServicedelegationtarget: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Ipaallowedtoimpersonate + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipaallowedtoimpersonate = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipaallowedtoimpersonate: %v; expected exactly one element", raw) + } + out.Ipaallowedtoimpersonate = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipaallowedtoimpersonate: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Memberprincipal + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Memberprincipal = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Memberprincipal: %v; expected exactly one element", raw) + } + out.Memberprincipal = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Memberprincipal: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - Owner interface{} `json:"owner"` +type Servrole struct { + + /* +Role name +IPA role name + */ + Name string `json:"name,omitempty"` + } - Service interface{} `json:"service"` +func (t *Servrole) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Servrole[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Servrole%v", string(b)) +} - Shared interface{} `json:"shared"` +type jsonServrole struct { + + Name interface{} `json:"name"` + } - Username interface{} `json:"username"` +func (out *Servrole) UnmarshalJSON(data []byte) error { + var in jsonServrole + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Name + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Name = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Name: %v; expected exactly one element", raw) + } + out.Name = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Name: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil } -func (out *Vaultcontainer) UnmarshalJSON(data []byte) error { - var in jsonVaultcontainer - if e := json.Unmarshal(data, &in); e != nil { - return e - } +type Stageuser struct { + + /* +User login + + */ + UID string `json:"uid,omitempty"` + + /* +First name + + */ + Givenname string `json:"givenname,omitempty"` + + /* +Last name + + */ + Sn string `json:"sn,omitempty"` + + /* +Full name + + */ + Cn string `json:"cn,omitempty"` + + /* +Display name + + */ + Displayname *string `json:"displayname,omitempty"` + + /* +Initials + + */ + Initials *string `json:"initials,omitempty"` + + /* +Home directory + + */ + Homedirectory *string `json:"homedirectory,omitempty"` + + /* +GECOS + + */ + Gecos *string `json:"gecos,omitempty"` + + /* +Login shell + + */ + Loginshell *string `json:"loginshell,omitempty"` + + /* +Principal name + + */ + Krbcanonicalname *string `json:"krbcanonicalname,omitempty"` + + /* +Principal alias + + */ + Krbprincipalname *[]string `json:"krbprincipalname,omitempty"` + + /* +Kerberos principal expiration + + */ + Krbprincipalexpiration *time.Time `json:"krbprincipalexpiration,omitempty"` + + /* +User password expiration + + */ + Krbpasswordexpiration *time.Time `json:"krbpasswordexpiration,omitempty"` + + /* +Email address + + */ + Mail *[]string `json:"mail,omitempty"` + + /* +Password +Prompt to set the user password + */ + Userpassword *string `json:"userpassword,omitempty"` + + /* + +Generate a random user password + */ + Random *bool `json:"random,omitempty"` + + /* +Random password + + */ + Randompassword *string `json:"randompassword,omitempty"` + + /* +UID +User ID Number (system will assign one if not provided) + */ + Uidnumber *int `json:"uidnumber,omitempty"` + + /* +GID +Group ID Number + */ + Gidnumber *int `json:"gidnumber,omitempty"` + + /* +Street address + + */ + Street *string `json:"street,omitempty"` + + /* +City + + */ + L *string `json:"l,omitempty"` + + /* +State/Province + + */ + St *string `json:"st,omitempty"` + + /* +ZIP + + */ + Postalcode *string `json:"postalcode,omitempty"` + + /* +Telephone Number + + */ + Telephonenumber *[]string `json:"telephonenumber,omitempty"` + + /* +Mobile Telephone Number + + */ + Mobile *[]string `json:"mobile,omitempty"` + + /* +Pager Number + + */ + Pager *[]string `json:"pager,omitempty"` + + /* +Fax Number + + */ + Facsimiletelephonenumber *[]string `json:"facsimiletelephonenumber,omitempty"` + + /* +Org. Unit + + */ + Ou *string `json:"ou,omitempty"` + + /* +Job Title + + */ + Title *string `json:"title,omitempty"` + + /* +Manager + + */ + Manager *string `json:"manager,omitempty"` + + /* +Car License + + */ + Carlicense *[]string `json:"carlicense,omitempty"` + + /* +SSH public key + + */ + Ipasshpubkey *[]string `json:"ipasshpubkey,omitempty"` + + /* +SSH public key fingerprint + + */ + Sshpubkeyfp *[]string `json:"sshpubkeyfp,omitempty"` + + /* +User authentication types +Types of supported user authentication + */ + Ipauserauthtype *[]string `json:"ipauserauthtype,omitempty"` + + /* +Class +User category (semantics placed on this attribute are for local interpretation) + */ + Userclass *[]string `json:"userclass,omitempty"` + + /* +RADIUS proxy configuration + + */ + Ipatokenradiusconfiglink *string `json:"ipatokenradiusconfiglink,omitempty"` + + /* +RADIUS proxy username + + */ + Ipatokenradiususername *string `json:"ipatokenradiususername,omitempty"` + + /* +Department Number + + */ + Departmentnumber *[]string `json:"departmentnumber,omitempty"` + + /* +Employee Number + + */ + Employeenumber *string `json:"employeenumber,omitempty"` + + /* +Employee Type + + */ + Employeetype *string `json:"employeetype,omitempty"` + + /* +Preferred Language + + */ + Preferredlanguage *string `json:"preferredlanguage,omitempty"` + + /* +Certificate +Base-64 encoded user certificate + */ + Usercertificate *[]interface{} `json:"usercertificate,omitempty"` + + /* +Certificate mapping data +Certificate mapping data + */ + Ipacertmapdata *[]string `json:"ipacertmapdata,omitempty"` + + /* +Password + + */ + HasPassword *bool `json:"has_password,omitempty"` + + /* +Member of groups + + */ + MemberofGroup *[]string `json:"memberof_group,omitempty"` + + /* +Roles + + */ + MemberofRole *[]string `json:"memberof_role,omitempty"` + + /* +Member of netgroups + + */ + MemberofNetgroup *[]string `json:"memberof_netgroup,omitempty"` + + /* +Member of Sudo rule + + */ + MemberofSudorule *[]string `json:"memberof_sudorule,omitempty"` + + /* +Member of HBAC rule + + */ + MemberofHbacrule *[]string `json:"memberof_hbacrule,omitempty"` + + /* +Indirect Member of group + + */ + MemberofindirectGroup *string `json:"memberofindirect_group,omitempty"` + + /* +Indirect Member of netgroup + + */ + MemberofindirectNetgroup *string `json:"memberofindirect_netgroup,omitempty"` + + /* +Indirect Member of role + + */ + MemberofindirectRole *string `json:"memberofindirect_role,omitempty"` + + /* +Indirect Member of Sudo rule + + */ + MemberofindirectSudorule *string `json:"memberofindirect_sudorule,omitempty"` + + /* +Indirect Member of HBAC rule + + */ + MemberofindirectHbacrule *string `json:"memberofindirect_hbacrule,omitempty"` + + /* +Kerberos keys available + + */ + HasKeytab *bool `json:"has_keytab,omitempty"` + } - if in.OwnerUser != nil { - raw := in.OwnerUser - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +func (t *Stageuser) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Stageuser[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Stageuser%v", string(b)) +} - itemV, itemOk := rawItem.(string) +type jsonStageuser struct { + + UID interface{} `json:"uid"` + + Givenname interface{} `json:"givenname"` + + Sn interface{} `json:"sn"` + + Cn interface{} `json:"cn"` + + Displayname interface{} `json:"displayname"` + + Initials interface{} `json:"initials"` + + Homedirectory interface{} `json:"homedirectory"` + + Gecos interface{} `json:"gecos"` + + Loginshell interface{} `json:"loginshell"` + + Krbcanonicalname interface{} `json:"krbcanonicalname"` + + Krbprincipalname interface{} `json:"krbprincipalname"` + + Krbprincipalexpiration interface{} `json:"krbprincipalexpiration"` + + Krbpasswordexpiration interface{} `json:"krbpasswordexpiration"` + + Mail interface{} `json:"mail"` + + Userpassword interface{} `json:"userpassword"` + + Random interface{} `json:"random"` + + Randompassword interface{} `json:"randompassword"` + + Uidnumber interface{} `json:"uidnumber"` + + Gidnumber interface{} `json:"gidnumber"` + + Street interface{} `json:"street"` + + L interface{} `json:"l"` + + St interface{} `json:"st"` + + Postalcode interface{} `json:"postalcode"` + + Telephonenumber interface{} `json:"telephonenumber"` + + Mobile interface{} `json:"mobile"` + + Pager interface{} `json:"pager"` + + Facsimiletelephonenumber interface{} `json:"facsimiletelephonenumber"` + + Ou interface{} `json:"ou"` + + Title interface{} `json:"title"` + + Manager interface{} `json:"manager"` + + Carlicense interface{} `json:"carlicense"` + + Ipasshpubkey interface{} `json:"ipasshpubkey"` + + Sshpubkeyfp interface{} `json:"sshpubkeyfp"` + + Ipauserauthtype interface{} `json:"ipauserauthtype"` + + Userclass interface{} `json:"userclass"` + + Ipatokenradiusconfiglink interface{} `json:"ipatokenradiusconfiglink"` + + Ipatokenradiususername interface{} `json:"ipatokenradiususername"` + + Departmentnumber interface{} `json:"departmentnumber"` + + Employeenumber interface{} `json:"employeenumber"` + + Employeetype interface{} `json:"employeetype"` + + Preferredlanguage interface{} `json:"preferredlanguage"` + + Usercertificate interface{} `json:"usercertificate"` + + Ipacertmapdata interface{} `json:"ipacertmapdata"` + + HasPassword interface{} `json:"has_password"` + + MemberofGroup interface{} `json:"memberof_group"` + + MemberofRole interface{} `json:"memberof_role"` + + MemberofNetgroup interface{} `json:"memberof_netgroup"` + + MemberofSudorule interface{} `json:"memberof_sudorule"` + + MemberofHbacrule interface{} `json:"memberof_hbacrule"` + + MemberofindirectGroup interface{} `json:"memberofindirect_group"` + + MemberofindirectNetgroup interface{} `json:"memberofindirect_netgroup"` + + MemberofindirectRole interface{} `json:"memberofindirect_role"` + + MemberofindirectSudorule interface{} `json:"memberofindirect_sudorule"` + + MemberofindirectHbacrule interface{} `json:"memberofindirect_hbacrule"` + + HasKeytab interface{} `json:"has_keytab"` + } - if !itemOk { - sliceOk = false - break - } +func (out *Stageuser) UnmarshalJSON(data []byte) error { + var in jsonStageuser + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.UID + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.UID = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field UID: %v; expected exactly one element", raw) + } + out.UID = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field UID: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Givenname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Givenname = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Givenname: %v; expected exactly one element", raw) + } + out.Givenname = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Givenname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Sn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Sn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Sn: %v; expected exactly one element", raw) + } + out.Sn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Sn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Cn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) + } + out.Cn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Displayname != nil { + raw := in.Displayname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Displayname = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Displayname = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Displayname: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Displayname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Initials != nil { + raw := in.Initials + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Initials = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Initials = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Initials: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Initials: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Homedirectory != nil { + raw := in.Homedirectory + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Homedirectory = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Homedirectory = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Homedirectory: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Homedirectory: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Gecos != nil { + raw := in.Gecos + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Gecos = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Gecos = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Gecos: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Gecos: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Loginshell != nil { + raw := in.Loginshell + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Loginshell = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Loginshell = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Loginshell: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Loginshell: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Krbcanonicalname != nil { + raw := in.Krbcanonicalname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Krbcanonicalname = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Krbcanonicalname = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Krbcanonicalname: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Krbcanonicalname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Krbprincipalname != nil { + raw := in.Krbprincipalname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Krbprincipalname = &[]string{plainV} + } else if sliceOk { + + out.Krbprincipalname = &sliceV + } else { + return fmt.Errorf("unexpected value for field Krbprincipalname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Krbprincipalexpiration != nil { + raw := in.Krbprincipalexpiration + plainV, plainOk := raw.(time.Time) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []time.Time + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(time.Time) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Krbprincipalexpiration = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Krbprincipalexpiration = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Krbprincipalexpiration: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Krbprincipalexpiration: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Krbpasswordexpiration != nil { + raw := in.Krbpasswordexpiration + plainV, plainOk := raw.(time.Time) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []time.Time + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(time.Time) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Krbpasswordexpiration = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Krbpasswordexpiration = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Krbpasswordexpiration: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Krbpasswordexpiration: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Mail != nil { + raw := in.Mail + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Mail = &[]string{plainV} + } else if sliceOk { + + out.Mail = &sliceV + } else { + return fmt.Errorf("unexpected value for field Mail: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Userpassword != nil { + raw := in.Userpassword + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Userpassword = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Userpassword = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Userpassword: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Userpassword: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Random != nil { + raw := in.Random + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Random = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Random = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Random: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Random: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Randompassword != nil { + raw := in.Randompassword + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Randompassword = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Randompassword = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Randompassword: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Randompassword: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Uidnumber != nil { + raw := in.Uidnumber + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Uidnumber: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Uidnumber = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Uidnumber = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Uidnumber: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Uidnumber: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Gidnumber != nil { + raw := in.Gidnumber + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Gidnumber: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Gidnumber = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Gidnumber = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Gidnumber: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Gidnumber: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Street != nil { + raw := in.Street + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Street = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Street = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Street: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Street: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.L != nil { + raw := in.L + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.L = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.L = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field L: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field L: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.St != nil { + raw := in.St + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.St = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.St = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field St: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field St: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Postalcode != nil { + raw := in.Postalcode + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Postalcode = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Postalcode = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Postalcode: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Postalcode: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Telephonenumber != nil { + raw := in.Telephonenumber + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Telephonenumber = &[]string{plainV} + } else if sliceOk { + + out.Telephonenumber = &sliceV + } else { + return fmt.Errorf("unexpected value for field Telephonenumber: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Mobile != nil { + raw := in.Mobile + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Mobile = &[]string{plainV} + } else if sliceOk { + + out.Mobile = &sliceV + } else { + return fmt.Errorf("unexpected value for field Mobile: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Pager != nil { + raw := in.Pager + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Pager = &[]string{plainV} + } else if sliceOk { + + out.Pager = &sliceV + } else { + return fmt.Errorf("unexpected value for field Pager: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Facsimiletelephonenumber != nil { + raw := in.Facsimiletelephonenumber + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Facsimiletelephonenumber = &[]string{plainV} + } else if sliceOk { + + out.Facsimiletelephonenumber = &sliceV + } else { + return fmt.Errorf("unexpected value for field Facsimiletelephonenumber: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ou != nil { + raw := in.Ou + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ou = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ou = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ou: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ou: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Title != nil { + raw := in.Title + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Title = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Title = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Title: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Title: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Manager != nil { + raw := in.Manager + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Manager = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Manager = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Manager: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Manager: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Carlicense != nil { + raw := in.Carlicense + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Carlicense = &[]string{plainV} + } else if sliceOk { + + out.Carlicense = &sliceV + } else { + return fmt.Errorf("unexpected value for field Carlicense: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipasshpubkey != nil { + raw := in.Ipasshpubkey + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipasshpubkey = &[]string{plainV} + } else if sliceOk { + + out.Ipasshpubkey = &sliceV + } else { + return fmt.Errorf("unexpected value for field Ipasshpubkey: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Sshpubkeyfp != nil { + raw := in.Sshpubkeyfp + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Sshpubkeyfp = &[]string{plainV} + } else if sliceOk { + + out.Sshpubkeyfp = &sliceV + } else { + return fmt.Errorf("unexpected value for field Sshpubkeyfp: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipauserauthtype != nil { + raw := in.Ipauserauthtype + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipauserauthtype = &[]string{plainV} + } else if sliceOk { + + out.Ipauserauthtype = &sliceV + } else { + return fmt.Errorf("unexpected value for field Ipauserauthtype: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Userclass != nil { + raw := in.Userclass + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Userclass = &[]string{plainV} + } else if sliceOk { + + out.Userclass = &sliceV + } else { + return fmt.Errorf("unexpected value for field Userclass: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipatokenradiusconfiglink != nil { + raw := in.Ipatokenradiusconfiglink + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipatokenradiusconfiglink = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipatokenradiusconfiglink = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipatokenradiusconfiglink: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipatokenradiusconfiglink: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipatokenradiususername != nil { + raw := in.Ipatokenradiususername + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipatokenradiususername = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipatokenradiususername = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipatokenradiususername: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipatokenradiususername: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Departmentnumber != nil { + raw := in.Departmentnumber + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Departmentnumber = &[]string{plainV} + } else if sliceOk { + + out.Departmentnumber = &sliceV + } else { + return fmt.Errorf("unexpected value for field Departmentnumber: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Employeenumber != nil { + raw := in.Employeenumber + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Employeenumber = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Employeenumber = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Employeenumber: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Employeenumber: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Employeetype != nil { + raw := in.Employeetype + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Employeetype = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Employeetype = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Employeetype: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Employeetype: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Preferredlanguage != nil { + raw := in.Preferredlanguage + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Preferredlanguage = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Preferredlanguage = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Preferredlanguage: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Preferredlanguage: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Usercertificate != nil { + raw := in.Usercertificate + plainV, plainOk := raw.(interface{}) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []interface{} + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(interface{}) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Usercertificate = &[]interface{}{plainV} + } else if sliceOk { + + out.Usercertificate = &sliceV + } else { + return fmt.Errorf("unexpected value for field Usercertificate: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipacertmapdata != nil { + raw := in.Ipacertmapdata + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipacertmapdata = &[]string{plainV} + } else if sliceOk { + + out.Ipacertmapdata = &sliceV + } else { + return fmt.Errorf("unexpected value for field Ipacertmapdata: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.HasPassword != nil { + raw := in.HasPassword + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.HasPassword = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.HasPassword = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field HasPassword: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field HasPassword: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofGroup != nil { + raw := in.MemberofGroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofGroup = &[]string{plainV} + } else if sliceOk { + + out.MemberofGroup = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberofGroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofRole != nil { + raw := in.MemberofRole + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofRole = &[]string{plainV} + } else if sliceOk { + + out.MemberofRole = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberofRole: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofNetgroup != nil { + raw := in.MemberofNetgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofNetgroup = &[]string{plainV} + } else if sliceOk { + + out.MemberofNetgroup = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberofNetgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofSudorule != nil { + raw := in.MemberofSudorule + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofSudorule = &[]string{plainV} + } else if sliceOk { + + out.MemberofSudorule = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberofSudorule: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofHbacrule != nil { + raw := in.MemberofHbacrule + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofHbacrule = &[]string{plainV} + } else if sliceOk { + + out.MemberofHbacrule = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberofHbacrule: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofindirectGroup != nil { + raw := in.MemberofindirectGroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofindirectGroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberofindirectGroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberofindirectGroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberofindirectGroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofindirectNetgroup != nil { + raw := in.MemberofindirectNetgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofindirectNetgroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberofindirectNetgroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberofindirectNetgroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberofindirectNetgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofindirectRole != nil { + raw := in.MemberofindirectRole + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofindirectRole = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberofindirectRole = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberofindirectRole: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberofindirectRole: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofindirectSudorule != nil { + raw := in.MemberofindirectSudorule + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofindirectSudorule = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberofindirectSudorule = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberofindirectSudorule: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberofindirectSudorule: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofindirectHbacrule != nil { + raw := in.MemberofindirectHbacrule + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofindirectHbacrule = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberofindirectHbacrule = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberofindirectHbacrule: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberofindirectHbacrule: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.HasKeytab != nil { + raw := in.HasKeytab + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.HasKeytab = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.HasKeytab = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field HasKeytab: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field HasKeytab: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - sliceV = append(sliceV, itemV) +type Sudocmd struct { + + /* +Sudo Command + + */ + Sudocmd string `json:"sudocmd,omitempty"` + + /* +Description +A description of this command + */ + Description *string `json:"description,omitempty"` + + /* +Sudo Command Groups + + */ + MemberofSudocmdgroup *[]string `json:"memberof_sudocmdgroup,omitempty"` + } - } - } +func (t *Sudocmd) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Sudocmd[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Sudocmd%v", string(b)) +} - if plainOk { - out.OwnerUser = &plainV - } else if sliceOk { +type jsonSudocmd struct { + + Sudocmd interface{} `json:"sudocmd"` + + Description interface{} `json:"description"` + + MemberofSudocmdgroup interface{} `json:"memberof_sudocmdgroup"` + } - if len(sliceV) == 1 { - out.OwnerUser = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field OwnerUser: %v; expected at most one element", raw) - } +func (out *Sudocmd) UnmarshalJSON(data []byte) error { + var in jsonSudocmd + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Sudocmd + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Sudocmd = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Sudocmd: %v; expected exactly one element", raw) + } + out.Sudocmd = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Sudocmd: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Description != nil { + raw := in.Description + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Description = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Description = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofSudocmdgroup != nil { + raw := in.MemberofSudocmdgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofSudocmdgroup = &[]string{plainV} + } else if sliceOk { + + out.MemberofSudocmdgroup = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberofSudocmdgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - } else { - return fmt.Errorf("unexpected value for field OwnerUser: %v (%v)", raw, reflect.TypeOf(raw)) - } +type Sudocmdgroup struct { + + /* +Sudo Command Group + + */ + Cn string `json:"cn,omitempty"` + + /* +Description +Group description + */ + Description *string `json:"description,omitempty"` + + /* +Commands + + */ + MembercmdSudocmd *string `json:"membercmd_sudocmd,omitempty"` + + /* +Sudo Command Groups + + */ + MembercmdSudocmdgroup *string `json:"membercmd_sudocmdgroup,omitempty"` + + /* +Member Sudo commands + + */ + MemberSudocmd *[]string `json:"member_sudocmd,omitempty"` + } - } +func (t *Sudocmdgroup) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Sudocmdgroup[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Sudocmdgroup%v", string(b)) +} - if in.OwnerGroup != nil { - raw := in.OwnerGroup - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +type jsonSudocmdgroup struct { + + Cn interface{} `json:"cn"` + + Description interface{} `json:"description"` + + MembercmdSudocmd interface{} `json:"membercmd_sudocmd"` + + MembercmdSudocmdgroup interface{} `json:"membercmd_sudocmdgroup"` + + MemberSudocmd interface{} `json:"member_sudocmd"` + } - itemV, itemOk := rawItem.(string) +func (out *Sudocmdgroup) UnmarshalJSON(data []byte) error { + var in jsonSudocmdgroup + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Cn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) + } + out.Cn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Description != nil { + raw := in.Description + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Description = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Description = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MembercmdSudocmd != nil { + raw := in.MembercmdSudocmd + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MembercmdSudocmd = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MembercmdSudocmd = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MembercmdSudocmd: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MembercmdSudocmd: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MembercmdSudocmdgroup != nil { + raw := in.MembercmdSudocmdgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MembercmdSudocmdgroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MembercmdSudocmdgroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MembercmdSudocmdgroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MembercmdSudocmdgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberSudocmd != nil { + raw := in.MemberSudocmd + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberSudocmd = &[]string{plainV} + } else if sliceOk { + + out.MemberSudocmd = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberSudocmd: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - if !itemOk { - sliceOk = false - break - } +type Sudorule struct { + + /* +Rule name + + */ + Cn string `json:"cn,omitempty"` + + /* +Description + + */ + Description *string `json:"description,omitempty"` + + /* +Enabled + + */ + Ipaenabledflag *bool `json:"ipaenabledflag,omitempty"` + + /* +User category +User category the rule applies to + */ + Usercategory *string `json:"usercategory,omitempty"` + + /* +Host category +Host category the rule applies to + */ + Hostcategory *string `json:"hostcategory,omitempty"` + + /* +Command category +Command category the rule applies to + */ + Cmdcategory *string `json:"cmdcategory,omitempty"` + + /* +RunAs User category +RunAs User category the rule applies to + */ + Ipasudorunasusercategory *string `json:"ipasudorunasusercategory,omitempty"` + + /* +RunAs Group category +RunAs Group category the rule applies to + */ + Ipasudorunasgroupcategory *string `json:"ipasudorunasgroupcategory,omitempty"` + + /* +Sudo order +integer to order the Sudo rules + */ + Sudoorder *int `json:"sudoorder,omitempty"` + + /* +Users + + */ + MemberuserUser *string `json:"memberuser_user,omitempty"` + + /* +User Groups + + */ + MemberuserGroup *string `json:"memberuser_group,omitempty"` + + /* +External User +External User the rule applies to (sudorule-find only) + */ + Externaluser *string `json:"externaluser,omitempty"` + + /* +Hosts + + */ + MemberhostHost *string `json:"memberhost_host,omitempty"` + + /* +Host Groups + + */ + MemberhostHostgroup *string `json:"memberhost_hostgroup,omitempty"` + + /* +Host Masks + + */ + Hostmask []string `json:"hostmask,omitempty"` + + /* +External host + + */ + Externalhost *[]string `json:"externalhost,omitempty"` + + /* +Sudo Allow Commands + + */ + MemberallowcmdSudocmd *string `json:"memberallowcmd_sudocmd,omitempty"` + + /* +Sudo Deny Commands + + */ + MemberdenycmdSudocmd *string `json:"memberdenycmd_sudocmd,omitempty"` + + /* +Sudo Allow Command Groups + + */ + MemberallowcmdSudocmdgroup *string `json:"memberallowcmd_sudocmdgroup,omitempty"` + + /* +Sudo Deny Command Groups + + */ + MemberdenycmdSudocmdgroup *string `json:"memberdenycmd_sudocmdgroup,omitempty"` + + /* +RunAs Users +Run as a user + */ + IpasudorunasUser *string `json:"ipasudorunas_user,omitempty"` + + /* +Groups of RunAs Users +Run as any user within a specified group + */ + IpasudorunasGroup *string `json:"ipasudorunas_group,omitempty"` + + /* +RunAs External User +External User the commands can run as (sudorule-find only) + */ + Ipasudorunasextuser *string `json:"ipasudorunasextuser,omitempty"` + + /* +External Groups of RunAs Users +External Groups of users that the command can run as + */ + Ipasudorunasextusergroup *string `json:"ipasudorunasextusergroup,omitempty"` + + /* +RunAs Groups +Run with the gid of a specified POSIX group + */ + IpasudorunasgroupGroup *string `json:"ipasudorunasgroup_group,omitempty"` + + /* +RunAs External Group +External Group the commands can run as (sudorule-find only) + */ + Ipasudorunasextgroup *string `json:"ipasudorunasextgroup,omitempty"` + + /* +Sudo Option + + */ + Ipasudoopt *string `json:"ipasudoopt,omitempty"` + } - sliceV = append(sliceV, itemV) +func (t *Sudorule) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Sudorule[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Sudorule%v", string(b)) +} - } - } +type jsonSudorule struct { + + Cn interface{} `json:"cn"` + + Description interface{} `json:"description"` + + Ipaenabledflag interface{} `json:"ipaenabledflag"` + + Usercategory interface{} `json:"usercategory"` + + Hostcategory interface{} `json:"hostcategory"` + + Cmdcategory interface{} `json:"cmdcategory"` + + Ipasudorunasusercategory interface{} `json:"ipasudorunasusercategory"` + + Ipasudorunasgroupcategory interface{} `json:"ipasudorunasgroupcategory"` + + Sudoorder interface{} `json:"sudoorder"` + + MemberuserUser interface{} `json:"memberuser_user"` + + MemberuserGroup interface{} `json:"memberuser_group"` + + Externaluser interface{} `json:"externaluser"` + + MemberhostHost interface{} `json:"memberhost_host"` + + MemberhostHostgroup interface{} `json:"memberhost_hostgroup"` + + Hostmask interface{} `json:"hostmask"` + + Externalhost interface{} `json:"externalhost"` + + MemberallowcmdSudocmd interface{} `json:"memberallowcmd_sudocmd"` + + MemberdenycmdSudocmd interface{} `json:"memberdenycmd_sudocmd"` + + MemberallowcmdSudocmdgroup interface{} `json:"memberallowcmd_sudocmdgroup"` + + MemberdenycmdSudocmdgroup interface{} `json:"memberdenycmd_sudocmdgroup"` + + IpasudorunasUser interface{} `json:"ipasudorunas_user"` + + IpasudorunasGroup interface{} `json:"ipasudorunas_group"` + + Ipasudorunasextuser interface{} `json:"ipasudorunasextuser"` + + Ipasudorunasextusergroup interface{} `json:"ipasudorunasextusergroup"` + + IpasudorunasgroupGroup interface{} `json:"ipasudorunasgroup_group"` + + Ipasudorunasextgroup interface{} `json:"ipasudorunasextgroup"` + + Ipasudoopt interface{} `json:"ipasudoopt"` + } - if plainOk { - out.OwnerGroup = &plainV - } else if sliceOk { +func (out *Sudorule) UnmarshalJSON(data []byte) error { + var in jsonSudorule + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Cn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) + } + out.Cn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Description != nil { + raw := in.Description + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Description = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Description = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipaenabledflag != nil { + raw := in.Ipaenabledflag + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipaenabledflag = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipaenabledflag = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipaenabledflag: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipaenabledflag: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Usercategory != nil { + raw := in.Usercategory + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Usercategory = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Usercategory = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Usercategory: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Usercategory: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Hostcategory != nil { + raw := in.Hostcategory + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Hostcategory = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Hostcategory = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Hostcategory: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Hostcategory: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Cmdcategory != nil { + raw := in.Cmdcategory + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cmdcategory = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Cmdcategory = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Cmdcategory: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Cmdcategory: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipasudorunasusercategory != nil { + raw := in.Ipasudorunasusercategory + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipasudorunasusercategory = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipasudorunasusercategory = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipasudorunasusercategory: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipasudorunasusercategory: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipasudorunasgroupcategory != nil { + raw := in.Ipasudorunasgroupcategory + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipasudorunasgroupcategory = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipasudorunasgroupcategory = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipasudorunasgroupcategory: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipasudorunasgroupcategory: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Sudoorder != nil { + raw := in.Sudoorder + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Sudoorder: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Sudoorder = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Sudoorder = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Sudoorder: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Sudoorder: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberuserUser != nil { + raw := in.MemberuserUser + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberuserUser = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberuserUser = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberuserUser: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberuserUser: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberuserGroup != nil { + raw := in.MemberuserGroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberuserGroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberuserGroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberuserGroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberuserGroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Externaluser != nil { + raw := in.Externaluser + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Externaluser = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Externaluser = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Externaluser: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Externaluser: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberhostHost != nil { + raw := in.MemberhostHost + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberhostHost = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberhostHost = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberhostHost: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberhostHost: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberhostHostgroup != nil { + raw := in.MemberhostHostgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberhostHostgroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberhostHostgroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberhostHostgroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberhostHostgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Hostmask + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Hostmask = []string{plainV} + } else if sliceOk { + + if len(sliceV) < 1 { + return fmt.Errorf("unexpected value for field Hostmask: %v; expected at least one element", raw) + } + + out.Hostmask = sliceV + } else { + return fmt.Errorf("unexpected value for field Hostmask: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Externalhost != nil { + raw := in.Externalhost + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Externalhost = &[]string{plainV} + } else if sliceOk { + + out.Externalhost = &sliceV + } else { + return fmt.Errorf("unexpected value for field Externalhost: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberallowcmdSudocmd != nil { + raw := in.MemberallowcmdSudocmd + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberallowcmdSudocmd = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberallowcmdSudocmd = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberallowcmdSudocmd: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberallowcmdSudocmd: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberdenycmdSudocmd != nil { + raw := in.MemberdenycmdSudocmd + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberdenycmdSudocmd = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberdenycmdSudocmd = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberdenycmdSudocmd: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberdenycmdSudocmd: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberallowcmdSudocmdgroup != nil { + raw := in.MemberallowcmdSudocmdgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberallowcmdSudocmdgroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberallowcmdSudocmdgroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberallowcmdSudocmdgroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberallowcmdSudocmdgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberdenycmdSudocmdgroup != nil { + raw := in.MemberdenycmdSudocmdgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberdenycmdSudocmdgroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberdenycmdSudocmdgroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberdenycmdSudocmdgroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberdenycmdSudocmdgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.IpasudorunasUser != nil { + raw := in.IpasudorunasUser + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.IpasudorunasUser = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.IpasudorunasUser = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field IpasudorunasUser: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field IpasudorunasUser: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.IpasudorunasGroup != nil { + raw := in.IpasudorunasGroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.IpasudorunasGroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.IpasudorunasGroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field IpasudorunasGroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field IpasudorunasGroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipasudorunasextuser != nil { + raw := in.Ipasudorunasextuser + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipasudorunasextuser = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipasudorunasextuser = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipasudorunasextuser: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipasudorunasextuser: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipasudorunasextusergroup != nil { + raw := in.Ipasudorunasextusergroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipasudorunasextusergroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipasudorunasextusergroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipasudorunasextusergroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipasudorunasextusergroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.IpasudorunasgroupGroup != nil { + raw := in.IpasudorunasgroupGroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.IpasudorunasgroupGroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.IpasudorunasgroupGroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field IpasudorunasgroupGroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field IpasudorunasgroupGroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipasudorunasextgroup != nil { + raw := in.Ipasudorunasextgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipasudorunasextgroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipasudorunasextgroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipasudorunasextgroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipasudorunasextgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipasudoopt != nil { + raw := in.Ipasudoopt + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipasudoopt = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipasudoopt = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipasudoopt: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipasudoopt: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - if len(sliceV) == 1 { - out.OwnerGroup = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field OwnerGroup: %v; expected at most one element", raw) - } +type Topic struct { + + /* +Name + + */ + Name string `json:"name,omitempty"` + + /* +Version + + */ + Version string `json:"version,omitempty"` + + /* +Full name + + */ + FullName string `json:"full_name,omitempty"` + + /* +Documentation + + */ + Doc *string `json:"doc,omitempty"` + + /* +Exclude from + + */ + Exclude *[]string `json:"exclude,omitempty"` + + /* +Include in + + */ + Include *[]string `json:"include,omitempty"` + + /* +Help topic + + */ + TopicTopic *string `json:"topic_topic,omitempty"` + } - } else { - return fmt.Errorf("unexpected value for field OwnerGroup: %v (%v)", raw, reflect.TypeOf(raw)) - } +func (t *Topic) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Topic[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Topic%v", string(b)) +} - } +type jsonTopic struct { + + Name interface{} `json:"name"` + + Version interface{} `json:"version"` + + FullName interface{} `json:"full_name"` + + Doc interface{} `json:"doc"` + + Exclude interface{} `json:"exclude"` + + Include interface{} `json:"include"` + + TopicTopic interface{} `json:"topic_topic"` + } - if in.OwnerService != nil { - raw := in.OwnerService - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +func (out *Topic) UnmarshalJSON(data []byte) error { + var in jsonTopic + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Name + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Name = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Name: %v; expected exactly one element", raw) + } + out.Name = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Name: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Version + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Version = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Version: %v; expected exactly one element", raw) + } + out.Version = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Version: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.FullName + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.FullName = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field FullName: %v; expected exactly one element", raw) + } + out.FullName = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field FullName: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Doc != nil { + raw := in.Doc + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Doc = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Doc = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Doc: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Doc: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Exclude != nil { + raw := in.Exclude + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Exclude = &[]string{plainV} + } else if sliceOk { + + out.Exclude = &sliceV + } else { + return fmt.Errorf("unexpected value for field Exclude: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Include != nil { + raw := in.Include + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Include = &[]string{plainV} + } else if sliceOk { + + out.Include = &sliceV + } else { + return fmt.Errorf("unexpected value for field Include: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.TopicTopic != nil { + raw := in.TopicTopic + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.TopicTopic = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.TopicTopic = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field TopicTopic: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field TopicTopic: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - itemV, itemOk := rawItem.(string) +type Topologysegment struct { + + /* +Segment name +Arbitrary string identifying the segment + */ + Cn string `json:"cn,omitempty"` + + /* +Left node +Left replication node - an IPA server + */ + Iparepltoposegmentleftnode string `json:"iparepltoposegmentleftnode,omitempty"` + + /* +Right node +Right replication node - an IPA server + */ + Iparepltoposegmentrightnode string `json:"iparepltoposegmentrightnode,omitempty"` + + /* +Connectivity +Direction of replication between left and right replication node + */ + Iparepltoposegmentdirection string `json:"iparepltoposegmentdirection,omitempty"` + + /* +Attributes to strip +A space separated list of attributes which are removed from replication updates. + */ + Nsds5replicastripattrs *string `json:"nsds5replicastripattrs,omitempty"` + + /* +Attributes to replicate +Attributes that are not replicated to a consumer server during a fractional update. E.g., `(objectclass=*) $ EXCLUDE accountlockout memberof + */ + Nsds5replicatedattributelist *string `json:"nsds5replicatedattributelist,omitempty"` + + /* +Attributes for total update +Attributes that are not replicated to a consumer server during a total update. E.g. (objectclass=*) $ EXCLUDE accountlockout + */ + Nsds5replicatedattributelisttotal *string `json:"nsds5replicatedattributelisttotal,omitempty"` + + /* +Session timeout +Number of seconds outbound LDAP operations waits for a response from the remote replica before timing out and failing + */ + Nsds5replicatimeout *int `json:"nsds5replicatimeout,omitempty"` + + /* +Replication agreement enabled +Whether a replication agreement is active, meaning whether replication is occurring per that agreement + */ + Nsds5replicaenabled *string `json:"nsds5replicaenabled,omitempty"` + } - if !itemOk { - sliceOk = false - break - } +func (t *Topologysegment) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Topologysegment[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Topologysegment%v", string(b)) +} - sliceV = append(sliceV, itemV) +type jsonTopologysegment struct { + + Cn interface{} `json:"cn"` + + Iparepltoposegmentleftnode interface{} `json:"iparepltoposegmentleftnode"` + + Iparepltoposegmentrightnode interface{} `json:"iparepltoposegmentrightnode"` + + Iparepltoposegmentdirection interface{} `json:"iparepltoposegmentdirection"` + + Nsds5replicastripattrs interface{} `json:"nsds5replicastripattrs"` + + Nsds5replicatedattributelist interface{} `json:"nsds5replicatedattributelist"` + + Nsds5replicatedattributelisttotal interface{} `json:"nsds5replicatedattributelisttotal"` + + Nsds5replicatimeout interface{} `json:"nsds5replicatimeout"` + + Nsds5replicaenabled interface{} `json:"nsds5replicaenabled"` + } - } - } +func (out *Topologysegment) UnmarshalJSON(data []byte) error { + var in jsonTopologysegment + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Cn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) + } + out.Cn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Iparepltoposegmentleftnode + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Iparepltoposegmentleftnode = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Iparepltoposegmentleftnode: %v; expected exactly one element", raw) + } + out.Iparepltoposegmentleftnode = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Iparepltoposegmentleftnode: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Iparepltoposegmentrightnode + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Iparepltoposegmentrightnode = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Iparepltoposegmentrightnode: %v; expected exactly one element", raw) + } + out.Iparepltoposegmentrightnode = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Iparepltoposegmentrightnode: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Iparepltoposegmentdirection + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Iparepltoposegmentdirection = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Iparepltoposegmentdirection: %v; expected exactly one element", raw) + } + out.Iparepltoposegmentdirection = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Iparepltoposegmentdirection: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Nsds5replicastripattrs != nil { + raw := in.Nsds5replicastripattrs + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Nsds5replicastripattrs = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Nsds5replicastripattrs = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Nsds5replicastripattrs: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Nsds5replicastripattrs: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Nsds5replicatedattributelist != nil { + raw := in.Nsds5replicatedattributelist + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Nsds5replicatedattributelist = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Nsds5replicatedattributelist = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Nsds5replicatedattributelist: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Nsds5replicatedattributelist: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Nsds5replicatedattributelisttotal != nil { + raw := in.Nsds5replicatedattributelisttotal + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Nsds5replicatedattributelisttotal = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Nsds5replicatedattributelisttotal = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Nsds5replicatedattributelisttotal: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Nsds5replicatedattributelisttotal: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Nsds5replicatimeout != nil { + raw := in.Nsds5replicatimeout + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Nsds5replicatimeout: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Nsds5replicatimeout = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Nsds5replicatimeout = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Nsds5replicatimeout: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Nsds5replicatimeout: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Nsds5replicaenabled != nil { + raw := in.Nsds5replicaenabled + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Nsds5replicaenabled = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Nsds5replicaenabled = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Nsds5replicaenabled: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Nsds5replicaenabled: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - if plainOk { - out.OwnerService = &plainV - } else if sliceOk { +type Topologysuffix struct { + + /* +Suffix name - if len(sliceV) == 1 { - out.OwnerService = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field OwnerService: %v; expected at most one element", raw) - } + */ + Cn string `json:"cn,omitempty"` + + /* +Managed LDAP suffix DN - } else { - return fmt.Errorf("unexpected value for field OwnerService: %v (%v)", raw, reflect.TypeOf(raw)) - } + */ + Iparepltopoconfroot string `json:"iparepltopoconfroot,omitempty"` + } - } +func (t *Topologysuffix) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Topologysuffix[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Topologysuffix%v", string(b)) +} - if in.Owner != nil { - raw := in.Owner - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +type jsonTopologysuffix struct { + + Cn interface{} `json:"cn"` + + Iparepltopoconfroot interface{} `json:"iparepltopoconfroot"` + } - itemV, itemOk := rawItem.(string) +func (out *Topologysuffix) UnmarshalJSON(data []byte) error { + var in jsonTopologysuffix + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Cn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) + } + out.Cn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Iparepltopoconfroot + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Iparepltopoconfroot = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Iparepltopoconfroot: %v; expected exactly one element", raw) + } + out.Iparepltopoconfroot = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Iparepltopoconfroot: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - if !itemOk { - sliceOk = false - break - } +type Trust struct { + + /* +Realm name + + */ + Cn string `json:"cn,omitempty"` + + /* +Domain NetBIOS name + + */ + Ipantflatname string `json:"ipantflatname,omitempty"` + + /* +Domain Security Identifier + + */ + Ipanttrusteddomainsid string `json:"ipanttrusteddomainsid,omitempty"` + + /* +SID blacklist incoming + + */ + Ipantsidblacklistincoming *[]string `json:"ipantsidblacklistincoming,omitempty"` + + /* +SID blacklist outgoing + + */ + Ipantsidblacklistoutgoing *[]string `json:"ipantsidblacklistoutgoing,omitempty"` + + /* +Trust direction + + */ + Trustdirection string `json:"trustdirection,omitempty"` + + /* +Trust type + + */ + Trusttype string `json:"trusttype,omitempty"` + + /* +Trust status + + */ + Truststatus string `json:"truststatus,omitempty"` + + /* +UPN suffixes + + */ + Ipantadditionalsuffixes *[]string `json:"ipantadditionalsuffixes,omitempty"` + } - sliceV = append(sliceV, itemV) +func (t *Trust) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Trust[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Trust%v", string(b)) +} - } - } +type jsonTrust struct { + + Cn interface{} `json:"cn"` + + Ipantflatname interface{} `json:"ipantflatname"` + + Ipanttrusteddomainsid interface{} `json:"ipanttrusteddomainsid"` + + Ipantsidblacklistincoming interface{} `json:"ipantsidblacklistincoming"` + + Ipantsidblacklistoutgoing interface{} `json:"ipantsidblacklistoutgoing"` + + Trustdirection interface{} `json:"trustdirection"` + + Trusttype interface{} `json:"trusttype"` + + Truststatus interface{} `json:"truststatus"` + + Ipantadditionalsuffixes interface{} `json:"ipantadditionalsuffixes"` + } - if plainOk { - out.Owner = &plainV - } else if sliceOk { +func (out *Trust) UnmarshalJSON(data []byte) error { + var in jsonTrust + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Cn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) + } + out.Cn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Ipantflatname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipantflatname = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipantflatname: %v; expected exactly one element", raw) + } + out.Ipantflatname = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipantflatname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Ipanttrusteddomainsid + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipanttrusteddomainsid = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipanttrusteddomainsid: %v; expected exactly one element", raw) + } + out.Ipanttrusteddomainsid = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipanttrusteddomainsid: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipantsidblacklistincoming != nil { + raw := in.Ipantsidblacklistincoming + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipantsidblacklistincoming = &[]string{plainV} + } else if sliceOk { + + out.Ipantsidblacklistincoming = &sliceV + } else { + return fmt.Errorf("unexpected value for field Ipantsidblacklistincoming: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipantsidblacklistoutgoing != nil { + raw := in.Ipantsidblacklistoutgoing + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipantsidblacklistoutgoing = &[]string{plainV} + } else if sliceOk { + + out.Ipantsidblacklistoutgoing = &sliceV + } else { + return fmt.Errorf("unexpected value for field Ipantsidblacklistoutgoing: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Trustdirection + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Trustdirection = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Trustdirection: %v; expected exactly one element", raw) + } + out.Trustdirection = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Trustdirection: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Trusttype + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Trusttype = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Trusttype: %v; expected exactly one element", raw) + } + out.Trusttype = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Trusttype: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Truststatus + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Truststatus = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Truststatus: %v; expected exactly one element", raw) + } + out.Truststatus = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Truststatus: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipantadditionalsuffixes != nil { + raw := in.Ipantadditionalsuffixes + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipantadditionalsuffixes = &[]string{plainV} + } else if sliceOk { + + out.Ipantadditionalsuffixes = &sliceV + } else { + return fmt.Errorf("unexpected value for field Ipantadditionalsuffixes: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - if len(sliceV) == 1 { - out.Owner = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Owner: %v; expected at most one element", raw) - } +type Trustconfig struct { + + /* +Domain + + */ + Cn string `json:"cn,omitempty"` + + /* +Security Identifier + + */ + Ipantsecurityidentifier string `json:"ipantsecurityidentifier,omitempty"` + + /* +NetBIOS name + + */ + Ipantflatname string `json:"ipantflatname,omitempty"` + + /* +Domain GUID + + */ + Ipantdomainguid string `json:"ipantdomainguid,omitempty"` + + /* +Fallback primary group + + */ + Ipantfallbackprimarygroup string `json:"ipantfallbackprimarygroup,omitempty"` + + /* +IPA AD trust agents +IPA servers configured as AD trust agents + */ + AdTrustAgentServer *[]string `json:"ad_trust_agent_server,omitempty"` + + /* +IPA AD trust controllers +IPA servers configured as AD trust controllers + */ + AdTrustControllerServer *[]string `json:"ad_trust_controller_server,omitempty"` + } - } else { - return fmt.Errorf("unexpected value for field Owner: %v (%v)", raw, reflect.TypeOf(raw)) - } +func (t *Trustconfig) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Trustconfig[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Trustconfig%v", string(b)) +} - } +type jsonTrustconfig struct { + + Cn interface{} `json:"cn"` + + Ipantsecurityidentifier interface{} `json:"ipantsecurityidentifier"` + + Ipantflatname interface{} `json:"ipantflatname"` + + Ipantdomainguid interface{} `json:"ipantdomainguid"` + + Ipantfallbackprimarygroup interface{} `json:"ipantfallbackprimarygroup"` + + AdTrustAgentServer interface{} `json:"ad_trust_agent_server"` + + AdTrustControllerServer interface{} `json:"ad_trust_controller_server"` + } - if in.Service != nil { - raw := in.Service - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +func (out *Trustconfig) UnmarshalJSON(data []byte) error { + var in jsonTrustconfig + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Cn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) + } + out.Cn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Ipantsecurityidentifier + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipantsecurityidentifier = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipantsecurityidentifier: %v; expected exactly one element", raw) + } + out.Ipantsecurityidentifier = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipantsecurityidentifier: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Ipantflatname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipantflatname = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipantflatname: %v; expected exactly one element", raw) + } + out.Ipantflatname = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipantflatname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Ipantdomainguid + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipantdomainguid = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipantdomainguid: %v; expected exactly one element", raw) + } + out.Ipantdomainguid = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipantdomainguid: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Ipantfallbackprimarygroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipantfallbackprimarygroup = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Ipantfallbackprimarygroup: %v; expected exactly one element", raw) + } + out.Ipantfallbackprimarygroup = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Ipantfallbackprimarygroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.AdTrustAgentServer != nil { + raw := in.AdTrustAgentServer + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.AdTrustAgentServer = &[]string{plainV} + } else if sliceOk { + + out.AdTrustAgentServer = &sliceV + } else { + return fmt.Errorf("unexpected value for field AdTrustAgentServer: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.AdTrustControllerServer != nil { + raw := in.AdTrustControllerServer + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.AdTrustControllerServer = &[]string{plainV} + } else if sliceOk { + + out.AdTrustControllerServer = &sliceV + } else { + return fmt.Errorf("unexpected value for field AdTrustControllerServer: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - itemV, itemOk := rawItem.(string) +type Trustdomain struct { + + /* +Domain name + + */ + Cn string `json:"cn,omitempty"` + + /* +Domain NetBIOS name + + */ + Ipantflatname *string `json:"ipantflatname,omitempty"` + + /* +Domain Security Identifier + + */ + Ipanttrusteddomainsid *string `json:"ipanttrusteddomainsid,omitempty"` + + /* +Domain enabled + + */ + DomainEnabled *bool `json:"domain_enabled,omitempty"` + } - if !itemOk { - sliceOk = false - break - } +func (t *Trustdomain) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Trustdomain[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Trustdomain%v", string(b)) +} - sliceV = append(sliceV, itemV) +type jsonTrustdomain struct { + + Cn interface{} `json:"cn"` + + Ipantflatname interface{} `json:"ipantflatname"` + + Ipanttrusteddomainsid interface{} `json:"ipanttrusteddomainsid"` + + DomainEnabled interface{} `json:"domain_enabled"` + } - } - } +func (out *Trustdomain) UnmarshalJSON(data []byte) error { + var in jsonTrustdomain + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Cn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) + } + out.Cn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipantflatname != nil { + raw := in.Ipantflatname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipantflatname = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipantflatname = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipantflatname: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipantflatname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipanttrusteddomainsid != nil { + raw := in.Ipanttrusteddomainsid + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipanttrusteddomainsid = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipanttrusteddomainsid = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipanttrusteddomainsid: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipanttrusteddomainsid: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.DomainEnabled != nil { + raw := in.DomainEnabled + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.DomainEnabled = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.DomainEnabled = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field DomainEnabled: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field DomainEnabled: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - if plainOk { - out.Service = &plainV - } else if sliceOk { +type User struct { + + /* +User login + + */ + UID string `json:"uid,omitempty"` + + /* +First name + + */ + Givenname *string `json:"givenname,omitempty"` + + /* +Last name + + */ + Sn string `json:"sn,omitempty"` + + /* +Full name + + */ + Cn *string `json:"cn,omitempty"` + + /* +Display name + + */ + Displayname *string `json:"displayname,omitempty"` + + /* +Initials + + */ + Initials *string `json:"initials,omitempty"` + + /* +Home directory + + */ + Homedirectory *string `json:"homedirectory,omitempty"` + + /* +GECOS + + */ + Gecos *string `json:"gecos,omitempty"` + + /* +Login shell + + */ + Loginshell *string `json:"loginshell,omitempty"` + + /* +Principal name + + */ + Krbcanonicalname *string `json:"krbcanonicalname,omitempty"` + + /* +Principal alias + + */ + Krbprincipalname *[]string `json:"krbprincipalname,omitempty"` + + /* +Kerberos principal expiration + + */ + Krbprincipalexpiration *time.Time `json:"krbprincipalexpiration,omitempty"` + + /* +User password expiration + + */ + Krbpasswordexpiration *time.Time `json:"krbpasswordexpiration,omitempty"` + + /* +Email address + + */ + Mail *[]string `json:"mail,omitempty"` + + /* +Password +Prompt to set the user password + */ + Userpassword *string `json:"userpassword,omitempty"` + + /* + +Generate a random user password + */ + Random *bool `json:"random,omitempty"` + + /* +Random password + + */ + Randompassword *string `json:"randompassword,omitempty"` + + /* +UID +User ID Number (system will assign one if not provided) + */ + Uidnumber *int `json:"uidnumber,omitempty"` + + /* +GID +Group ID Number + */ + Gidnumber *int `json:"gidnumber,omitempty"` + + /* +Street address + + */ + Street *string `json:"street,omitempty"` + + /* +City + + */ + L *string `json:"l,omitempty"` + + /* +State/Province + + */ + St *string `json:"st,omitempty"` + + /* +ZIP + + */ + Postalcode *string `json:"postalcode,omitempty"` + + /* +Telephone Number + + */ + Telephonenumber *[]string `json:"telephonenumber,omitempty"` + + /* +Mobile Telephone Number + + */ + Mobile *[]string `json:"mobile,omitempty"` + + /* +Pager Number + + */ + Pager *[]string `json:"pager,omitempty"` + + /* +Fax Number + + */ + Facsimiletelephonenumber *[]string `json:"facsimiletelephonenumber,omitempty"` + + /* +Org. Unit + + */ + Ou *string `json:"ou,omitempty"` + + /* +Job Title + + */ + Title *string `json:"title,omitempty"` + + /* +Manager + + */ + Manager *string `json:"manager,omitempty"` + + /* +Car License + + */ + Carlicense *[]string `json:"carlicense,omitempty"` + + /* +SSH public key + + */ + Ipasshpubkey *[]string `json:"ipasshpubkey,omitempty"` + + /* +SSH public key fingerprint + + */ + Sshpubkeyfp *[]string `json:"sshpubkeyfp,omitempty"` + + /* +User authentication types +Types of supported user authentication + */ + Ipauserauthtype *[]string `json:"ipauserauthtype,omitempty"` + + /* +Class +User category (semantics placed on this attribute are for local interpretation) + */ + Userclass *[]string `json:"userclass,omitempty"` + + /* +RADIUS proxy configuration + + */ + Ipatokenradiusconfiglink *string `json:"ipatokenradiusconfiglink,omitempty"` + + /* +RADIUS proxy username + + */ + Ipatokenradiususername *string `json:"ipatokenradiususername,omitempty"` + + /* +Department Number + + */ + Departmentnumber *[]string `json:"departmentnumber,omitempty"` + + /* +Employee Number + + */ + Employeenumber *string `json:"employeenumber,omitempty"` + + /* +Employee Type + + */ + Employeetype *string `json:"employeetype,omitempty"` + + /* +Preferred Language + + */ + Preferredlanguage *string `json:"preferredlanguage,omitempty"` + + /* +Certificate +Base-64 encoded user certificate + */ + Usercertificate *[]interface{} `json:"usercertificate,omitempty"` + + /* +Certificate mapping data +Certificate mapping data + */ + Ipacertmapdata *[]string `json:"ipacertmapdata,omitempty"` + + /* +Account disabled + + */ + Nsaccountlock *bool `json:"nsaccountlock,omitempty"` + + /* +Preserved user + + */ + Preserved *bool `json:"preserved,omitempty"` + + /* +Password + + */ + HasPassword *bool `json:"has_password,omitempty"` + + /* +Member of groups + + */ + MemberofGroup *[]string `json:"memberof_group,omitempty"` + + /* +Roles + + */ + MemberofRole *[]string `json:"memberof_role,omitempty"` + + /* +Member of netgroups + + */ + MemberofNetgroup *[]string `json:"memberof_netgroup,omitempty"` + + /* +Member of Sudo rule + + */ + MemberofSudorule *[]string `json:"memberof_sudorule,omitempty"` + + /* +Member of HBAC rule + + */ + MemberofHbacrule *[]string `json:"memberof_hbacrule,omitempty"` + + /* +Indirect Member of group + + */ + MemberofindirectGroup *string `json:"memberofindirect_group,omitempty"` + + /* +Indirect Member of netgroup + + */ + MemberofindirectNetgroup *string `json:"memberofindirect_netgroup,omitempty"` + + /* +Indirect Member of role + + */ + MemberofindirectRole *string `json:"memberofindirect_role,omitempty"` + + /* +Indirect Member of Sudo rule + + */ + MemberofindirectSudorule *string `json:"memberofindirect_sudorule,omitempty"` + + /* +Indirect Member of HBAC rule + + */ + MemberofindirectHbacrule *string `json:"memberofindirect_hbacrule,omitempty"` + + /* +Kerberos keys available + + */ + HasKeytab *bool `json:"has_keytab,omitempty"` + } - if len(sliceV) == 1 { - out.Service = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Service: %v; expected at most one element", raw) - } +func (t *User) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("User[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("User%v", string(b)) +} - } else { - return fmt.Errorf("unexpected value for field Service: %v (%v)", raw, reflect.TypeOf(raw)) - } +type jsonUser struct { + + UID interface{} `json:"uid"` + + Givenname interface{} `json:"givenname"` + + Sn interface{} `json:"sn"` + + Cn interface{} `json:"cn"` + + Displayname interface{} `json:"displayname"` + + Initials interface{} `json:"initials"` + + Homedirectory interface{} `json:"homedirectory"` + + Gecos interface{} `json:"gecos"` + + Loginshell interface{} `json:"loginshell"` + + Krbcanonicalname interface{} `json:"krbcanonicalname"` + + Krbprincipalname interface{} `json:"krbprincipalname"` + + Krbprincipalexpiration interface{} `json:"krbprincipalexpiration"` + + Krbpasswordexpiration interface{} `json:"krbpasswordexpiration"` + + Mail interface{} `json:"mail"` + + Userpassword interface{} `json:"userpassword"` + + Random interface{} `json:"random"` + + Randompassword interface{} `json:"randompassword"` + + Uidnumber interface{} `json:"uidnumber"` + + Gidnumber interface{} `json:"gidnumber"` + + Street interface{} `json:"street"` + + L interface{} `json:"l"` + + St interface{} `json:"st"` + + Postalcode interface{} `json:"postalcode"` + + Telephonenumber interface{} `json:"telephonenumber"` + + Mobile interface{} `json:"mobile"` + + Pager interface{} `json:"pager"` + + Facsimiletelephonenumber interface{} `json:"facsimiletelephonenumber"` + + Ou interface{} `json:"ou"` + + Title interface{} `json:"title"` + + Manager interface{} `json:"manager"` + + Carlicense interface{} `json:"carlicense"` + + Ipasshpubkey interface{} `json:"ipasshpubkey"` + + Sshpubkeyfp interface{} `json:"sshpubkeyfp"` + + Ipauserauthtype interface{} `json:"ipauserauthtype"` + + Userclass interface{} `json:"userclass"` + + Ipatokenradiusconfiglink interface{} `json:"ipatokenradiusconfiglink"` + + Ipatokenradiususername interface{} `json:"ipatokenradiususername"` + + Departmentnumber interface{} `json:"departmentnumber"` + + Employeenumber interface{} `json:"employeenumber"` + + Employeetype interface{} `json:"employeetype"` + + Preferredlanguage interface{} `json:"preferredlanguage"` + + Usercertificate interface{} `json:"usercertificate"` + + Ipacertmapdata interface{} `json:"ipacertmapdata"` + + Nsaccountlock interface{} `json:"nsaccountlock"` + + Preserved interface{} `json:"preserved"` + + HasPassword interface{} `json:"has_password"` + + MemberofGroup interface{} `json:"memberof_group"` + + MemberofRole interface{} `json:"memberof_role"` + + MemberofNetgroup interface{} `json:"memberof_netgroup"` + + MemberofSudorule interface{} `json:"memberof_sudorule"` + + MemberofHbacrule interface{} `json:"memberof_hbacrule"` + + MemberofindirectGroup interface{} `json:"memberofindirect_group"` + + MemberofindirectNetgroup interface{} `json:"memberofindirect_netgroup"` + + MemberofindirectRole interface{} `json:"memberofindirect_role"` + + MemberofindirectSudorule interface{} `json:"memberofindirect_sudorule"` + + MemberofindirectHbacrule interface{} `json:"memberofindirect_hbacrule"` + + HasKeytab interface{} `json:"has_keytab"` + } - } +func (out *User) UnmarshalJSON(data []byte) error { + var in jsonUser + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.UID + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.UID = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field UID: %v; expected exactly one element", raw) + } + out.UID = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field UID: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Givenname != nil { + raw := in.Givenname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Givenname = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Givenname = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Givenname: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Givenname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Sn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Sn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Sn: %v; expected exactly one element", raw) + } + out.Sn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Sn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Cn != nil { + raw := in.Cn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cn = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Cn = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Cn: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Displayname != nil { + raw := in.Displayname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Displayname = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Displayname = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Displayname: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Displayname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Initials != nil { + raw := in.Initials + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Initials = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Initials = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Initials: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Initials: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Homedirectory != nil { + raw := in.Homedirectory + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Homedirectory = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Homedirectory = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Homedirectory: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Homedirectory: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Gecos != nil { + raw := in.Gecos + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Gecos = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Gecos = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Gecos: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Gecos: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Loginshell != nil { + raw := in.Loginshell + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Loginshell = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Loginshell = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Loginshell: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Loginshell: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Krbcanonicalname != nil { + raw := in.Krbcanonicalname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Krbcanonicalname = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Krbcanonicalname = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Krbcanonicalname: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Krbcanonicalname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Krbprincipalname != nil { + raw := in.Krbprincipalname + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Krbprincipalname = &[]string{plainV} + } else if sliceOk { + + out.Krbprincipalname = &sliceV + } else { + return fmt.Errorf("unexpected value for field Krbprincipalname: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Krbprincipalexpiration != nil { + raw := in.Krbprincipalexpiration + plainV, plainOk := raw.(time.Time) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []time.Time + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(time.Time) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Krbprincipalexpiration = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Krbprincipalexpiration = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Krbprincipalexpiration: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Krbprincipalexpiration: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Krbpasswordexpiration != nil { + raw := in.Krbpasswordexpiration + plainV, plainOk := raw.(time.Time) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []time.Time + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(time.Time) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Krbpasswordexpiration = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Krbpasswordexpiration = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Krbpasswordexpiration: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Krbpasswordexpiration: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Mail != nil { + raw := in.Mail + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Mail = &[]string{plainV} + } else if sliceOk { + + out.Mail = &sliceV + } else { + return fmt.Errorf("unexpected value for field Mail: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Userpassword != nil { + raw := in.Userpassword + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Userpassword = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Userpassword = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Userpassword: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Userpassword: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Random != nil { + raw := in.Random + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Random = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Random = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Random: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Random: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Randompassword != nil { + raw := in.Randompassword + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Randompassword = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Randompassword = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Randompassword: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Randompassword: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Uidnumber != nil { + raw := in.Uidnumber + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Uidnumber: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Uidnumber = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Uidnumber = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Uidnumber: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Uidnumber: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Gidnumber != nil { + raw := in.Gidnumber + plainV, plainOk := raw.(int) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []int + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + intV, e := strconv.Atoi(itemV) + if e != nil { + return fmt.Errorf("unexpected value for field Gidnumber: %v (hit string which couldn't be converted to int)", raw) + } + sliceV = append(sliceV, intV) + + } + } + + if plainOk { + out.Gidnumber = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Gidnumber = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Gidnumber: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Gidnumber: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Street != nil { + raw := in.Street + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Street = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Street = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Street: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Street: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.L != nil { + raw := in.L + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.L = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.L = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field L: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field L: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.St != nil { + raw := in.St + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.St = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.St = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field St: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field St: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Postalcode != nil { + raw := in.Postalcode + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Postalcode = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Postalcode = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Postalcode: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Postalcode: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Telephonenumber != nil { + raw := in.Telephonenumber + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Telephonenumber = &[]string{plainV} + } else if sliceOk { + + out.Telephonenumber = &sliceV + } else { + return fmt.Errorf("unexpected value for field Telephonenumber: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Mobile != nil { + raw := in.Mobile + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Mobile = &[]string{plainV} + } else if sliceOk { + + out.Mobile = &sliceV + } else { + return fmt.Errorf("unexpected value for field Mobile: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Pager != nil { + raw := in.Pager + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Pager = &[]string{plainV} + } else if sliceOk { + + out.Pager = &sliceV + } else { + return fmt.Errorf("unexpected value for field Pager: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Facsimiletelephonenumber != nil { + raw := in.Facsimiletelephonenumber + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Facsimiletelephonenumber = &[]string{plainV} + } else if sliceOk { + + out.Facsimiletelephonenumber = &sliceV + } else { + return fmt.Errorf("unexpected value for field Facsimiletelephonenumber: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ou != nil { + raw := in.Ou + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ou = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ou = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ou: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ou: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Title != nil { + raw := in.Title + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Title = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Title = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Title: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Title: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Manager != nil { + raw := in.Manager + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Manager = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Manager = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Manager: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Manager: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Carlicense != nil { + raw := in.Carlicense + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Carlicense = &[]string{plainV} + } else if sliceOk { + + out.Carlicense = &sliceV + } else { + return fmt.Errorf("unexpected value for field Carlicense: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipasshpubkey != nil { + raw := in.Ipasshpubkey + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipasshpubkey = &[]string{plainV} + } else if sliceOk { + + out.Ipasshpubkey = &sliceV + } else { + return fmt.Errorf("unexpected value for field Ipasshpubkey: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Sshpubkeyfp != nil { + raw := in.Sshpubkeyfp + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Sshpubkeyfp = &[]string{plainV} + } else if sliceOk { + + out.Sshpubkeyfp = &sliceV + } else { + return fmt.Errorf("unexpected value for field Sshpubkeyfp: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipauserauthtype != nil { + raw := in.Ipauserauthtype + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipauserauthtype = &[]string{plainV} + } else if sliceOk { + + out.Ipauserauthtype = &sliceV + } else { + return fmt.Errorf("unexpected value for field Ipauserauthtype: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Userclass != nil { + raw := in.Userclass + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Userclass = &[]string{plainV} + } else if sliceOk { + + out.Userclass = &sliceV + } else { + return fmt.Errorf("unexpected value for field Userclass: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipatokenradiusconfiglink != nil { + raw := in.Ipatokenradiusconfiglink + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipatokenradiusconfiglink = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipatokenradiusconfiglink = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipatokenradiusconfiglink: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipatokenradiusconfiglink: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipatokenradiususername != nil { + raw := in.Ipatokenradiususername + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipatokenradiususername = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipatokenradiususername = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipatokenradiususername: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipatokenradiususername: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Departmentnumber != nil { + raw := in.Departmentnumber + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Departmentnumber = &[]string{plainV} + } else if sliceOk { + + out.Departmentnumber = &sliceV + } else { + return fmt.Errorf("unexpected value for field Departmentnumber: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Employeenumber != nil { + raw := in.Employeenumber + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Employeenumber = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Employeenumber = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Employeenumber: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Employeenumber: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Employeetype != nil { + raw := in.Employeetype + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Employeetype = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Employeetype = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Employeetype: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Employeetype: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Preferredlanguage != nil { + raw := in.Preferredlanguage + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Preferredlanguage = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Preferredlanguage = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Preferredlanguage: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Preferredlanguage: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Usercertificate != nil { + raw := in.Usercertificate + plainV, plainOk := raw.(interface{}) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []interface{} + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(interface{}) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Usercertificate = &[]interface{}{plainV} + } else if sliceOk { + + out.Usercertificate = &sliceV + } else { + return fmt.Errorf("unexpected value for field Usercertificate: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipacertmapdata != nil { + raw := in.Ipacertmapdata + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipacertmapdata = &[]string{plainV} + } else if sliceOk { + + out.Ipacertmapdata = &sliceV + } else { + return fmt.Errorf("unexpected value for field Ipacertmapdata: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Nsaccountlock != nil { + raw := in.Nsaccountlock + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Nsaccountlock = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Nsaccountlock = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Nsaccountlock: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Nsaccountlock: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Preserved != nil { + raw := in.Preserved + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Preserved = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Preserved = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Preserved: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Preserved: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.HasPassword != nil { + raw := in.HasPassword + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.HasPassword = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.HasPassword = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field HasPassword: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field HasPassword: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofGroup != nil { + raw := in.MemberofGroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofGroup = &[]string{plainV} + } else if sliceOk { + + out.MemberofGroup = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberofGroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofRole != nil { + raw := in.MemberofRole + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofRole = &[]string{plainV} + } else if sliceOk { + + out.MemberofRole = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberofRole: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofNetgroup != nil { + raw := in.MemberofNetgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofNetgroup = &[]string{plainV} + } else if sliceOk { + + out.MemberofNetgroup = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberofNetgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofSudorule != nil { + raw := in.MemberofSudorule + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofSudorule = &[]string{plainV} + } else if sliceOk { + + out.MemberofSudorule = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberofSudorule: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofHbacrule != nil { + raw := in.MemberofHbacrule + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofHbacrule = &[]string{plainV} + } else if sliceOk { + + out.MemberofHbacrule = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberofHbacrule: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofindirectGroup != nil { + raw := in.MemberofindirectGroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofindirectGroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberofindirectGroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberofindirectGroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberofindirectGroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofindirectNetgroup != nil { + raw := in.MemberofindirectNetgroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofindirectNetgroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberofindirectNetgroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberofindirectNetgroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberofindirectNetgroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofindirectRole != nil { + raw := in.MemberofindirectRole + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofindirectRole = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberofindirectRole = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberofindirectRole: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberofindirectRole: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofindirectSudorule != nil { + raw := in.MemberofindirectSudorule + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofindirectSudorule = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberofindirectSudorule = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberofindirectSudorule: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberofindirectSudorule: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberofindirectHbacrule != nil { + raw := in.MemberofindirectHbacrule + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberofindirectHbacrule = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.MemberofindirectHbacrule = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field MemberofindirectHbacrule: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field MemberofindirectHbacrule: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.HasKeytab != nil { + raw := in.HasKeytab + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.HasKeytab = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.HasKeytab = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field HasKeytab: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field HasKeytab: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - if in.Shared != nil { - raw := in.Shared - plainV, plainOk := raw.(bool) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []bool - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +type Userstatus struct { + + /* +Preserved user + + */ + Preserved *bool `json:"preserved,omitempty"` + + /* +Server + + */ + Server string `json:"server,omitempty"` + + /* +Failed logins + + */ + Krbloginfailedcount string `json:"krbloginfailedcount,omitempty"` + + /* +Last successful authentication + + */ + Krblastsuccessfulauth string `json:"krblastsuccessfulauth,omitempty"` + + /* +Last failed authentication + + */ + Krblastfailedauth string `json:"krblastfailedauth,omitempty"` + + /* +Time now + + */ + Now string `json:"now,omitempty"` + } - itemV, itemOk := rawItem.(bool) +func (t *Userstatus) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Userstatus[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Userstatus%v", string(b)) +} - if !itemOk { - sliceOk = false - break - } +type jsonUserstatus struct { + + Preserved interface{} `json:"preserved"` + + Server interface{} `json:"server"` + + Krbloginfailedcount interface{} `json:"krbloginfailedcount"` + + Krblastsuccessfulauth interface{} `json:"krblastsuccessfulauth"` + + Krblastfailedauth interface{} `json:"krblastfailedauth"` + + Now interface{} `json:"now"` + } - sliceV = append(sliceV, itemV) +func (out *Userstatus) UnmarshalJSON(data []byte) error { + var in jsonUserstatus + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if in.Preserved != nil { + raw := in.Preserved + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Preserved = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Preserved = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Preserved: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Preserved: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Server + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Server = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Server: %v; expected exactly one element", raw) + } + out.Server = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Server: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Krbloginfailedcount + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Krbloginfailedcount = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Krbloginfailedcount: %v; expected exactly one element", raw) + } + out.Krbloginfailedcount = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Krbloginfailedcount: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Krblastsuccessfulauth + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Krblastsuccessfulauth = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Krblastsuccessfulauth: %v; expected exactly one element", raw) + } + out.Krblastsuccessfulauth = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Krblastsuccessfulauth: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Krblastfailedauth + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Krblastfailedauth = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Krblastfailedauth: %v; expected exactly one element", raw) + } + out.Krblastfailedauth = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Krblastfailedauth: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if true { + raw := in.Now + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Now = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Now: %v; expected exactly one element", raw) + } + out.Now = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Now: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - } - } +type Vault struct { + + /* +Vault name + + */ + Cn string `json:"cn,omitempty"` + + /* +Description +Vault description + */ + Description *string `json:"description,omitempty"` + + /* +Type +Vault type + */ + Ipavaulttype *string `json:"ipavaulttype,omitempty"` + + /* +Salt +Vault salt + */ + Ipavaultsalt *string `json:"ipavaultsalt,omitempty"` + + /* +Public key +Vault public key + */ + Ipavaultpublickey *string `json:"ipavaultpublickey,omitempty"` + + /* +Owner users + + */ + OwnerUser *string `json:"owner_user,omitempty"` + + /* +Owner groups + + */ + OwnerGroup *string `json:"owner_group,omitempty"` + + /* +Owner services + + */ + OwnerService *string `json:"owner_service,omitempty"` + + /* +Failed owners + + */ + Owner *string `json:"owner,omitempty"` + + /* +Vault service + + */ + Service *string `json:"service,omitempty"` + + /* +Shared vault + + */ + Shared *bool `json:"shared,omitempty"` + + /* +Vault user + + */ + Username *string `json:"username,omitempty"` + + /* +Member users + + */ + MemberUser *[]string `json:"member_user,omitempty"` + + /* +Member groups + + */ + MemberGroup *[]string `json:"member_group,omitempty"` + + /* +Member services + + */ + MemberService *[]string `json:"member_service,omitempty"` + } - if plainOk { - out.Shared = &plainV - } else if sliceOk { +func (t *Vault) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Vault[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Vault%v", string(b)) +} - if len(sliceV) == 1 { - out.Shared = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Shared: %v; expected at most one element", raw) - } +type jsonVault struct { + + Cn interface{} `json:"cn"` + + Description interface{} `json:"description"` + + Ipavaulttype interface{} `json:"ipavaulttype"` + + Ipavaultsalt interface{} `json:"ipavaultsalt"` + + Ipavaultpublickey interface{} `json:"ipavaultpublickey"` + + OwnerUser interface{} `json:"owner_user"` + + OwnerGroup interface{} `json:"owner_group"` + + OwnerService interface{} `json:"owner_service"` + + Owner interface{} `json:"owner"` + + Service interface{} `json:"service"` + + Shared interface{} `json:"shared"` + + Username interface{} `json:"username"` + + MemberUser interface{} `json:"member_user"` + + MemberGroup interface{} `json:"member_group"` + + MemberService interface{} `json:"member_service"` + } - } else { - return fmt.Errorf("unexpected value for field Shared: %v (%v)", raw, reflect.TypeOf(raw)) - } +func (out *Vault) UnmarshalJSON(data []byte) error { + var in jsonVault + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.Cn + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Cn = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field Cn: %v; expected exactly one element", raw) + } + out.Cn = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field Cn: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Description != nil { + raw := in.Description + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Description = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Description = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Description: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Description: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipavaulttype != nil { + raw := in.Ipavaulttype + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipavaulttype = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipavaulttype = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipavaulttype: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipavaulttype: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipavaultsalt != nil { + raw := in.Ipavaultsalt + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipavaultsalt = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipavaultsalt = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipavaultsalt: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipavaultsalt: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Ipavaultpublickey != nil { + raw := in.Ipavaultpublickey + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Ipavaultpublickey = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Ipavaultpublickey = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Ipavaultpublickey: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Ipavaultpublickey: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.OwnerUser != nil { + raw := in.OwnerUser + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.OwnerUser = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.OwnerUser = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field OwnerUser: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field OwnerUser: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.OwnerGroup != nil { + raw := in.OwnerGroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.OwnerGroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.OwnerGroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field OwnerGroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field OwnerGroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.OwnerService != nil { + raw := in.OwnerService + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.OwnerService = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.OwnerService = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field OwnerService: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field OwnerService: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Owner != nil { + raw := in.Owner + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Owner = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Owner = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Owner: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Owner: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Service != nil { + raw := in.Service + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Service = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Service = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Service: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Service: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Shared != nil { + raw := in.Shared + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Shared = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Shared = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Shared: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Shared: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Username != nil { + raw := in.Username + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Username = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Username = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Username: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Username: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberUser != nil { + raw := in.MemberUser + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberUser = &[]string{plainV} + } else if sliceOk { + + out.MemberUser = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberUser: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberGroup != nil { + raw := in.MemberGroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberGroup = &[]string{plainV} + } else if sliceOk { + + out.MemberGroup = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberGroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.MemberService != nil { + raw := in.MemberService + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.MemberService = &[]string{plainV} + } else if sliceOk { + + out.MemberService = &sliceV + } else { + return fmt.Errorf("unexpected value for field MemberService: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - } +type Vaultconfig struct { + + /* +Transport Certificate + + */ + TransportCert string `json:"transport_cert,omitempty"` + + /* +IPA KRA servers +IPA servers configured as key recovery agents + */ + KraServerServer *[]string `json:"kra_server_server,omitempty"` + } - if in.Username != nil { - raw := in.Username - plainV, plainOk := raw.(string) - sliceWrapperV, sliceWrapperOk := raw.([]interface{}) - var sliceV []string - sliceOk := sliceWrapperOk - if sliceWrapperOk { - for _, rawItem := range sliceWrapperV { +func (t *Vaultconfig) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Vaultconfig[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Vaultconfig%v", string(b)) +} - itemV, itemOk := rawItem.(string) +type jsonVaultconfig struct { + + TransportCert interface{} `json:"transport_cert"` + + KraServerServer interface{} `json:"kra_server_server"` + } - if !itemOk { - sliceOk = false - break - } +func (out *Vaultconfig) UnmarshalJSON(data []byte) error { + var in jsonVaultconfig + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if true { + raw := in.TransportCert + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.TransportCert = plainV + } else if sliceOk { + + if len(sliceV) != 1 { + return fmt.Errorf("unexpected value for field TransportCert: %v; expected exactly one element", raw) + } + out.TransportCert = sliceV[0] + + } else { + return fmt.Errorf("unexpected value for field TransportCert: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.KraServerServer != nil { + raw := in.KraServerServer + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.KraServerServer = &[]string{plainV} + } else if sliceOk { + + out.KraServerServer = &sliceV + } else { + return fmt.Errorf("unexpected value for field KraServerServer: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - sliceV = append(sliceV, itemV) +type Vaultcontainer struct { + + /* +Owner users + + */ + OwnerUser *string `json:"owner_user,omitempty"` + + /* +Owner groups + + */ + OwnerGroup *string `json:"owner_group,omitempty"` + + /* +Owner services + + */ + OwnerService *string `json:"owner_service,omitempty"` + + /* +Failed owners + + */ + Owner *string `json:"owner,omitempty"` + + /* +Vault service + + */ + Service *string `json:"service,omitempty"` + + /* +Shared vault + + */ + Shared *bool `json:"shared,omitempty"` + + /* +Vault user + + */ + Username *string `json:"username,omitempty"` + } - } - } +func (t *Vaultcontainer) String() string { + if t == nil { + return "" + } + b, e := json.Marshal(t) + if e != nil { + return fmt.Sprintf("Vaultcontainer[failed json.Marshal: %v]", e) + } + return fmt.Sprintf("Vaultcontainer%v", string(b)) +} - if plainOk { - out.Username = &plainV - } else if sliceOk { +type jsonVaultcontainer struct { + + OwnerUser interface{} `json:"owner_user"` + + OwnerGroup interface{} `json:"owner_group"` + + OwnerService interface{} `json:"owner_service"` + + Owner interface{} `json:"owner"` + + Service interface{} `json:"service"` + + Shared interface{} `json:"shared"` + + Username interface{} `json:"username"` + } - if len(sliceV) == 1 { - out.Username = &sliceV[0] - } else if len(sliceV) > 1 { - return fmt.Errorf("unexpected value for field Username: %v; expected at most one element", raw) - } +func (out *Vaultcontainer) UnmarshalJSON(data []byte) error { + var in jsonVaultcontainer + if e := json.Unmarshal(data, &in); e != nil { + return e + } + + if in.OwnerUser != nil { + raw := in.OwnerUser + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.OwnerUser = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.OwnerUser = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field OwnerUser: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field OwnerUser: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.OwnerGroup != nil { + raw := in.OwnerGroup + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.OwnerGroup = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.OwnerGroup = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field OwnerGroup: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field OwnerGroup: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.OwnerService != nil { + raw := in.OwnerService + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.OwnerService = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.OwnerService = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field OwnerService: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field OwnerService: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Owner != nil { + raw := in.Owner + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Owner = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Owner = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Owner: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Owner: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Service != nil { + raw := in.Service + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Service = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Service = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Service: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Service: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Shared != nil { + raw := in.Shared + plainV, plainOk := raw.(bool) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []bool + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(bool) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Shared = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Shared = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Shared: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Shared: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + + if in.Username != nil { + raw := in.Username + plainV, plainOk := raw.(string) + sliceWrapperV, sliceWrapperOk := raw.([]interface{}) + var sliceV []string + sliceOk := sliceWrapperOk + if sliceWrapperOk { + for _, rawItem := range sliceWrapperV { + + itemV, itemOk := rawItem.(string) + + if !itemOk { + sliceOk = false + break + } + + sliceV = append(sliceV, itemV) + + } + } + + if plainOk { + out.Username = &plainV + } else if sliceOk { + + if len(sliceV) == 1 { + out.Username = &sliceV[0] + } else if len(sliceV) > 1 { + return fmt.Errorf("unexpected value for field Username: %v; expected at most one element", raw) + } + + } else { + return fmt.Errorf("unexpected value for field Username: %v (%v)", raw, reflect.TypeOf(raw)) + } + + } + return nil +} - } else { - return fmt.Errorf("unexpected value for field Username: %v (%v)", raw, reflect.TypeOf(raw)) - } - } - return nil -} const PublicErrorCode = 900