protected Role(String name, Optional<String> description, Optional<String> jsonDefaultAttributes, Optional<String> jsonOverrideAttributes, Optional<RunList> runlist) { this.name = checkNotNull(name, "name must be set"); this.description = checkNotNull(description, "description must be set"); this.jsonDefaultAttributes = checkNotNull(jsonDefaultAttributes, "jsonDefaultAttributes must be set"); this.jsonOverrideAttributes = checkNotNull(jsonOverrideAttributes, "jsonOverrideAttributes must be set"); this.runlist = checkNotNull(runlist, "runlist must be set").or(RunList.builder().build()); }
public String toJsonString() { StringBuilder json = new StringBuilder(); json.append("{"); json.append("\"name\": \"").append(name).append("\","); json.append("\"description\":\"").append(description.or("")).append("\","); json.append("\"default_attributes\":").append(jsonDefaultAttributes.or("{}")).append(","); json.append("\"override_attributes\":").append(jsonOverrideAttributes.or("{}")).append(","); json.append("\"json_class\":\"Chef::Role\","); json.append("\"chef_type\":\"role\","); json.append("\"run_list\":" + runlist.toString()); json.append("}"); return json.toString(); }
public RunList build() { return new RunList(runlist.build()); } }
protected Role(String name, Optional<String> description, Optional<String> jsonDefaultAttributes, Optional<String> jsonOverrideAttributes, Optional<RunList> runlist) { this.name = checkNotNull(name, "name must be set"); this.description = checkNotNull(description, "description must be set"); this.jsonDefaultAttributes = checkNotNull(jsonDefaultAttributes, "jsonDefaultAttributes must be set"); this.jsonOverrideAttributes = checkNotNull(jsonOverrideAttributes, "jsonOverrideAttributes must be set"); this.runlist = checkNotNull(runlist, "runlist must be set").or(RunList.builder().build()); }
public String toJsonString() { StringBuilder json = new StringBuilder(); json.append("{"); json.append("\"name\": \"").append(name).append("\","); json.append("\"description\":\"").append(description.or("")).append("\","); json.append("\"default_attributes\":").append(jsonDefaultAttributes.or("{}")).append(","); json.append("\"override_attributes\":").append(jsonOverrideAttributes.or("{}")).append(","); json.append("\"json_class\":\"Chef::Role\","); json.append("\"chef_type\":\"role\","); json.append("\"run_list\":" + runlist.toString()); json.append("}"); return json.toString(); }
public RunList build() { return new RunList(runlist.build()); } }
protected Role(String name, Optional<String> description, Optional<String> jsonDefaultAttributes, Optional<String> jsonOverrideAttributes, Optional<RunList> runlist) { this.name = checkNotNull(name, "name must be set"); this.description = checkNotNull(description, "description must be set"); this.jsonDefaultAttributes = checkNotNull(jsonDefaultAttributes, "jsonDefaultAttributes must be set"); this.jsonOverrideAttributes = checkNotNull(jsonOverrideAttributes, "jsonOverrideAttributes must be set"); this.runlist = checkNotNull(runlist, "runlist must be set").or(RunList.builder().build()); }
public String toJsonString() { StringBuilder json = new StringBuilder(); json.append("{"); json.append("\"name\": \"").append(name).append("\","); json.append("\"description\":\"").append(description.or("")).append("\","); json.append("\"default_attributes\":").append(jsonDefaultAttributes.or("{}")).append(","); json.append("\"override_attributes\":").append(jsonOverrideAttributes.or("{}")).append(","); json.append("\"json_class\":\"Chef::Role\","); json.append("\"chef_type\":\"role\","); json.append("\"run_list\":" + runlist.toString()); json.append("}"); return json.toString(); }
public RunList build() { return new RunList(runlist.build()); } }
protected Role(String name, Optional<String> description, Optional<String> jsonDefaultAttributes, Optional<String> jsonOverrideAttributes, Optional<RunList> runlist) { this.name = checkNotNull(name, "name must be set"); this.description = checkNotNull(description, "description must be set"); this.jsonDefaultAttributes = checkNotNull(jsonDefaultAttributes, "jsonDefaultAttributes must be set"); this.jsonOverrideAttributes = checkNotNull(jsonOverrideAttributes, "jsonOverrideAttributes must be set"); this.runlist = checkNotNull(runlist, "runlist must be set").or(RunList.builder().build()); }
public String toJsonString() { StringBuilder json = new StringBuilder(); json.append("{"); json.append("\"name\": \"").append(name).append("\","); json.append("\"description\":\"").append(description.or("")).append("\","); json.append("\"default_attributes\":").append(jsonDefaultAttributes.or("{}")).append(","); json.append("\"override_attributes\":").append(jsonOverrideAttributes.or("{}")).append(","); json.append("\"json_class\":\"Chef::Role\","); json.append("\"chef_type\":\"role\","); json.append("\"run_list\":" + runlist.toString()); json.append("}"); return json.toString(); }
public RunList build() { return new RunList(runlist.build()); } }
protected Role(String name, Optional<String> description, Optional<String> jsonDefaultAttributes, Optional<String> jsonOverrideAttributes, Optional<RunList> runlist) { this.name = checkNotNull(name, "name must be set"); this.description = checkNotNull(description, "description must be set"); this.jsonDefaultAttributes = checkNotNull(jsonDefaultAttributes, "jsonDefaultAttributes must be set"); this.jsonOverrideAttributes = checkNotNull(jsonOverrideAttributes, "jsonOverrideAttributes must be set"); this.runlist = checkNotNull(runlist, "runlist must be set").or(RunList.builder().build()); }
public String toJsonString() { StringBuilder json = new StringBuilder(); json.append("{"); json.append("\"name\": \"").append(name).append("\","); json.append("\"description\":\"").append(description.or("")).append("\","); json.append("\"default_attributes\":").append(jsonDefaultAttributes.or("{}")).append(","); json.append("\"override_attributes\":").append(jsonOverrideAttributes.or("{}")).append(","); json.append("\"json_class\":\"Chef::Role\","); json.append("\"chef_type\":\"role\","); json.append("\"run_list\":" + runlist.toString()); json.append("}"); return json.toString(); }