func (c executeOne) Build() (transport.RefreshRequest, error) {
	base, err := constructRefreshBase(c.Base)
	if err != nil {
		return transport.RefreshRequest{}, errors.Trace(err)
	}

	var id *string
	if c.ID != "" {
		id = &c.ID
	}
	var name *string
	if c.Name != "" {
		name = &c.Name
	}

	req := transport.RefreshRequest{
		// Context is required here, even if it looks optional.
		Context: []transport.RefreshRequestContext{},
		Actions: []transport.RefreshRequestAction{{
			Action:      string(c.action),
			InstanceKey: c.instanceKey,
			ID:          id,
			Name:        name,
			Revision:    c.Revision,
			Channel:     c.Channel,
			Base:        &base,
		}},
		Fields: c.fields,
	}
	return req, nil
}
// Build a refresh request that can be past to the API.
Build a refresh request that can be past to the API.
// Build a refresh request that can be past to the API .
func (c executeOne) Build() (transport.RefreshRequest, error) {
	base, err := constructRefreshBase(c.Base)
	if err != nil {
		return transport.RefreshRequest{}, errors.Trace(err)
	}
	var id *string
	if c.ID != "" {
		id = &c.ID
	}
	var name *string
	if c.Name != "" {
		name = &c.Name
	}
	req := transport.RefreshRequest{
		Context: []transport.RefreshRequestContext{},
		Actions: []transport.RefreshRequestAction{{
			Action:      string(c.action),
			InstanceKey: c.instanceKey,
			ID:          id,
			Name:        name,
			Revision:    c.Revision,
			Channel:     c.Channel,
			Base:        &base,
		}},
		Fields: c.fields,
	}
	return req, nil
}
func ( c executeOne ) Build ( ) ( transport . RefreshRequest , error ) { base , err := constructRefreshBase ( c . Base ) if err != nil { return transport . RefreshRequest { } , errors . Trace ( err ) } var id * string if c . ID != " " { id = & c . ID } var name * string if c . Name != " " { name = & c . Name } req := transport . RefreshRequest { Context : [ ] transport . RefreshRequestContext { } , Actions : [ ] transport . RefreshRequestAction { { Action : string ( c . action ) , InstanceKey : c . instanceKey , ID : id , Name : name , Revision : c . Revision , Channel : c . Channel , Base : & base , } } , Fields : c . fields , } return req , nil }
Build a refresh request that can be past to the API.
Build a refresh request that can be past to the API .
// Context is required here, even if it looks optional.