Skip to content

Commit

Permalink
update generated models
Browse files Browse the repository at this point in the history
  • Loading branch information
grabsefx committed Jul 24, 2024
1 parent b7f57fd commit 2599adc
Show file tree
Hide file tree
Showing 36 changed files with 841 additions and 731 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public InlineResponse201 message(String message) {
* Get message
* @return message
**/
@Schema(example = "The user has been created in the organization.", description = "")
@Schema(example = "The user was added to the organization.", description = "")
@NotNull

public String getMessage() {
Expand Down
148 changes: 148 additions & 0 deletions src/main/java/com/epam/reportportal/api/model/OrgIdUsersBody.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
package com.epam.reportportal.api.model;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import org.springframework.validation.annotation.Validated;

/**
* OrgIdUsersBody
*/
@Validated



public class OrgIdUsersBody extends OrganizationUserDefinition {
/**
* Organization user role.
*/
public enum OrganizationRoleEnum {
MEMBER("MEMBER"),

MANAGER("MANAGER");

private String value;

OrganizationRoleEnum(String value) {
this.value = value;
}

@Override
@JsonValue
public String toString() {
return String.valueOf(value);
}

@JsonCreator
public static OrganizationRoleEnum fromValue(String text) {
for (OrganizationRoleEnum b : OrganizationRoleEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
}
@JsonProperty("organization_role")
private OrganizationRoleEnum organizationRole = null;

@JsonProperty("items")
@Valid
private List<UserProjectInfo> items = null;

public OrgIdUsersBody organizationRole(OrganizationRoleEnum organizationRole) {
this.organizationRole = organizationRole;
return this;
}

/**
* Organization user role.
* @return organizationRole
**/
@Schema(required = true, description = "Organization user role.")
@NotNull

public OrganizationRoleEnum getOrganizationRole() {
return organizationRole;
}

public void setOrganizationRole(OrganizationRoleEnum organizationRole) {
this.organizationRole = organizationRole;
}

public OrgIdUsersBody items(List<UserProjectInfo> items) {
this.items = items;
return this;
}

public OrgIdUsersBody addItemsItem(UserProjectInfo itemsItem) {
if (this.items == null) {
this.items = new ArrayList<>();
}
this.items.add(itemsItem);
return this;
}

/**
* Get items
* @return items
**/
@Schema(description = "")
@NotNull
@Valid
public List<UserProjectInfo> getItems() {
return items;
}

public void setItems(List<UserProjectInfo> items) {
this.items = items;
}


@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
OrgIdUsersBody orgIdUsersBody = (OrgIdUsersBody) o;
return Objects.equals(this.organizationRole, orgIdUsersBody.organizationRole) &&
Objects.equals(this.items, orgIdUsersBody.items) &&
super.equals(o);
}

@Override
public int hashCode() {
return Objects.hash(organizationRole, items, super.hashCode());
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class OrgIdUsersBody {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" organizationRole: ").append(toIndentedString(organizationRole)).append("\n");
sb.append(" items: ").append(toIndentedString(items)).append("\n");
sb.append("}");
return sb.toString();
}

/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public OrganizationDetails name(String name) {
@Schema(required = true, description = "Organization display name.")
@NotNull

@Size(min=1) public String getName() {
@Size(min=3,max=250) public String getName() {
return name;
}

Expand All @@ -53,9 +53,8 @@ public OrganizationDetails slug(String slug) {
* @return slug
**/
@Schema(description = "A slug is used to identify a resource. It should be unique and contain only lowercase letters, numbers, and hyphens. It should not start or end with a hyphen.")
@NotNull

@Pattern(regexp="^[a-z0-9]+(?:-[a-z0-9]+)*$") public String getSlug() {

@Pattern(regexp="^[a-z0-9]+(?:-[a-z0-9]+)*$") @Size(min=3,max=250) public String getSlug() {
return slug;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

public class OrganizationProfile extends OrganizationInfo {
@JsonProperty("relationships")
private OrganizationRelation relationships = null;
private OrganizationRelationRelationships relationships = null;

public OrganizationProfile relationships(OrganizationRelation relationships) {
public OrganizationProfile relationships(OrganizationRelationRelationships relationships) {
this.relationships = relationships;
return this;
}
Expand All @@ -32,11 +32,11 @@ public OrganizationProfile relationships(OrganizationRelation relationships) {
@NotNull

@Valid
public OrganizationRelation getRelationships() {
public OrganizationRelationRelationships getRelationships() {
return relationships;
}

public void setRelationships(OrganizationRelation relationships) {
public void setRelationships(OrganizationRelationRelationships relationships) {
this.relationships = relationships;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@



public class OrganizationProfilesList extends Offset {
public class OrganizationProfilesList {
@JsonProperty("items")
@Valid
private List<OrganizationProfile> items = null;
Expand Down Expand Up @@ -59,20 +59,19 @@ public boolean equals(Object o) {
return false;
}
OrganizationProfilesList organizationProfilesList = (OrganizationProfilesList) o;
return Objects.equals(this.items, organizationProfilesList.items) &&
super.equals(o);
return Objects.equals(this.items, organizationProfilesList.items);
}

@Override
public int hashCode() {
return Objects.hash(items, super.hashCode());
return Objects.hash(items);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class OrganizationProfilesList {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");

sb.append(" items: ").append(toIndentedString(items)).append("\n");
sb.append("}");
return sb.toString();
Expand Down
Loading

0 comments on commit 2599adc

Please sign in to comment.