From f14b8e537b12b1226d88d8bdafa691523614b4da Mon Sep 17 00:00:00 2001 From: gitnexbot Date: Tue, 17 Jan 2023 00:10:41 +0000 Subject: [PATCH] Synchronizing API and documentation updates --- docs/BranchProtection.md | 3 +- docs/CreateBranchProtectionOption.md | 3 +- .../tea4j/v2/models/BranchProtection.java | 29 +++++++++++++++++-- .../models/CreateBranchProtectionOption.java | 29 +++++++++++++++++-- 4 files changed, 58 insertions(+), 6 deletions(-) diff --git a/docs/BranchProtection.md b/docs/BranchProtection.md index d0b701d..3d212f9 100644 --- a/docs/BranchProtection.md +++ b/docs/BranchProtection.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **blockOnOfficialReviewRequests** | **Boolean** | | [optional] **blockOnOutdatedBranch** | **Boolean** | | [optional] **blockOnRejectedReviews** | **Boolean** | | [optional] -**branchName** | **String** | | [optional] +**branchName** | **String** | Deprecated: true | [optional] **createdAt** | [**Date**](Date.md) | | [optional] **dismissStaleApprovals** | **Boolean** | | [optional] **enableApprovalsWhitelist** | **Boolean** | | [optional] @@ -24,6 +24,7 @@ Name | Type | Description | Notes **pushWhitelistUsernames** | **List<String>** | | [optional] **requireSignedCommits** | **Boolean** | | [optional] **requiredApprovals** | **Long** | | [optional] +**ruleName** | **String** | | [optional] **statusCheckContexts** | **List<String>** | | [optional] **unprotectedFilePatterns** | **String** | | [optional] **updatedAt** | [**Date**](Date.md) | | [optional] diff --git a/docs/CreateBranchProtectionOption.md b/docs/CreateBranchProtectionOption.md index 8665e50..fd62837 100644 --- a/docs/CreateBranchProtectionOption.md +++ b/docs/CreateBranchProtectionOption.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **blockOnOfficialReviewRequests** | **Boolean** | | [optional] **blockOnOutdatedBranch** | **Boolean** | | [optional] **blockOnRejectedReviews** | **Boolean** | | [optional] -**branchName** | **String** | | [optional] +**branchName** | **String** | Deprecated: true | [optional] **dismissStaleApprovals** | **Boolean** | | [optional] **enableApprovalsWhitelist** | **Boolean** | | [optional] **enableMergeWhitelist** | **Boolean** | | [optional] @@ -23,5 +23,6 @@ Name | Type | Description | Notes **pushWhitelistUsernames** | **List<String>** | | [optional] **requireSignedCommits** | **Boolean** | | [optional] **requiredApprovals** | **Long** | | [optional] +**ruleName** | **String** | | [optional] **statusCheckContexts** | **List<String>** | | [optional] **unprotectedFilePatterns** | **String** | | [optional] diff --git a/src/main/java/org/gitnex/tea4j/v2/models/BranchProtection.java b/src/main/java/org/gitnex/tea4j/v2/models/BranchProtection.java index 68d430a..5da9efe 100644 --- a/src/main/java/org/gitnex/tea4j/v2/models/BranchProtection.java +++ b/src/main/java/org/gitnex/tea4j/v2/models/BranchProtection.java @@ -88,6 +88,9 @@ public class BranchProtection implements Serializable { @SerializedName("required_approvals") private Long requiredApprovals = null; + @SerializedName("rule_name") + private String ruleName = null; + @SerializedName("status_check_contexts") private List statusCheckContexts = null; @@ -214,11 +217,11 @@ public class BranchProtection implements Serializable { } /** - * Get branchName + * Deprecated: true * * @return branchName */ - @Schema(description = "") + @Schema(description = "Deprecated: true") public String getBranchName() { return branchName; } @@ -544,6 +547,25 @@ public class BranchProtection implements Serializable { this.requiredApprovals = requiredApprovals; } + public BranchProtection ruleName(String ruleName) { + this.ruleName = ruleName; + return this; + } + + /** + * Get ruleName + * + * @return ruleName + */ + @Schema(description = "") + public String getRuleName() { + return ruleName; + } + + public void setRuleName(String ruleName) { + this.ruleName = ruleName; + } + public BranchProtection statusCheckContexts(List statusCheckContexts) { this.statusCheckContexts = statusCheckContexts; return this; @@ -641,6 +663,7 @@ public class BranchProtection implements Serializable { && Objects.equals(this.pushWhitelistUsernames, branchProtection.pushWhitelistUsernames) && Objects.equals(this.requireSignedCommits, branchProtection.requireSignedCommits) && Objects.equals(this.requiredApprovals, branchProtection.requiredApprovals) + && Objects.equals(this.ruleName, branchProtection.ruleName) && Objects.equals(this.statusCheckContexts, branchProtection.statusCheckContexts) && Objects.equals(this.unprotectedFilePatterns, branchProtection.unprotectedFilePatterns) && Objects.equals(this.updatedAt, branchProtection.updatedAt); @@ -670,6 +693,7 @@ public class BranchProtection implements Serializable { pushWhitelistUsernames, requireSignedCommits, requiredApprovals, + ruleName, statusCheckContexts, unprotectedFilePatterns, updatedAt); @@ -731,6 +755,7 @@ public class BranchProtection implements Serializable { .append(toIndentedString(requireSignedCommits)) .append("\n"); sb.append(" requiredApprovals: ").append(toIndentedString(requiredApprovals)).append("\n"); + sb.append(" ruleName: ").append(toIndentedString(ruleName)).append("\n"); sb.append(" statusCheckContexts: ") .append(toIndentedString(statusCheckContexts)) .append("\n"); diff --git a/src/main/java/org/gitnex/tea4j/v2/models/CreateBranchProtectionOption.java b/src/main/java/org/gitnex/tea4j/v2/models/CreateBranchProtectionOption.java index 9f8aa3d..1b46dd9 100644 --- a/src/main/java/org/gitnex/tea4j/v2/models/CreateBranchProtectionOption.java +++ b/src/main/java/org/gitnex/tea4j/v2/models/CreateBranchProtectionOption.java @@ -84,6 +84,9 @@ public class CreateBranchProtectionOption implements Serializable { @SerializedName("required_approvals") private Long requiredApprovals = null; + @SerializedName("rule_name") + private String ruleName = null; + @SerializedName("status_check_contexts") private List statusCheckContexts = null; @@ -212,11 +215,11 @@ public class CreateBranchProtectionOption implements Serializable { } /** - * Get branchName + * Deprecated: true * * @return branchName */ - @Schema(description = "") + @Schema(description = "Deprecated: true") public String getBranchName() { return branchName; } @@ -526,6 +529,25 @@ public class CreateBranchProtectionOption implements Serializable { this.requiredApprovals = requiredApprovals; } + public CreateBranchProtectionOption ruleName(String ruleName) { + this.ruleName = ruleName; + return this; + } + + /** + * Get ruleName + * + * @return ruleName + */ + @Schema(description = "") + public String getRuleName() { + return ruleName; + } + + public void setRuleName(String ruleName) { + this.ruleName = ruleName; + } + public CreateBranchProtectionOption statusCheckContexts(List statusCheckContexts) { this.statusCheckContexts = statusCheckContexts; return this; @@ -618,6 +640,7 @@ public class CreateBranchProtectionOption implements Serializable { && Objects.equals( this.requireSignedCommits, createBranchProtectionOption.requireSignedCommits) && Objects.equals(this.requiredApprovals, createBranchProtectionOption.requiredApprovals) + && Objects.equals(this.ruleName, createBranchProtectionOption.ruleName) && Objects.equals( this.statusCheckContexts, createBranchProtectionOption.statusCheckContexts) && Objects.equals( @@ -647,6 +670,7 @@ public class CreateBranchProtectionOption implements Serializable { pushWhitelistUsernames, requireSignedCommits, requiredApprovals, + ruleName, statusCheckContexts, unprotectedFilePatterns); } @@ -706,6 +730,7 @@ public class CreateBranchProtectionOption implements Serializable { .append(toIndentedString(requireSignedCommits)) .append("\n"); sb.append(" requiredApprovals: ").append(toIndentedString(requiredApprovals)).append("\n"); + sb.append(" ruleName: ").append(toIndentedString(ruleName)).append("\n"); sb.append(" statusCheckContexts: ") .append(toIndentedString(statusCheckContexts)) .append("\n");