func NewSetProperty(propertyName string, parameter string) Action {
	return NewAction(fmt.Sprintf(`<SetProperty Id="{{.ID}}" ObjectPathId="{{.ObjectID}}" Name="%s">%s</SetProperty>`, propertyName, parameter))
}
NewSetProperty creates CSOM XML set property action node builder instance
package csom
import (
	"bytes"
	"fmt"
	"text/template"
)
type Action interface {
	String() string
	SetID(id int)
	GetID() int
	SetObjectID(objectID int)
	GetObjectID() int
	CheckErr() error
}
type action struct {
	template string
	id       int
	objectID int
	err      error
}
func NewAction(template string) Action {
	a := &action{}
	a.template = template
	return a
}
func NewActionIdentityQuery() Action {
	return NewAction(`<ObjectIdentityQuery Id="{{.ID}}" ObjectPathId="{{.ObjectID}}" />`)
}
func NewQueryWithProps(properties []string) Action {
	props := ""
	for _, prop := range properties {
		props += prop
	}
	return NewAction(fmt.Sprintf(`
		<Query Id="{{.ID}}" ObjectPathId="{{.ObjectID}}">
			<Query SelectAllProperties="true">
				<Properties>%s</Properties>
			</Query>
		</Query>
	`, trimMultiline(props)))
}
func NewQueryWithChildProps(properties []string) Action {
	props := ""
	for _, prop := range properties {
		props += prop
	}
	return NewAction(fmt.Sprintf(`
		<Query Id="{{.ID}}" ObjectPathId="{{.ObjectID}}">
			<Query SelectAllProperties="true">
				<Properties />
			</Query>
			<ChildItemQuery SelectAllProperties="true">
				<Properties>%s</Properties>
			</ChildItemQuery>
		</Query>
	`, trimMultiline(props)))
}
func NewActionMethod(methodName string, parameters []string) Action {
	params := ""
	for _, param := range parameters {
		params += param
	}
	return NewAction(fmt.Sprintf(`
		<Method Id="{{.ID}}" ObjectPathId="{{.ObjectID}}" Name="%s">
			<Parameters>%s</Parameters>
		</Method>
	`, methodName, trimMultiline(params)))
}