package com.perforce.hwsclient.models;
import java.util.Objects;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.google.gson.annotations.SerializedName;
/**
* The Perforce server specification describes the high-level configuration and intended usage of a Perforce server.\nFor installations with only one Perforce server, the server specification is optional.
**/
@ApiModel(description = "The Perforce server specification describes the high-level configuration and intended usage of a Perforce server.\nFor installations with only one Perforce server, the server specification is optional.")
public class ServerCommand {
@SerializedName("serverID")
private String serverID = null;
@SerializedName("type")
private String type = null;
@SerializedName("services")
private String services = null;
@SerializedName("name")
private String name = null;
@SerializedName("address")
private String address = null;
@SerializedName("externalAddress")
private String externalAddress = null;
@SerializedName("description")
private String description = null;
@SerializedName("user")
private String user = null;
@SerializedName("clientDataFilter")
private String clientDataFilter = null;
@SerializedName("revisionDataFilter")
private String revisionDataFilter = null;
@SerializedName("archiveDataFilter")
private String archiveDataFilter = null;
@SerializedName("distributedConfig")
private String distributedConfig = null;
/**
* A unique identifier for this server.\nThis must match the contents of the server’s `server.id` file as defined by the p4 serverid command.\nIf the server type is identifier, the server id specifies the name of the cluster.
**/
@ApiModelProperty(value = "A unique identifier for this server.\nThis must match the contents of the server’s `server.id` file as defined by the p4 serverid command.\nIf the server type is identifier, the server id specifies the name of the cluster.")
public String getServerID() {
return serverID;
}
public void setServerID(String serverID) {
this.serverID = serverID;
}
/**
* Server executable type.\n\nOne of the following: `server`, `proxy`, `broker`, `identifier`, `admin`.\n\nEach type may offer one or more services, defined in the `services` property.
**/
@ApiModelProperty(value = "Server executable type.\n\nOne of the following: `server`, `proxy`, `broker`, `identifier`, `admin`.\n\nEach type may offer one or more services, defined in the `services` property.")
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
/**
* The `server` type server provides the following services:\n\n- standard - a standard Perforce server\n- replica - a read-only replica server\n- commit-server - central server in distributed installation\n- edge-server - node in distributed installation\n- forwarding-replica - a replica configured to forward commands that involve database writes to a master server\n- build-server - a replica that supports build automation and build farm integration\n- P4AUTH - a server that provides authentication\n- P4CHANGE - a server that provides change numbering\n- depot-master - commit-server with automated failover\n- depot-standby - standby replica of the depot-master\n- workspace-server - node in a cluster installation\n- standby - read-only replica server that uses p4 journalcopy\n- forwarding-standby - forwarding replica server that uses p4 journalcopy\n\nThe `proxy` type server provides a p4p caching proxy.\n\nThe `broker` type server provides the following services:\n\n- broker - a p4broker process\n- workspace-router - routing broker for a cluster\n\nThe services field for the `identifier` type server specifies the existence of the cluster, and has the value `cluster`.\nThe name of the cluster is then drawn from the ServerID field.\n\nThe `admin` type server provides the following services:\n\n- hxca-server - the admin server for a Helix cluster.\n- zookeeper-server - ZooKeeper server for a cluster
**/
@ApiModelProperty(value = "The `server` type server provides the following services:\n\n- standard - a standard Perforce server\n- replica - a read-only replica server\n- commit-server - central server in distributed installation\n- edge-server - node in distributed installation\n- forwarding-replica - a replica configured to forward commands that involve database writes to a master server\n- build-server - a replica that supports build automation and build farm integration\n- P4AUTH - a server that provides authentication\n- P4CHANGE - a server that provides change numbering\n- depot-master - commit-server with automated failover\n- depot-standby - standby replica of the depot-master\n- workspace-server - node in a cluster installation\n- standby - read-only replica server that uses p4 journalcopy\n- forwarding-standby - forwarding replica server that uses p4 journalcopy\n\nThe `proxy` type server provides a p4p caching proxy.\n\nThe `broker` type server provides the following services:\n\n- broker - a p4broker process\n- workspace-router - routing broker for a cluster\n\nThe services field for the `identifier` type server specifies the existence of the cluster, and has the value `cluster`.\nThe name of the cluster is then drawn from the ServerID field.\n\nThe `admin` type server provides the following services:\n\n- hxca-server - the admin server for a Helix cluster.\n- zookeeper-server - ZooKeeper server for a cluster")
public String getServices() {
return services;
}
public void setServices(String services) {
this.services = services;
}
/**
* The P4NAME associated with this server.\nYou can leave this blank or you can set it to the same value as the serverid.
**/
@ApiModelProperty(value = "The P4NAME associated with this server.\nYou can leave this blank or you can set it to the same value as the serverid.")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
/**
* The P4PORT used by this server.
**/
@ApiModelProperty(value = "The P4PORT used by this server.")
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
/**
* For an edge server, this optional field specifies the external address used for connections to a commit server.\nThis field must be set for the edge server to enable parallel submits in a federated environment.
**/
@ApiModelProperty(value = "For an edge server, this optional field specifies the external address used for connections to a commit server.\nThis field must be set for the edge server to enable parallel submits in a federated environment.")
public String getExternalAddress() {
return externalAddress;
}
public void setExternalAddress(String externalAddress) {
this.externalAddress = externalAddress;
}
/**
* An optional description for this server.
**/
@ApiModelProperty(value = "An optional description for this server.")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
/**
* The service user name used by the server.
**/
@ApiModelProperty(value = "The service user name used by the server.")
public String getUser() {
return user;
}
public void setUser(String user) {
this.user = user;
}
/**
* For a replica server, this optional field can contain one or more patterns describing how active client workspace metadata is to be filtered. Active client workspace data includes have lists, working records, and pending resolves.\n\nTo include client data, use the syntax:\n`//client-pattern/...`\n\nTo exclude client data, use the syntax:\n`-//client-pattern/...`\n\nAll patterns are specified in client syntax.
**/
@ApiModelProperty(value = "For a replica server, this optional field can contain one or more patterns describing how active client workspace metadata is to be filtered. Active client workspace data includes have lists, working records, and pending resolves.\n\nTo include client data, use the syntax:\n`//client-pattern/...`\n\nTo exclude client data, use the syntax:\n`-//client-pattern/...`\n\nAll patterns are specified in client syntax.")
public String getClientDataFilter() {
return clientDataFilter;
}
public void setClientDataFilter(String clientDataFilter) {
this.clientDataFilter = clientDataFilter;
}
/**
* For a replica server, this optional field can contain one or more patterns describing how submitted revision metadata is to be filtered. Submitted revision data includes revision records, integration records, label contents, and the files listed in submitted changelists.\n\nTo include depot data, use the syntax:\n//depot/pattern/...\n\nTo exclude depot data, use the syntax:\n-//depot/pattern/...\n\nAll patterns are specified in depot syntax.
**/
@ApiModelProperty(value = "For a replica server, this optional field can contain one or more patterns describing how submitted revision metadata is to be filtered. Submitted revision data includes revision records, integration records, label contents, and the files listed in submitted changelists.\n\nTo include depot data, use the syntax:\n//depot/pattern/...\n\nTo exclude depot data, use the syntax:\n-//depot/pattern/...\n\nAll patterns are specified in depot syntax.")
public String getRevisionDataFilter() {
return revisionDataFilter;
}
public void setRevisionDataFilter(String revisionDataFilter) {
this.revisionDataFilter = revisionDataFilter;
}
/**
* For a replica server, this optional field can contain one or more patterns describing the policy for automatically scheduling the replication of file content. If this field is present, only those files described by the pattern are automatically transferred to the replica; other files are not transferred until they are referenced by a replica command that needs the file content.\n\nFiles specified in the ArchiveDataFilter: field are transferred to the replica regardless of whether any users of the replica have made requests for their content.\n\nTo automatically transfer files on submit, use the syntax:\n`//depot/pattern/...`\n\nTo exclude files from automatic transfer, use the syntax:\n`-//depot/pattern/...`\n\nAll patterns are specified in depot syntax.
**/
@ApiModelProperty(value = "For a replica server, this optional field can contain one or more patterns describing the policy for automatically scheduling the replication of file content. If this field is present, only those files described by the pattern are automatically transferred to the replica; other files are not transferred until they are referenced by a replica command that needs the file content.\n\nFiles specified in the ArchiveDataFilter: field are transferred to the replica regardless of whether any users of the replica have made requests for their content.\n\nTo automatically transfer files on submit, use the syntax:\n`//depot/pattern/...`\n\nTo exclude files from automatic transfer, use the syntax:\n`-//depot/pattern/...`\n\nAll patterns are specified in depot syntax.")
public String getArchiveDataFilter() {
return archiveDataFilter;
}
public void setArchiveDataFilter(String archiveDataFilter) {
this.archiveDataFilter = archiveDataFilter;
}
/**
* For an edge or commit server, this optional field, which is displayed only when you use the -l or -c option, shows configuration settings for this server.\n\n`-l` flag shows the current configuration.\n`-c-` flag shows current configuration values, recommended default values for fields that are not set, or unset for fields that are not set and do not have default values.\n\nIf this field is present when invoked with -c, the configuration commands in this field are run on the current server using the scope of the server specified in the serverID field.
**/
@ApiModelProperty(value = "For an edge or commit server, this optional field, which is displayed only when you use the -l or -c option, shows configuration settings for this server.\n\n`-l` flag shows the current configuration.\n`-c-` flag shows current configuration values, recommended default values for fields that are not set, or unset for fields that are not set and do not have default values.\n\nIf this field is present when invoked with -c, the configuration commands in this field are run on the current server using the scope of the server specified in the serverID field.")
public String getDistributedConfig() {
return distributedConfig;
}
public void setDistributedConfig(String distributedConfig) {
this.distributedConfig = distributedConfig;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ServerCommand serverCommand = (ServerCommand) o;
return Objects.equals(serverID, serverCommand.serverID) &&
Objects.equals(type, serverCommand.type) &&
Objects.equals(services, serverCommand.services) &&
Objects.equals(name, serverCommand.name) &&
Objects.equals(address, serverCommand.address) &&
Objects.equals(externalAddress, serverCommand.externalAddress) &&
Objects.equals(description, serverCommand.description) &&
Objects.equals(user, serverCommand.user) &&
Objects.equals(clientDataFilter, serverCommand.clientDataFilter) &&
Objects.equals(revisionDataFilter, serverCommand.revisionDataFilter) &&
Objects.equals(archiveDataFilter, serverCommand.archiveDataFilter) &&
Objects.equals(distributedConfig, serverCommand.distributedConfig);
}
@Override
public int hashCode() {
return Objects.hash(serverID, type, services, name, address, externalAddress, description, user, clientDataFilter, revisionDataFilter, archiveDataFilter, distributedConfig);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ServerCommand {\n");
sb.append(" serverID: ").append(toIndentedString(serverID)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" services: ").append(toIndentedString(services)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" address: ").append(toIndentedString(address)).append("\n");
sb.append(" externalAddress: ").append(toIndentedString(externalAddress)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" user: ").append(toIndentedString(user)).append("\n");
sb.append(" clientDataFilter: ").append(toIndentedString(clientDataFilter)).append("\n");
sb.append(" revisionDataFilter: ").append(toIndentedString(revisionDataFilter)).append("\n");
sb.append(" archiveDataFilter: ").append(toIndentedString(archiveDataFilter)).append("\n");
sb.append(" distributedConfig: ").append(toIndentedString(distributedConfig)).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 ");
}
}