Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: update branch proto (#9670)

Danny Xu63e984de612c
diff --git a/backend/api/v1/branch_service.go b/backend/api/v1/branch_service.go
index fc931577c8..95547e8c58 100644
--- a/backend/api/v1/branch_service.go
+++ b/backend/api/v1/branch_service.go
@@ -104,6 +104,11 @@ func (s *BranchService) ListBranches(ctx context.Context, request *v1pb.ListBran
// CreateBranch creates a new branch.
func (s *BranchService) CreateBranch(ctx context.Context, request *v1pb.CreateBranchRequest) (*v1pb.Branch, error) {
+ branchID := request.BranchId
+ // TODO(d): regex check.
+ if branchID == "" {
+ return nil, status.Errorf(codes.InvalidArgument, "branch ID is empty")
+ }
projectID, err := common.GetProjectID(request.Parent)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, err.Error())
@@ -116,11 +121,6 @@ func (s *BranchService) CreateBranch(ctx context.Context, request *v1pb.CreateBr
return nil, err
}
- // TODO(d): move to resource_id in the request.
- projectID, branchID, err := common.GetProjectAndBranchID(request.Branch.Name)
- if err != nil {
- return nil, status.Errorf(codes.InvalidArgument, err.Error())
- }
branch, err := s.store.GetBranch(ctx, &store.FindBranchMessage{ProjectID: &projectID, ResourceID: &branchID, LoadFull: false})
if err != nil {
return nil, err
@@ -310,48 +310,49 @@ func (s *BranchService) UpdateBranch(ctx context.Context, request *v1pb.UpdateBr
// MergeBranch merges a personal draft branch to the target branch.
func (s *BranchService) MergeBranch(ctx context.Context, request *v1pb.MergeBranchRequest) (*v1pb.Branch, error) {
- projectID, branchID, err := common.GetProjectAndBranchID(request.Name)
+ baseProjectID, baseBranchID, err := common.GetProjectAndBranchID(request.Name)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, err.Error())
}
- if _, err := s.getProject(ctx, projectID); err != nil {
+ baseProject, err := s.getProject(ctx, baseProjectID)
+ if err != nil {
return nil, err
}
- if err := s.checkBranchPermission(ctx, projectID); err != nil {
+ if err := s.checkBranchPermission(ctx, baseProjectID); err != nil {
return nil, err
}
- branch, err := s.store.GetBranch(ctx, &store.FindBranchMessage{ProjectID: &projectID, ResourceID: &branchID, LoadFull: true})
+ baseBranch, err := s.store.GetBranch(ctx, &store.FindBranchMessage{ProjectID: &baseProjectID, ResourceID: &baseBranchID, LoadFull: true})
if err != nil {
return nil, err
}
- if branch == nil {
- return nil, status.Errorf(codes.NotFound, "branch %q not found", branchID)
+ if baseBranch == nil {
+ return nil, status.Errorf(codes.NotFound, "branch %q not found", baseBranchID)
}
- targetProjectID, targetBranchID, err := common.GetProjectAndBranchID(request.TargetName)
+ headProjectID, headBranchID, err := common.GetProjectAndBranchID(request.HeadBranch)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, err.Error())
}
- targetProject, err := s.getProject(ctx, targetProjectID)
+ _, err = s.getProject(ctx, headProjectID)
if err != nil {
return nil, err
}
- if err := s.checkBranchPermission(ctx, targetProjectID); err != nil {
+ if err := s.checkBranchPermission(ctx, headProjectID); err != nil {
return nil, err
}
- targetBranch, err := s.store.GetBranch(ctx, &store.FindBranchMessage{ProjectID: &targetProjectID, ResourceID: &targetBranchID, LoadFull: true})
+ headBranch, err := s.store.GetBranch(ctx, &store.FindBranchMessage{ProjectID: &headProjectID, ResourceID: &headBranchID, LoadFull: true})
if err != nil {
return nil, err
}
- if targetBranch == nil {
- return nil, status.Errorf(codes.NotFound, "branch %q not found", targetBranchID)
+ if headBranch == nil {
+ return nil, status.Errorf(codes.NotFound, "branch %q not found", headBranchID)
}
- // Restrict merging only when the target branch is not updated.
+ // Restrict merging only when the head branch is not updated.
// Maybe we can support auto-merging in the future.
- baseMetadata := convertDatabaseMetadata(nil, branch.Base.Metadata, nil, v1pb.DatabaseMetadataView_DATABASE_METADATA_VIEW_FULL, nil)
- headMetadata := convertDatabaseMetadata(nil, branch.Head.Metadata, nil, v1pb.DatabaseMetadataView_DATABASE_METADATA_VIEW_FULL, nil)
- targetHeadMetadata := convertDatabaseMetadata(nil, targetBranch.Head.Metadata, nil, v1pb.DatabaseMetadataView_DATABASE_METADATA_VIEW_FULL, nil)
+ baseMetadata := convertDatabaseMetadata(nil, headBranch.Base.Metadata, nil, v1pb.DatabaseMetadataView_DATABASE_METADATA_VIEW_FULL, nil)
+ headMetadata := convertDatabaseMetadata(nil, headBranch.Head.Metadata, nil, v1pb.DatabaseMetadataView_DATABASE_METADATA_VIEW_FULL, nil)
+ targetHeadMetadata := convertDatabaseMetadata(nil, baseBranch.Head.Metadata, nil, v1pb.DatabaseMetadataView_DATABASE_METADATA_VIEW_FULL, nil)
mergedTarget, err := tryMerge(baseMetadata, headMetadata, targetHeadMetadata)
if err != nil {
return nil, status.Errorf(codes.FailedPrecondition, fmt.Sprintf("failed to merge branch: %v", err))
@@ -359,7 +360,7 @@ func (s *BranchService) MergeBranch(ctx context.Context, request *v1pb.MergeBran
if mergedTarget == nil {
return nil, status.Errorf(codes.FailedPrecondition, "failed to merge branch: no change")
}
- mergedTargetSchema, err := getDesignSchema(v1pb.Engine(branch.Engine), string(targetBranch.Head.Schema), mergedTarget)
+ mergedTargetSchema, err := getDesignSchema(v1pb.Engine(baseBranch.Engine), string(headBranch.Head.Schema), mergedTarget)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to convert merged metadata to schema string, %v", err)
}
@@ -370,8 +371,8 @@ func (s *BranchService) MergeBranch(ctx context.Context, request *v1pb.MergeBran
return nil, status.Errorf(codes.Internal, "principal ID not found")
}
if err := s.store.UpdateBranch(ctx, &store.UpdateBranchMessage{
- ProjectID: targetProjectID,
- ResourceID: targetBranchID,
+ ProjectID: baseProjectID,
+ ResourceID: baseBranchID,
UpdaterID: principalID,
Head: &storepb.BranchSnapshot{
Schema: []byte(mergedTargetSchema),
@@ -381,11 +382,11 @@ func (s *BranchService) MergeBranch(ctx context.Context, request *v1pb.MergeBran
return nil, status.Errorf(codes.Internal, "failed update branch, error %v", err)
}
- targetBranchV1, err := s.convertBranchToBranch(ctx, targetProject, targetBranch, v1pb.BranchView_BRANCH_VIEW_FULL)
+ v1Branch, err := s.convertBranchToBranch(ctx, baseProject, baseBranch, v1pb.BranchView_BRANCH_VIEW_FULL)
if err != nil {
return nil, err
}
- return targetBranchV1, nil
+ return v1Branch, nil
}
// DeleteBranch deletes an existing branch.
diff --git a/frontend/src/components/Branch/BranchDetailView.vue b/frontend/src/components/Branch/BranchDetailView.vue
index 661faf1646..038aa3f48c 100644
--- a/frontend/src/components/Branch/BranchDetailView.vue
+++ b/frontend/src/components/Branch/BranchDetailView.vue
@@ -392,8 +392,8 @@ const handleSaveBranch = async () => {
});
try {
await branchStore.mergeBranch({
- name: newBranch.name,
- targetName: schemaDesign.value.name,
+ name: schemaDesign.value.name,
+ headBranch: newBranch.name,
});
} catch (error: any) {
// If there is conflict, we need to show the conflict and let user resolve it.
diff --git a/frontend/src/components/Branch/MergeBranchPanel.vue b/frontend/src/components/Branch/MergeBranchPanel.vue
index 67a18d5027..fa77fa1518 100644
--- a/frontend/src/components/Branch/MergeBranchPanel.vue
+++ b/frontend/src/components/Branch/MergeBranchPanel.vue
@@ -208,8 +208,8 @@ const handleMergeBranch = async () => {
try {
await branchStore.mergeBranch({
- name: sourceBranch.value.name,
- targetName: targetBranch.value.name,
+ name: targetBranch.value.name,
+ headBranch: sourceBranch.value.name,
});
} catch (error: any) {
// If there is conflict, we need to show the conflict and let user resolve it.
diff --git a/frontend/src/types/proto/v1/branch_service.ts b/frontend/src/types/proto/v1/branch_service.ts
index dcc899887c..56b0fcf8fc 100644
--- a/frontend/src/types/proto/v1/branch_service.ts
+++ b/frontend/src/types/proto/v1/branch_service.ts
@@ -158,7 +158,15 @@ export interface CreateBranchRequest {
* Format: project/{project}
*/
parent: string;
- branch: Branch | undefined;
+ branch:
+ | Branch
+ | undefined;
+ /**
+ * The ID to use for the branch, which will become the final component of
+ * the branch's resource name.
+ * Format: [a-zA-Z][a-zA-Z0-9-_/]+.
+ */
+ branchId: string;
}
export interface UpdateBranchRequest {
@@ -177,15 +185,15 @@ export interface UpdateBranchRequest {
export interface MergeBranchRequest {
/**
- * The name of the branch to merge.
+ * The name of the base branch to merge to.
* Format: projects/{project}/branches/{branch}
*/
name: string;
/**
- * The target branch to merge into.
+ * The head branch to merge from.
* Format: projects/{project}/branches/{branch}
*/
- targetName: string;
+ headBranch: string;
}
export interface DeleteBranchRequest {
@@ -741,7 +749,7 @@ export const ListBranchesResponse = {
};
function createBaseCreateBranchRequest(): CreateBranchRequest {
- return { parent: "", branch: undefined };
+ return { parent: "", branch: undefined, branchId: "" };
}
export const CreateBranchRequest = {
@@ -752,6 +760,9 @@ export const CreateBranchRequest = {
if (message.branch !== undefined) {
Branch.encode(message.branch, writer.uint32(18).fork()).ldelim();
}
+ if (message.branchId !== "") {
+ writer.uint32(26).string(message.branchId);
+ }
return writer;
},
@@ -776,6 +787,13 @@ export const CreateBranchRequest = {
message.branch = Branch.decode(reader, reader.uint32());
continue;
+ case 3:
+ if (tag !== 26) {
+ break;
+ }
+
+ message.branchId = reader.string();
+ continue;
}
if ((tag & 7) === 4 || tag === 0) {
break;
@@ -789,6 +807,7 @@ export const CreateBranchRequest = {
return {
parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
branch: isSet(object.branch) ? Branch.fromJSON(object.branch) : undefined,
+ branchId: isSet(object.branchId) ? globalThis.String(object.branchId) : "",
};
},
@@ -800,6 +819,9 @@ export const CreateBranchRequest = {
if (message.branch !== undefined) {
obj.branch = Branch.toJSON(message.branch);
}
+ if (message.branchId !== "") {
+ obj.branchId = message.branchId;
+ }
return obj;
},
@@ -812,6 +834,7 @@ export const CreateBranchRequest = {
message.branch = (object.branch !== undefined && object.branch !== null)
? Branch.fromPartial(object.branch)
: undefined;
+ message.branchId = object.branchId ?? "";
return message;
},
};
@@ -893,7 +916,7 @@ export const UpdateBranchRequest = {
};
function createBaseMergeBranchRequest(): MergeBranchRequest {
- return { name: "", targetName: "" };
+ return { name: "", headBranch: "" };
}
export const MergeBranchRequest = {
@@ -901,8 +924,8 @@ export const MergeBranchRequest = {
if (message.name !== "") {
writer.uint32(10).string(message.name);
}
- if (message.targetName !== "") {
- writer.uint32(18).string(message.targetName);
+ if (message.headBranch !== "") {
+ writer.uint32(18).string(message.headBranch);
}
return writer;
},
@@ -926,7 +949,7 @@ export const MergeBranchRequest = {
break;
}
- message.targetName = reader.string();
+ message.headBranch = reader.string();
continue;
}
if ((tag & 7) === 4 || tag === 0) {
@@ -940,7 +963,7 @@ export const MergeBranchRequest = {
fromJSON(object: any): MergeBranchRequest {
return {
name: isSet(object.name) ? globalThis.String(object.name) : "",
- targetName: isSet(object.targetName) ? globalThis.String(object.targetName) : "",
+ headBranch: isSet(object.headBranch) ? globalThis.String(object.headBranch) : "",
};
},
@@ -949,8 +972,8 @@ export const MergeBranchRequest = {
if (message.name !== "") {
obj.name = message.name;
}
- if (message.targetName !== "") {
- obj.targetName = message.targetName;
+ if (message.headBranch !== "") {
+ obj.headBranch = message.headBranch;
}
return obj;
},
@@ -961,7 +984,7 @@ export const MergeBranchRequest = {
fromPartial(object: DeepPartial<MergeBranchRequest>): MergeBranchRequest {
const message = createBaseMergeBranchRequest();
message.name = object.name ?? "";
- message.targetName = object.targetName ?? "";
+ message.headBranch = object.headBranch ?? "";
return message;
},
};
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index 9858372ed9..17744324e3 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -3450,6 +3450,7 @@ The type of the backup.
| ----- | ---- | ----- | ----------- |
| parent | [string](#string) | | The parent, which owns this collection of branches. Format: project/{project} |
| branch | [Branch](#bytebase-v1-Branch) | | |
+| branch_id | [string](#string) | | The ID to use for the branch, which will become the final component of the branch&#39;s resource name. Format: [a-zA-Z][a-zA-Z0-9-_/]&#43;. |
@@ -3563,8 +3564,8 @@ When paginating, all other parameters provided to `ListBranches` must match the
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the branch to merge. Format: projects/{project}/branches/{branch} |
-| target_name | [string](#string) | | The target branch to merge into. Format: projects/{project}/branches/{branch} |
+| name | [string](#string) | | The name of the base branch to merge to. Format: projects/{project}/branches/{branch} |
+| head_branch | [string](#string) | | The head branch to merge from. Format: projects/{project}/branches/{branch} |
diff --git a/proto/generated-go/v1/branch_service.pb.go b/proto/generated-go/v1/branch_service.pb.go
index 031bd2b6f6..dffb80ad36 100644
--- a/proto/generated-go/v1/branch_service.pb.go
+++ b/proto/generated-go/v1/branch_service.pb.go
@@ -456,6 +456,10 @@ type CreateBranchRequest struct {
// Format: project/{project}
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
Branch *Branch `protobuf:"bytes,2,opt,name=branch,proto3" json:"branch,omitempty"`
+ // The ID to use for the branch, which will become the final component of
+ // the branch's resource name.
+ // Format: [a-zA-Z][a-zA-Z0-9-_/]+.
+ BranchId string `protobuf:"bytes,3,opt,name=branch_id,json=branchId,proto3" json:"branch_id,omitempty"`
}
func (x *CreateBranchRequest) Reset() {
@@ -504,6 +508,13 @@ func (x *CreateBranchRequest) GetBranch() *Branch {
return nil
}
+func (x *CreateBranchRequest) GetBranchId() string {
+ if x != nil {
+ return x.BranchId
+ }
+ return ""
+}
+
type UpdateBranchRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -569,12 +580,12 @@ type MergeBranchRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- // The name of the branch to merge.
+ // The name of the base branch to merge to.
// Format: projects/{project}/branches/{branch}
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- // The target branch to merge into.
+ // The head branch to merge from.
// Format: projects/{project}/branches/{branch}
- TargetName string `protobuf:"bytes,2,opt,name=target_name,json=targetName,proto3" json:"target_name,omitempty"`
+ HeadBranch string `protobuf:"bytes,2,opt,name=head_branch,json=headBranch,proto3" json:"head_branch,omitempty"`
}
func (x *MergeBranchRequest) Reset() {
@@ -616,9 +627,9 @@ func (x *MergeBranchRequest) GetName() string {
return ""
}
-func (x *MergeBranchRequest) GetTargetName() string {
+func (x *MergeBranchRequest) GetHeadBranch() string {
if x != nil {
- return x.TargetName
+ return x.HeadBranch
}
return ""
}
@@ -867,112 +878,113 @@ var file_v1_branch_service_proto_rawDesc = []byte{
0x68, 0x52, 0x08, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e,
0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f,
- 0x6b, 0x65, 0x6e, 0x22, 0x5a, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x72, 0x61,
+ 0x6b, 0x65, 0x6e, 0x22, 0x77, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x72, 0x61,
0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61,
0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65,
0x6e, 0x74, 0x12, 0x2b, 0x0a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
- 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22,
- 0x84, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63,
- 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
- 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x42, 0x03, 0xe0, 0x41,
- 0x02, 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64,
- 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
- 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61,
- 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x53, 0x0a, 0x12, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x42,
- 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x04,
- 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52,
- 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f,
- 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52,
- 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x2e, 0x0a, 0x13, 0x44,
- 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
- 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xdc, 0x01, 0x0a, 0x13,
- 0x44, 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65,
- 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x62,
- 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62,
- 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x03, 0xe0, 0x41, 0x02,
- 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
- 0x12, 0x4b, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64,
- 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65,
+ 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12,
+ 0x1b, 0x0a, 0x09, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x08, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x49, 0x64, 0x22, 0x84, 0x01, 0x0a,
+ 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06,
+ 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
+ 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69,
+ 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d,
+ 0x61, 0x73, 0x6b, 0x22, 0x53, 0x0a, 0x12, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x42, 0x72, 0x61, 0x6e,
+ 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
+ 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61,
+ 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63,
+ 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x68, 0x65,
+ 0x61, 0x64, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x2e, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65,
+ 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
+ 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0,
+ 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xdc, 0x01, 0x0a, 0x13, 0x44, 0x69, 0x66,
+ 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x12, 0x4b, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65,
0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,
- 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0e, 0x74,
- 0x61, 0x72, 0x67, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2b, 0x0a,
- 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e,
- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x67, 0x69,
- 0x6e, 0x65, 0x52, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x22, 0x2a, 0x0a, 0x14, 0x44, 0x69,
- 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x69, 0x66, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x04, 0x64, 0x69, 0x66, 0x66, 0x2a, 0x56, 0x0a, 0x0a, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68,
- 0x56, 0x69, 0x65, 0x77, 0x12, 0x1b, 0x0a, 0x17, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x5f, 0x56,
- 0x49, 0x45, 0x57, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10,
- 0x00, 0x12, 0x15, 0x0a, 0x11, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x5f, 0x56, 0x49, 0x45, 0x57,
- 0x5f, 0x42, 0x41, 0x53, 0x49, 0x43, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x52, 0x41, 0x4e,
- 0x43, 0x48, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x5f, 0x46, 0x55, 0x4c, 0x4c, 0x10, 0x02, 0x32, 0xa5,
- 0x07, 0x0a, 0x0d, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
- 0x12, 0x70, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x1d, 0x2e,
- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42,
- 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x62,
- 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63,
- 0x68, 0x22, 0x2f, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22,
- 0x12, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a,
- 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x2f,
- 0x2a, 0x7d, 0x12, 0x80, 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63,
- 0x68, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
- 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
- 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73,
- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0xda, 0x41, 0x00, 0x82, 0xd3, 0xe4,
- 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74,
- 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x62, 0x72, 0x61,
- 0x6e, 0x63, 0x68, 0x65, 0x73, 0x12, 0x85, 0x01, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
- 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63,
- 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x3e, 0xda,
- 0x41, 0x0d, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x82,
- 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x1e, 0x2f,
- 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65,
- 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x93, 0x01,
- 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x20,
- 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64,
- 0x61, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x1a, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42,
- 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x4c, 0xda, 0x41, 0x12, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68,
- 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93,
- 0x02, 0x31, 0x3a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x32, 0x27, 0x2f, 0x76, 0x31, 0x2f,
- 0x7b, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f,
+ 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0e, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x4b, 0x0a,
+ 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67,
+ 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2b, 0x0a, 0x06, 0x65, 0x6e,
+ 0x67, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x62, 0x79, 0x74,
+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52,
+ 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x22, 0x2a, 0x0a, 0x14, 0x44, 0x69, 0x66, 0x66, 0x4d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0x12, 0x0a, 0x04, 0x64, 0x69, 0x66, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64,
+ 0x69, 0x66, 0x66, 0x2a, 0x56, 0x0a, 0x0a, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x56, 0x69, 0x65,
+ 0x77, 0x12, 0x1b, 0x0a, 0x17, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x5f, 0x56, 0x49, 0x45, 0x57,
+ 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15,
+ 0x0a, 0x11, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x5f, 0x42, 0x41,
+ 0x53, 0x49, 0x43, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x5f,
+ 0x56, 0x49, 0x45, 0x57, 0x5f, 0x46, 0x55, 0x4c, 0x4c, 0x10, 0x02, 0x32, 0xa5, 0x07, 0x0a, 0x0d,
+ 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x70, 0x0a,
+ 0x09, 0x47, 0x65, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x1d, 0x2e, 0x62, 0x79, 0x74,
+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x72, 0x61, 0x6e,
+ 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65,
+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x2f,
+ 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f,
+ 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74,
+ 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12,
+ 0x80, 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73,
+ 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c,
+ 0x69, 0x73, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
+ 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0xda, 0x41, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22,
+ 0x12, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72,
+ 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68,
+ 0x65, 0x73, 0x12, 0x85, 0x01, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x72, 0x61,
+ 0x6e, 0x63, 0x68, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
+ 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
+ 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x3e, 0xda, 0x41, 0x0d, 0x70,
+ 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x82, 0xd3, 0xe4, 0x93,
+ 0x02, 0x28, 0x3a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x1e, 0x2f, 0x76, 0x31, 0x2f,
+ 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73,
+ 0x2f, 0x2a, 0x7d, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x93, 0x01, 0x0a, 0x0c, 0x55,
+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x20, 0x2e, 0x62, 0x79,
+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
+ 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e,
+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x72, 0x61, 0x6e,
+ 0x63, 0x68, 0x22, 0x4c, 0xda, 0x41, 0x12, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x2c, 0x75, 0x70,
+ 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x3a,
+ 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x32, 0x27, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x62, 0x72,
+ 0x61, 0x6e, 0x63, 0x68, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63,
+ 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x2f, 0x2a, 0x7d,
+ 0x12, 0x86, 0x01, 0x0a, 0x0b, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68,
+ 0x12, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d,
+ 0x65, 0x72, 0x67, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x1a, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,
+ 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x41, 0xda, 0x41, 0x10, 0x6e, 0x61, 0x6d, 0x65, 0x2c,
+ 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02,
+ 0x28, 0x22, 0x26, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f,
0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73,
- 0x2f, 0x2a, 0x7d, 0x12, 0x86, 0x01, 0x0a, 0x0b, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x42, 0x72, 0x61,
- 0x6e, 0x63, 0x68, 0x12, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
- 0x31, 0x2e, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
- 0x76, 0x31, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x41, 0xda, 0x41, 0x10, 0x6e, 0x61,
- 0x6d, 0x65, 0x2c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3,
- 0xe4, 0x93, 0x02, 0x28, 0x22, 0x26, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
- 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63,
- 0x68, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x12, 0x79, 0x0a, 0x0c,
- 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x20, 0x2e, 0x62,
- 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74,
- 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
- 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2f, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82,
- 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x2a, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65,
- 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x72, 0x61, 0x6e,
- 0x63, 0x68, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x7d, 0x0a, 0x0c, 0x44, 0x69, 0x66, 0x66, 0x4d,
- 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
- 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
- 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65,
- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61,
- 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3,
- 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x68,
- 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x3a, 0x64, 0x69, 0x66, 0x66, 0x4d, 0x65,
- 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
- 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x33,
+ 0x2f, 0x2a, 0x7d, 0x3a, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x12, 0x79, 0x0a, 0x0c, 0x44, 0x65, 0x6c,
+ 0x65, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65,
+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x72,
+ 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d,
+ 0x70, 0x74, 0x79, 0x22, 0x2f, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93,
+ 0x02, 0x22, 0x2a, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72,
+ 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65,
+ 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x7d, 0x0a, 0x0c, 0x44, 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02,
+ 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61,
+ 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x3a, 0x64, 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64,
+ 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
diff --git a/proto/generated-go/v1/branch_service.pb.gw.go b/proto/generated-go/v1/branch_service.pb.gw.go
index c7c9792cef..3774823918 100644
--- a/proto/generated-go/v1/branch_service.pb.gw.go
+++ b/proto/generated-go/v1/branch_service.pb.gw.go
@@ -153,6 +153,10 @@ func local_request_BranchService_ListBranches_0(ctx context.Context, marshaler r
}
+var (
+ filter_BranchService_CreateBranch_0 = &utilities.DoubleArray{Encoding: map[string]int{"branch": 0, "parent": 1}, Base: []int{1, 2, 4, 0, 0, 0, 0}, Check: []int{0, 1, 1, 2, 2, 3, 3}}
+)
+
func request_BranchService_CreateBranch_0(ctx context.Context, marshaler runtime.Marshaler, client BranchServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq CreateBranchRequest
var metadata runtime.ServerMetadata
@@ -182,6 +186,13 @@ func request_BranchService_CreateBranch_0(ctx context.Context, marshaler runtime
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)
}
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BranchService_CreateBranch_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
msg, err := client.CreateBranch(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
@@ -216,6 +227,13 @@ func local_request_BranchService_CreateBranch_0(ctx context.Context, marshaler r
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)
}
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BranchService_CreateBranch_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
msg, err := server.CreateBranch(ctx, &protoReq)
return msg, metadata, err
diff --git a/proto/v1/branch_service.proto b/proto/v1/branch_service.proto
index 98a7883784..cc09a63712 100644
--- a/proto/v1/branch_service.proto
+++ b/proto/v1/branch_service.proto
@@ -165,6 +165,11 @@ message CreateBranchRequest {
string parent = 1;
Branch branch = 2;
+
+ // The ID to use for the branch, which will become the final component of
+ // the branch's resource name.
+ // Format: [a-zA-Z][a-zA-Z0-9-_/]+.
+ string branch_id = 3;
}
message UpdateBranchRequest {
@@ -179,13 +184,13 @@ message UpdateBranchRequest {
}
message MergeBranchRequest {
- // The name of the branch to merge.
+ // The name of the base branch to merge to.
// Format: projects/{project}/branches/{branch}
string name = 1 [(google.api.field_behavior) = REQUIRED];
- // The target branch to merge into.
+ // The head branch to merge from.
// Format: projects/{project}/branches/{branch}
- string target_name = 2 [(google.api.field_behavior) = REQUIRED];
+ string head_branch = 2 [(google.api.field_behavior) = REQUIRED];
}
message DeleteBranchRequest {