func (permissions *Roles) BreakInheritance(copyRoleAssignments bool, clearSubScopes bool) error {
	client := NewHTTPClient(permissions.client)
	endpoint := fmt.Sprintf(
		"%s/BreakRoleInheritance(copyroleassignments=%t,clearsubscopes=%t)",
		permissions.endpoint,
		copyRoleAssignments,
		clearSubScopes,
	)
	_, err := client.Post(endpoint, nil, permissions.config)
	return err
}
BreakInheritance breaks permissions inheritance for this securable object
`copyRoleAssignments` - if true the permissions are copied from the current parent scope
`clearSubScopes` - true to make all child securable objects inherit role assignments from the current object
package api
import (
	"encoding/json"
	"fmt"
	"github.com/koltyakov/gosip"
)
var RoleTypeKinds = struct {
	None          int
	Guest         int
	Reader        int
	Contributor   int
	WebDesigner   int
	Administrator int
	Editor        int
	System        int
}{
	None:          0,
	Guest:         1,
	Reader:        2,
	Contributor:   3,
	WebDesigner:   4,
	Administrator: 5,
	Editor:        6,
	System:        7,
}
type Roles struct {
	client   *gosip.SPClient
	config   *RequestConfig
	endpoint string
}
func NewRoles(client *gosip.SPClient, endpoint string, config *RequestConfig) *Roles {
	return &Roles{
		client:   client,
		endpoint: endpoint,
		config:   config,
	}
}
func (permissions *Roles) HasUniqueAssignments() (bool, error) {
	client := NewHTTPClient(permissions.client)
	endpoint := fmt.Sprintf("%s/HasUniqueRoleAssignments", permissions.endpoint)
	data, err := client.Post(endpoint, nil, permissions.config)
	if err != nil {
		return false, err
	}
	data = NormalizeODataItem(data)
	res := &struct {
		Value                    bool `json:"value"`
		HasUniqueRoleAssignments bool `json:"HasUniqueRoleAssignments"`
	}{}
	if err := json.Unmarshal(data, &res); err != nil {
		return false, err
	}
	return res.HasUniqueRoleAssignments || res.Value, nil
}
func (permissions *Roles) ResetInheritance() error {
	client := NewHTTPClient(permissions.client)
	endpoint := fmt.Sprintf("%s/ResetRoleInheritance", permissions.endpoint)
	_, err := client.Post(endpoint, nil, permissions.config)
	return err
}