@NotNull
public StructureViewBean build() throws IllegalStateException {
if (!isValid()) {
throw new IllegalStateException("builder is not in valid state: " + this);
}
PermissionSubject owner = PermissionSubject.clone(myOwner);
List<PermissionRule> permissions = StructureUtil.copyPermissions(myPermissions);
ViewSpecification spec = mySpecification.build();
return new StructureViewBean(myId, myName, myDescription, owner, permissions, spec);
}