//
// Code generated by rdl 1.5.2 DO NOT EDIT.
//

package zts

import (
	"log"

	rdl "github.com/ardielle/ardielle-go/rdl"
)

var schema *rdl.Schema

func init() {
	sb := rdl.NewSchemaBuilder("ZTS")
	sb.Version(1)
	sb.Namespace("com.yahoo.athenz.zts")
	sb.Comment("Copyright The Athenz Authors Licensed under the terms of the Apache version 2.0 license. See LICENSE file for terms. The Authorization Token Service (ZTS) API")

	tSimpleName := rdl.NewStringTypeBuilder("SimpleName")
	tSimpleName.Comment("Copyright The Athenz Authors Licensed under the terms of the Apache version 2.0 license. See LICENSE file for terms. Common name types used by several API definitions A simple identifier, an element of compound name.")
	tSimpleName.Pattern("[a-zA-Z0-9_][a-zA-Z0-9_-]*")
	sb.AddType(tSimpleName.Build())

	tCompoundName := rdl.NewStringTypeBuilder("CompoundName")
	tCompoundName.Comment("A compound name. Most names in this API are compound names.")
	tCompoundName.Pattern("([a-zA-Z0-9_][a-zA-Z0-9_-]*\\.)*[a-zA-Z0-9_][a-zA-Z0-9_-]*")
	sb.AddType(tCompoundName.Build())

	tDomainName := rdl.NewStringTypeBuilder("DomainName")
	tDomainName.Comment("A domain name is the general qualifier prefix, as its uniqueness is managed.")
	tDomainName.Pattern("([a-zA-Z0-9_][a-zA-Z0-9_-]*\\.)*[a-zA-Z0-9_][a-zA-Z0-9_-]*")
	sb.AddType(tDomainName.Build())

	tEntityName := rdl.NewStringTypeBuilder("EntityName")
	tEntityName.Comment("An entity name is a short form of a resource name, including only the domain and entity.")
	tEntityName.Pattern("([a-zA-Z0-9_][a-zA-Z0-9_-]*\\.)*[a-zA-Z0-9_][a-zA-Z0-9_-]*")
	sb.AddType(tEntityName.Build())

	tEntityList := rdl.NewStringTypeBuilder("EntityList")
	tEntityList.Comment("An Entity list is comma separated compound Names")
	tEntityList.Pattern("(([a-zA-Z0-9_][a-zA-Z0-9_-]*\\.)*[a-zA-Z0-9_][a-zA-Z0-9_-]*,)*([a-zA-Z0-9_][a-zA-Z0-9_-]*\\.)*[a-zA-Z0-9_][a-zA-Z0-9_-]*")
	sb.AddType(tEntityList.Build())

	tServiceName := rdl.NewStringTypeBuilder("ServiceName")
	tServiceName.Comment("A service name will generally be a unique subdomain.")
	tServiceName.Pattern("([a-zA-Z0-9_][a-zA-Z0-9_-]*\\.)*[a-zA-Z0-9_][a-zA-Z0-9_-]*")
	sb.AddType(tServiceName.Build())

	tActionName := rdl.NewStringTypeBuilder("ActionName")
	tActionName.Comment("An action (operation) name.")
	tActionName.Pattern("([a-zA-Z0-9_][a-zA-Z0-9_-]*\\.)*[a-zA-Z0-9_][a-zA-Z0-9_-]*")
	sb.AddType(tActionName.Build())

	tResourceName := rdl.NewStringTypeBuilder("ResourceName")
	tResourceName.Comment("A resource name Note that the EntityName part is optional, that is, a domain name followed by a colon is valid resource name.")
	tResourceName.Pattern("([a-zA-Z0-9_][a-zA-Z0-9_-]*\\.)*[a-zA-Z0-9_][a-zA-Z0-9_-]*(:([a-zA-Z0-9_][a-zA-Z0-9_-]*\\.)*[a-zA-Z0-9_][a-zA-Z0-9_-]*)?")
	sb.AddType(tResourceName.Build())

	tYBase64 := rdl.NewStringTypeBuilder("YBase64")
	tYBase64.Comment("The Y-specific URL-safe Base64 variant.")
	tYBase64.Pattern("[a-zA-Z0-9\\._-]+")
	sb.AddType(tYBase64.Build())

	tYEncoded := rdl.NewStringTypeBuilder("YEncoded")
	tYEncoded.Comment("YEncoded includes ybase64 chars, as well as = and %. This can represent a user cookie and URL-encoded values.")
	tYEncoded.Pattern("[a-zA-Z0-9\\._%=-]*")
	sb.AddType(tYEncoded.Build())

	tAuthorityName := rdl.NewStringTypeBuilder("AuthorityName")
	tAuthorityName.Comment("Used as the prefix in a signed assertion. This uniquely identifies a signing authority.")
	tAuthorityName.Pattern("([a-zA-Z0-9_][a-zA-Z0-9_-]*\\.)*[a-zA-Z0-9_][a-zA-Z0-9_-]*")
	sb.AddType(tAuthorityName.Build())

	tSignedToken := rdl.NewStringTypeBuilder("SignedToken")
	tSignedToken.Comment("A signed assertion if identity. i.e. the user cookie value. This token will only make sense to the authority that generated it, so it is beneficial to have something in the value that is cheaply recognized to quickly reject if it belongs to another authority. In addition to the YEncoded set our token includes ; to separate components and , to separate roles")
	tSignedToken.Pattern("[a-zA-Z0-9\\._%=;,-]*")
	sb.AddType(tSignedToken.Build())

	tPathElement := rdl.NewStringTypeBuilder("PathElement")
	tPathElement.Comment("A uri-safe path element")
	tPathElement.Pattern("[a-zA-Z0-9-\\._~=+@$,:]*")
	sb.AddType(tPathElement.Build())

	tCertType := rdl.NewEnumTypeBuilder("Enum", "CertType")
	tCertType.Comment("CertType denotes various types of certs issued by Athenz")
	tCertType.Element("X509", "TLS X.509 Certificate")
	tCertType.Element("SSH_HOST", "SSH Host certificate")
	tCertType.Element("SSH_USER", "SSH User certificate")
	sb.AddType(tCertType.Build())

	tResourceAccess := rdl.NewStructTypeBuilder("Struct", "ResourceAccess")
	tResourceAccess.Comment("ResourceAccess can be checked and returned as this resource. (same as ZMS.Access)")
	tResourceAccess.Field("granted", "Bool", false, nil, "true (allowed) or false (denied)")
	sb.AddType(tResourceAccess.Build())

	tPublicKeyEntry := rdl.NewStructTypeBuilder("Struct", "PublicKeyEntry")
	tPublicKeyEntry.Comment("The representation of the public key in a service identity object.")
	tPublicKeyEntry.Field("key", "String", false, nil, "the public key for the service")
	tPublicKeyEntry.Field("id", "String", false, nil, "the key identifier (version or zone name)")
	sb.AddType(tPublicKeyEntry.Build())

	tServiceIdentity := rdl.NewStructTypeBuilder("Struct", "ServiceIdentity")
	tServiceIdentity.Comment("The representation of the service identity object.")
	tServiceIdentity.Field("name", "ServiceName", false, nil, "the full name of the service, i.e. \"sports.storage\"")
	tServiceIdentity.ArrayField("publicKeys", "PublicKeyEntry", true, "array of public keys for key rotation")
	tServiceIdentity.Field("providerEndpoint", "String", true, nil, "if present, then this service can provision tenants via this endpoint.")
	tServiceIdentity.Field("modified", "Timestamp", true, nil, "the timestamp when this entry was last modified")
	tServiceIdentity.Field("executable", "String", true, nil, "the path of the executable that runs the service")
	tServiceIdentity.ArrayField("hosts", "String", true, "list of host names that this service can run on")
	tServiceIdentity.Field("user", "String", true, nil, "local (unix) user name this service can run as")
	tServiceIdentity.Field("group", "String", true, nil, "local (unix) group name this service can run as")
	sb.AddType(tServiceIdentity.Build())

	tServiceIdentityList := rdl.NewStructTypeBuilder("Struct", "ServiceIdentityList")
	tServiceIdentityList.Comment("The representation for an enumeration of services in the namespace.")
	tServiceIdentityList.ArrayField("names", "EntityName", false, "list of service names")
	sb.AddType(tServiceIdentityList.Build())

	tHostServices := rdl.NewStructTypeBuilder("Struct", "HostServices")
	tHostServices.Comment("The representation for an enumeration of services authorized to run on a specific host.")
	tHostServices.Field("host", "String", false, nil, "name of the host")
	tHostServices.ArrayField("names", "EntityName", false, "list of service names authorized to run on this host")
	sb.AddType(tHostServices.Build())

	tAssertionEffect := rdl.NewEnumTypeBuilder("Enum", "AssertionEffect")
	tAssertionEffect.Comment("Every assertion can have the effect of ALLOW or DENY.")
	tAssertionEffect.Element("ALLOW", "")
	tAssertionEffect.Element("DENY", "")
	sb.AddType(tAssertionEffect.Build())

	tAssertion := rdl.NewStructTypeBuilder("Struct", "Assertion")
	tAssertion.Comment("A representation for the encapsulation of an action to be performed on a resource by a principal.")
	tAssertion.Field("role", "String", false, nil, "the subject of the assertion, a role")
	tAssertion.Field("resource", "String", false, nil, "the object of the assertion. Must be in the local namespace. Can contain wildcards")
	tAssertion.Field("action", "String", false, nil, "the predicate of the assertion. Can contain wildcards")
	tAssertion.Field("effect", "AssertionEffect", true, ALLOW, "the effect of the assertion in the policy language")
	tAssertion.Field("id", "Int64", true, nil, "assertion id - auto generated by server")
	tAssertion.Field("caseSensitive", "Bool", true, nil, "If true, we should store action and resource in their original case")
	sb.AddType(tAssertion.Build())

	tPolicy := rdl.NewStructTypeBuilder("Struct", "Policy")
	tPolicy.Comment("The representation for a Policy with set of assertions.")
	tPolicy.Field("name", "ResourceName", false, nil, "name of the policy")
	tPolicy.Field("modified", "Timestamp", true, nil, "last modification timestamp of this policy")
	tPolicy.ArrayField("assertions", "Assertion", false, "list of defined assertions for this policy")
	tPolicy.Field("caseSensitive", "Bool", true, nil, "If true, we should store action and resource in their original case")
	tPolicy.Field("version", "SimpleName", true, nil, "optional version string, defaults to 0")
	tPolicy.Field("active", "Bool", true, nil, "if multi-version policy then indicates active version")
	sb.AddType(tPolicy.Build())

	tPolicyData := rdl.NewStructTypeBuilder("Struct", "PolicyData")
	tPolicyData.Field("domain", "DomainName", false, nil, "name of the domain")
	tPolicyData.ArrayField("policies", "Policy", false, "list of policies defined in this server")
	sb.AddType(tPolicyData.Build())

	tSignedPolicyData := rdl.NewStructTypeBuilder("Struct", "SignedPolicyData")
	tSignedPolicyData.Comment("A representation of policies object defined in a given server.")
	tSignedPolicyData.Field("policyData", "PolicyData", false, nil, "list of policies defined in a domain")
	tSignedPolicyData.Field("zmsSignature", "String", true, nil, "zms signature generated based on the domain policies object")
	tSignedPolicyData.Field("zmsKeyId", "String", true, nil, "the identifier of the zms key used to generate the signature")
	tSignedPolicyData.Field("modified", "Timestamp", false, nil, "when the domain itself was last modified")
	tSignedPolicyData.Field("expires", "Timestamp", false, nil, "timestamp specifying the expiration time for using this set of policies")
	sb.AddType(tSignedPolicyData.Build())

	tDomainSignedPolicyData := rdl.NewStructTypeBuilder("Struct", "DomainSignedPolicyData")
	tDomainSignedPolicyData.Comment("A signed bulk transfer of policies. The data is signed with server's private key.")
	tDomainSignedPolicyData.Field("signedPolicyData", "SignedPolicyData", false, nil, "policy data signed by ZMS")
	tDomainSignedPolicyData.Field("signature", "String", false, nil, "signature generated based on the domain policies object")
	tDomainSignedPolicyData.Field("keyId", "String", false, nil, "the identifier of the key used to generate the signature")
	sb.AddType(tDomainSignedPolicyData.Build())

	tJWSPolicyData := rdl.NewStructTypeBuilder("Struct", "JWSPolicyData")
	tJWSPolicyData.Comment("SignedPolicyData using flattened JWS JSON Serialization syntax. https://tools.ietf.org/html/rfc7515#section-7.2.2")
	tJWSPolicyData.Field("payload", "String", false, nil, "")
	tJWSPolicyData.Field("protected", "String", false, nil, "")
	tJWSPolicyData.MapField("header", "String", "String", false, "")
	tJWSPolicyData.Field("signature", "String", false, nil, "")
	sb.AddType(tJWSPolicyData.Build())

	tSignedPolicyRequest := rdl.NewStructTypeBuilder("Struct", "SignedPolicyRequest")
	tSignedPolicyRequest.MapField("policyVersions", "String", "String", false, "")
	tSignedPolicyRequest.Field("signatureP1363Format", "Bool", false, nil, "true if signature must be in P1363 format instead of ASN.1 DER")
	sb.AddType(tSignedPolicyRequest.Build())

	tRoleCertificate := rdl.NewStructTypeBuilder("Struct", "RoleCertificate")
	tRoleCertificate.Comment("Copyright The Athenz Authors Licensed under the terms of the Apache version 2.0 license. See LICENSE file for terms. RoleCertificate - a role certificate")
	tRoleCertificate.Field("x509Certificate", "String", false, nil, "")
	sb.AddType(tRoleCertificate.Build())

	tRoleCertificateRequest := rdl.NewStructTypeBuilder("Struct", "RoleCertificateRequest")
	tRoleCertificateRequest.Comment("RoleCertificateRequest - a certificate signing request. By including the optional previous Certificate NotBefore and NotAfter dates would all the server to correctly prioritize this request in case the certificate signer is under heavy load and it can't sign all submitted requests from the Athenz Server.")
	tRoleCertificateRequest.Field("csr", "String", false, nil, "role certificate singing request")
	tRoleCertificateRequest.Field("proxyForPrincipal", "EntityName", true, nil, "this request is proxy for this principal")
	tRoleCertificateRequest.Field("expiryTime", "Int64", false, nil, "request an expiry time for the role certificate")
	tRoleCertificateRequest.Field("prevCertNotBefore", "Timestamp", true, nil, "previous role certificate not before date")
	tRoleCertificateRequest.Field("prevCertNotAfter", "Timestamp", true, nil, "previous role certificate not after date")
	tRoleCertificateRequest.Field("x509CertSignerKeyId", "SimpleName", true, nil, "requested x509 cert signer key id")
	sb.AddType(tRoleCertificateRequest.Build())

	tRoleAccess := rdl.NewStructTypeBuilder("Struct", "RoleAccess")
	tRoleAccess.ArrayField("roles", "EntityName", false, "")
	sb.AddType(tRoleAccess.Build())

	tRoleToken := rdl.NewStructTypeBuilder("Struct", "RoleToken")
	tRoleToken.Comment("A representation of a signed RoleToken")
	tRoleToken.Field("token", "String", false, nil, "")
	tRoleToken.Field("expiryTime", "Int64", false, nil, "")
	sb.AddType(tRoleToken.Build())

	tAccess := rdl.NewStructTypeBuilder("Struct", "Access")
	tAccess.Comment("Access can be checked and returned as this resource.")
	tAccess.Field("granted", "Bool", false, nil, "true (allowed) or false (denied)")
	sb.AddType(tAccess.Build())

	tTenantDomains := rdl.NewStructTypeBuilder("Struct", "TenantDomains")
	tTenantDomains.ArrayField("tenantDomainNames", "DomainName", false, "")
	sb.AddType(tTenantDomains.Build())

	tIdentity := rdl.NewStructTypeBuilder("Struct", "Identity")
	tIdentity.Comment("Identity - a signed assertion of service or human identity, the response could be either a client certificate or just a regular NToken (depending if the request contained a csr or not).")
	tIdentity.Field("name", "CompoundName", false, nil, "name of the identity, fully qualified, i.e. my.domain.service1, or aws.1232321321312.myusername")
	tIdentity.Field("certificate", "String", true, nil, "a certificate usable for both client and server in TLS connections")
	tIdentity.Field("caCertBundle", "String", true, nil, "the CA certificate chain to use with all IMS-generated certs")
	tIdentity.Field("sshCertificate", "String", true, nil, "the SSH certificate, signed by the CA (user or host)")
	tIdentity.Field("sshCertificateSigner", "String", true, nil, "the SSH CA's public key for the sshCertificate (user or host)")
	tIdentity.Field("serviceToken", "SignedToken", true, nil, "service token instead of TLS certificate")
	tIdentity.MapField("attributes", "String", "String", true, "other config-like attributes determined at boot time")
	sb.AddType(tIdentity.Build())

	tInstanceRefreshRequest := rdl.NewStructTypeBuilder("Struct", "InstanceRefreshRequest")
	tInstanceRefreshRequest.Comment("InstanceRefreshRequest - a certificate refresh request")
	tInstanceRefreshRequest.Field("csr", "String", false, nil, "Cert CSR signed by the service's private key (public key registered in ZMS)")
	tInstanceRefreshRequest.Field("expiryTime", "Int32", true, nil, "in minutes how long token should be valid for")
	tInstanceRefreshRequest.Field("keyId", "String", true, nil, "public key identifier")
	tInstanceRefreshRequest.Field("namespace", "SimpleName", true, nil, "spiffe/k8s namespace value")
	tInstanceRefreshRequest.Field("cloud", "SimpleName", true, nil, "optional cloud name where the instance is bootstrapped. e.g. aws / gcp / azure / openstack etc.")
	tInstanceRefreshRequest.Field("x509CertSignerKeyId", "SimpleName", true, nil, "requested x509 cert signer key id")
	sb.AddType(tInstanceRefreshRequest.Build())

	tAWSRoleName := rdl.NewStringTypeBuilder("AWSRoleName")
	tAWSRoleName.Comment("AWS role name without the path")
	tAWSRoleName.Pattern("[a-zA-Z0-9-\\._=+@,]*")
	sb.AddType(tAWSRoleName.Build())

	tAWSRolePathElement := rdl.NewStringTypeBuilder("AWSRolePathElement")
	tAWSRolePathElement.Comment("AWS role path single element")
	tAWSRolePathElement.Pattern("[a-zA-Z0-9][a-zA-Z0-9-\\._]*")
	sb.AddType(tAWSRolePathElement.Build())

	tAWSRolePath := rdl.NewStringTypeBuilder("AWSRolePath")
	tAWSRolePath.Comment("AWS role path")
	tAWSRolePath.Pattern("([a-zA-Z0-9][a-zA-Z0-9-\\._]*/)+")
	sb.AddType(tAWSRolePath.Build())

	tAWSArnRoleName := rdl.NewStringTypeBuilder("AWSArnRoleName")
	tAWSArnRoleName.Comment("AWS full role name with path")
	tAWSArnRoleName.Pattern("(([a-zA-Z0-9][a-zA-Z0-9-\\._]*/)+)*[a-zA-Z0-9-\\._=+@,]*")
	sb.AddType(tAWSArnRoleName.Build())

	tAWSTemporaryCredentials := rdl.NewStructTypeBuilder("Struct", "AWSTemporaryCredentials")
	tAWSTemporaryCredentials.Field("accessKeyId", "String", false, nil, "")
	tAWSTemporaryCredentials.Field("secretAccessKey", "String", false, nil, "")
	tAWSTemporaryCredentials.Field("sessionToken", "String", false, nil, "")
	tAWSTemporaryCredentials.Field("expiration", "Timestamp", false, nil, "")
	sb.AddType(tAWSTemporaryCredentials.Build())

	tSSHCertRequestData := rdl.NewStructTypeBuilder("Struct", "SSHCertRequestData")
	tSSHCertRequestData.ArrayField("principals", "String", false, "principals in the ssh certificate (usually only one)")
	tSSHCertRequestData.ArrayField("sources", "String", true, "source FQDNs or ip addresses")
	tSSHCertRequestData.ArrayField("destinations", "String", true, "destination FQDNs or ip addresses")
	tSSHCertRequestData.Field("publicKey", "String", true, nil, "public key for ssh certificate")
	tSSHCertRequestData.Field("touchPublicKey", "String", true, nil, "yubikey/touch public key for ssh certificate")
	tSSHCertRequestData.Field("caPubKeyAlgo", "Int32", true, nil, "CA public key algorithm: 0: Unknown, 1: RSA, 3: ECDSA")
	tSSHCertRequestData.Field("command", "String", true, nil, "optional force command option for certificate")
	sb.AddType(tSSHCertRequestData.Build())

	tSSHCertRequestMeta := rdl.NewStructTypeBuilder("Struct", "SSHCertRequestMeta")
	tSSHCertRequestMeta.Field("requestor", "String", false, nil, "requesting user")
	tSSHCertRequestMeta.Field("origin", "String", false, nil, "origin FQDN or ip")
	tSSHCertRequestMeta.Field("clientInfo", "String", true, nil, "client info")
	tSSHCertRequestMeta.Field("sshClientVersion", "String", true, nil, "ssh client version")
	tSSHCertRequestMeta.Field("certType", "String", false, nil, "cert type - user or host")
	tSSHCertRequestMeta.ArrayField("keyIdPrincipals", "String", true, "principals included in the keyId field in the certificate")
	tSSHCertRequestMeta.Field("athenzService", "EntityName", true, nil, "ssh host cert request is for this athenz service")
	tSSHCertRequestMeta.Field("instanceId", "PathElement", true, nil, "ssh host cert request is for this instance id")
	tSSHCertRequestMeta.Field("prevCertValidFrom", "Timestamp", true, nil, "previous ssh certificate validity from date")
	tSSHCertRequestMeta.Field("prevCertValidTo", "Timestamp", true, nil, "previous ssh certificate validity to date")
	tSSHCertRequestMeta.Field("transId", "String", true, nil, "ssh request transaction id")
	sb.AddType(tSSHCertRequestMeta.Build())

	tSSHCertRequest := rdl.NewStructTypeBuilder("Struct", "SSHCertRequest")
	tSSHCertRequest.Field("certRequestData", "SSHCertRequestData", false, nil, "ssh certificate request data")
	tSSHCertRequest.Field("certRequestMeta", "SSHCertRequestMeta", false, nil, "ssh certificate request meta")
	tSSHCertRequest.Field("csr", "String", true, nil, "free-form csr if not using data/meta fields.")
	tSSHCertRequest.Field("attestationData", "String", true, nil, "identity attestation data including document with its signature containing attributes like IP address, instance-id, account#, etc.")
	sb.AddType(tSSHCertRequest.Build())

	tSSHCertificate := rdl.NewStructTypeBuilder("Struct", "SSHCertificate")
	tSSHCertificate.Field("certificate", "String", false, nil, "the SSH certificate, signed by the CA")
	tSSHCertificate.Field("publicKey", "String", true, nil, "certificate public key if generated by SSH RA")
	tSSHCertificate.Field("privateKey", "String", true, nil, "certificate private key if generated by SSH Agent")
	sb.AddType(tSSHCertificate.Build())

	tSSHCertificates := rdl.NewStructTypeBuilder("Struct", "SSHCertificates")
	tSSHCertificates.ArrayField("certificates", "SSHCertificate", false, "set of user ssh certificates")
	tSSHCertificates.Field("certificateSigner", "String", true, nil, "the SSH CA's public key for the sshCertificate (user or host)")
	sb.AddType(tSSHCertificates.Build())

	tAccessTokenResponse := rdl.NewStructTypeBuilder("Struct", "AccessTokenResponse")
	tAccessTokenResponse.Field("access_token", "String", false, nil, "access token")
	tAccessTokenResponse.Field("token_type", "String", false, nil, "token type e.g. Bearer")
	tAccessTokenResponse.Field("expires_in", "Int32", true, nil, "expiration in seconds")
	tAccessTokenResponse.Field("scope", "String", true, nil, "scope of the access token e.g. openid")
	tAccessTokenResponse.Field("refresh_token", "String", true, nil, "refresh token")
	tAccessTokenResponse.Field("id_token", "String", true, nil, "id token")
	sb.AddType(tAccessTokenResponse.Build())

	tJWK := rdl.NewStructTypeBuilder("Struct", "JWK")
	tJWK.Field("kty", "String", false, nil, "key type: EC or RSA")
	tJWK.Field("kid", "String", false, nil, "identifier")
	tJWK.Field("alg", "String", true, nil, "key algorithm")
	tJWK.Field("use", "String", true, nil, "usage: sig or enc")
	tJWK.Field("crv", "String", true, nil, "ec curve name")
	tJWK.Field("x", "String", true, nil, "ec x value")
	tJWK.Field("y", "String", true, nil, "ec y value")
	tJWK.Field("n", "String", true, nil, "rsa modulus value")
	tJWK.Field("e", "String", true, nil, "rsa public exponent value")
	sb.AddType(tJWK.Build())

	tOpenIDConfig := rdl.NewStructTypeBuilder("Struct", "OpenIDConfig")
	tOpenIDConfig.Field("issuer", "String", false, nil, "url using the https scheme")
	tOpenIDConfig.Field("authorization_endpoint", "String", false, nil, "oauth 2.0 authorization endpoint url")
	tOpenIDConfig.Field("jwks_uri", "String", false, nil, "public server jwk set url")
	tOpenIDConfig.ArrayField("response_types_supported", "String", false, "list of supported response types")
	tOpenIDConfig.ArrayField("subject_types_supported", "String", false, "list of supported subject identifier types")
	tOpenIDConfig.ArrayField("id_token_signing_alg_values_supported", "String", false, "list of supported algorithms for issued id tokens")
	tOpenIDConfig.ArrayField("claims_supported", "String", true, "list of supported id claims")
	sb.AddType(tOpenIDConfig.Build())

	tOAuthConfig := rdl.NewStructTypeBuilder("Struct", "OAuthConfig")
	tOAuthConfig.Field("issuer", "String", false, nil, "url using the https scheme")
	tOAuthConfig.Field("authorization_endpoint", "String", false, nil, "oauth 2.0 authorization endpoint url")
	tOAuthConfig.Field("introspection_endpoint", "String", false, nil, "oauth 2.0 introspection endpoint")
	tOAuthConfig.Field("token_endpoint", "String", false, nil, "authorization server token endpoint")
	tOAuthConfig.Field("jwks_uri", "String", false, nil, "public server jwk set url")
	tOAuthConfig.ArrayField("response_types_supported", "String", false, "list of supported response types")
	tOAuthConfig.ArrayField("grant_types_supported", "String", false, "supported grant types")
	tOAuthConfig.ArrayField("token_endpoint_auth_signing_alg_values_supported", "String", false, "list of supported algorithms for issued access tokens")
	sb.AddType(tOAuthConfig.Build())

	tJWKList := rdl.NewStructTypeBuilder("Struct", "JWKList")
	tJWKList.Comment("JSON Web Key (JWK) List")
	tJWKList.ArrayField("keys", "JWK", false, "array of JWKs")
	sb.AddType(tJWKList.Build())

	tAccessTokenRequest := rdl.NewAliasTypeBuilder("String", "AccessTokenRequest")
	sb.AddType(tAccessTokenRequest.Build())

	tOIDCResponse := rdl.NewStructTypeBuilder("Struct", "OIDCResponse")
	tOIDCResponse.Field("version", "Int32", false, nil, "version number")
	tOIDCResponse.Field("id_token", "String", false, nil, "id token")
	tOIDCResponse.Field("token_type", "String", false, nil, "token type e.g. urn:ietf:params:oauth:token-type:id_token")
	tOIDCResponse.Field("success", "Bool", false, nil, "response status")
	tOIDCResponse.Field("expiration_time", "Int64", false, nil, "expiration time in UTC")
	sb.AddType(tOIDCResponse.Build())

	tIntrospectRequest := rdl.NewAliasTypeBuilder("String", "IntrospectRequest")
	sb.AddType(tIntrospectRequest.Build())

	tIntrospectResponse := rdl.NewStructTypeBuilder("Struct", "IntrospectResponse")
	tIntrospectResponse.Field("active", "Bool", false, nil, "token status")
	tIntrospectResponse.Field("ver", "Int32", false, nil, "version number")
	tIntrospectResponse.Field("exp", "Int64", true, nil, "expiration time")
	tIntrospectResponse.Field("iat", "Int64", true, nil, "issued at time")
	tIntrospectResponse.Field("auth_time", "Int64", true, nil, "issued at time")
	tIntrospectResponse.Field("aud", "String", true, nil, "audience")
	tIntrospectResponse.Field("iss", "String", true, nil, "issuer")
	tIntrospectResponse.Field("jti", "String", true, nil, "jwt id")
	tIntrospectResponse.Field("sub", "String", true, nil, "subject")
	tIntrospectResponse.Field("scope", "String", true, nil, "scope of the access token")
	tIntrospectResponse.Field("client_id", "String", true, nil, "client id")
	tIntrospectResponse.Field("uid", "String", true, nil, "user id")
	tIntrospectResponse.Field("proxy", "String", true, nil, "proxy principal")
	tIntrospectResponse.Field("authorization_details", "String", true, nil, "authorization details")
	sb.AddType(tIntrospectResponse.Build())

	tInstanceRegisterInformation := rdl.NewStructTypeBuilder("Struct", "InstanceRegisterInformation")
	tInstanceRegisterInformation.Field("provider", "ServiceName", false, nil, "the provider service name (i.e. \"aws.us-west-2\", \"sys.openstack.cluster1\")")
	tInstanceRegisterInformation.Field("domain", "DomainName", false, nil, "the domain of the instance")
	tInstanceRegisterInformation.Field("service", "SimpleName", false, nil, "the service this instance is supposed to run")
	tInstanceRegisterInformation.Field("attestationData", "String", false, nil, "identity attestation data including document with its signature containing attributes like IP address, instance-id, account#, etc.")
	tInstanceRegisterInformation.Field("csr", "String", false, nil, "the Certificate Signing Request for the expected X.509 certificate in the response")
	tInstanceRegisterInformation.Field("ssh", "String", true, nil, "deprecated - use sshCertRequest, if present, return an SSH host certificate. Format is JSON.")
	tInstanceRegisterInformation.Field("sshCertRequest", "SSHCertRequest", true, nil, "if present, return an SSH host certificate")
	tInstanceRegisterInformation.Field("token", "Bool", true, nil, "if true, return a service token signed by ZTS for this service")
	tInstanceRegisterInformation.Field("expiryTime", "Int32", true, nil, "expiry time in minutes for the certificate (server enforces max expiry)")
	tInstanceRegisterInformation.Field("hostname", "DomainName", true, nil, "optional hostname in case included in the csr SAN dnsName attribute")
	tInstanceRegisterInformation.ArrayField("hostCnames", "DomainName", true, "optional host CNAMEs included in the csr SAN dnsName attribute")
	tInstanceRegisterInformation.Field("athenzJWK", "Bool", true, nil, "if true, return an Athenz JWK public keys file")
	tInstanceRegisterInformation.Field("athenzJWKModified", "Timestamp", true, nil, "return the public keys file only if modified after the given timestamp")
	tInstanceRegisterInformation.Field("namespace", "SimpleName", true, nil, "spiffe/k8s namespace value")
	tInstanceRegisterInformation.Field("cloud", "SimpleName", true, nil, "optional cloud name where the instance is bootstrapped. e.g. aws / gcp / azure / openstack etc.")
	tInstanceRegisterInformation.Field("x509CertSignerKeyId", "SimpleName", true, nil, "requested x509 cert signer key id")
	tInstanceRegisterInformation.Field("sshCertSignerKeyId", "SimpleName", true, nil, "requested ssh cert signer key id")
	sb.AddType(tInstanceRegisterInformation.Build())

	tInstanceRefreshInformation := rdl.NewStructTypeBuilder("Struct", "InstanceRefreshInformation")
	tInstanceRefreshInformation.Field("attestationData", "String", true, nil, "identity attestation data including document with its signature containing attributes like IP address, instance-id, account#, etc.")
	tInstanceRefreshInformation.Field("csr", "String", true, nil, "the Certificate Signing Request for the expected X.509 certificate in the response")
	tInstanceRefreshInformation.Field("ssh", "String", true, nil, "deprecated - use sshCertRequest, if present, return an SSH host certificate. Format is JSON.")
	tInstanceRefreshInformation.Field("sshCertRequest", "SSHCertRequest", true, nil, "if present, return an SSH host certificate")
	tInstanceRefreshInformation.Field("token", "Bool", true, nil, "if true, return a service token signed by ZTS for this service")
	tInstanceRefreshInformation.Field("expiryTime", "Int32", true, nil, "expiry time in minutes for the certificate (server enforces max expiry)")
	tInstanceRefreshInformation.Field("hostname", "DomainName", true, nil, "optional hostname in case included in the csr SAN dnsName attribute")
	tInstanceRefreshInformation.ArrayField("hostCnames", "DomainName", true, "optional host CNAMEs included in the csr SAN dnsName attribute")
	tInstanceRefreshInformation.Field("athenzJWK", "Bool", true, nil, "if true, return an Athenz JWK public keys file")
	tInstanceRefreshInformation.Field("athenzJWKModified", "Timestamp", true, nil, "return the public keys file only if modified after the given timestamp")
	tInstanceRefreshInformation.Field("namespace", "SimpleName", true, nil, "spiffe/k8s namespace value")
	tInstanceRefreshInformation.Field("cloud", "SimpleName", true, nil, "optional cloud name where the instance is bootstrapped. e.g. aws / gcp / azure / openstack etc.")
	tInstanceRefreshInformation.Field("x509CertSignerKeyId", "SimpleName", true, nil, "requested x509 cert signer key id")
	tInstanceRefreshInformation.Field("sshCertSignerKeyId", "SimpleName", true, nil, "requested ssh cert signer key id")
	sb.AddType(tInstanceRefreshInformation.Build())

	tInstanceRegisterToken := rdl.NewStructTypeBuilder("Struct", "InstanceRegisterToken")
	tInstanceRegisterToken.Field("provider", "ServiceName", false, nil, "provider service name")
	tInstanceRegisterToken.Field("domain", "DomainName", false, nil, "the domain of the instance")
	tInstanceRegisterToken.Field("service", "SimpleName", false, nil, "the service this instance is supposed to run")
	tInstanceRegisterToken.Field("attestationData", "String", false, nil, "identity attestation data including document with its signature containing attributes like IP address, instance-id, account#, etc.")
	tInstanceRegisterToken.MapField("attributes", "String", "String", true, "additional non-signed attributes that assist in attestation. I.e. \"keyId\", \"accessKey\", etc")
	sb.AddType(tInstanceRegisterToken.Build())

	tAthenzJWKConfig := rdl.NewStructTypeBuilder("Struct", "AthenzJWKConfig")
	tAthenzJWKConfig.Field("zms", "JWKList", false, nil, "ZMS JSON Web Key (JWK) List")
	tAthenzJWKConfig.Field("zts", "JWKList", false, nil, "ZTS JSON Web Key (JWK) List")
	tAthenzJWKConfig.Field("modified", "Timestamp", true, nil, "the last modification timestamp of the Athenz JWK configuration")
	sb.AddType(tAthenzJWKConfig.Build())

	tInstanceIdentity := rdl.NewStructTypeBuilder("Struct", "InstanceIdentity")
	tInstanceIdentity.Field("provider", "ServiceName", false, nil, "the provider service name (i.e. \"aws.us-west-2\", \"sys.openstack.cluster1\")")
	tInstanceIdentity.Field("name", "ServiceName", false, nil, "name of the identity, fully qualified, i.e. my.domain.service1")
	tInstanceIdentity.Field("instanceId", "PathElement", false, nil, "unique instance id within provider's namespace")
	tInstanceIdentity.Field("x509Certificate", "String", true, nil, "an X.509 certificate usable for both client and server in TLS connections")
	tInstanceIdentity.Field("x509CertificateSigner", "String", true, nil, "the CA certificate chain to verify all generated X.509 certs")
	tInstanceIdentity.Field("sshCertificate", "String", true, nil, "the SSH certificate, signed by the CA (user or host)")
	tInstanceIdentity.Field("sshCertificateSigner", "String", true, nil, "the SSH CA's public key for the sshCertificate (user or host)")
	tInstanceIdentity.Field("serviceToken", "SignedToken", true, nil, "service token instead of TLS certificate")
	tInstanceIdentity.MapField("attributes", "String", "String", true, "other config-like attributes determined at boot time")
	tInstanceIdentity.Field("athenzJWK", "AthenzJWKConfig", true, nil, "the Athenz JSON Web Key (JWK) configuration object")
	sb.AddType(tInstanceIdentity.Build())

	tCertificateAuthorityBundle := rdl.NewStructTypeBuilder("Struct", "CertificateAuthorityBundle")
	tCertificateAuthorityBundle.Field("name", "SimpleName", false, nil, "name of the bundle")
	tCertificateAuthorityBundle.Field("certs", "String", false, nil, "set of certificates included in the bundle")
	sb.AddType(tCertificateAuthorityBundle.Build())

	tDomainMetricType := rdl.NewEnumTypeBuilder("Enum", "DomainMetricType")
	tDomainMetricType.Comment("zpe metric attributes")
	tDomainMetricType.Element("ACCESS_ALLOWED", "")
	tDomainMetricType.Element("ACCESS_ALLOWED_DENY", "")
	tDomainMetricType.Element("ACCESS_ALLOWED_DENY_NO_MATCH", "")
	tDomainMetricType.Element("ACCESS_ALLOWED_ALLOW", "")
	tDomainMetricType.Element("ACCESS_ALLOWED_ERROR", "")
	tDomainMetricType.Element("ACCESS_ALLOWED_TOKEN_INVALID", "")
	tDomainMetricType.Element("ACCESS_Allowed_TOKEN_EXPIRED", "")
	tDomainMetricType.Element("ACCESS_ALLOWED_DOMAIN_NOT_FOUND", "")
	tDomainMetricType.Element("ACCESS_ALLOWED_DOMAIN_MISMATCH", "")
	tDomainMetricType.Element("ACCESS_ALLOWED_DOMAIN_EXPIRED", "")
	tDomainMetricType.Element("ACCESS_ALLOWED_DOMAIN_EMPTY", "")
	tDomainMetricType.Element("ACCESS_ALLOWED_TOKEN_CACHE_FAILURE", "")
	tDomainMetricType.Element("ACCESS_ALLOWED_TOKEN_CACHE_NOT_FOUND", "")
	tDomainMetricType.Element("ACCESS_ALLOWED_TOKEN_CACHE_SUCCESS", "")
	tDomainMetricType.Element("ACCESS_ALLOWED_TOKEN_VALIDATE", "")
	tDomainMetricType.Element("LOAD_FILE_FAIL", "")
	tDomainMetricType.Element("LOAD_FILE_GOOD", "")
	tDomainMetricType.Element("LOAD_DOMAIN_GOOD", "")
	sb.AddType(tDomainMetricType.Build())

	tDomainMetric := rdl.NewStructTypeBuilder("Struct", "DomainMetric")
	tDomainMetric.Field("metricType", "DomainMetricType", false, nil, "")
	tDomainMetric.Field("metricVal", "Int32", false, nil, "")
	sb.AddType(tDomainMetric.Build())

	tDomainMetrics := rdl.NewStructTypeBuilder("Struct", "DomainMetrics")
	tDomainMetrics.Field("domainName", "DomainName", false, nil, "name of the domain the metrics pertain to")
	tDomainMetrics.ArrayField("metricList", "DomainMetric", false, "list of the domains metrics")
	sb.AddType(tDomainMetrics.Build())

	tStatus := rdl.NewStructTypeBuilder("Struct", "Status")
	tStatus.Comment("The representation for a status object")
	tStatus.Field("code", "Int32", false, nil, "status message code")
	tStatus.Field("message", "String", false, nil, "status message of the server")
	sb.AddType(tStatus.Build())

	tWorkload := rdl.NewStructTypeBuilder("Struct", "Workload")
	tWorkload.Field("domainName", "DomainName", false, nil, "name of the domain, optional for getWorkloadsByService API call")
	tWorkload.Field("serviceName", "EntityName", false, nil, "name of the service, , optional for getWorkloadsByService API call")
	tWorkload.Field("uuid", "String", false, nil, "unique identifier for the workload, usually defined by provider")
	tWorkload.ArrayField("ipAddresses", "String", false, "list of IP addresses associated with the workload, optional for getWorkloadsByIP API call")
	tWorkload.Field("hostname", "String", false, nil, "hostname associated with the workload")
	tWorkload.Field("provider", "String", false, nil, "infrastructure provider e.g. k8s, AWS, Azure, openstack etc.")
	tWorkload.Field("updateTime", "Timestamp", false, nil, "most recent update timestamp in the backend")
	tWorkload.Field("certExpiryTime", "Timestamp", false, nil, "certificate expiry time (ex: getNotAfter)")
	sb.AddType(tWorkload.Build())

	tWorkloads := rdl.NewStructTypeBuilder("Struct", "Workloads")
	tWorkloads.ArrayField("workloadList", "Workload", false, "list of workloads")
	sb.AddType(tWorkloads.Build())

	tTransportDirection := rdl.NewEnumTypeBuilder("Enum", "TransportDirection")
	tTransportDirection.Comment("Copyright The Athenz Authors Licensed under the terms of the Apache version 2.0 license. See LICENSE file for terms.")
	tTransportDirection.Element("IN", "")
	tTransportDirection.Element("OUT", "")
	sb.AddType(tTransportDirection.Build())

	tTransportRule := rdl.NewStructTypeBuilder("Struct", "TransportRule")
	tTransportRule.Field("endPoint", "String", false, nil, "source or destination endpoints defined in terms of CIDR notation")
	tTransportRule.Field("sourcePortRange", "String", false, nil, "range of port numbers for incoming connections")
	tTransportRule.Field("port", "Int32", false, nil, "destination / listener port of the service")
	tTransportRule.Field("protocol", "String", false, nil, "protocol of the connection")
	tTransportRule.Field("direction", "TransportDirection", false, nil, "transport direction")
	sb.AddType(tTransportRule.Build())

	tTransportRules := rdl.NewStructTypeBuilder("Struct", "TransportRules")
	tTransportRules.ArrayField("ingressRules", "TransportRule", false, "")
	tTransportRules.ArrayField("egressRules", "TransportRule", false, "")
	sb.AddType(tTransportRules.Build())

	tInfo := rdl.NewStructTypeBuilder("Struct", "Info")
	tInfo.Comment("Copyright The Athenz Authors Licensed under the terms of the Apache version 2.0 license. See LICENSE file for terms. The representation for an info object")
	tInfo.Field("buildJdkSpec", "String", true, nil, "jdk build version")
	tInfo.Field("implementationTitle", "String", true, nil, "implementation title - e.g. athenz-zms-server")
	tInfo.Field("implementationVersion", "String", true, nil, "implementation version - e.g. 1.11.1")
	tInfo.Field("implementationVendor", "String", true, nil, "implementation vendor - Athenz")
	sb.AddType(tInfo.Build())

	tExternalCredentialsRequest := rdl.NewStructTypeBuilder("Struct", "ExternalCredentialsRequest")
	tExternalCredentialsRequest.Field("clientId", "ServiceName", false, nil, "client id to be referenced in the ID token as audience")
	tExternalCredentialsRequest.Field("expiryTime", "Int32", true, nil, "optional expiry period specified in seconds")
	tExternalCredentialsRequest.MapField("attributes", "String", "String", true, "credential request attributes")
	sb.AddType(tExternalCredentialsRequest.Build())

	tExternalCredentialsResponse := rdl.NewStructTypeBuilder("Struct", "ExternalCredentialsResponse")
	tExternalCredentialsResponse.MapField("attributes", "String", "String", false, "credential response attributes")
	tExternalCredentialsResponse.Field("expiration", "Timestamp", true, nil, "credential expiry timestamp")
	sb.AddType(tExternalCredentialsResponse.Build())

	tDomainDetails := rdl.NewStructTypeBuilder("Struct", "DomainDetails")
	tDomainDetails.Field("name", "DomainName", false, nil, "name of the athenz domain")
	tDomainDetails.Field("awsAccount", "String", true, nil, "associated aws account id")
	tDomainDetails.Field("azureSubscription", "String", true, nil, "associated azure subscription id")
	tDomainDetails.Field("azureTenant", "String", true, nil, "associated azure tenant id")
	tDomainDetails.Field("azureClient", "String", true, nil, "associated azure client id")
	tDomainDetails.Field("gcpProjectId", "String", true, nil, "associated gcp project id")
	tDomainDetails.Field("gcpProjectNumber", "String", true, nil, "associated gcp project number")
	sb.AddType(tDomainDetails.Build())

	tRdl_Identifier := rdl.NewStringTypeBuilder("rdl.Identifier")
	tRdl_Identifier.Comment("All names need to be of this restricted string type")
	tRdl_Identifier.Pattern("[a-zA-Z_]+[a-zA-Z_0-9]*")
	sb.AddType(tRdl_Identifier.Build())

	tRdl_NamespacedIdentifier := rdl.NewStringTypeBuilder("rdl.NamespacedIdentifier")
	tRdl_NamespacedIdentifier.Comment("A Namespace is a dotted compound name, using reverse domain name order (i.e. \"com.yahoo.auth\")")
	tRdl_NamespacedIdentifier.Pattern("([a-zA-Z_]+[a-zA-Z_0-9]*)(\\.[a-zA-Z_]+[a-zA-Z_0-9])*")
	sb.AddType(tRdl_NamespacedIdentifier.Build())

	tRdl_TypeName := rdl.NewAliasTypeBuilder("rdl.Identifier", "rdl.TypeName")
	tRdl_TypeName.Comment("The identifier for an already-defined type")
	sb.AddType(tRdl_TypeName.Build())

	tRdl_TypeRef := rdl.NewAliasTypeBuilder("rdl.NamespacedIdentifier", "rdl.TypeRef")
	tRdl_TypeRef.Comment("A type reference can be a simple name, or also a namespaced name.")
	sb.AddType(tRdl_TypeRef.Build())

	tRdl_BaseType := rdl.NewEnumTypeBuilder("Enum", "rdl.BaseType")
	tRdl_BaseType.Element("Bool", "")
	tRdl_BaseType.Element("Int8", "")
	tRdl_BaseType.Element("Int16", "")
	tRdl_BaseType.Element("Int32", "")
	tRdl_BaseType.Element("Int64", "")
	tRdl_BaseType.Element("Float32", "")
	tRdl_BaseType.Element("Float64", "")
	tRdl_BaseType.Element("Bytes", "")
	tRdl_BaseType.Element("String", "")
	tRdl_BaseType.Element("Timestamp", "")
	tRdl_BaseType.Element("Symbol", "")
	tRdl_BaseType.Element("UUID", "")
	tRdl_BaseType.Element("Array", "")
	tRdl_BaseType.Element("Map", "")
	tRdl_BaseType.Element("Struct", "")
	tRdl_BaseType.Element("Enum", "")
	tRdl_BaseType.Element("Union", "")
	tRdl_BaseType.Element("Any", "")
	sb.AddType(tRdl_BaseType.Build())

	tRdl_ExtendedAnnotation := rdl.NewStringTypeBuilder("rdl.ExtendedAnnotation")
	tRdl_ExtendedAnnotation.Comment("ExtendedAnnotation - parsed and preserved, but has no defined meaning in RDL. Such annotations must begin with \"x_\", and may have an associated string literal value (the value will be \"\" if the annotation is just a flag).")
	tRdl_ExtendedAnnotation.Pattern("x_[a-zA-Z_0-9]*")
	sb.AddType(tRdl_ExtendedAnnotation.Build())

	tRdl_TypeDef := rdl.NewStructTypeBuilder("Struct", "rdl.TypeDef")
	tRdl_TypeDef.Comment("TypeDef is the basic type definition.")
	tRdl_TypeDef.Field("type", "rdl.TypeRef", false, nil, "The type this type is derived from. For base types, it is the same as the name")
	tRdl_TypeDef.Field("name", "rdl.TypeName", false, nil, "The name of the type")
	tRdl_TypeDef.Field("comment", "String", true, nil, "The comment for the type")
	tRdl_TypeDef.MapField("annotations", "rdl.ExtendedAnnotation", "String", true, "additional annotations starting with \"x_\"")
	sb.AddType(tRdl_TypeDef.Build())

	tRdl_AliasTypeDef := rdl.NewStructTypeBuilder("rdl.TypeDef", "rdl.AliasTypeDef")
	tRdl_AliasTypeDef.Comment("AliasTypeDef is used for type definitions that add no additional attributes, and thus just create an alias")
	sb.AddType(tRdl_AliasTypeDef.Build())

	tRdl_BytesTypeDef := rdl.NewStructTypeBuilder("rdl.TypeDef", "rdl.BytesTypeDef")
	tRdl_BytesTypeDef.Comment("Bytes allow the restriction by fixed size, or min/max size.")
	tRdl_BytesTypeDef.Field("size", "Int32", true, nil, "Fixed size")
	tRdl_BytesTypeDef.Field("minSize", "Int32", true, nil, "Min size")
	tRdl_BytesTypeDef.Field("maxSize", "Int32", true, nil, "Max size")
	sb.AddType(tRdl_BytesTypeDef.Build())

	tRdl_StringTypeDef := rdl.NewStructTypeBuilder("rdl.TypeDef", "rdl.StringTypeDef")
	tRdl_StringTypeDef.Comment("Strings allow the restriction by regular expression pattern or by an explicit set of values. An optional maximum size may be asserted")
	tRdl_StringTypeDef.Field("pattern", "String", true, nil, "A regular expression that must be matched. Mutually exclusive with values")
	tRdl_StringTypeDef.ArrayField("values", "String", true, "A set of allowable values")
	tRdl_StringTypeDef.Field("minSize", "Int32", true, nil, "Min size")
	tRdl_StringTypeDef.Field("maxSize", "Int32", true, nil, "Max size")
	sb.AddType(tRdl_StringTypeDef.Build())

	tRdl_Number := rdl.NewUnionTypeBuilder("Union", "rdl.Number")
	tRdl_Number.Comment("A numeric is any of the primitive numeric types")
	tRdl_Number.Variant("Int8")
	tRdl_Number.Variant("Int16")
	tRdl_Number.Variant("Int32")
	tRdl_Number.Variant("Int64")
	tRdl_Number.Variant("Float32")
	tRdl_Number.Variant("Float64")
	sb.AddType(tRdl_Number.Build())

	tRdl_NumberTypeDef := rdl.NewStructTypeBuilder("rdl.TypeDef", "rdl.NumberTypeDef")
	tRdl_NumberTypeDef.Comment("A number type definition allows the restriction of numeric values.")
	tRdl_NumberTypeDef.Field("min", "rdl.Number", true, nil, "Min value")
	tRdl_NumberTypeDef.Field("max", "rdl.Number", true, nil, "Max value")
	sb.AddType(tRdl_NumberTypeDef.Build())

	tRdl_ArrayTypeDef := rdl.NewStructTypeBuilder("rdl.TypeDef", "rdl.ArrayTypeDef")
	tRdl_ArrayTypeDef.Comment("Array types can be restricted by item type and size")
	tRdl_ArrayTypeDef.Field("items", "rdl.TypeRef", false, "Any", "The type of the items, default to any type")
	tRdl_ArrayTypeDef.Field("size", "Int32", true, nil, "If present, indicate the fixed size.")
	tRdl_ArrayTypeDef.Field("minSize", "Int32", true, nil, "If present, indicate the min size")
	tRdl_ArrayTypeDef.Field("maxSize", "Int32", true, nil, "If present, indicate the max size")
	sb.AddType(tRdl_ArrayTypeDef.Build())

	tRdl_MapTypeDef := rdl.NewStructTypeBuilder("rdl.TypeDef", "rdl.MapTypeDef")
	tRdl_MapTypeDef.Comment("Map types can be restricted by key type, item type and size")
	tRdl_MapTypeDef.Field("keys", "rdl.TypeRef", false, "String", "The type of the keys, default to String.")
	tRdl_MapTypeDef.Field("items", "rdl.TypeRef", false, "Any", "The type of the items, default to Any type")
	tRdl_MapTypeDef.Field("size", "Int32", true, nil, "If present, indicates the fixed size.")
	tRdl_MapTypeDef.Field("minSize", "Int32", true, nil, "If present, indicate the min size")
	tRdl_MapTypeDef.Field("maxSize", "Int32", true, nil, "If present, indicate the max size")
	sb.AddType(tRdl_MapTypeDef.Build())

	tRdl_StructFieldDef := rdl.NewStructTypeBuilder("Struct", "rdl.StructFieldDef")
	tRdl_StructFieldDef.Comment("Each field in a struct_field_spec is defined by this type")
	tRdl_StructFieldDef.Field("name", "rdl.Identifier", false, nil, "The name of the field")
	tRdl_StructFieldDef.Field("type", "rdl.TypeRef", false, nil, "The type of the field")
	tRdl_StructFieldDef.Field("optional", "Bool", false, false, "The field may be omitted even if specified")
	tRdl_StructFieldDef.Field("default", "Any", true, nil, "If field is absent, what default value should be assumed.")
	tRdl_StructFieldDef.Field("comment", "String", true, nil, "The comment for the field")
	tRdl_StructFieldDef.Field("items", "rdl.TypeRef", true, nil, "For map or array fields, the type of the items")
	tRdl_StructFieldDef.Field("keys", "rdl.TypeRef", true, nil, "For map type fields, the type of the keys")
	tRdl_StructFieldDef.MapField("annotations", "rdl.ExtendedAnnotation", "String", true, "additional annotations starting with \"x_\"")
	sb.AddType(tRdl_StructFieldDef.Build())

	tRdl_StructTypeDef := rdl.NewStructTypeBuilder("rdl.TypeDef", "rdl.StructTypeDef")
	tRdl_StructTypeDef.Comment("A struct can restrict specific named fields to specific types. By default, any field not specified is allowed, and can be of any type. Specifying closed means only those fields explicitly")
	tRdl_StructTypeDef.ArrayField("fields", "rdl.StructFieldDef", false, "The fields in this struct. By default, open Structs can have any fields in addition to these")
	tRdl_StructTypeDef.Field("closed", "Bool", false, false, "indicates that only the specified fields are acceptable. Default is open (any fields)")
	sb.AddType(tRdl_StructTypeDef.Build())

	tRdl_EnumElementDef := rdl.NewStructTypeBuilder("Struct", "rdl.EnumElementDef")
	tRdl_EnumElementDef.Comment("EnumElementDef defines one of the elements of an Enum")
	tRdl_EnumElementDef.Field("symbol", "rdl.Identifier", false, nil, "The identifier representing the value")
	tRdl_EnumElementDef.Field("comment", "String", true, nil, "the comment for the element")
	tRdl_EnumElementDef.MapField("annotations", "rdl.ExtendedAnnotation", "String", true, "additional annotations starting with \"x_\"")
	sb.AddType(tRdl_EnumElementDef.Build())

	tRdl_EnumTypeDef := rdl.NewStructTypeBuilder("rdl.TypeDef", "rdl.EnumTypeDef")
	tRdl_EnumTypeDef.Comment("Define an enumerated type. Each value of the type is represented by a symbolic identifier.")
	tRdl_EnumTypeDef.ArrayField("elements", "rdl.EnumElementDef", false, "The enumeration of the possible elements")
	sb.AddType(tRdl_EnumTypeDef.Build())

	tRdl_UnionTypeDef := rdl.NewStructTypeBuilder("rdl.TypeDef", "rdl.UnionTypeDef")
	tRdl_UnionTypeDef.Comment("Define a type as one of any other specified type.")
	tRdl_UnionTypeDef.ArrayField("variants", "rdl.TypeRef", false, "The type names of constituent types. Union types get expanded, this is a flat list")
	sb.AddType(tRdl_UnionTypeDef.Build())

	tRdl_Type := rdl.NewUnionTypeBuilder("Union", "rdl.Type")
	tRdl_Type.Comment("A Type can be specified by any of the above specialized Types, determined by the value of the the 'type' field")
	tRdl_Type.Variant("rdl.BaseType")
	tRdl_Type.Variant("rdl.StructTypeDef")
	tRdl_Type.Variant("rdl.MapTypeDef")
	tRdl_Type.Variant("rdl.ArrayTypeDef")
	tRdl_Type.Variant("rdl.EnumTypeDef")
	tRdl_Type.Variant("rdl.UnionTypeDef")
	tRdl_Type.Variant("rdl.StringTypeDef")
	tRdl_Type.Variant("rdl.BytesTypeDef")
	tRdl_Type.Variant("rdl.NumberTypeDef")
	tRdl_Type.Variant("rdl.AliasTypeDef")
	sb.AddType(tRdl_Type.Build())

	tRdl_ResourceInput := rdl.NewStructTypeBuilder("Struct", "rdl.ResourceInput")
	tRdl_ResourceInput.Comment("ResourceOutput defines input characteristics of a Resource")
	tRdl_ResourceInput.Field("name", "rdl.Identifier", false, nil, "the formal name of the input")
	tRdl_ResourceInput.Field("type", "rdl.TypeRef", false, nil, "The type of the input")
	tRdl_ResourceInput.Field("comment", "String", true, nil, "The optional comment")
	tRdl_ResourceInput.Field("pathParam", "Bool", false, false, "true of this input is a path parameter")
	tRdl_ResourceInput.Field("queryParam", "String", true, nil, "if present, the name of the query param name")
	tRdl_ResourceInput.Field("header", "String", true, nil, "If present, the name of the header the input is associated with")
	tRdl_ResourceInput.Field("pattern", "String", true, nil, "If present, the pattern associated with the pathParam (i.e. wildcard path matches)")
	tRdl_ResourceInput.Field("default", "Any", true, nil, "If present, the default value for optional params")
	tRdl_ResourceInput.Field("optional", "Bool", false, false, "If present, indicates that the input is optional")
	tRdl_ResourceInput.Field("flag", "Bool", false, false, "If present, indicates the queryparam is of flag style (no value)")
	tRdl_ResourceInput.Field("context", "String", true, nil, "If present, indicates the parameter comes form the implementation context")
	tRdl_ResourceInput.MapField("annotations", "rdl.ExtendedAnnotation", "String", true, "additional annotations starting with \"x_\"")
	sb.AddType(tRdl_ResourceInput.Build())

	tRdl_ResourceOutput := rdl.NewStructTypeBuilder("Struct", "rdl.ResourceOutput")
	tRdl_ResourceOutput.Comment("ResourceOutput defines output characteristics of a Resource")
	tRdl_ResourceOutput.Field("name", "rdl.Identifier", false, nil, "the formal name of the output")
	tRdl_ResourceOutput.Field("type", "rdl.TypeRef", false, nil, "The type of the output")
	tRdl_ResourceOutput.Field("header", "String", false, nil, "the name of the header associated with this output")
	tRdl_ResourceOutput.Field("comment", "String", true, nil, "The optional comment for the output")
	tRdl_ResourceOutput.Field("optional", "Bool", false, false, "If present, indicates that the output is optional (the server decides)")
	tRdl_ResourceOutput.MapField("annotations", "rdl.ExtendedAnnotation", "String", true, "additional annotations starting with \"x_\"")
	sb.AddType(tRdl_ResourceOutput.Build())

	tRdl_ResourceAuth := rdl.NewStructTypeBuilder("Struct", "rdl.ResourceAuth")
	tRdl_ResourceAuth.Comment("ResourceAuth defines authentication and authorization attributes of a resource. Presence of action, resource, or domain implies authentication; the authentication flag alone is required only when no authorization is done.")
	tRdl_ResourceAuth.Field("authenticate", "Bool", false, false, "if present and true, then the requester must be authenticated")
	tRdl_ResourceAuth.Field("action", "String", true, nil, "the action to authorize access to. This forces authentication")
	tRdl_ResourceAuth.Field("resource", "String", true, nil, "the resource identity to authorize access to")
	tRdl_ResourceAuth.Field("domain", "String", true, nil, "if present, the alternate domain to check access to. This is rare.")
	sb.AddType(tRdl_ResourceAuth.Build())

	tRdl_ExceptionDef := rdl.NewStructTypeBuilder("Struct", "rdl.ExceptionDef")
	tRdl_ExceptionDef.Comment("ExceptionDef describes the exception a symbolic response code maps to.")
	tRdl_ExceptionDef.Field("type", "String", false, nil, "The type of the exception")
	tRdl_ExceptionDef.Field("comment", "String", true, nil, "the optional comment for the exception")
	sb.AddType(tRdl_ExceptionDef.Build())

	tRdl_Resource := rdl.NewStructTypeBuilder("Struct", "rdl.Resource")
	tRdl_Resource.Comment("A Resource of a REST service")
	tRdl_Resource.Field("type", "rdl.TypeRef", false, nil, "The type of the resource")
	tRdl_Resource.Field("method", "String", false, nil, "The method for the action (typically GET, POST, etc for HTTP access)")
	tRdl_Resource.Field("path", "String", false, nil, "The resource path template")
	tRdl_Resource.Field("comment", "String", true, nil, "The optional comment")
	tRdl_Resource.ArrayField("inputs", "rdl.ResourceInput", true, "An Array named inputs")
	tRdl_Resource.ArrayField("outputs", "rdl.ResourceOutput", true, "An Array of named outputs")
	tRdl_Resource.Field("auth", "rdl.ResourceAuth", true, nil, "The optional authentication or authorization directive")
	tRdl_Resource.Field("expected", "String", false, "OK", "The expected symbolic response code")
	tRdl_Resource.ArrayField("alternatives", "String", true, "The set of alternative but non-error response codes")
	tRdl_Resource.MapField("exceptions", "String", "rdl.ExceptionDef", true, "A map of symbolic response code to Exception definitions")
	tRdl_Resource.Field("async", "Bool", true, nil, "A hint to server implementations that this resource would be better implemented with async I/O")
	tRdl_Resource.MapField("annotations", "rdl.ExtendedAnnotation", "String", true, "additional annotations starting with \"x_\"")
	tRdl_Resource.ArrayField("consumes", "String", true, "Optional hint for resource acceptable input types")
	tRdl_Resource.ArrayField("produces", "String", true, "Optional hint for resource output content types")
	tRdl_Resource.Field("name", "rdl.Identifier", true, nil, "The optional name of the resource")
	sb.AddType(tRdl_Resource.Build())

	tRdl_Schema := rdl.NewStructTypeBuilder("Struct", "rdl.Schema")
	tRdl_Schema.Comment("A Schema is a container for types and resources. It is self-contained (no external references). and is the output of the RDL parser.")
	tRdl_Schema.Field("namespace", "rdl.NamespacedIdentifier", true, nil, "The namespace for the schema")
	tRdl_Schema.Field("name", "rdl.Identifier", true, nil, "The name of the schema")
	tRdl_Schema.Field("version", "Int32", true, nil, "The version of the schema")
	tRdl_Schema.Field("comment", "String", true, nil, "The comment for the entire schema")
	tRdl_Schema.ArrayField("types", "rdl.Type", true, "The types this schema defines.")
	tRdl_Schema.ArrayField("resources", "rdl.Resource", true, "The resources for a service this schema defines")
	tRdl_Schema.Field("base", "String", true, nil, "the base path for resources in the schema.")
	tRdl_Schema.MapField("annotations", "rdl.ExtendedAnnotation", "String", true, "additional annotations starting with \"x_\"")
	sb.AddType(tRdl_Schema.Build())

	mGetResourceAccess := rdl.NewResourceBuilder("ResourceAccess", "GET", "/access/{action}/{resource}")
	mGetResourceAccess.Comment("Check access for the specified operation on the specified resource for the currently authenticated user. This is the slow centralized access for control-plane purposes. Use distributed mechanisms for decentralized (data-plane) access by fetching signed policies and role tokens for users. With this endpoint the resource is part of the uri and restricted to its strict definition of resource name. If needed, you can use the GetAccessExt api that allows resource name to be less restrictive.")
	mGetResourceAccess.Input("action", "ActionName", true, "", "", false, nil, "action as specified in the policy assertion, i.e. update or read")
	mGetResourceAccess.Input("resource", "ResourceName", true, "", "", false, nil, "the resource to check access against, i.e. \"media.news:articles\"")
	mGetResourceAccess.Input("domain", "DomainName", false, "domain", "", true, nil, "usually null. If present, it specifies an alternate domain for cross-domain trust relation")
	mGetResourceAccess.Input("checkPrincipal", "EntityName", false, "principal", "", true, nil, "usually null. If present, carry out the access check for this principal")
	mGetResourceAccess.Auth("", "", true, "")
	mGetResourceAccess.Exception("BAD_REQUEST", "ResourceError", "")
	mGetResourceAccess.Exception("FORBIDDEN", "ResourceError", "")
	mGetResourceAccess.Exception("NOT_FOUND", "ResourceError", "")
	mGetResourceAccess.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mGetResourceAccess.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mGetResourceAccess.Build())

	mGetResourceAccessExt := rdl.NewResourceBuilder("ResourceAccess", "GET", "/access/{action}")
	mGetResourceAccessExt.Comment("Check access for the specified operation on the specified resource for the currently authenticated user. This is the slow centralized access for control-plane purposes.")
	mGetResourceAccessExt.Name("GetResourceAccessExt")
	mGetResourceAccessExt.Input("action", "ActionName", true, "", "", false, nil, "action as specified in the policy assertion, i.e. update or read")
	mGetResourceAccessExt.Input("resource", "String", false, "resource", "", false, nil, "the resource to check access against, i.e. \"media.news:articles\"")
	mGetResourceAccessExt.Input("domain", "DomainName", false, "domain", "", true, nil, "usually null. If present, it specifies an alternate domain for cross-domain trust relation")
	mGetResourceAccessExt.Input("checkPrincipal", "EntityName", false, "principal", "", true, nil, "usually null. If present, carry out the access check for this principal")
	mGetResourceAccessExt.Auth("", "", true, "")
	mGetResourceAccessExt.Exception("BAD_REQUEST", "ResourceError", "")
	mGetResourceAccessExt.Exception("FORBIDDEN", "ResourceError", "")
	mGetResourceAccessExt.Exception("NOT_FOUND", "ResourceError", "")
	mGetResourceAccessExt.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mGetResourceAccessExt.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mGetResourceAccessExt.Build())

	mGetServiceIdentity := rdl.NewResourceBuilder("ServiceIdentity", "GET", "/domain/{domainName}/service/{serviceName}")
	mGetServiceIdentity.Comment("Get info for the specified ServiceIdentity.")
	mGetServiceIdentity.Input("domainName", "DomainName", true, "", "", false, nil, "name of the domain")
	mGetServiceIdentity.Input("serviceName", "ServiceName", true, "", "", false, nil, "name of the service to be retrieved")
	mGetServiceIdentity.Auth("", "", true, "")
	mGetServiceIdentity.Exception("BAD_REQUEST", "ResourceError", "")
	mGetServiceIdentity.Exception("NOT_FOUND", "ResourceError", "")
	mGetServiceIdentity.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mGetServiceIdentity.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mGetServiceIdentity.Build())

	mGetServiceIdentityList := rdl.NewResourceBuilder("ServiceIdentityList", "GET", "/domain/{domainName}/service")
	mGetServiceIdentityList.Comment("Enumerate services provisioned in this domain.")
	mGetServiceIdentityList.Input("domainName", "DomainName", true, "", "", false, nil, "name of the domain")
	mGetServiceIdentityList.Auth("", "", true, "")
	mGetServiceIdentityList.Exception("BAD_REQUEST", "ResourceError", "")
	mGetServiceIdentityList.Exception("NOT_FOUND", "ResourceError", "")
	mGetServiceIdentityList.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mGetServiceIdentityList.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mGetServiceIdentityList.Build())

	mGetPublicKeyEntry := rdl.NewResourceBuilder("PublicKeyEntry", "GET", "/domain/{domainName}/service/{serviceName}/publickey/{keyId}")
	mGetPublicKeyEntry.Comment("Retrieve the specified public key from the service.")
	mGetPublicKeyEntry.Input("domainName", "DomainName", true, "", "", false, nil, "name of the domain")
	mGetPublicKeyEntry.Input("serviceName", "SimpleName", true, "", "", false, nil, "name of the service")
	mGetPublicKeyEntry.Input("keyId", "String", true, "", "", false, nil, "the identifier of the public key to be retrieved")
	mGetPublicKeyEntry.Auth("", "", true, "")
	mGetPublicKeyEntry.Exception("BAD_REQUEST", "ResourceError", "")
	mGetPublicKeyEntry.Exception("NOT_FOUND", "ResourceError", "")
	mGetPublicKeyEntry.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mGetPublicKeyEntry.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mGetPublicKeyEntry.Build())

	mGetHostServices := rdl.NewResourceBuilder("HostServices", "GET", "/host/{host}/services")
	mGetHostServices.Comment("Enumerate services provisioned on a specific host")
	mGetHostServices.Input("host", "String", true, "", "", false, nil, "name of the host")
	mGetHostServices.Auth("", "", true, "")
	mGetHostServices.Exception("BAD_REQUEST", "ResourceError", "")
	mGetHostServices.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mGetHostServices.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mGetHostServices.Build())

	mGetDomainSignedPolicyData := rdl.NewResourceBuilder("DomainSignedPolicyData", "GET", "/domain/{domainName}/signed_policy_data")
	mGetDomainSignedPolicyData.Comment("Get a signed policy enumeration from the service, to transfer to a local store. An ETag is generated for the PolicyList that changes when any item in the list changes. If the If-None-Match header is provided, and it matches the ETag that would be returned, then a NOT_MODIFIED response is returned instead of the list.")
	mGetDomainSignedPolicyData.Input("domainName", "DomainName", true, "", "", false, nil, "name of the domain")
	mGetDomainSignedPolicyData.Input("matchingTag", "String", false, "", "If-None-Match", false, nil, "Retrieved from the previous request, this timestamp specifies to the server to return any policies modified since this time")
	mGetDomainSignedPolicyData.Output("tag", "String", "ETag", false, "The current latest modification timestamp is returned in this header")
	mGetDomainSignedPolicyData.Auth("", "", true, "")
	mGetDomainSignedPolicyData.Exception("BAD_REQUEST", "ResourceError", "")
	mGetDomainSignedPolicyData.Exception("NOT_FOUND", "ResourceError", "")
	mGetDomainSignedPolicyData.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mGetDomainSignedPolicyData.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mGetDomainSignedPolicyData.Build())

	mPostSignedPolicyRequest := rdl.NewResourceBuilder("JWSPolicyData", "POST", "/domain/{domainName}/policy/signed")
	mPostSignedPolicyRequest.Comment("Get a signed policy enumeration from the service, to transfer to a local store. An ETag is generated for the PolicyList that changes when any item in the list changes. If the If-None-Match header is provided, and it matches the ETag that would be returned, then a NOT_MODIFIED response is returned instead of the list.")
	mPostSignedPolicyRequest.Input("domainName", "DomainName", true, "", "", false, nil, "name of the domain")
	mPostSignedPolicyRequest.Input("request", "SignedPolicyRequest", false, "", "", false, nil, "policy version request details")
	mPostSignedPolicyRequest.Input("matchingTag", "String", false, "", "If-None-Match", false, nil, "Retrieved from the previous request, this timestamp specifies to the server to return any policies modified since this time")
	mPostSignedPolicyRequest.Output("tag", "String", "ETag", false, "The current latest modification timestamp is returned in this header")
	mPostSignedPolicyRequest.Auth("", "", true, "")
	mPostSignedPolicyRequest.Exception("BAD_REQUEST", "ResourceError", "")
	mPostSignedPolicyRequest.Exception("NOT_FOUND", "ResourceError", "")
	mPostSignedPolicyRequest.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mPostSignedPolicyRequest.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mPostSignedPolicyRequest.Build())

	mGetRoleToken := rdl.NewResourceBuilder("RoleToken", "GET", "/domain/{domainName}/token")
	mGetRoleToken.Comment("Return a security token for the specific role in the namespace that the principal can assume. If the role is omitted, then all roles in the namespace that the authenticated user can assume are returned. the caller can specify how long the RoleToken should be valid for by specifying the minExpiryTime and maxExpiryTime parameters. The minExpiryTime specifies that the returned RoleToken must be at least valid (min/lower bound) for specified number of seconds, while maxExpiryTime specifies that the RoleToken must be at most valid (max/upper bound) for specified number of seconds. If both values are the same, the server must return a RoleToken for that many seconds. If no values are specified, the server's default RoleToken Timeout value is used.")
	mGetRoleToken.Input("domainName", "DomainName", true, "", "", false, nil, "name of the domain")
	mGetRoleToken.Input("role", "EntityList", false, "role", "", true, nil, "only interested for a token for these comma separated roles")
	mGetRoleToken.Input("minExpiryTime", "Int32", false, "minExpiryTime", "", true, nil, "in seconds min expiry time")
	mGetRoleToken.Input("maxExpiryTime", "Int32", false, "maxExpiryTime", "", true, nil, "in seconds max expiry time")
	mGetRoleToken.Input("proxyForPrincipal", "EntityName", false, "proxyForPrincipal", "", true, nil, "optional this request is proxy for this principal")
	mGetRoleToken.Auth("", "", true, "")
	mGetRoleToken.Exception("BAD_REQUEST", "ResourceError", "")
	mGetRoleToken.Exception("FORBIDDEN", "ResourceError", "")
	mGetRoleToken.Exception("NOT_FOUND", "ResourceError", "")
	mGetRoleToken.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mGetRoleToken.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mGetRoleToken.Build())

	mPostRoleCertificateRequest := rdl.NewResourceBuilder("RoleToken", "POST", "/domain/{domainName}/role/{roleName}/token")
	mPostRoleCertificateRequest.Comment("Return a TLS certificate for the specific role in the namespace that the principal can assume. Role certificates are valid for 30 days by default. This is deprecated and \"POST /rolecert\" api should be used instead.")
	mPostRoleCertificateRequest.Input("domainName", "DomainName", true, "", "", false, nil, "name of the domain")
	mPostRoleCertificateRequest.Input("roleName", "EntityName", true, "", "", false, nil, "name of role")
	mPostRoleCertificateRequest.Input("req", "RoleCertificateRequest", false, "", "", false, nil, "csr request")
	mPostRoleCertificateRequest.Auth("", "", true, "")
	mPostRoleCertificateRequest.Exception("BAD_REQUEST", "ResourceError", "")
	mPostRoleCertificateRequest.Exception("FORBIDDEN", "ResourceError", "")
	mPostRoleCertificateRequest.Exception("NOT_FOUND", "ResourceError", "")
	mPostRoleCertificateRequest.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mPostRoleCertificateRequest.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mPostRoleCertificateRequest.Build())

	mGetAccess := rdl.NewResourceBuilder("Access", "GET", "/access/domain/{domainName}/role/{roleName}/principal/{principal}")
	mGetAccess.Input("domainName", "DomainName", true, "", "", false, nil, "name of the domain")
	mGetAccess.Input("roleName", "EntityName", true, "", "", false, nil, "name of the role to check access for")
	mGetAccess.Input("principal", "EntityName", true, "", "", false, nil, "carry out the access check for this principal")
	mGetAccess.Auth("", "", true, "")
	mGetAccess.Exception("BAD_REQUEST", "ResourceError", "")
	mGetAccess.Exception("FORBIDDEN", "ResourceError", "")
	mGetAccess.Exception("NOT_FOUND", "ResourceError", "")
	mGetAccess.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mGetAccess.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mGetAccess.Build())

	mGetRoleAccess := rdl.NewResourceBuilder("RoleAccess", "GET", "/access/domain/{domainName}/principal/{principal}")
	mGetRoleAccess.Input("domainName", "DomainName", true, "", "", false, nil, "name of the domain")
	mGetRoleAccess.Input("principal", "EntityName", true, "", "", false, nil, "carry out the role access lookup for this principal")
	mGetRoleAccess.Auth("", "", true, "")
	mGetRoleAccess.Exception("BAD_REQUEST", "ResourceError", "")
	mGetRoleAccess.Exception("NOT_FOUND", "ResourceError", "")
	mGetRoleAccess.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mGetRoleAccess.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mGetRoleAccess.Build())

	mGetTenantDomains := rdl.NewResourceBuilder("TenantDomains", "GET", "/providerdomain/{providerDomainName}/user/{userName}")
	mGetTenantDomains.Comment("Get list of tenant domains user has access to for specified provider domain and service")
	mGetTenantDomains.Input("providerDomainName", "DomainName", true, "", "", false, nil, "name of the provider domain")
	mGetTenantDomains.Input("userName", "EntityName", true, "", "", false, nil, "name of the user to retrieve tenant domain access for")
	mGetTenantDomains.Input("roleName", "EntityName", false, "roleName", "", true, nil, "role name to filter on when looking for the tenants in provider")
	mGetTenantDomains.Input("serviceName", "ServiceName", false, "serviceName", "", true, nil, "service name to filter on when looking for the tenants in provider")
	mGetTenantDomains.Auth("", "", true, "")
	mGetTenantDomains.Exception("BAD_REQUEST", "ResourceError", "")
	mGetTenantDomains.Exception("NOT_FOUND", "ResourceError", "")
	mGetTenantDomains.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mGetTenantDomains.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mGetTenantDomains.Build())

	mPostInstanceRefreshRequest := rdl.NewResourceBuilder("Identity", "POST", "/instance/{domain}/{service}/refresh")
	mPostInstanceRefreshRequest.Comment("Refresh Service tokens into TLS Certificate")
	mPostInstanceRefreshRequest.Input("domain", "CompoundName", true, "", "", false, nil, "name of the domain requesting the refresh")
	mPostInstanceRefreshRequest.Input("service", "SimpleName", true, "", "", false, nil, "name of the service requesting the refresh")
	mPostInstanceRefreshRequest.Input("req", "InstanceRefreshRequest", false, "", "", false, nil, "the refresh request")
	mPostInstanceRefreshRequest.Auth("", "", true, "")
	mPostInstanceRefreshRequest.Exception("BAD_REQUEST", "ResourceError", "")
	mPostInstanceRefreshRequest.Exception("FORBIDDEN", "ResourceError", "")
	mPostInstanceRefreshRequest.Exception("INTERNAL_SERVER_ERROR", "ResourceError", "")
	mPostInstanceRefreshRequest.Exception("NOT_FOUND", "ResourceError", "")
	mPostInstanceRefreshRequest.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mPostInstanceRefreshRequest.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mPostInstanceRefreshRequest.Build())

	mGetAWSTemporaryCredentials := rdl.NewResourceBuilder("AWSTemporaryCredentials", "GET", "/domain/{domainName}/role/{role}/creds")
	mGetAWSTemporaryCredentials.Comment("perform an AWS AssumeRole of the target role and return the credentials. ZTS must have been granted the ability to assume the role in IAM, and granted the ability to assume_aws_role in Athenz for this to succeed.")
	mGetAWSTemporaryCredentials.Input("domainName", "DomainName", true, "", "", false, nil, "name of the domain containing the role, which implies the target account")
	mGetAWSTemporaryCredentials.Input("role", "AWSArnRoleName", true, "", "", false, nil, "the target AWS role name in the domain account, in Athenz terms, i.e. \"the.role\"")
	mGetAWSTemporaryCredentials.Input("durationSeconds", "Int32", false, "durationSeconds", "", true, nil, "how long the aws temp creds should be issued for")
	mGetAWSTemporaryCredentials.Input("externalId", "String", false, "externalId", "", true, nil, "aws assume role external id")
	mGetAWSTemporaryCredentials.Auth("", "", true, "")
	mGetAWSTemporaryCredentials.Exception("BAD_REQUEST", "ResourceError", "")
	mGetAWSTemporaryCredentials.Exception("FORBIDDEN", "ResourceError", "")
	mGetAWSTemporaryCredentials.Exception("NOT_FOUND", "ResourceError", "")
	mGetAWSTemporaryCredentials.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mGetAWSTemporaryCredentials.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mGetAWSTemporaryCredentials.Build())

	mPostInstanceRegisterInformation := rdl.NewResourceBuilder("InstanceIdentity", "POST", "/instance")
	mPostInstanceRegisterInformation.Comment("Register a new service instance and issue an x.509 service identity certificate once the provider validates the attestation data along with the request attributes. We have an authenticate enabled for this endpoint but in most cases the service owner might need to make it optional by setting the zts servers no_auth_uri list to include this endpoint. We need the authenticate in case the request comes with a client certificate and the provider needs to know who that principal was in the client certificate")
	mPostInstanceRegisterInformation.Input("info", "InstanceRegisterInformation", false, "", "", false, nil, "")
	mPostInstanceRegisterInformation.Output("location", "String", "Location", false, "return location for subsequent patch requests")
	mPostInstanceRegisterInformation.Auth("", "", true, "")
	mPostInstanceRegisterInformation.Expected("CREATED")
	mPostInstanceRegisterInformation.Exception("BAD_REQUEST", "ResourceError", "")
	mPostInstanceRegisterInformation.Exception("FORBIDDEN", "ResourceError", "")
	mPostInstanceRegisterInformation.Exception("INTERNAL_SERVER_ERROR", "ResourceError", "")
	mPostInstanceRegisterInformation.Exception("NOT_FOUND", "ResourceError", "")
	mPostInstanceRegisterInformation.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mPostInstanceRegisterInformation.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mPostInstanceRegisterInformation.Build())

	mPostInstanceRefreshInformation := rdl.NewResourceBuilder("InstanceIdentity", "POST", "/instance/{provider}/{domain}/{service}/{instanceId}")
	mPostInstanceRefreshInformation.Comment("Refresh the given service instance and issue a new x.509 service identity certificate once the provider validates the attestation data along with the request attributes. only TLS Certificate authentication is allowed")
	mPostInstanceRefreshInformation.Input("provider", "ServiceName", true, "", "", false, nil, "the provider service name (i.e. \"aws.us-west-2\", \"paas.manhattan.corp-gq1\")")
	mPostInstanceRefreshInformation.Input("domain", "DomainName", true, "", "", false, nil, "the domain of the instance")
	mPostInstanceRefreshInformation.Input("service", "SimpleName", true, "", "", false, nil, "the service this instance is supposed to run")
	mPostInstanceRefreshInformation.Input("instanceId", "PathElement", true, "", "", false, nil, "unique instance id within provider's namespace")
	mPostInstanceRefreshInformation.Input("info", "InstanceRefreshInformation", false, "", "", false, nil, "the refresh request")
	mPostInstanceRefreshInformation.Auth("", "", true, "")
	mPostInstanceRefreshInformation.Exception("BAD_REQUEST", "ResourceError", "")
	mPostInstanceRefreshInformation.Exception("FORBIDDEN", "ResourceError", "")
	mPostInstanceRefreshInformation.Exception("INTERNAL_SERVER_ERROR", "ResourceError", "")
	mPostInstanceRefreshInformation.Exception("NOT_FOUND", "ResourceError", "")
	mPostInstanceRefreshInformation.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mPostInstanceRefreshInformation.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mPostInstanceRefreshInformation.Build())

	mGetInstanceRegisterToken := rdl.NewResourceBuilder("InstanceRegisterToken", "GET", "/instance/{provider}/{domain}/{service}/{instanceId}/token")
	mGetInstanceRegisterToken.Comment("Request a token for the given service to be bootstrapped for the given provider. The caller must have authorization to manage the service in the given domain. The token will be valid for 30 mins for one time use only for the initial registration. The token must be sent back in the register request as the value of the attestationData field in the InstanceRegisterInformation object")
	mGetInstanceRegisterToken.Input("provider", "ServiceName", true, "", "", false, nil, "the provider service name (i.e. \"aws.us-west-2\")")
	mGetInstanceRegisterToken.Input("domain", "DomainName", true, "", "", false, nil, "the domain of the instance")
	mGetInstanceRegisterToken.Input("service", "SimpleName", true, "", "", false, nil, "the service this instance is supposed to run")
	mGetInstanceRegisterToken.Input("instanceId", "PathElement", true, "", "", false, nil, "unique instance id within provider's namespace")
	mGetInstanceRegisterToken.Auth("update", "{domain}:service.{service}", false, "")
	mGetInstanceRegisterToken.Exception("BAD_REQUEST", "ResourceError", "")
	mGetInstanceRegisterToken.Exception("FORBIDDEN", "ResourceError", "")
	mGetInstanceRegisterToken.Exception("INTERNAL_SERVER_ERROR", "ResourceError", "")
	mGetInstanceRegisterToken.Exception("NOT_FOUND", "ResourceError", "")
	mGetInstanceRegisterToken.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mGetInstanceRegisterToken.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mGetInstanceRegisterToken.Build())

	mDeleteInstanceIdentity := rdl.NewResourceBuilder("InstanceIdentity", "DELETE", "/instance/{provider}/{domain}/{service}/{instanceId}")
	mDeleteInstanceIdentity.Comment("Delete the given service instance certificate record thus blocking any future refresh requests from the given instance for this service There are two possible authorization checks for this endpoint: 1) domain admin: authorize(\"delete\", \"{domain}:instance.{instanceId}\") the authorized user can remove the instance record from the datastore 2) provider itself: if the identity of the caller is the provider itself then the provider is notifying ZTS that the instance was deleted")
	mDeleteInstanceIdentity.Input("provider", "ServiceName", true, "", "", false, nil, "the provider service name (i.e. \"aws.us-west-2\", \"paas.manhattan.corp-gq1\")")
	mDeleteInstanceIdentity.Input("domain", "DomainName", true, "", "", false, nil, "the domain of the instance")
	mDeleteInstanceIdentity.Input("service", "SimpleName", true, "", "", false, nil, "the service this instance is supposed to run")
	mDeleteInstanceIdentity.Input("instanceId", "PathElement", true, "", "", false, nil, "unique instance id within provider's namespace")
	mDeleteInstanceIdentity.Auth("", "", true, "")
	mDeleteInstanceIdentity.Expected("NO_CONTENT")
	mDeleteInstanceIdentity.Exception("BAD_REQUEST", "ResourceError", "")
	mDeleteInstanceIdentity.Exception("FORBIDDEN", "ResourceError", "")
	mDeleteInstanceIdentity.Exception("INTERNAL_SERVER_ERROR", "ResourceError", "")
	mDeleteInstanceIdentity.Exception("NOT_FOUND", "ResourceError", "")
	mDeleteInstanceIdentity.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mDeleteInstanceIdentity.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mDeleteInstanceIdentity.Build())

	mGetCertificateAuthorityBundle := rdl.NewResourceBuilder("CertificateAuthorityBundle", "GET", "/cacerts/{name}")
	mGetCertificateAuthorityBundle.Comment("Return the request CA X.509 Certificate bundle")
	mGetCertificateAuthorityBundle.Input("name", "SimpleName", true, "", "", false, nil, "name of the CA cert bundle")
	mGetCertificateAuthorityBundle.Auth("", "", true, "")
	mGetCertificateAuthorityBundle.Exception("BAD_REQUEST", "ResourceError", "")
	mGetCertificateAuthorityBundle.Exception("NOT_FOUND", "ResourceError", "")
	mGetCertificateAuthorityBundle.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mGetCertificateAuthorityBundle.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mGetCertificateAuthorityBundle.Build())

	mGetStatus := rdl.NewResourceBuilder("Status", "GET", "/status")
	mGetStatus.Comment("Retrieve the server status")
	mGetStatus.Auth("", "", true, "")
	mGetStatus.Exception("BAD_REQUEST", "ResourceError", "")
	mGetStatus.Exception("NOT_FOUND", "ResourceError", "")
	mGetStatus.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mGetStatus.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mGetStatus.Build())

	mPostSSHCertRequest := rdl.NewResourceBuilder("SSHCertificates", "POST", "/sshcert")
	mPostSSHCertRequest.Input("certRequest", "SSHCertRequest", false, "", "", false, nil, "ssh certificate request")
	mPostSSHCertRequest.Auth("", "", true, "")
	mPostSSHCertRequest.Expected("CREATED")
	mPostSSHCertRequest.Exception("BAD_REQUEST", "ResourceError", "")
	mPostSSHCertRequest.Exception("FORBIDDEN", "ResourceError", "")
	mPostSSHCertRequest.Exception("INTERNAL_SERVER_ERROR", "ResourceError", "")
	mPostSSHCertRequest.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mPostSSHCertRequest.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mPostSSHCertRequest.Build())

	mGetOpenIDConfig := rdl.NewResourceBuilder("OpenIDConfig", "GET", "/.well-known/openid-configuration")
	mGetOpenIDConfig.Exception("BAD_REQUEST", "ResourceError", "")
	mGetOpenIDConfig.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	sb.AddResource(mGetOpenIDConfig.Build())

	mGetOAuthConfig := rdl.NewResourceBuilder("OAuthConfig", "GET", "/.well-known/oauth-authorization-server")
	mGetOAuthConfig.Exception("BAD_REQUEST", "ResourceError", "")
	mGetOAuthConfig.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	sb.AddResource(mGetOAuthConfig.Build())

	mGetJWKList := rdl.NewResourceBuilder("JWKList", "GET", "/oauth2/keys")
	mGetJWKList.Input("rfc", "Bool", false, "rfc", "", true, false, "flag to indicate ec curve names are restricted to RFC values")
	mGetJWKList.Input("service", "ServiceName", false, "service", "", true, "zts", "service")
	mGetJWKList.Exception("BAD_REQUEST", "ResourceError", "")
	mGetJWKList.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	sb.AddResource(mGetJWKList.Build())

	mPostAccessTokenRequest := rdl.NewResourceBuilder("AccessTokenResponse", "POST", "/oauth2/token")
	mPostAccessTokenRequest.Comment("Fetch OAuth2 Access Token")
	mPostAccessTokenRequest.Input("request", "AccessTokenRequest", false, "", "", false, nil, "token request details include scope")
	mPostAccessTokenRequest.Auth("", "", true, "")
	mPostAccessTokenRequest.Exception("BAD_REQUEST", "ResourceError", "")
	mPostAccessTokenRequest.Exception("FORBIDDEN", "ResourceError", "")
	mPostAccessTokenRequest.Exception("NOT_FOUND", "ResourceError", "")
	mPostAccessTokenRequest.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mPostAccessTokenRequest.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mPostAccessTokenRequest.Build())

	mGetOIDCResponse := rdl.NewResourceBuilder("OIDCResponse", "GET", "/oauth2/auth")
	mGetOIDCResponse.Comment("Fetch OAuth OpenID Connect ID Token")
	mGetOIDCResponse.Input("responseType", "String", false, "response_type", "", false, nil, "response type - currently only supporting id tokens - id_token")
	mGetOIDCResponse.Input("clientId", "ServiceName", false, "client_id", "", false, nil, "client id - must be valid athenz service identity name")
	mGetOIDCResponse.Input("redirectUri", "String", false, "redirect_uri", "", false, nil, "redirect uri for the response")
	mGetOIDCResponse.Input("scope", "String", false, "scope", "", false, nil, "id token scope")
	mGetOIDCResponse.Input("state", "EntityName", false, "state", "", true, nil, "optional state claim included in the response location header")
	mGetOIDCResponse.Input("nonce", "EntityName", false, "nonce", "", false, nil, "nonce claim included in the id token")
	mGetOIDCResponse.Input("keyType", "SimpleName", false, "keyType", "", true, nil, "optional signing key type - RSA or EC. Might be ignored if server doesn't have the requested type configured")
	mGetOIDCResponse.Input("fullArn", "Bool", false, "fullArn", "", true, false, "flag to indicate to use full arn in group claim (e.g. sports:role.deployer instead of deployer)")
	mGetOIDCResponse.Input("expiryTime", "Int32", false, "expiryTime", "", true, nil, "optional expiry period specified in seconds")
	mGetOIDCResponse.Input("output", "SimpleName", false, "output", "", true, nil, "optional output format of json")
	mGetOIDCResponse.Input("roleInAudClaim", "Bool", false, "roleInAudClaim", "", true, false, "flag to indicate to include role name in the audience claim only if we have a single role in response")
	mGetOIDCResponse.Input("allScopePresent", "Bool", false, "allScopePresent", "", true, false, "flag to indicate that all requested roles/groups in the scope must be present in the response otherwise return an error")
	mGetOIDCResponse.Output("location", "String", "Location", false, "return location header with id token")
	mGetOIDCResponse.Auth("", "", true, "")
	mGetOIDCResponse.Exception("BAD_REQUEST", "ResourceError", "")
	mGetOIDCResponse.Exception("FORBIDDEN", "ResourceError", "")
	mGetOIDCResponse.Exception("NOT_FOUND", "ResourceError", "")
	mGetOIDCResponse.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mGetOIDCResponse.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mGetOIDCResponse.Build())

	mPostIntrospectRequest := rdl.NewResourceBuilder("IntrospectResponse", "POST", "/oauth2/introspect")
	mPostIntrospectRequest.Comment("OAuth2 Access Token Introspection. The server will carry out the required authorization check of authorize (\"introspect\", \"{domain}:token\"); where domain is the audience of the token.")
	mPostIntrospectRequest.Input("request", "IntrospectRequest", false, "", "", false, nil, "token introspect request details")
	mPostIntrospectRequest.Auth("", "", true, "")
	mPostIntrospectRequest.Exception("BAD_REQUEST", "ResourceError", "")
	mPostIntrospectRequest.Exception("FORBIDDEN", "ResourceError", "")
	mPostIntrospectRequest.Exception("NOT_FOUND", "ResourceError", "")
	mPostIntrospectRequest.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mPostIntrospectRequest.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mPostIntrospectRequest.Build())

	mPostRoleCertificateRequestExt := rdl.NewResourceBuilder("RoleCertificate", "POST", "/rolecert")
	mPostRoleCertificateRequestExt.Comment("Return a TLS certificate for a role that the principal can assume. The role arn is in the CN field of the Subject and the principal is in the SAN URI field.")
	mPostRoleCertificateRequestExt.Name("PostRoleCertificateRequestExt")
	mPostRoleCertificateRequestExt.Input("req", "RoleCertificateRequest", false, "", "", false, nil, "csr request")
	mPostRoleCertificateRequestExt.Auth("", "", true, "")
	mPostRoleCertificateRequestExt.Exception("BAD_REQUEST", "ResourceError", "")
	mPostRoleCertificateRequestExt.Exception("FORBIDDEN", "ResourceError", "")
	mPostRoleCertificateRequestExt.Exception("NOT_FOUND", "ResourceError", "")
	mPostRoleCertificateRequestExt.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mPostRoleCertificateRequestExt.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mPostRoleCertificateRequestExt.Build())

	mGetRolesRequireRoleCert := rdl.NewResourceBuilder("RoleAccess", "GET", "/role/cert")
	mGetRolesRequireRoleCert.Comment("Fetch all roles that are tagged as requiring role certificates for principal")
	mGetRolesRequireRoleCert.Name("getRolesRequireRoleCert")
	mGetRolesRequireRoleCert.Input("principal", "EntityName", false, "principal", "", true, nil, "If not present, will return roles for the user making the call")
	mGetRolesRequireRoleCert.Auth("", "", true, "")
	mGetRolesRequireRoleCert.Exception("BAD_REQUEST", "ResourceError", "")
	mGetRolesRequireRoleCert.Exception("FORBIDDEN", "ResourceError", "")
	mGetRolesRequireRoleCert.Exception("NOT_FOUND", "ResourceError", "")
	mGetRolesRequireRoleCert.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mGetRolesRequireRoleCert.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mGetRolesRequireRoleCert.Build())

	mGetWorkloadsByService := rdl.NewResourceBuilder("Workloads", "GET", "/domain/{domainName}/service/{serviceName}/workloads")
	mGetWorkloadsByService.Name("getWorkloadsByService")
	mGetWorkloadsByService.Input("domainName", "DomainName", true, "", "", false, nil, "name of the domain")
	mGetWorkloadsByService.Input("serviceName", "EntityName", true, "", "", false, nil, "name of the service")
	mGetWorkloadsByService.Auth("", "", true, "")
	mGetWorkloadsByService.Exception("BAD_REQUEST", "ResourceError", "")
	mGetWorkloadsByService.Exception("FORBIDDEN", "ResourceError", "")
	mGetWorkloadsByService.Exception("NOT_FOUND", "ResourceError", "")
	mGetWorkloadsByService.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mGetWorkloadsByService.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mGetWorkloadsByService.Build())

	mGetWorkloadsByIP := rdl.NewResourceBuilder("Workloads", "GET", "/workloads/{ip}")
	mGetWorkloadsByIP.Name("getWorkloadsByIP")
	mGetWorkloadsByIP.Input("ip", "String", true, "", "", false, nil, "ip address to query")
	mGetWorkloadsByIP.Auth("", "", true, "")
	mGetWorkloadsByIP.Exception("BAD_REQUEST", "ResourceError", "")
	mGetWorkloadsByIP.Exception("FORBIDDEN", "ResourceError", "")
	mGetWorkloadsByIP.Exception("NOT_FOUND", "ResourceError", "")
	mGetWorkloadsByIP.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mGetWorkloadsByIP.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mGetWorkloadsByIP.Build())

	mGetTransportRules := rdl.NewResourceBuilder("TransportRules", "GET", "/domain/{domainName}/service/{serviceName}/transportRules")
	mGetTransportRules.Input("domainName", "DomainName", true, "", "", false, nil, "name of the domain")
	mGetTransportRules.Input("serviceName", "EntityName", true, "", "", false, nil, "name of the service")
	mGetTransportRules.Auth("", "", true, "")
	mGetTransportRules.Exception("BAD_REQUEST", "ResourceError", "")
	mGetTransportRules.Exception("FORBIDDEN", "ResourceError", "")
	mGetTransportRules.Exception("NOT_FOUND", "ResourceError", "")
	mGetTransportRules.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mGetTransportRules.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mGetTransportRules.Build())

	mGetInfo := rdl.NewResourceBuilder("Info", "GET", "/sys/info")
	mGetInfo.Comment("Retrieve the server info. Since we're exposing server version details, the request will require authorization")
	mGetInfo.Auth("get", "sys.auth:info", false, "")
	mGetInfo.Exception("BAD_REQUEST", "ResourceError", "")
	mGetInfo.Exception("FORBIDDEN", "ResourceError", "")
	mGetInfo.Exception("NOT_FOUND", "ResourceError", "")
	mGetInfo.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mGetInfo.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mGetInfo.Build())

	mPostExternalCredentialsRequest := rdl.NewResourceBuilder("ExternalCredentialsResponse", "POST", "/external/{provider}/domain/{domainName}/creds")
	mPostExternalCredentialsRequest.Comment("request external credentials from the specified provider based on the specified request attributes and the principal's id token (that will be internally generated by ZTS). Based on the provider, the server will carry out internal authorization checks (e.g. is the principal authorized to request a given scope in the credentials).")
	mPostExternalCredentialsRequest.Input("provider", "SimpleName", true, "", "", false, nil, "provider name to request credentials from")
	mPostExternalCredentialsRequest.Input("domainName", "DomainName", true, "", "", false, nil, "request credentials from account/project associated with this athenz domain")
	mPostExternalCredentialsRequest.Input("request", "ExternalCredentialsRequest", false, "", "", false, nil, "request object with optional and required attributes")
	mPostExternalCredentialsRequest.Auth("", "", true, "")
	mPostExternalCredentialsRequest.Exception("BAD_REQUEST", "ResourceError", "")
	mPostExternalCredentialsRequest.Exception("FORBIDDEN", "ResourceError", "")
	mPostExternalCredentialsRequest.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mPostExternalCredentialsRequest.Build())

	mGetRdlSchema := rdl.NewResourceBuilder("rdl.Schema", "GET", "/schema")
	mGetRdlSchema.Comment("Get RDL Schema")
	mGetRdlSchema.Auth("", "", true, "")
	sb.AddResource(mGetRdlSchema.Build())

	var err error
	schema, err = sb.BuildParanoid()
	if err != nil {
		log.Fatalf("rdl: schema build failed: %s", err)
	}
}

func ZTSSchema() *rdl.Schema {
	return schema
}
