/// <summary> /// Initializes a new instance of the <see cref="CustomRole" /> class. /// </summary> /// <param name="links">links.</param> /// <param name="name">Name of the custom role..</param> /// <param name="key">key.</param> /// <param name="description">Description of the custom role..</param> /// <param name="id">id.</param> /// <param name="policy">policy.</param> public CustomRole(Links links = default(Links), string name = default(string), CustomRoleKeyOrId key = default(CustomRoleKeyOrId), string description = default(string), Id id = default(Id), List <Policy> policy = default(List <Policy>)) { this.Links = links; this.Name = name; this.Key = key; this.Description = description; this.Id = id; this.Policy = policy; }
/// <summary> /// Initializes a new instance of the <see cref="CustomRoleBody" /> class. /// </summary> /// <param name="name">Name of the custom role. (required).</param> /// <param name="description">Description of the custom role..</param> /// <param name="key">key (required).</param> /// <param name="policy">policy (required).</param> public CustomRoleBody(string name = default(string), string description = default(string), CustomRoleKeyOrId key = default(CustomRoleKeyOrId), List <Policy> policy = default(List <Policy>)) { // to ensure "name" is required (not null) if (name == null) { throw new InvalidDataException("name is a required property for CustomRoleBody and cannot be null"); } else { this.Name = name; } // to ensure "key" is required (not null) if (key == null) { throw new InvalidDataException("key is a required property for CustomRoleBody and cannot be null"); } else { this.Key = key; } // to ensure "policy" is required (not null) if (policy == null) { throw new InvalidDataException("policy is a required property for CustomRoleBody and cannot be null"); } else { this.Policy = policy; } this.Description = description; }