// Code generated by rdl 1.5.2 DO NOT EDIT.

package msd

import (
	"log"

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

var schema *rdl.Schema

func init() {
	sb := rdl.NewSchemaBuilder("MSD")
	sb.Version(1)
	sb.Namespace("com.yahoo.athenz.msd")
	sb.Comment("Copyright The Athenz Authors Licensed under the terms of the Apache version 2.0 license. See LICENSE file for terms. The Micro Segmentation Defense (MSD) API")

	tAthenzEntityAction := rdl.NewEnumTypeBuilder("Enum", "AthenzEntityAction")
	tAthenzEntityAction.Comment("Copyright The Athenz Authors Licensed under the terms of the Apache version 2.0 license. See LICENSE file for terms.")
	tAthenzEntityAction.Element("create", "")
	tAthenzEntityAction.Element("delete", "")
	tAthenzEntityAction.Element("update", "")
	sb.AddType(tAthenzEntityAction.Build())

	tAthenzEntityType := rdl.NewEnumTypeBuilder("Enum", "AthenzEntityType")
	tAthenzEntityType.Element("domain", "")
	tAthenzEntityType.Element("role", "")
	tAthenzEntityType.Element("group", "")
	tAthenzEntityType.Element("service", "")
	tAthenzEntityType.Element("policy", "")
	tAthenzEntityType.Element("entity", "")
	sb.AddType(tAthenzEntityType.Build())

	tAthenzDependencyResponseStatus := rdl.NewEnumTypeBuilder("Enum", "AthenzDependencyResponseStatus")
	tAthenzDependencyResponseStatus.Element("allow", "")
	tAthenzDependencyResponseStatus.Element("deny", "")
	sb.AddType(tAthenzDependencyResponseStatus.Build())

	tAthenzDependencyRequest := rdl.NewStructTypeBuilder("Struct", "AthenzDependencyRequest")
	tAthenzDependencyRequest.Field("operation", "AthenzEntityAction", false, nil, "domain action like, create/delete/...")
	tAthenzDependencyRequest.Field("domainName", "String", false, nil, "domain name")
	tAthenzDependencyRequest.Field("objectType", "AthenzEntityType", false, nil, "entity type like, domain/role/...")
	tAthenzDependencyRequest.Field("objectName", "String", false, nil, "name of the athenz entity")
	tAthenzDependencyRequest.Field("principal", "String", true, nil, "principal of the executing operation")
	tAthenzDependencyRequest.Field("provider", "String", true, nil, "provider service identity")
	sb.AddType(tAthenzDependencyRequest.Build())

	tAthenzDependencyResponse := rdl.NewStructTypeBuilder("Struct", "AthenzDependencyResponse")
	tAthenzDependencyResponse.Field("status", "AthenzDependencyResponseStatus", false, nil, "whether the request is allowed or denied")
	tAthenzDependencyResponse.Field("message", "String", true, nil, "reason for denial")
	sb.AddType(tAthenzDependencyResponse.Build())

	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())

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

	tTransportPolicySubjectDomainName := rdl.NewStringTypeBuilder("TransportPolicySubjectDomainName")
	tTransportPolicySubjectDomainName.Comment("DomainName in TransportPolicySubject should allow * to indicate ANY")
	tTransportPolicySubjectDomainName.Pattern("\\*|([a-zA-Z0-9_][a-zA-Z0-9_-]*\\.)*[a-zA-Z0-9_][a-zA-Z0-9_-]*")
	sb.AddType(tTransportPolicySubjectDomainName.Build())

	tTransportPolicySubjectServiceName := rdl.NewStringTypeBuilder("TransportPolicySubjectServiceName")
	tTransportPolicySubjectServiceName.Comment("ServiceName in TransportPolicySubject should allow * to indicate ANY")
	tTransportPolicySubjectServiceName.Pattern("\\*|([a-zA-Z0-9_][a-zA-Z0-9_-]*\\.)*[a-zA-Z0-9_][a-zA-Z0-9_-]*")
	sb.AddType(tTransportPolicySubjectServiceName.Build())

	tStaticWorkloadComponent := rdl.NewStringTypeBuilder("StaticWorkloadComponent")
	tStaticWorkloadComponent.Pattern("[a-zA-Z0-9][a-zA-Z0-9-:._]*")
	sb.AddType(tStaticWorkloadComponent.Build())

	tStaticWorkloadFQDN := rdl.NewStringTypeBuilder("StaticWorkloadFQDN")
	tStaticWorkloadFQDN.Pattern("([a-zA-Z0-9][a-zA-Z0-9-:._]*\\.)*[a-zA-Z0-9][a-zA-Z0-9-:._]*")
	sb.AddType(tStaticWorkloadFQDN.Build())

	tStaticWorkloadName := rdl.NewStringTypeBuilder("StaticWorkloadName")
	tStaticWorkloadName.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-:._]*)(\\/[0-9]{1,3})?")
	sb.AddType(tStaticWorkloadName.Build())

	tTransportPolicySubjectExternal := rdl.NewStringTypeBuilder("TransportPolicySubjectExternal")
	tTransportPolicySubjectExternal.Pattern("(([a-zA-Z0-9][a-zA-Z0-9-:._]*\\.)*[a-zA-Z0-9][a-zA-Z0-9-:._]*)(\\/[0-9]{1,3})?")
	sb.AddType(tTransportPolicySubjectExternal.Build())

	tTransportPolicyEnforcementState := rdl.NewEnumTypeBuilder("Enum", "TransportPolicyEnforcementState")
	tTransportPolicyEnforcementState.Comment("Types of transport policy enforcement states")
	tTransportPolicyEnforcementState.Element("ENFORCE", "")
	tTransportPolicyEnforcementState.Element("REPORT", "")
	sb.AddType(tTransportPolicyEnforcementState.Build())

	tTransportPolicyProtocol := rdl.NewEnumTypeBuilder("Enum", "TransportPolicyProtocol")
	tTransportPolicyProtocol.Comment("Types of transport policy protocols")
	tTransportPolicyProtocol.Element("TCP", "")
	tTransportPolicyProtocol.Element("UDP", "")
	sb.AddType(tTransportPolicyProtocol.Build())

	tTransportPolicyValidationStatus := rdl.NewEnumTypeBuilder("Enum", "TransportPolicyValidationStatus")
	tTransportPolicyValidationStatus.Comment("Validation Status of transport policy vs network policy")
	tTransportPolicyValidationStatus.Element("VALID", "")
	tTransportPolicyValidationStatus.Element("INVALID", "")
	tTransportPolicyValidationStatus.Element("PARTIAL", "")
	sb.AddType(tTransportPolicyValidationStatus.Build())

	tTransportPolicyTrafficDirection := rdl.NewEnumTypeBuilder("Enum", "TransportPolicyTrafficDirection")
	tTransportPolicyTrafficDirection.Comment("Types of transport policy traffic direction")
	tTransportPolicyTrafficDirection.Element("INGRESS", "")
	tTransportPolicyTrafficDirection.Element("EGRESS", "")
	sb.AddType(tTransportPolicyTrafficDirection.Build())

	tTransportPolicyScope := rdl.NewEnumTypeBuilder("Enum", "TransportPolicyScope")
	tTransportPolicyScope.Comment("Scope of transport policy")
	tTransportPolicyScope.Element("ALL", "")
	tTransportPolicyScope.Element("ONPREM", "")
	tTransportPolicyScope.Element("AWS", "")
	tTransportPolicyScope.Element("GCP", "")
	sb.AddType(tTransportPolicyScope.Build())

	tTransportPolicySubject := rdl.NewStructTypeBuilder("Struct", "TransportPolicySubject")
	tTransportPolicySubject.Comment("Subject for a transport policy")
	tTransportPolicySubject.Field("domainName", "TransportPolicySubjectDomainName", false, nil, "Name of the domain")
	tTransportPolicySubject.Field("serviceName", "TransportPolicySubjectServiceName", false, nil, "Name of the service")
	tTransportPolicySubject.Field("externalPeer", "TransportPolicySubjectExternal", true, nil, "External peer ( not in Athenz )")
	sb.AddType(tTransportPolicySubject.Build())

	tTransportPolicySubjectSelectorRequirement := rdl.NewStructTypeBuilder("Struct", "TransportPolicySubjectSelectorRequirement")
	tTransportPolicySubjectSelectorRequirement.Comment("A subject selector requirement is a selector that contains value, a key, and an operator that relates the key and value.")
	tTransportPolicySubjectSelectorRequirement.Field("key", "String", false, nil, "key that the selector applies to")
	tTransportPolicySubjectSelectorRequirement.Field("operator", "String", false, nil, "Operator that is applied to the key and value")
	tTransportPolicySubjectSelectorRequirement.Field("value", "String", false, nil, "Value that the selector applies to")
	sb.AddType(tTransportPolicySubjectSelectorRequirement.Build())

	tTransportPolicyCondition := rdl.NewStructTypeBuilder("Struct", "TransportPolicyCondition")
	tTransportPolicyCondition.Comment("Transport policy condition. Used to specify additional restrictions for the subject of a transport policy")
	tTransportPolicyCondition.Field("enforcementState", "TransportPolicyEnforcementState", false, nil, "State of transport policy enforcement ( ENFORCE / REPORT )")
	tTransportPolicyCondition.ArrayField("instances", "String", true, "Acts as restrictions. If present, this transport policy should be restricted to only mentioned instances.")
	tTransportPolicyCondition.ArrayField("scope", "TransportPolicyScope", true, "Scope of transport policy")
	tTransportPolicyCondition.ArrayField("additionalConditions", "TransportPolicySubjectSelectorRequirement", true, "List of any additional conditions")
	sb.AddType(tTransportPolicyCondition.Build())

	tPolicyPort := rdl.NewStructTypeBuilder("Struct", "PolicyPort")
	tPolicyPort.Comment("generic policy port. Will be used by TransportPolicyPort and NetworkPolicyPort structs")
	tPolicyPort.Field("port", "Int32", false, nil, "Start port of the port range. port and endPort will have same values for a single port definition.")
	tPolicyPort.Field("endPort", "Int32", false, nil, "End port of the port range. port and endPort will have same values for a single port definition.")
	sb.AddType(tPolicyPort.Build())

	tTransportPolicyPort := rdl.NewStructTypeBuilder("PolicyPort", "TransportPolicyPort")
	tTransportPolicyPort.Comment("Transport policy port")
	tTransportPolicyPort.Field("protocol", "TransportPolicyProtocol", false, nil, "Protocol for this transport policy")
	sb.AddType(tTransportPolicyPort.Build())

	tTransportPolicyMatch := rdl.NewStructTypeBuilder("Struct", "TransportPolicyMatch")
	tTransportPolicyMatch.Comment("Selector for the subject of a transport policy")
	tTransportPolicyMatch.Field("athenzService", "TransportPolicySubject", false, nil, "Subject where this transport policy applies")
	tTransportPolicyMatch.ArrayField("conditions", "TransportPolicyCondition", false, "List of additional requirements for restrictions. Requirements are ANDed.")
	sb.AddType(tTransportPolicyMatch.Build())

	tTransportPolicyPeer := rdl.NewStructTypeBuilder("Struct", "TransportPolicyPeer")
	tTransportPolicyPeer.Comment("Source or destination for a transport policy")
	tTransportPolicyPeer.ArrayField("athenzServices", "TransportPolicySubject", false, "List of transport policy subjects")
	tTransportPolicyPeer.ArrayField("ports", "TransportPolicyPort", false, "List of network traffic port part of this transport policy")
	sb.AddType(tTransportPolicyPeer.Build())

	tTransportPolicyEntitySelector := rdl.NewStructTypeBuilder("Struct", "TransportPolicyEntitySelector")
	tTransportPolicyEntitySelector.Comment("Entity to which a transport policy applies. Describes the subject and port(s) for a transport policy.")
	tTransportPolicyEntitySelector.Field("match", "TransportPolicyMatch", false, nil, "Requirements for selecting the subject for this transport policy.")
	tTransportPolicyEntitySelector.ArrayField("ports", "TransportPolicyPort", false, "List of network traffic port of the subject eligible for the transport policy")
	sb.AddType(tTransportPolicyEntitySelector.Build())

	tTransportPolicyIngressRule := rdl.NewStructTypeBuilder("Struct", "TransportPolicyIngressRule")
	tTransportPolicyIngressRule.Comment("Transport policy ingress rule")
	tTransportPolicyIngressRule.Field("id", "Int64", false, nil, "Assertion id associated with this transport policy")
	tTransportPolicyIngressRule.Field("identifier", "EntityName", true, nil, "Policy Identifier")
	tTransportPolicyIngressRule.Field("lastModified", "Timestamp", false, nil, "Last modification timestamp of this transport policy")
	tTransportPolicyIngressRule.Field("entitySelector", "TransportPolicyEntitySelector", false, nil, "Entity to which this transport policy applies")
	tTransportPolicyIngressRule.Field("from", "TransportPolicyPeer", true, nil, "Source of network traffic")
	sb.AddType(tTransportPolicyIngressRule.Build())

	tTransportPolicyEgressRule := rdl.NewStructTypeBuilder("Struct", "TransportPolicyEgressRule")
	tTransportPolicyEgressRule.Comment("Transport policy egress rule")
	tTransportPolicyEgressRule.Field("id", "Int64", false, nil, "Assertion id associated with this transport policy")
	tTransportPolicyEgressRule.Field("identifier", "EntityName", true, nil, "Policy Identifier")
	tTransportPolicyEgressRule.Field("lastModified", "Timestamp", false, nil, "Last modification timestamp of this transport policy")
	tTransportPolicyEgressRule.Field("entitySelector", "TransportPolicyEntitySelector", false, nil, "Entity to which this transport policy applies")
	tTransportPolicyEgressRule.Field("to", "TransportPolicyPeer", true, nil, "Destination of network traffic")
	sb.AddType(tTransportPolicyEgressRule.Build())

	tTransportPolicyRules := rdl.NewStructTypeBuilder("Struct", "TransportPolicyRules")
	tTransportPolicyRules.Comment("Transport policy containing ingress and egress rules")
	tTransportPolicyRules.ArrayField("ingress", "TransportPolicyIngressRule", false, "List of ingress rules")
	tTransportPolicyRules.ArrayField("egress", "TransportPolicyEgressRule", false, "List of egress rules")
	sb.AddType(tTransportPolicyRules.Build())

	tTransportPolicyValidationRequest := rdl.NewStructTypeBuilder("Struct", "TransportPolicyValidationRequest")
	tTransportPolicyValidationRequest.Comment("Transport policy request object to be validated")
	tTransportPolicyValidationRequest.Field("entitySelector", "TransportPolicyEntitySelector", false, nil, "Describes the entity to which this transport policy applies")
	tTransportPolicyValidationRequest.Field("peer", "TransportPolicyPeer", false, nil, "source or destination of the network traffic depending on direction")
	tTransportPolicyValidationRequest.Field("id", "Int64", true, nil, "If present, assertion id associated with this transport policy")
	tTransportPolicyValidationRequest.Field("trafficDirection", "TransportPolicyTrafficDirection", false, nil, "")
	sb.AddType(tTransportPolicyValidationRequest.Build())

	tTransportPolicyValidationResponse := rdl.NewStructTypeBuilder("Struct", "TransportPolicyValidationResponse")
	tTransportPolicyValidationResponse.Comment("Response object of transport policy rule validation")
	tTransportPolicyValidationResponse.Field("status", "TransportPolicyValidationStatus", false, nil, "")
	tTransportPolicyValidationResponse.ArrayField("errors", "String", true, "")
	tTransportPolicyValidationResponse.Field("updateTime", "Timestamp", true, nil, "most recent update timestamp in the backend")
	tTransportPolicyValidationResponse.Field("id", "Int64", true, nil, "If present, assertion id associated with the transport policy")
	sb.AddType(tTransportPolicyValidationResponse.Build())

	tTransportPolicyValidationResponseList := rdl.NewStructTypeBuilder("Struct", "TransportPolicyValidationResponseList")
	tTransportPolicyValidationResponseList.Comment("List of TransportPolicyValidationResponse")
	tTransportPolicyValidationResponseList.ArrayField("responseList", "TransportPolicyValidationResponse", false, "list of transport policy validation response")
	sb.AddType(tTransportPolicyValidationResponseList.Build())

	tTransportPolicyRequest := rdl.NewStructTypeBuilder("Struct", "TransportPolicyRequest")
	tTransportPolicyRequest.Comment("Input to create a transport policy")
	tTransportPolicyRequest.Field("direction", "TransportPolicyTrafficDirection", false, nil, "Direction of network traffic")
	tTransportPolicyRequest.Field("identifier", "EntityName", false, nil, "Policy Identifier")
	tTransportPolicyRequest.Field("subject", "TransportPolicySubject", false, nil, "Subject for the policy")
	tTransportPolicyRequest.ArrayField("conditions", "TransportPolicyCondition", true, "List of transport policy conditions")
	tTransportPolicyRequest.ArrayField("sourcePorts", "TransportPolicyPort", false, "List of source network traffic ports")
	tTransportPolicyRequest.ArrayField("destinationPorts", "TransportPolicyPort", false, "List of destination network traffic ports")
	tTransportPolicyRequest.ArrayField("peers", "TransportPolicySubject", true, "Source or destination of the policy depending on direction")
	sb.AddType(tTransportPolicyRequest.Build())

	tStaticWorkloadType := rdl.NewEnumTypeBuilder("Enum", "StaticWorkloadType")
	tStaticWorkloadType.Comment("Enum representing defined types of static workloads.")
	tStaticWorkloadType.Element("VIP", "represents a virtual ip construct")
	tStaticWorkloadType.Element("ENTERPRISE_APPLIANCE", "represents generic network devices which can not be bootstrapped with an identity due to limitations")
	tStaticWorkloadType.Element("CLOUD_LB", "represents a public cloud load balancer ( for ingress to public cloud )")
	tStaticWorkloadType.Element("CLOUD_NAT", "represents a public cloud NAT gateway ( for egress from public cloud )")
	tStaticWorkloadType.Element("EXTERNAL_APPLIANCE", "Appliance present outside of enterprise deployment locations. For SaaS / Third Party / Vendor use cases")
	tStaticWorkloadType.Element("VIP_LB", "represents a virtual ip backed by a load balancer")
	tStaticWorkloadType.Element("CLOUD_MANAGED", "represents a cloud managed service or endpoint")
	tStaticWorkloadType.Element("SERVICE_SUBNET", "represents subnet for a given service, would be almost always a RFC1918 cidr")
	sb.AddType(tStaticWorkloadType.Build())

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

	tWorkload := rdl.NewStructTypeBuilder("DynamicWorkload", "Workload")
	tWorkload.Comment("kept for backward compatibility sake. Will be eventually deprecated in favor of DynamicWorkload")
	sb.AddType(tWorkload.Build())

	tStaticWorkload := rdl.NewStructTypeBuilder("Struct", "StaticWorkload")
	tStaticWorkload.Comment("workload type describing workload indirectly associated with an identity ( without bootstrap )")
	tStaticWorkload.Field("domainName", "DomainName", false, nil, "name of the domain")
	tStaticWorkload.Field("serviceName", "EntityName", false, nil, "name of the service")
	tStaticWorkload.Field("type", "StaticWorkloadType", false, nil, "value representing one of the StaticWorkloadType enum")
	tStaticWorkload.ArrayField("ipAddresses", "String", true, "list of IP addresses associated with the workload, optional for getWorkloadsByIP API call")
	tStaticWorkload.Field("name", "StaticWorkloadName", true, nil, "name associated with the workload. In most cases will be a FQDN")
	tStaticWorkload.Field("updateTime", "Timestamp", true, nil, "most recent update timestamp in the backend")
	sb.AddType(tStaticWorkload.Build())

	tWorkloadOptions := rdl.NewStructTypeBuilder("Struct", "WorkloadOptions")
	tWorkloadOptions.Field("ipChanged", "Bool", false, nil, "boolean flag to signal a change in IP state")
	sb.AddType(tWorkloadOptions.Build())

	tWorkloads := rdl.NewStructTypeBuilder("Struct", "Workloads")
	tWorkloads.Comment("list of workloads")
	tWorkloads.ArrayField("workloadList", "Workload", false, "list of workloads")
	tWorkloads.ArrayField("dynamicWorkloadList", "DynamicWorkload", true, "list of dynamic workloads")
	tWorkloads.ArrayField("staticWorkloadList", "StaticWorkload", true, "list of static workloads")
	sb.AddType(tWorkloads.Build())

	tStaticWorkloadService := rdl.NewStructTypeBuilder("Struct", "StaticWorkloadService")
	tStaticWorkloadService.Comment("static workload service")
	tStaticWorkloadService.Field("type", "StaticWorkloadType", false, nil, "value representing one of the StaticWorkloadType enum")
	tStaticWorkloadService.Field("serviceName", "EntityName", false, nil, "name of the service")
	tStaticWorkloadService.Field("instance", "EntityName", false, nil, "service instance")
	sb.AddType(tStaticWorkloadService.Build())

	tStaticWorkloadServices := rdl.NewStructTypeBuilder("Struct", "StaticWorkloadServices")
	tStaticWorkloadServices.Comment("list of services")
	tStaticWorkloadServices.ArrayField("staticWorkloadServices", "StaticWorkloadService", false, "")
	sb.AddType(tStaticWorkloadServices.Build())

	tDomainServices := rdl.NewStructTypeBuilder("Struct", "DomainServices")
	tDomainServices.Comment("request type to search all workloads for a domain and selected list of its services")
	tDomainServices.Field("domainName", "DomainName", false, nil, "name of the domain")
	tDomainServices.ArrayField("serviceNames", "EntityName", false, "list of service names")
	sb.AddType(tDomainServices.Build())

	tBulkWorkloadRequest := rdl.NewStructTypeBuilder("Struct", "BulkWorkloadRequest")
	tBulkWorkloadRequest.Comment("request type to search all workloads for a list of services grouped by domains")
	tBulkWorkloadRequest.ArrayField("domainServices", "DomainServices", false, "list of services, grouped by domain")
	tBulkWorkloadRequest.Field("fetchStaticTypeWorkloads", "Bool", true, true, "whether to fetch static type workloads")
	tBulkWorkloadRequest.Field("fetchDynamicTypeWorkloads", "Bool", true, true, "whether to fetch dynamic type workloads")
	tBulkWorkloadRequest.ArrayField("applicableStaticTypes", "StaticWorkloadType", true, "list of applicable static workload types, if not set then that means all. Applicable only if fetchStaticTypeWorkloads is enabled")
	tBulkWorkloadRequest.Field("resolveStaticWorkloads", "Bool", true, false, "resolve static workloads to IPs, if applicable")
	sb.AddType(tBulkWorkloadRequest.Build())

	tBulkWorkloadResponse := rdl.NewStructTypeBuilder("Struct", "BulkWorkloadResponse")
	tBulkWorkloadResponse.Comment("response of a bulk workload search request")
	tBulkWorkloadResponse.ArrayField("unmodifiedServices", "DomainServices", false, "list of services grouped by domain, those are not changed since time stamp in matchingTag")
	tBulkWorkloadResponse.Field("workloads", "Workloads", false, nil, "matching workloads")
	sb.AddType(tBulkWorkloadResponse.Build())

	tCompositeInstance := rdl.NewStructTypeBuilder("Struct", "CompositeInstance")
	tCompositeInstance.Comment("generic instance")
	tCompositeInstance.Field("domainName", "DomainName", false, nil, "name of the domain")
	tCompositeInstance.Field("serviceName", "EntityName", false, nil, "name of the service")
	tCompositeInstance.Field("instance", "SimpleName", false, nil, "instance name/id")
	tCompositeInstance.Field("instanceType", "String", true, nil, "instance type")
	tCompositeInstance.Field("provider", "String", true, nil, "name of the instance provider, for example aws/gcp")
	tCompositeInstance.Field("certExpiryTime", "Timestamp", true, nil, "certificate expiry time (ex: getNotAfter), if applicable")
	tCompositeInstance.Field("certIssueTime", "Timestamp", true, nil, "certificate issue time (ex: getNotBefore), if applicable")
	sb.AddType(tCompositeInstance.Build())

	tWorkloadCount := rdl.NewStructTypeBuilder("Struct", "WorkloadCount")
	tWorkloadCount.Comment("workload count")
	tWorkloadCount.Field("storeCount", "Int32", false, nil, "number of workloads for the service in the data store")
	tWorkloadCount.Field("cacheCount", "Int32", false, nil, "number of workloads for the service in the cache")
	sb.AddType(tWorkloadCount.Build())

	tNetworkPolicyChangeEffect := rdl.NewEnumTypeBuilder("Enum", "NetworkPolicyChangeEffect")
	tNetworkPolicyChangeEffect.Comment("IMPACT indicates that a change in network policy will interfere with workings of one or more transport policies NO_IMPACT indicates that a change in network policy will not interfere with workings of any transport policy")
	tNetworkPolicyChangeEffect.Element("IMPACT", "")
	tNetworkPolicyChangeEffect.Element("NO_IMPACT", "")
	sb.AddType(tNetworkPolicyChangeEffect.Build())

	tIPBlock := rdl.NewStructTypeBuilder("Struct", "IPBlock")
	tIPBlock.Comment("Struct representing ip blocks used by network policy in CIDR (Classless inter-domain routing) format")
	tIPBlock.Field("cidr", "String", false, nil, "cidr notation. can be used for ipv4 or ipv6")
	sb.AddType(tIPBlock.Build())

	tNetworkPolicyPort := rdl.NewStructTypeBuilder("PolicyPort", "NetworkPolicyPort")
	tNetworkPolicyPort.Comment("network policy port.")
	tNetworkPolicyPort.Field("protocol", "TransportPolicyProtocol", false, nil, "protocol used by the network policy")
	sb.AddType(tNetworkPolicyPort.Build())

	tNetworkPolicyPorts := rdl.NewStructTypeBuilder("Struct", "NetworkPolicyPorts")
	tNetworkPolicyPorts.Comment("allows creating a unique tuple of source and destination ports")
	tNetworkPolicyPorts.ArrayField("sourcePorts", "NetworkPolicyPort", false, "list of source ports")
	tNetworkPolicyPorts.ArrayField("destinationPorts", "NetworkPolicyPort", false, "list of destination ports")
	sb.AddType(tNetworkPolicyPorts.Build())

	tNetworkPolicyChangeImpactRequest := rdl.NewStructTypeBuilder("Struct", "NetworkPolicyChangeImpactRequest")
	tNetworkPolicyChangeImpactRequest.Comment("struct representing input details for evaluating network policies change impact on transport policies")
	tNetworkPolicyChangeImpactRequest.ArrayField("from", "IPBlock", false, "from ip address range list in cidr format")
	tNetworkPolicyChangeImpactRequest.ArrayField("to", "IPBlock", false, "to ip address range list in cidr format")
	tNetworkPolicyChangeImpactRequest.ArrayField("ports", "NetworkPolicyPorts", false, "list of ports. Facilitates multiple transports for the same source and destinations.")
	sb.AddType(tNetworkPolicyChangeImpactRequest.Build())

	tNetworkPolicyChangeImpactDetail := rdl.NewStructTypeBuilder("Struct", "NetworkPolicyChangeImpactDetail")
	tNetworkPolicyChangeImpactDetail.Field("domain", "DomainName", false, nil, "Name of the domain of the corresponding transport policy")
	tNetworkPolicyChangeImpactDetail.Field("policy", "EntityName", false, nil, "Name of the Athenz policy corresponding to transport policy")
	tNetworkPolicyChangeImpactDetail.Field("transportPolicyId", "Int64", false, nil, "Unique id of the transport policy")
	sb.AddType(tNetworkPolicyChangeImpactDetail.Build())

	tNetworkPolicyChangeImpactResponse := rdl.NewStructTypeBuilder("Struct", "NetworkPolicyChangeImpactResponse")
	tNetworkPolicyChangeImpactResponse.Comment("struct representing response of evaluating network policies change impact on transport policies")
	tNetworkPolicyChangeImpactResponse.Field("effect", "NetworkPolicyChangeEffect", false, nil, "enum indicating effect of network policy change on one or more transport policies")
	tNetworkPolicyChangeImpactResponse.ArrayField("details", "NetworkPolicyChangeImpactDetail", true, "if the above enum value is IMPACT then this optional object contains more details about the impacted transport policies")
	sb.AddType(tNetworkPolicyChangeImpactResponse.Build())

	tKubernetesLabelSelectorRequirement := rdl.NewStructTypeBuilder("Struct", "KubernetesLabelSelectorRequirement")
	tKubernetesLabelSelectorRequirement.Comment("A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.")
	tKubernetesLabelSelectorRequirement.Field("key", "String", false, nil, "Label key that the selector applies to")
	tKubernetesLabelSelectorRequirement.Field("operator", "String", false, nil, "Operator that is applied to the key. Valid operators are In, NotIn, Exists and DoesNotExist.")
	tKubernetesLabelSelectorRequirement.ArrayField("values", "String", true, "Array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.")
	sb.AddType(tKubernetesLabelSelectorRequirement.Build())

	tKubernetesLabelSelector := rdl.NewStructTypeBuilder("Struct", "KubernetesLabelSelector")
	tKubernetesLabelSelector.Comment("A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.")
	tKubernetesLabelSelector.ArrayField("matchExpressions", "KubernetesLabelSelectorRequirement", false, "Array of label selector requirements. The requirements are ANDed.")
	tKubernetesLabelSelector.MapField("matchLabels", "String", "String", false, "Map of label key/value pairs")
	sb.AddType(tKubernetesLabelSelector.Build())

	tKubernetesNetworkPolicyPort := rdl.NewStructTypeBuilder("PolicyPort", "KubernetesNetworkPolicyPort")
	tKubernetesNetworkPolicyPort.Comment("Kubernetes network policy port range")
	tKubernetesNetworkPolicyPort.Field("protocol", "TransportPolicyProtocol", false, nil, "Network policy protocol. Allowed values: TCP, UDP.")
	sb.AddType(tKubernetesNetworkPolicyPort.Build())

	tKubernetesIPBlock := rdl.NewStructTypeBuilder("Struct", "KubernetesIPBlock")
	tKubernetesIPBlock.Comment("Kubernetes network policy IP block source/target")
	tKubernetesIPBlock.Field("cidr", "String", false, nil, "CIDR block representing IP range for source/target")
	tKubernetesIPBlock.ArrayField("except", "String", true, "Exception for CIDR blocks, if needed")
	sb.AddType(tKubernetesIPBlock.Build())

	tKubernetesNetworkPolicyPeer := rdl.NewStructTypeBuilder("Struct", "KubernetesNetworkPolicyPeer")
	tKubernetesNetworkPolicyPeer.Comment("Kubernetes network policy peer (source/target)")
	tKubernetesNetworkPolicyPeer.Field("podSelector", "KubernetesLabelSelector", true, nil, "Kubernetes pod selector for the network policy source/target")
	tKubernetesNetworkPolicyPeer.Field("namespaceSelector", "KubernetesLabelSelector", true, nil, "Kubernetes namespace selector for the network policy source/target")
	tKubernetesNetworkPolicyPeer.Field("ipBlock", "KubernetesIPBlock", true, nil, "IP block for the network policy source/target")
	sb.AddType(tKubernetesNetworkPolicyPeer.Build())

	tKubernetesNetworkPolicyIngressRule := rdl.NewStructTypeBuilder("Struct", "KubernetesNetworkPolicyIngressRule")
	tKubernetesNetworkPolicyIngressRule.Comment("Kubernetes network policy ingress rule")
	tKubernetesNetworkPolicyIngressRule.ArrayField("from", "KubernetesNetworkPolicyPeer", true, "Network policy source, when empty all sources are allowed")
	tKubernetesNetworkPolicyIngressRule.ArrayField("ports", "KubernetesNetworkPolicyPort", true, "Ingress port(s), when empty all ports are allowed")
	sb.AddType(tKubernetesNetworkPolicyIngressRule.Build())

	tKubernetesNetworkPolicyEgressRule := rdl.NewStructTypeBuilder("Struct", "KubernetesNetworkPolicyEgressRule")
	tKubernetesNetworkPolicyEgressRule.Comment("Kubernetes network policy egress rule")
	tKubernetesNetworkPolicyEgressRule.ArrayField("to", "KubernetesNetworkPolicyPeer", true, "Network policy target, when empty all sources are allowed")
	tKubernetesNetworkPolicyEgressRule.ArrayField("ports", "KubernetesNetworkPolicyPort", true, "Egress port(s), when empty all ports are allowed")
	sb.AddType(tKubernetesNetworkPolicyEgressRule.Build())

	tKubernetesNetworkPolicySpec := rdl.NewStructTypeBuilder("Struct", "KubernetesNetworkPolicySpec")
	tKubernetesNetworkPolicySpec.Comment("Kubernetes network policy spec")
	tKubernetesNetworkPolicySpec.Field("podSelector", "KubernetesLabelSelector", false, nil, "Kubernetes pod selector for the network policy target")
	tKubernetesNetworkPolicySpec.ArrayField("policyTypes", "String", false, "Network policy types - Ingress, Egress")
	tKubernetesNetworkPolicySpec.ArrayField("ingress", "KubernetesNetworkPolicyIngressRule", true, "Ingress network policy rules, if empty then all ingress traffic is blocked")
	tKubernetesNetworkPolicySpec.ArrayField("egress", "KubernetesNetworkPolicyEgressRule", true, "Egress network policy rules, if empty then all egress traffic is blocked")
	sb.AddType(tKubernetesNetworkPolicySpec.Build())

	tKubernetesNetworkPolicyRequest := rdl.NewStructTypeBuilder("Struct", "KubernetesNetworkPolicyRequest")
	tKubernetesNetworkPolicyRequest.Comment("Request object containing Kubernetes network policy inputs")
	tKubernetesNetworkPolicyRequest.Field("athenzDomainLabel", "String", true, nil, "Label key name used on pods to identify Athenz domain")
	tKubernetesNetworkPolicyRequest.Field("athenzServiceLabel", "String", false, nil, "Label key name used on pods to identify Athenz service")
	tKubernetesNetworkPolicyRequest.Field("networkPolicyType", "String", true, nil, "Network policy type, default is vanilla Kubernetes")
	tKubernetesNetworkPolicyRequest.Field("requestedApiVersion", "String", true, nil, "Requested network policy apiVersion")
	tKubernetesNetworkPolicyRequest.Field("networkPolicyNamespace", "String", true, nil, "Kubernetes namespace for the network policy object")
	tKubernetesNetworkPolicyRequest.Field("domainLabelAsNamespaceSelector", "Bool", true, false, "Use athenzDomainLabel as namespace selector")
	tKubernetesNetworkPolicyRequest.Field("domainInServiceLabel", "Bool", true, false, "Use Athenz domain name in service label")
	sb.AddType(tKubernetesNetworkPolicyRequest.Build())

	tKubernetesNetworkPolicyResponse := rdl.NewStructTypeBuilder("Struct", "KubernetesNetworkPolicyResponse")
	tKubernetesNetworkPolicyResponse.Comment("Response object containing Kubernetes network policy")
	tKubernetesNetworkPolicyResponse.Field("apiVersion", "String", false, nil, "Kubernetes network policy apiVersion")
	tKubernetesNetworkPolicyResponse.Field("kind", "String", false, nil, "Kubernetes network policy kind")
	tKubernetesNetworkPolicyResponse.MapField("metadata", "String", "String", false, "Kubernetes network policy metadata")
	tKubernetesNetworkPolicyResponse.Field("spec", "KubernetesNetworkPolicySpec", false, nil, "Kubernetes network policy spec")
	sb.AddType(tKubernetesNetworkPolicyResponse.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())

	mPostAthenzDependencyRequest := rdl.NewResourceBuilder("AthenzDependencyResponse", "POST", "/domains/dependency-check")
	mPostAthenzDependencyRequest.Comment("Athenz entity Dependency API webhook")
	mPostAthenzDependencyRequest.Input("request", "AthenzDependencyRequest", false, "", "", false, nil, "request")
	mPostAthenzDependencyRequest.Auth("", "", true, "")
	mPostAthenzDependencyRequest.Exception("BAD_REQUEST", "ResourceError", "")
	mPostAthenzDependencyRequest.Exception("INTERNAL_SERVER_ERROR", "ResourceError", "")
	mPostAthenzDependencyRequest.Exception("NOT_FOUND", "ResourceError", "")
	mPostAthenzDependencyRequest.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mPostAthenzDependencyRequest.Build())

	mGetTransportPolicyRules := rdl.NewResourceBuilder("TransportPolicyRules", "GET", "/transportpolicies")
	mGetTransportPolicyRules.Comment("API endpoint to get the transport policy rules defined in Athenz")
	mGetTransportPolicyRules.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")
	mGetTransportPolicyRules.Output("tag", "String", "ETag", false, "The current latest modification timestamp is returned in this header")
	mGetTransportPolicyRules.Auth("", "", true, "")
	mGetTransportPolicyRules.Exception("BAD_REQUEST", "ResourceError", "")
	mGetTransportPolicyRules.Exception("FORBIDDEN", "ResourceError", "")
	mGetTransportPolicyRules.Exception("NOT_FOUND", "ResourceError", "")
	mGetTransportPolicyRules.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mGetTransportPolicyRules.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mGetTransportPolicyRules.Build())

	mValidateTransportPolicy := rdl.NewResourceBuilder("TransportPolicyValidationResponse", "POST", "/transportpolicy/validate")
	mValidateTransportPolicy.Comment("API to validate micro-segmentation policies against network policies")
	mValidateTransportPolicy.Name("validateTransportPolicy")
	mValidateTransportPolicy.Input("transportPolicy", "TransportPolicyValidationRequest", false, "", "", false, nil, "Struct representing micro-segmentation policy entered by the user")
	mValidateTransportPolicy.Auth("", "", true, "")
	mValidateTransportPolicy.Exception("BAD_REQUEST", "ResourceError", "")
	mValidateTransportPolicy.Exception("FORBIDDEN", "ResourceError", "")
	mValidateTransportPolicy.Exception("NOT_FOUND", "ResourceError", "")
	mValidateTransportPolicy.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mValidateTransportPolicy.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mValidateTransportPolicy.Build())

	mGetTransportPolicyValidationStatus := rdl.NewResourceBuilder("TransportPolicyValidationResponseList", "GET", "/domain/{domainName}/transportpolicy/validationstatus")
	mGetTransportPolicyValidationStatus.Comment("API to get transport policy validation response for transport policies of a domain")
	mGetTransportPolicyValidationStatus.Name("getTransportPolicyValidationStatus")
	mGetTransportPolicyValidationStatus.Input("domainName", "DomainName", true, "", "", false, nil, "name of the domain")
	mGetTransportPolicyValidationStatus.Auth("", "", true, "")
	mGetTransportPolicyValidationStatus.Exception("BAD_REQUEST", "ResourceError", "")
	mGetTransportPolicyValidationStatus.Exception("FORBIDDEN", "ResourceError", "")
	mGetTransportPolicyValidationStatus.Exception("NOT_FOUND", "ResourceError", "")
	mGetTransportPolicyValidationStatus.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mGetTransportPolicyValidationStatus.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mGetTransportPolicyValidationStatus.Build())

	mGetTransportPolicyRulesByDomain := rdl.NewResourceBuilder("TransportPolicyRules", "GET", "/domain/{domainName}/transportpolicies")
	mGetTransportPolicyRulesByDomain.Comment("API endpoint to get the transport policy rules defined in Athenz for a given domain")
	mGetTransportPolicyRulesByDomain.Name("getTransportPolicyRulesByDomain")
	mGetTransportPolicyRulesByDomain.Input("domainName", "DomainName", true, "", "", false, nil, "name of the domain")
	mGetTransportPolicyRulesByDomain.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")
	mGetTransportPolicyRulesByDomain.Output("tag", "String", "ETag", false, "The current latest modification timestamp is returned in this header")
	mGetTransportPolicyRulesByDomain.Auth("msd.GetNetworkPolicy", "{domainName}:domain", false, "")
	mGetTransportPolicyRulesByDomain.Exception("BAD_REQUEST", "ResourceError", "")
	mGetTransportPolicyRulesByDomain.Exception("FORBIDDEN", "ResourceError", "")
	mGetTransportPolicyRulesByDomain.Exception("NOT_FOUND", "ResourceError", "")
	mGetTransportPolicyRulesByDomain.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mGetTransportPolicyRulesByDomain.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mGetTransportPolicyRulesByDomain.Build())

	mPutTransportPolicy := rdl.NewResourceBuilder("TransportPolicyRules", "PUT", "/domain/{domainName}/service/{serviceName}/transportpolicy")
	mPutTransportPolicy.Comment("This API endpoint facilitates the creation or update of a transport policy for a specified domain and service. It is designed exclusively for the purpose of creating or updating transport policies, and does not support mixed-case scenarios. Once a transport policy is established, the destination service, protocol, and both source and destination ports become non-editable. To modify any of these fields, it is necessary to create a new policy and delete the old one.")
	mPutTransportPolicy.Name("putTransportPolicy")
	mPutTransportPolicy.Input("domainName", "DomainName", true, "", "", false, nil, "name of the domain")
	mPutTransportPolicy.Input("serviceName", "EntityName", true, "", "", false, nil, "Name of the service")
	mPutTransportPolicy.Input("auditRef", "String", false, "", "Y-Audit-Ref", false, nil, "Audit param required(not empty) if domain auditEnabled is true.")
	mPutTransportPolicy.Input("resourceOwner", "String", false, "", "Athenz-Resource-Owner", false, nil, "Resource owner for the request")
	mPutTransportPolicy.Input("payload", "TransportPolicyRequest", false, "", "", false, nil, "Struct representing input transport policy")
	mPutTransportPolicy.Auth("msd.UpdateNetworkPolicy", "{domainName}:service.{serviceName}", false, "")
	mPutTransportPolicy.Expected("NO_CONTENT")
	mPutTransportPolicy.Exception("BAD_REQUEST", "ResourceError", "")
	mPutTransportPolicy.Exception("FORBIDDEN", "ResourceError", "")
	mPutTransportPolicy.Exception("NOT_FOUND", "ResourceError", "")
	mPutTransportPolicy.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mPutTransportPolicy.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mPutTransportPolicy.Build())

	mGetTransportPolicyRulesByService := rdl.NewResourceBuilder("TransportPolicyRules", "GET", "/domain/{domainName}/service/{serviceName}/transportpolicies")
	mGetTransportPolicyRulesByService.Comment("API endpoint to get the transport policy rules defined in Athenz for a given domain and service")
	mGetTransportPolicyRulesByService.Name("getTransportPolicyRulesByService")
	mGetTransportPolicyRulesByService.Input("domainName", "DomainName", true, "", "", false, nil, "name of the domain")
	mGetTransportPolicyRulesByService.Input("serviceName", "EntityName", true, "", "", false, nil, "Name of the service")
	mGetTransportPolicyRulesByService.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")
	mGetTransportPolicyRulesByService.Output("tag", "String", "ETag", false, "The current latest modification timestamp is returned in this header")
	mGetTransportPolicyRulesByService.Auth("msd.GetNetworkPolicy", "{domainName}:service.{serviceName}", false, "")
	mGetTransportPolicyRulesByService.Exception("BAD_REQUEST", "ResourceError", "")
	mGetTransportPolicyRulesByService.Exception("FORBIDDEN", "ResourceError", "")
	mGetTransportPolicyRulesByService.Exception("NOT_FOUND", "ResourceError", "")
	mGetTransportPolicyRulesByService.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mGetTransportPolicyRulesByService.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mGetTransportPolicyRulesByService.Build())

	mDeleteTransportPolicy := rdl.NewResourceBuilder("TransportPolicyRules", "DELETE", "/domain/{domainName}/service/{serviceName}/transportpolicy/{id}")
	mDeleteTransportPolicy.Comment("API endpoint to delete the transport policy Upon successful completion of this delete request, the server will return NO_CONTENT status code without any data (no object will be returned).")
	mDeleteTransportPolicy.Name("deleteTransportPolicy")
	mDeleteTransportPolicy.Input("domainName", "DomainName", true, "", "", false, nil, "Name of the domain")
	mDeleteTransportPolicy.Input("serviceName", "EntityName", true, "", "", false, nil, "Name of the service")
	mDeleteTransportPolicy.Input("id", "Int64", true, "", "", false, nil, "Id of the assertion representing the transport policy")
	mDeleteTransportPolicy.Input("auditRef", "String", false, "", "Y-Audit-Ref", false, nil, "Audit param required(not empty) if domain auditEnabled is true.")
	mDeleteTransportPolicy.Input("resourceOwner", "String", false, "", "Athenz-Resource-Owner", false, nil, "Resource owner for the request")
	mDeleteTransportPolicy.Auth("msd.DeleteNetworkPolicy", "{domainName}:service.{serviceName}", false, "")
	mDeleteTransportPolicy.Expected("NO_CONTENT")
	mDeleteTransportPolicy.Exception("BAD_REQUEST", "ResourceError", "")
	mDeleteTransportPolicy.Exception("CONFLICT", "ResourceError", "")
	mDeleteTransportPolicy.Exception("FORBIDDEN", "ResourceError", "")
	mDeleteTransportPolicy.Exception("NOT_FOUND", "ResourceError", "")
	mDeleteTransportPolicy.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mDeleteTransportPolicy.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mDeleteTransportPolicy.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.Input("matchingTag", "String", false, "", "If-None-Match", false, nil, "Retrieved from the previous request, this timestamp specifies to the server to return any workloads modified since this time")
	mGetWorkloadsByService.Output("tag", "String", "ETag", false, "The current latest modification timestamp is returned in this header")
	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.Input("matchingTag", "String", false, "", "If-None-Match", false, nil, "Retrieved from the previous request, this timestamp specifies to the server to return any workloads modified since this time")
	mGetWorkloadsByIP.Output("tag", "String", "ETag", false, "The current latest modification timestamp is returned in this header")
	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())

	mPutDynamicWorkload := rdl.NewResourceBuilder("WorkloadOptions", "PUT", "/domain/{domainName}/service/{serviceName}/workload/dynamic")
	mPutDynamicWorkload.Comment("Api to perform a dynamic workload PUT operation for a domain and service Workload details are obtained from the service certificate")
	mPutDynamicWorkload.Name("putDynamicWorkload")
	mPutDynamicWorkload.Input("domainName", "DomainName", true, "", "", false, nil, "name of the domain")
	mPutDynamicWorkload.Input("serviceName", "EntityName", true, "", "", false, nil, "name of the service")
	mPutDynamicWorkload.Input("options", "WorkloadOptions", false, "", "", false, nil, "metadata about the dynamic workload")
	mPutDynamicWorkload.Input("resourceOwner", "String", false, "", "Athenz-Resource-Owner", false, nil, "Resource owner for the request")
	mPutDynamicWorkload.Auth("", "", true, "")
	mPutDynamicWorkload.Expected("NO_CONTENT")
	mPutDynamicWorkload.Exception("BAD_REQUEST", "ResourceError", "")
	mPutDynamicWorkload.Exception("FORBIDDEN", "ResourceError", "")
	mPutDynamicWorkload.Exception("NOT_FOUND", "ResourceError", "")
	mPutDynamicWorkload.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mPutDynamicWorkload.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mPutDynamicWorkload.Build())

	mDeleteDynamicWorkload := rdl.NewResourceBuilder("WorkloadOptions", "DELETE", "/domain/{domainName}/service/{serviceName}/instanceId/{instanceId}/workload/dynamic")
	mDeleteDynamicWorkload.Comment("Api to perform a dynamic workload DELETE operation for a domain, service, and instance")
	mDeleteDynamicWorkload.Name("deleteDynamicWorkload")
	mDeleteDynamicWorkload.Input("domainName", "DomainName", true, "", "", false, nil, "name of the domain")
	mDeleteDynamicWorkload.Input("serviceName", "EntityName", true, "", "", false, nil, "name of the service")
	mDeleteDynamicWorkload.Input("instanceId", "PathElement", true, "", "", false, nil, "unique instance id within provider's namespace")
	mDeleteDynamicWorkload.Input("resourceOwner", "String", false, "", "Athenz-Resource-Owner", false, nil, "Resource owner for the request")
	mDeleteDynamicWorkload.Auth("update", "{domainName}:service.{serviceName}", false, "")
	mDeleteDynamicWorkload.Expected("NO_CONTENT")
	mDeleteDynamicWorkload.Exception("BAD_REQUEST", "ResourceError", "")
	mDeleteDynamicWorkload.Exception("FORBIDDEN", "ResourceError", "")
	mDeleteDynamicWorkload.Exception("NOT_FOUND", "ResourceError", "")
	mDeleteDynamicWorkload.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mDeleteDynamicWorkload.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mDeleteDynamicWorkload.Build())

	mPutStaticWorkload := rdl.NewResourceBuilder("StaticWorkload", "PUT", "/domain/{domainName}/service/{serviceName}/workload/static")
	mPutStaticWorkload.Comment("Api to perform a static workload PUT operation for a domain and service")
	mPutStaticWorkload.Name("putStaticWorkload")
	mPutStaticWorkload.Input("domainName", "DomainName", true, "", "", false, nil, "name of the domain")
	mPutStaticWorkload.Input("serviceName", "EntityName", true, "", "", false, nil, "name of the service")
	mPutStaticWorkload.Input("staticWorkload", "StaticWorkload", false, "", "", false, nil, "Struct representing static workload entered by the user")
	mPutStaticWorkload.Input("resourceOwner", "String", false, "", "Athenz-Resource-Owner", false, nil, "Resource owner for the request")
	mPutStaticWorkload.Auth("update", "{domainName}:service.{serviceName}", false, "")
	mPutStaticWorkload.Expected("NO_CONTENT")
	mPutStaticWorkload.Exception("BAD_REQUEST", "ResourceError", "")
	mPutStaticWorkload.Exception("FORBIDDEN", "ResourceError", "")
	mPutStaticWorkload.Exception("NOT_FOUND", "ResourceError", "")
	mPutStaticWorkload.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mPutStaticWorkload.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mPutStaticWorkload.Build())

	mDeleteStaticWorkload := rdl.NewResourceBuilder("StaticWorkload", "DELETE", "/domain/{domainName}/service/{serviceName}/name/{name}/workload/static")
	mDeleteStaticWorkload.Comment("Api to perform a static workload DELETE operation for a domain, service, and instance")
	mDeleteStaticWorkload.Name("deleteStaticWorkload")
	mDeleteStaticWorkload.Input("domainName", "DomainName", true, "", "", false, nil, "name of the domain")
	mDeleteStaticWorkload.Input("serviceName", "EntityName", true, "", "", false, nil, "name of the service")
	mDeleteStaticWorkload.Input("name", "StaticWorkloadName", true, "", "", false, nil, "name associated with the workload. In most cases will be a FQDN")
	mDeleteStaticWorkload.Input("resourceOwner", "String", false, "", "Athenz-Resource-Owner", false, nil, "Resource owner for the request")
	mDeleteStaticWorkload.Auth("update", "{domainName}:service.{serviceName}", false, "")
	mDeleteStaticWorkload.Expected("NO_CONTENT")
	mDeleteStaticWorkload.Exception("BAD_REQUEST", "ResourceError", "")
	mDeleteStaticWorkload.Exception("FORBIDDEN", "ResourceError", "")
	mDeleteStaticWorkload.Exception("NOT_FOUND", "ResourceError", "")
	mDeleteStaticWorkload.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mDeleteStaticWorkload.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mDeleteStaticWorkload.Build())

	mGetStaticWorkloadServicesByType := rdl.NewResourceBuilder("StaticWorkloadServices", "GET", "/services/{serviceType}")
	mGetStaticWorkloadServicesByType.Comment("Api to retrieve static workload services by its type. type=StaticWorkloadType in String representation")
	mGetStaticWorkloadServicesByType.Name("getStaticWorkloadServicesByType")
	mGetStaticWorkloadServicesByType.Input("serviceType", "EntityName", true, "", "", false, nil, "type of the service")
	mGetStaticWorkloadServicesByType.Input("serviceValue", "EntityName", false, "value", "", true, nil, "specific service value")
	mGetStaticWorkloadServicesByType.Auth("", "", true, "")
	mGetStaticWorkloadServicesByType.Exception("BAD_REQUEST", "ResourceError", "")
	mGetStaticWorkloadServicesByType.Exception("FORBIDDEN", "ResourceError", "")
	mGetStaticWorkloadServicesByType.Exception("NOT_FOUND", "ResourceError", "")
	mGetStaticWorkloadServicesByType.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mGetStaticWorkloadServicesByType.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mGetStaticWorkloadServicesByType.Build())

	mGetWorkloadsByDomain := rdl.NewResourceBuilder("Workloads", "GET", "/domain/{domainName}/workloads")
	mGetWorkloadsByDomain.Name("getWorkloadsByDomain")
	mGetWorkloadsByDomain.Input("domainName", "DomainName", true, "", "", false, nil, "name of the domain")
	mGetWorkloadsByDomain.Input("matchingTag", "String", false, "", "If-None-Match", false, nil, "Retrieved from the previous request, this timestamp specifies to the server to return any workloads modified since this time")
	mGetWorkloadsByDomain.Output("tag", "String", "ETag", false, "The current latest modification timestamp is returned in this header")
	mGetWorkloadsByDomain.Auth("", "", true, "")
	mGetWorkloadsByDomain.Exception("BAD_REQUEST", "ResourceError", "")
	mGetWorkloadsByDomain.Exception("FORBIDDEN", "ResourceError", "")
	mGetWorkloadsByDomain.Exception("NOT_FOUND", "ResourceError", "")
	mGetWorkloadsByDomain.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mGetWorkloadsByDomain.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mGetWorkloadsByDomain.Build())

	mGetWorkloadsByDomainAndService := rdl.NewResourceBuilder("BulkWorkloadResponse", "POST", "/workloads")
	mGetWorkloadsByDomainAndService.Comment("Read only endpoint to fetch workloads for a list of services grouped by domains")
	mGetWorkloadsByDomainAndService.Name("getWorkloadsByDomainAndService")
	mGetWorkloadsByDomainAndService.Input("request", "BulkWorkloadRequest", false, "", "", false, nil, "workload search request")
	mGetWorkloadsByDomainAndService.Input("matchingTag", "String", false, "", "If-None-Match", false, nil, "Retrieved from the previous request, this timestamp specifies to the server to return any workloads modified since this time")
	mGetWorkloadsByDomainAndService.Output("tag", "String", "ETag", false, "The current latest modification timestamp is returned in this header")
	mGetWorkloadsByDomainAndService.Auth("", "", true, "")
	mGetWorkloadsByDomainAndService.Exception("BAD_REQUEST", "ResourceError", "")
	mGetWorkloadsByDomainAndService.Exception("FORBIDDEN", "ResourceError", "")
	mGetWorkloadsByDomainAndService.Exception("NOT_FOUND", "ResourceError", "")
	mGetWorkloadsByDomainAndService.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mGetWorkloadsByDomainAndService.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mGetWorkloadsByDomainAndService.Build())

	mPutCompositeInstance := rdl.NewResourceBuilder("Workloads", "PUT", "/domain/{domainName}/service/{serviceName}/workload/discover/instance")
	mPutCompositeInstance.Comment("Api to discover an additional instance which can have static or dynamic or both IPs")
	mPutCompositeInstance.Name("putCompositeInstance")
	mPutCompositeInstance.Input("domainName", "DomainName", true, "", "", false, nil, "name of the domain")
	mPutCompositeInstance.Input("serviceName", "EntityName", true, "", "", false, nil, "name of the service")
	mPutCompositeInstance.Input("instance", "CompositeInstance", false, "", "", false, nil, "Generic instance")
	mPutCompositeInstance.Input("resourceOwner", "String", false, "", "Athenz-Resource-Owner", false, nil, "Resource owner for the request")
	mPutCompositeInstance.Auth("msd.UpdateCompositeInstance", "{domainName}:service.{serviceName}", false, "")
	mPutCompositeInstance.Expected("NO_CONTENT")
	mPutCompositeInstance.Exception("BAD_REQUEST", "ResourceError", "")
	mPutCompositeInstance.Exception("FORBIDDEN", "ResourceError", "")
	mPutCompositeInstance.Exception("NOT_FOUND", "ResourceError", "")
	mPutCompositeInstance.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mPutCompositeInstance.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mPutCompositeInstance.Build())

	mDeleteCompositeInstance := rdl.NewResourceBuilder("Workloads", "DELETE", "/domain/{domainName}/service/{serviceName}/workload/discover/instance/{instance}")
	mDeleteCompositeInstance.Comment("Api to delete an additional instance which can have static or dynamic or both IPs")
	mDeleteCompositeInstance.Name("deleteCompositeInstance")
	mDeleteCompositeInstance.Input("domainName", "DomainName", true, "", "", false, nil, "name of the domain")
	mDeleteCompositeInstance.Input("serviceName", "EntityName", true, "", "", false, nil, "name of the service")
	mDeleteCompositeInstance.Input("instance", "SimpleName", true, "", "", false, nil, "instance name/id/key")
	mDeleteCompositeInstance.Input("resourceOwner", "String", false, "", "Athenz-Resource-Owner", false, nil, "Resource owner for the request")
	mDeleteCompositeInstance.Auth("msd.UpdateCompositeInstance", "{domainName}:service.{serviceName}", false, "")
	mDeleteCompositeInstance.Expected("NO_CONTENT")
	mDeleteCompositeInstance.Exception("BAD_REQUEST", "ResourceError", "")
	mDeleteCompositeInstance.Exception("FORBIDDEN", "ResourceError", "")
	mDeleteCompositeInstance.Exception("NOT_FOUND", "ResourceError", "")
	mDeleteCompositeInstance.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mDeleteCompositeInstance.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mDeleteCompositeInstance.Build())

	mResetWorkloadCacheCount := rdl.NewResourceBuilder("WorkloadCount", "DELETE", "/domain/{domainName}/service/{serviceName}/workload/count/cache")
	mResetWorkloadCacheCount.Comment("Api to reset msd cache count for a given domain and service This will have 2 diff authorizations 1. action=msd.ResetWorkloadCacheCount resource={domainName}:service.{serviceName} in the respective domain 2. action=msd.ResetWorkloadCacheCount resource=cache.* in designated system domain")
	mResetWorkloadCacheCount.Name("resetWorkloadCacheCount")
	mResetWorkloadCacheCount.Input("domainName", "DomainName", true, "", "", false, nil, "name of the domain")
	mResetWorkloadCacheCount.Input("serviceName", "EntityName", true, "", "", false, nil, "name of the service")
	mResetWorkloadCacheCount.Auth("", "", true, "")
	mResetWorkloadCacheCount.Expected("NO_CONTENT")
	mResetWorkloadCacheCount.Exception("BAD_REQUEST", "ResourceError", "")
	mResetWorkloadCacheCount.Exception("FORBIDDEN", "ResourceError", "")
	mResetWorkloadCacheCount.Exception("NOT_FOUND", "ResourceError", "")
	mResetWorkloadCacheCount.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mResetWorkloadCacheCount.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mResetWorkloadCacheCount.Build())

	mGetWorkloadCount := rdl.NewResourceBuilder("WorkloadCount", "GET", "/domain/{domainName}/service/{serviceName}/workload/count")
	mGetWorkloadCount.Comment("Api to get msd workload and cache counts for a given domain and service This will have 2 diff authorizations 1. action=msd.GetWorkloadCount resource={domainName}:service.{serviceName} in the respective domain 2. action=msd.GetWorkloadCount resource=cache.* in designated system domain")
	mGetWorkloadCount.Name("getWorkloadCount")
	mGetWorkloadCount.Input("domainName", "DomainName", true, "", "", false, nil, "name of the domain")
	mGetWorkloadCount.Input("serviceName", "EntityName", true, "", "", false, nil, "name of the service")
	mGetWorkloadCount.Auth("", "", true, "")
	mGetWorkloadCount.Exception("BAD_REQUEST", "ResourceError", "")
	mGetWorkloadCount.Exception("FORBIDDEN", "ResourceError", "")
	mGetWorkloadCount.Exception("NOT_FOUND", "ResourceError", "")
	mGetWorkloadCount.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mGetWorkloadCount.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mGetWorkloadCount.Build())

	mEvaluateNetworkPolicyChange := rdl.NewResourceBuilder("NetworkPolicyChangeImpactResponse", "POST", "/transportpolicy/evaluatenetworkpolicychange")
	mEvaluateNetworkPolicyChange.Comment("API to evaluate network policies change impact on transport policies")
	mEvaluateNetworkPolicyChange.Name("evaluateNetworkPolicyChange")
	mEvaluateNetworkPolicyChange.Input("detail", "NetworkPolicyChangeImpactRequest", false, "", "", false, nil, "Struct representing a network policy present in the system")
	mEvaluateNetworkPolicyChange.Auth("", "", true, "")
	mEvaluateNetworkPolicyChange.Exception("BAD_REQUEST", "ResourceError", "")
	mEvaluateNetworkPolicyChange.Exception("FORBIDDEN", "ResourceError", "")
	mEvaluateNetworkPolicyChange.Exception("NOT_FOUND", "ResourceError", "")
	mEvaluateNetworkPolicyChange.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mEvaluateNetworkPolicyChange.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mEvaluateNetworkPolicyChange.Build())

	mPostKubernetesNetworkPolicyRequest := rdl.NewResourceBuilder("KubernetesNetworkPolicyResponse", "POST", "/domain/{domainName}/service/{serviceName}/kubernetesnetworkpolicy")
	mPostKubernetesNetworkPolicyRequest.Comment("API endpoint to get the Kubernetes network policy converted from the corresponding MSD policy")
	mPostKubernetesNetworkPolicyRequest.Input("domainName", "DomainName", true, "", "", false, nil, "Name of the domain")
	mPostKubernetesNetworkPolicyRequest.Input("serviceName", "EntityName", true, "", "", false, nil, "Name of the service")
	mPostKubernetesNetworkPolicyRequest.Input("request", "KubernetesNetworkPolicyRequest", false, "", "", false, nil, "Struct representing input options based on the cluster context")
	mPostKubernetesNetworkPolicyRequest.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")
	mPostKubernetesNetworkPolicyRequest.Output("tag", "String", "ETag", false, "The current latest modification timestamp is returned in this header")
	mPostKubernetesNetworkPolicyRequest.Auth("msd.GetNetworkPolicy", "{domainName}:service.{serviceName}", false, "")
	mPostKubernetesNetworkPolicyRequest.Exception("BAD_REQUEST", "ResourceError", "")
	mPostKubernetesNetworkPolicyRequest.Exception("FORBIDDEN", "ResourceError", "")
	mPostKubernetesNetworkPolicyRequest.Exception("NOT_FOUND", "ResourceError", "")
	mPostKubernetesNetworkPolicyRequest.Exception("TOO_MANY_REQUESTS", "ResourceError", "")
	mPostKubernetesNetworkPolicyRequest.Exception("UNAUTHORIZED", "ResourceError", "")
	sb.AddResource(mPostKubernetesNetworkPolicyRequest.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 MSDSchema() *rdl.Schema {
	return schema
}
