package com.perforce.hwsclient.models;
import java.util.Objects;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import com.google.gson.annotations.SerializedName;
/**
* A summary of a stream in the system, as provided by the `p4 streams` command.
**/
@ApiModel(description = "A summary of a stream in the system, as provided by the `p4 streams` command.")
public class StreamsCommand {
@SerializedName("stream")
private String stream = null;
@SerializedName("update")
private Date update = null;
@SerializedName("access")
private Date access = null;
@SerializedName("owner")
private String owner = null;
@SerializedName("name")
private String name = null;
@SerializedName("parent")
private String parent = null;
@SerializedName("type")
private String type = null;
@SerializedName("description")
private String description = null;
@SerializedName("options")
private String options = null;
/**
* Specifies the stream's name (permanent identifier) and its path in the stream depot, in the form `//depotname/streamname`.
**/
@ApiModelProperty(value = "Specifies the stream's name (permanent identifier) and its path in the stream depot, in the form `//depotname/streamname`.")
public String getStream() {
return stream;
}
public void setStream(String stream) {
this.stream = stream;
}
/**
* The date the stream specification was last modified.
**/
@ApiModelProperty(value = "The date the stream specification was last modified.")
public Date getUpdate() {
return update;
}
public void setUpdate(Date update) {
this.update = update;
}
/**
* The date and time that the stream specification was last accessed by any Perforce command.
**/
@ApiModelProperty(value = "The date and time that the stream specification was last accessed by any Perforce command.")
public Date getAccess() {
return access;
}
public void setAccess(Date access) {
this.access = access;
}
/**
* The Perforce user or group who owns the stream.\nThe default is the user who created the stream.
**/
@ApiModelProperty(value = "The Perforce user or group who owns the stream.\nThe default is the user who created the stream.")
public String getOwner() {
return owner;
}
public void setOwner(String owner) {
this.owner = owner;
}
/**
* Display name of the stream.\nUnlike the Stream: field, this field can be modified.\nDefaults to the streamname portion of the stream path.
**/
@ApiModelProperty(value = "Display name of the stream.\nUnlike the Stream: field, this field can be modified.\nDefaults to the streamname portion of the stream path.")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
/**
* The parent of this stream.\nMust be none if the stream's `Type:` is mainline, otherwise must be set to an existing stream identifier of the form `//depotname/streamname`.
**/
@ApiModelProperty(value = "The parent of this stream.\nMust be none if the stream's `Type:` is mainline, otherwise must be set to an existing stream identifier of the form `//depotname/streamname`.")
public String getParent() {
return parent;
}
public void setParent(String parent) {
this.parent = parent;
}
/**
* The stream’s type determines the expected flow of change.\nValid stream types are `mainline`, `virtual`, `development`, and `release`.\n\n- `mainline`:\nThe mainline stream is the parent of all streams in the stream depot. Every stream depot must have at least one mainline stream.\n\n- `virtual`:\nVirtual streams allow merging and copying between parent and child streams without storing local data.\nData is passed through to the destination (a non-virtual stream) after applying restrictions on the scope of files defined in the virtual stream’s view.\nBecause virtual streams do not have files in their depot namespace, it is impossible to import a virtual stream.\n\n- `release`:\nMore stable than the mainline.\nRelease streams copy from the parent and merge to the parent.\n\n- `development`:\nLess stable than the mainline.\nDevelopment streams expect to merge from parent streams and copy to the parent.\n\n- `task`:\nTask streams are lightweight short-lived branches that are useful for bug fixing or new features that only modify a small subset of the branch data.\nBecause branched (copied) files are tracked in a set of shadow tables which are later removed, repository metadata is kept to a minimum when using this type of stream.\nWorkspaces associated with task streams see all branched data, but only modified and promoted data is visible to users with access to the stream’s namespace.\nThe default is stream type is development.
**/
@ApiModelProperty(value = "The stream’s type determines the expected flow of change.\nValid stream types are `mainline`, `virtual`, `development`, and `release`.\n\n- `mainline`:\nThe mainline stream is the parent of all streams in the stream depot. Every stream depot must have at least one mainline stream.\n\n- `virtual`:\nVirtual streams allow merging and copying between parent and child streams without storing local data.\nData is passed through to the destination (a non-virtual stream) after applying restrictions on the scope of files defined in the virtual stream’s view.\nBecause virtual streams do not have files in their depot namespace, it is impossible to import a virtual stream.\n\n- `release`:\nMore stable than the mainline.\nRelease streams copy from the parent and merge to the parent.\n\n- `development`:\nLess stable than the mainline.\nDevelopment streams expect to merge from parent streams and copy to the parent.\n\n- `task`:\nTask streams are lightweight short-lived branches that are useful for bug fixing or new features that only modify a small subset of the branch data.\nBecause branched (copied) files are tracked in a set of shadow tables which are later removed, repository metadata is kept to a minimum when using this type of stream.\nWorkspaces associated with task streams see all branched data, but only modified and promoted data is visible to users with access to the stream’s namespace.\nThe default is stream type is development.")
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
/**
* Description of the stream.
**/
@ApiModelProperty(value = "Description of the stream.")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
/**
* Settings that configure stream behavior as follows:\n\n- `[un]locked`:\nEnable/disable other users' ability to edit or delete the stream.\nIf locked, the stream specification cannot be deleted, and only its owner can modify it.\nThe default is unlocked.\n\n- `[all|owner]submit`:\nSpecifies whether all users or only the owner of the stream can submit changes to the stream.\nThe default is allsubmit.\nIf the Owner: of a stream marked ownersubmit is a group, all users who are members of that group can submit changes to the stream.\n\n- `[no]toparent`:\nSpecifies whether integrations from the stream to its parent are expected.\nThe default is toparent.\n\n- `[no]fromparent`:\nSpecifies whether integrations to the stream from its parent are expected.\nThe default is fromparent for mainline and development streams, and nofromparent for release streams.\n\n- `mergeany | mergedown`:\nSpecifies whether the merge flow is restricted or whether merge is permitted from any other stream.\nFor example, the mergeany option would allow a merge from a child to a parent with no warnings.\nA virtual stream must have its flow options set to notoparent and nofromparent.\nFlow options are ignored for mainline streams.
**/
@ApiModelProperty(value = "Settings that configure stream behavior as follows:\n\n- `[un]locked`:\nEnable/disable other users' ability to edit or delete the stream.\nIf locked, the stream specification cannot be deleted, and only its owner can modify it.\nThe default is unlocked.\n\n- `[all|owner]submit`:\nSpecifies whether all users or only the owner of the stream can submit changes to the stream.\nThe default is allsubmit.\nIf the Owner: of a stream marked ownersubmit is a group, all users who are members of that group can submit changes to the stream.\n\n- `[no]toparent`:\nSpecifies whether integrations from the stream to its parent are expected.\nThe default is toparent.\n\n- `[no]fromparent`:\nSpecifies whether integrations to the stream from its parent are expected.\nThe default is fromparent for mainline and development streams, and nofromparent for release streams.\n\n- `mergeany | mergedown`:\nSpecifies whether the merge flow is restricted or whether merge is permitted from any other stream.\nFor example, the mergeany option would allow a merge from a child to a parent with no warnings.\nA virtual stream must have its flow options set to notoparent and nofromparent.\nFlow options are ignored for mainline streams.")
public String getOptions() {
return options;
}
public void setOptions(String options) {
this.options = options;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
StreamsCommand streamsCommand = (StreamsCommand) o;
return Objects.equals(this.stream, streamsCommand.stream) &&
Objects.equals(this.update, streamsCommand.update) &&
Objects.equals(this.access, streamsCommand.access) &&
Objects.equals(this.owner, streamsCommand.owner) &&
Objects.equals(this.name, streamsCommand.name) &&
Objects.equals(this.parent, streamsCommand.parent) &&
Objects.equals(this.type, streamsCommand.type) &&
Objects.equals(this.description, streamsCommand.description) &&
Objects.equals(this.options, streamsCommand.options);
}
@Override
public int hashCode() {
return Objects.hash(stream, update, access, owner, name, parent, type, description, options);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class StreamsCommand {\n");
sb.append(" stream: ").append(toIndentedString(stream)).append("\n");
sb.append(" update: ").append(toIndentedString(update)).append("\n");
sb.append(" access: ").append(toIndentedString(access)).append("\n");
sb.append(" owner: ").append(toIndentedString(owner)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" parent: ").append(toIndentedString(parent)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" options: ").append(toIndentedString(options)).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 ");
}
}