/// <summary>
        /// Initializes a new instance of the <see cref="RoleUpdateRequest" /> class.
        /// </summary>
        /// <param name="description">description.</param>
        /// <param name="resource">resource (required).</param>
        /// <param name="when">when (required).</param>
        public RoleUpdateRequest(string description = default(string), RoleResourceRequest resource = default(RoleResourceRequest), WhenSpec when = default(WhenSpec))
        {
            this.Description = description;
            // to ensure "resource" is required (not null)
            if (resource == null)
            {
                throw new InvalidDataException("resource is a required property for RoleUpdateRequest and cannot be null");
            }
            else
            {
                this.Resource = resource;
            }

            // to ensure "when" is required (not null)
            if (when == null)
            {
                throw new InvalidDataException("when is a required property for RoleUpdateRequest and cannot be null");
            }
            else
            {
                this.When = when;
            }

            this.Description = description;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="RoleResponse" /> class.
        /// </summary>
        /// <param name="id">id (required).</param>
        /// <param name="roleHierarchyIndex">roleHierarchyIndex (required).</param>
        /// <param name="description">description.</param>
        /// <param name="resource">resource (required).</param>
        /// <param name="when">when (required).</param>
        /// <param name="permission">permission (required).</param>
        /// <param name="limit">limit.</param>
        /// <param name="links">links.</param>
        public RoleResponse(RoleId id = default(RoleId), int?roleHierarchyIndex = default(int?), string description = default(string), RoleResourceRequest resource = default(RoleResourceRequest), WhenSpec when = default(WhenSpec), string permission = default(string), Dictionary <string, string> limit = default(Dictionary <string, string>), List <Link> links = default(List <Link>))
        {
            // to ensure "id" is required (not null)
            if (id == null)
            {
                throw new InvalidDataException("id is a required property for RoleResponse and cannot be null");
            }
            else
            {
                this.Id = id;
            }

            // to ensure "roleHierarchyIndex" is required (not null)
            if (roleHierarchyIndex == null)
            {
                throw new InvalidDataException("roleHierarchyIndex is a required property for RoleResponse and cannot be null");
            }
            else
            {
                this.RoleHierarchyIndex = roleHierarchyIndex;
            }

            this.Description = description;
            // to ensure "resource" is required (not null)
            if (resource == null)
            {
                throw new InvalidDataException("resource is a required property for RoleResponse and cannot be null");
            }
            else
            {
                this.Resource = resource;
            }

            // to ensure "when" is required (not null)
            if (when == null)
            {
                throw new InvalidDataException("when is a required property for RoleResponse and cannot be null");
            }
            else
            {
                this.When = when;
            }

            // to ensure "permission" is required (not null)
            if (permission == null)
            {
                throw new InvalidDataException("permission is a required property for RoleResponse and cannot be null");
            }
            else
            {
                this.Permission = permission;
            }

            this.Limit       = limit;
            this.Links       = links;
            this.Description = description;
            this.Limit       = limit;
            this.Links       = links;
        }