package com.perforce.hwsclient.models;
import java.util.Objects;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.*;
import com.google.gson.annotations.SerializedName;
/**
* The depot specification, which is the shared repository Perforce stores files in.
**/
@ApiModel(description = "The depot specification, which is the shared repository Perforce stores files in.")
public class DepotCommand {
@SerializedName("depot")
private String depot = null;
@SerializedName("owner")
private String owner = null;
@SerializedName("description")
private String description = null;
@SerializedName("type")
private String type = null;
@SerializedName("address")
private String address = null;
@SerializedName("suffix")
private String suffix = null;
@SerializedName("streamDepth")
private String streamDepth = null;
@SerializedName("map")
private String map = null;
@SerializedName("specMap")
private List<String> specMap = new ArrayList<String>();
/**
* The depot name.
**/
@ApiModelProperty(value = "The depot name.")
public String getDepot() {
return depot;
}
public void setDepot(String depot) {
this.depot = depot;
}
/**
* The user who owns the depot.\nBy default, this is the user who created the depot.\n\nThe specified owner does not have to be a Perforce user.\nYou might want to use an arbitrary name if the user does not yet exist, or if you have deleted the user and need a placeholder until you can assign the spec to a new user.
**/
@ApiModelProperty(value = "The user who owns the depot.\nBy default, this is the user who created the depot.\n\nThe specified owner does not have to be a Perforce user.\nYou might want to use an arbitrary name if the user does not yet exist, or if you have deleted the user and need a placeholder until you can assign the spec to a new user.")
public String getOwner() {
return owner;
}
public void setOwner(String owner) {
this.owner = owner;
}
/**
* A short description of the depot’s purpose. Optional.
**/
@ApiModelProperty(value = "A short description of the depot’s purpose. Optional.")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
/**
* `local`, `remote`, `spec`, `stream`, `unload`, `archive` or `tangent`.\n\nA local depot is writable, and is the default depot type.\nFiles reside in the server's root directory and are managed directly by the server.\n\nA stream depot is also writable, but contains streams, a type of branch that includes hierarchy and policy.\n\nA remote depot references files that reside on other servers, and cannot be written to.\n\nThe spec depot, if present, automatically archives edited forms.\n\nThe unload depot, if present, holds infrequently-used metadata (about old client workspaces and labels) that has been unloaded with the p4 unload command.\n\nAn archive depot is used in conjunction with the p4 archive and p4 restore commands to facilitate offline (or near-line) storage of infrequently-accessed revisions, typically large binaries.\n\nA tangent depot defines a read-only location that holds tangents created by the p4 fetch -t command.\nThe tangent depot named tangent is automatically created by p4 fetch -t if one does not already exist.
**/
@ApiModelProperty(value = "`local`, `remote`, `spec`, `stream`, `unload`, `archive` or `tangent`.\n\nA local depot is writable, and is the default depot type.\nFiles reside in the server's root directory and are managed directly by the server.\n\nA stream depot is also writable, but contains streams, a type of branch that includes hierarchy and policy.\n\nA remote depot references files that reside on other servers, and cannot be written to.\n\nThe spec depot, if present, automatically archives edited forms.\n\nThe unload depot, if present, holds infrequently-used metadata (about old client workspaces and labels) that has been unloaded with the p4 unload command.\n\nAn archive depot is used in conjunction with the p4 archive and p4 restore commands to facilitate offline (or near-line) storage of infrequently-accessed revisions, typically large binaries.\n\nA tangent depot defines a read-only location that holds tangents created by the p4 fetch -t command.\nThe tangent depot named tangent is automatically created by p4 fetch -t if one does not already exist.")
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
/**
* If the `Type:` is `remote`, the address should be the P4PORT address of the remote server.\nIf the `Type:` is local or spec, this field is ignored.
**/
@ApiModelProperty(value = "If the `Type:` is `remote`, the address should be the P4PORT address of the remote server.\nIf the `Type:` is local or spec, this field is ignored.")
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
/**
* If the Type: is spec, this field holds an optional suffix for generated paths to objects in the spec depot.\n\nThe default suffix is .p4s.\nYou do not need a suffix to use the spec depot, but supplying a file extension to your Perforce server’s versioned specs enables users of GUI client software to associate Perforce specifications with a preferred text editor.\nIf the Type: is local or remote, this field is ignored.
**/
@ApiModelProperty(value = "If the Type: is spec, this field holds an optional suffix for generated paths to objects in the spec depot.\n\nThe default suffix is .p4s.\nYou do not need a suffix to use the spec depot, but supplying a file extension to your Perforce server’s versioned specs enables users of GUI client software to associate Perforce specifications with a preferred text editor.\nIf the Type: is local or remote, this field is ignored.")
public String getSuffix() {
return suffix;
}
public void setSuffix(String suffix) {
this.suffix = suffix;
}
/**
* For stream depots, the optional depth to be used for stream paths in the depot, where depth specifies the number of slashes following the depot name of a stream. ]\n\nThis field is used when streams are being created.\nThe default is 1, matching the traditional stream name.\nYou cannot update this value once streams or archive data exist in a depot.
**/
@ApiModelProperty(value = "For stream depots, the optional depth to be used for stream paths in the depot, where depth specifies the number of slashes following the depot name of a stream. ]\n\nThis field is used when streams are being created.\nThe default is 1, matching the traditional stream name.\nYou cannot update this value once streams or archive data exist in a depot.")
public String getStreamDepth() {
return streamDepth;
}
public void setStreamDepth(String streamDepth) {
this.streamDepth = streamDepth;
}
/**
* If the Type: is local, spec, or archive, set the map to point to the relative location of the depot subdirectory.\nThe map must contain the `...` wildcard; for example, a local depot new might have a Map: of `new/...`.\n\nIf the Type: is remote, set the map to point to a location in the remote depot's physical namespace, for example, `//depot/new/rel2/...`.\nThis directory will be the root of the local representation of the remote depot.
**/
@ApiModelProperty(value = "If the Type: is local, spec, or archive, set the map to point to the relative location of the depot subdirectory.\nThe map must contain the `...` wildcard; for example, a local depot new might have a Map: of `new/...`.\n\nIf the Type: is remote, set the map to point to a location in the remote depot's physical namespace, for example, `//depot/new/rel2/...`.\nThis directory will be the root of the local representation of the remote depot.")
public String getMap() {
return map;
}
public void setMap(String map) {
this.map = map;
}
/**
* For spec depots, an optional description of which specs should be saved, expressed as a view.
**/
@ApiModelProperty(value = "For spec depots, an optional description of which specs should be saved, expressed as a view.")
public List<String> getSpecMap() {
return specMap;
}
public void setSpecMap(List<String> specMap) {
this.specMap = specMap;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DepotCommand depotCommand = (DepotCommand) o;
return Objects.equals(depot, depotCommand.depot) &&
Objects.equals(owner, depotCommand.owner) &&
Objects.equals(description, depotCommand.description) &&
Objects.equals(type, depotCommand.type) &&
Objects.equals(address, depotCommand.address) &&
Objects.equals(suffix, depotCommand.suffix) &&
Objects.equals(streamDepth, depotCommand.streamDepth) &&
Objects.equals(map, depotCommand.map) &&
Objects.equals(specMap, depotCommand.specMap);
}
@Override
public int hashCode() {
return Objects.hash(depot, owner, description, type, address, suffix, streamDepth, map, specMap);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DepotCommand {\n");
sb.append(" depot: ").append(toIndentedString(depot)).append("\n");
sb.append(" owner: ").append(toIndentedString(owner)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" address: ").append(toIndentedString(address)).append("\n");
sb.append(" suffix: ").append(toIndentedString(suffix)).append("\n");
sb.append(" streamDepth: ").append(toIndentedString(streamDepth)).append("\n");
sb.append(" map: ").append(toIndentedString(map)).append("\n");
sb.append(" specMap: ").append(toIndentedString(specMap)).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 ");
}
}