Record Class WorkspaceDiffFileChange
java.lang.Object
java.lang.Record
com.github.copilot.generated.rpc.WorkspaceDiffFileChange
@Generated("copilot-sdk-codegen")
public record WorkspaceDiffFileChange(String path, String diff, WorkspaceDiffFileChangeType changeType, String oldPath, Boolean isTruncated, WorkspaceDiffContents contents)
extends Record
A single changed file and its unified diff.
- Since:
- 1.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionWorkspaceDiffFileChange(String path, String diff, WorkspaceDiffFileChangeType changeType, String oldPath, Boolean isTruncated) Creates a record with the components it had before later optional fields were added.WorkspaceDiffFileChange(String path, String diff, WorkspaceDiffFileChangeType changeType, String oldPath, Boolean isTruncated, WorkspaceDiffContents contents) Creates an instance of aWorkspaceDiffFileChangerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thechangeTyperecord component.contents()Returns the value of thecontentsrecord component.diff()Returns the value of thediffrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theisTruncatedrecord component.oldPath()Returns the value of theoldPathrecord component.path()Returns the value of thepathrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
WorkspaceDiffFileChange
public WorkspaceDiffFileChange(String path, String diff, WorkspaceDiffFileChangeType changeType, String oldPath, Boolean isTruncated) Creates a record with the components it had before later optional fields were added.- Parameters:
path- Path to the changed file, relative to the workspace root when the file lives under it. A file changed outside the workspace root keeps a `../`-relative path, or an absolute path when no relative path exists (for example a different Windows drive).diff- Unified diff content for the file. Empty when the diff was truncated.changeType- Type of change represented by this file diff.oldPath- Original file path for renamed files.isTruncated- Whether the diff content was omitted because it exceeded the per-file size limit.
-
WorkspaceDiffFileChange
public WorkspaceDiffFileChange(String path, String diff, WorkspaceDiffFileChangeType changeType, String oldPath, Boolean isTruncated, WorkspaceDiffContents contents) Creates an instance of aWorkspaceDiffFileChangerecord class.- Parameters:
path- the value for thepathrecord componentdiff- the value for thediffrecord componentchangeType- the value for thechangeTyperecord componentoldPath- the value for theoldPathrecord componentisTruncated- the value for theisTruncatedrecord componentcontents- the value for thecontentsrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
diff
Returns the value of thediffrecord component.- Returns:
- the value of the
diffrecord component
-
changeType
Returns the value of thechangeTyperecord component.- Returns:
- the value of the
changeTyperecord component
-
oldPath
Returns the value of theoldPathrecord component.- Returns:
- the value of the
oldPathrecord component
-
isTruncated
Returns the value of theisTruncatedrecord component.- Returns:
- the value of the
isTruncatedrecord component
-
contents
Returns the value of thecontentsrecord component.- Returns:
- the value of the
contentsrecord component
-