Skip to main content

CreateCommitRequest Constructors

An object defining constructors for the CreateCommitRequest class.

CreateCommitRequest()

Initializes a new instance of the CreateCommitRequest class.


CreateCommitRequest(secretKey, branchSecretKey, commitMessage, length, createdBy, createdAt)

Initializes a new instance of the CreateCommitRequest class with complete commit information.

Parameters:

secretKey (required): string
The encrypted secret key for the object being committed.

branchSecretKey (required): string
The encrypted secret key for the branch receiving the commit.

commitMessage (required): string
The message describing the changes in this commit.

length (required): long
The size of the content being committed.

createdBy (optional): long?
The ID of the user creating the commit.

createdAt (optional): DateTimeOffset?
The timestamp when the commit was created.

This constructor, marked with the JsonConstructor attribute for JSON deserialization support, creates a new CreateCommitRequest instance with complete information. It initializes both the essential commit data and optional audit information, allowing for full tracking of the commit creation process.


CreateCommitRequest(secretKey, branchSecretKey, commitMessage, length)

Initializes a new instance of the CreateCommitRequest class with essential commit information.

Parameters:

secretKey (required): string
The encrypted secret key for the object being committed.

branchSecretKey (required): string
The encrypted secret key for the branch receiving the commit.

commitMessage (required): string
The message describing the changes in this commit.

length (required): long
The size of the content being committed.

This constructor creates a new CreateCommitRequest instance by calling the parameterized constructor with null values for createdBy and createdAt. It provides a simpler way to create commits when audit information is not needed, focusing only on the essential commit data and security keys.