// Code generated by go-swagger; DO NOT EDIT. package models // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // EditBranchProtectionOption EditBranchProtectionOption options for editing a branch protection // // swagger:model EditBranchProtectionOption type EditBranchProtectionOption struct { // approvals whitelist teams ApprovalsWhitelistTeams []string `json:"approvals_whitelist_teams"` // approvals whitelist usernames ApprovalsWhitelistUsernames []string `json:"approvals_whitelist_username"` // block on official review requests BlockOnOfficialReviewRequests bool `json:"block_on_official_review_requests,omitempty"` // block on outdated branch BlockOnOutdatedBranch bool `json:"block_on_outdated_branch,omitempty"` // block on rejected reviews BlockOnRejectedReviews bool `json:"block_on_rejected_reviews,omitempty"` // dismiss stale approvals DismissStaleApprovals bool `json:"dismiss_stale_approvals,omitempty"` // enable approvals whitelist EnableApprovalsWhitelist bool `json:"enable_approvals_whitelist,omitempty"` // enable merge whitelist EnableMergeWhitelist bool `json:"enable_merge_whitelist,omitempty"` // enable push EnablePush bool `json:"enable_push,omitempty"` // enable push whitelist EnablePushWhitelist bool `json:"enable_push_whitelist,omitempty"` // enable status check EnableStatusCheck bool `json:"enable_status_check,omitempty"` // ignore stale approvals IgnoreStaleApprovals bool `json:"ignore_stale_approvals,omitempty"` // merge whitelist teams MergeWhitelistTeams []string `json:"merge_whitelist_teams"` // merge whitelist usernames MergeWhitelistUsernames []string `json:"merge_whitelist_usernames"` // protected file patterns ProtectedFilePatterns string `json:"protected_file_patterns,omitempty"` // push whitelist deploy keys PushWhitelistDeployKeys bool `json:"push_whitelist_deploy_keys,omitempty"` // push whitelist teams PushWhitelistTeams []string `json:"push_whitelist_teams"` // push whitelist usernames PushWhitelistUsernames []string `json:"push_whitelist_usernames"` // require signed commits RequireSignedCommits bool `json:"require_signed_commits,omitempty"` // required approvals RequiredApprovals int64 `json:"required_approvals,omitempty"` // status check contexts StatusCheckContexts []string `json:"status_check_contexts"` // unprotected file patterns UnprotectedFilePatterns string `json:"unprotected_file_patterns,omitempty"` } // Validate validates this edit branch protection option func (m *EditBranchProtectionOption) Validate(formats strfmt.Registry) error { return nil } // ContextValidate validates this edit branch protection option based on context it is used func (m *EditBranchProtectionOption) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation func (m *EditBranchProtectionOption) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } return swag.WriteJSON(m) } // UnmarshalBinary interface implementation func (m *EditBranchProtectionOption) UnmarshalBinary(b []byte) error { var res EditBranchProtectionOption if err := swag.ReadJSON(b, &res); err != nil { return err } *m = res return nil }