func (c *ApiService) FetchIncomingPhoneNumber(Sid string, params *FetchIncomingPhoneNumberParams) (*ApiV2010IncomingPhoneNumber, error) {
	path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{Sid}.json"
	if params != nil && params.PathAccountSid != nil {
		path = strings.Replace(path, "{"+"AccountSid"+"}", *params.PathAccountSid, -1)
	} else {
		path = strings.Replace(path, "{"+"AccountSid"+"}", c.requestHandler.Client.AccountSid(), -1)
	}
	path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1)
	data := url.Values{}
	headers := make(map[string]interface{})
	resp, err := c.requestHandler.Get(c.baseURL+path, data, headers)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	ps := &ApiV2010IncomingPhoneNumber{}
	if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
		return nil, err
	}
	return ps, err
}
Fetch an incoming-phone-number belonging to the account used to make the request.
package openapi
import (
	"encoding/json"
	"fmt"
	"net/url"
	"strings"
	"github.com/twilio/twilio-go/client"
)
type CreateIncomingPhoneNumberParams struct {
	PathAccountSid *string `json:"PathAccountSid,omitempty"`
	AddressSid *string `json:"AddressSid,omitempty"`
	ApiVersion *string `json:"ApiVersion,omitempty"`
	AreaCode *string `json:"AreaCode,omitempty"`
	BundleSid *string `json:"BundleSid,omitempty"`
	EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"`
	EmergencyStatus *string `json:"EmergencyStatus,omitempty"`
	FriendlyName *string `json:"FriendlyName,omitempty"`
	IdentitySid *string `json:"IdentitySid,omitempty"`
	PhoneNumber *string `json:"PhoneNumber,omitempty"`
	SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"`
	SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"`
	SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"`
	SmsMethod *string `json:"SmsMethod,omitempty"`
	SmsUrl *string `json:"SmsUrl,omitempty"`
	StatusCallback *string `json:"StatusCallback,omitempty"`
	StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"`
	TrunkSid *string `json:"TrunkSid,omitempty"`
	VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"`
	VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"`
	VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"`
	VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"`
	VoiceMethod *string `json:"VoiceMethod,omitempty"`
	VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"`
	VoiceUrl *string `json:"VoiceUrl,omitempty"`
}
func (params *CreateIncomingPhoneNumberParams) SetPathAccountSid(PathAccountSid string) *CreateIncomingPhoneNumberParams {
	params.PathAccountSid = &PathAccountSid
	return params
}
func (params *CreateIncomingPhoneNumberParams) SetAddressSid(AddressSid string) *CreateIncomingPhoneNumberParams {
	params.AddressSid = &AddressSid
	return params
}
func (params *CreateIncomingPhoneNumberParams) SetApiVersion(ApiVersion string) *CreateIncomingPhoneNumberParams {
	params.ApiVersion = &ApiVersion
	return params
}
func (params *CreateIncomingPhoneNumberParams) SetAreaCode(AreaCode string) *CreateIncomingPhoneNumberParams {
	params.AreaCode = &AreaCode
	return params
}
func (params *CreateIncomingPhoneNumberParams) SetBundleSid(BundleSid string) *CreateIncomingPhoneNumberParams {
	params.BundleSid = &BundleSid
	return params
}
func (params *CreateIncomingPhoneNumberParams) SetEmergencyAddressSid(EmergencyAddressSid string) *CreateIncomingPhoneNumberParams {
	params.EmergencyAddressSid = &EmergencyAddressSid
	return params
}
func (params *CreateIncomingPhoneNumberParams) SetEmergencyStatus(EmergencyStatus string) *CreateIncomingPhoneNumberParams {
	params.EmergencyStatus = &EmergencyStatus
	return params
}
func (params *CreateIncomingPhoneNumberParams) SetFriendlyName(FriendlyName string) *CreateIncomingPhoneNumberParams {
	params.FriendlyName = &FriendlyName
	return params
}
func (params *CreateIncomingPhoneNumberParams) SetIdentitySid(IdentitySid string) *CreateIncomingPhoneNumberParams {
	params.IdentitySid = &IdentitySid
	return params
}
func (params *CreateIncomingPhoneNumberParams) SetPhoneNumber(PhoneNumber string) *CreateIncomingPhoneNumberParams {
	params.PhoneNumber = &PhoneNumber
	return params
}
func (params *CreateIncomingPhoneNumberParams) SetSmsApplicationSid(SmsApplicationSid string) *CreateIncomingPhoneNumberParams {
	params.SmsApplicationSid = &SmsApplicationSid
	return params
}
func (params *CreateIncomingPhoneNumberParams) SetSmsFallbackMethod(SmsFallbackMethod string) *CreateIncomingPhoneNumberParams {
	params.SmsFallbackMethod = &SmsFallbackMethod
	return params
}
func (params *CreateIncomingPhoneNumberParams) SetSmsFallbackUrl(SmsFallbackUrl string) *CreateIncomingPhoneNumberParams {
	params.SmsFallbackUrl = &SmsFallbackUrl
	return params
}
func (params *CreateIncomingPhoneNumberParams) SetSmsMethod(SmsMethod string) *CreateIncomingPhoneNumberParams {
	params.SmsMethod = &SmsMethod
	return params
}
func (params *CreateIncomingPhoneNumberParams) SetSmsUrl(SmsUrl string) *CreateIncomingPhoneNumberParams {
	params.SmsUrl = &SmsUrl
	return params
}
func (params *CreateIncomingPhoneNumberParams) SetStatusCallback(StatusCallback string) *CreateIncomingPhoneNumberParams {
	params.StatusCallback = &StatusCallback
	return params
}
func (params *CreateIncomingPhoneNumberParams) SetStatusCallbackMethod(StatusCallbackMethod string) *CreateIncomingPhoneNumberParams {
	params.StatusCallbackMethod = &StatusCallbackMethod
	return params
}
func (params *CreateIncomingPhoneNumberParams) SetTrunkSid(TrunkSid string) *CreateIncomingPhoneNumberParams {
	params.TrunkSid = &TrunkSid
	return params
}
func (params *CreateIncomingPhoneNumberParams) SetVoiceApplicationSid(VoiceApplicationSid string) *CreateIncomingPhoneNumberParams {
	params.VoiceApplicationSid = &VoiceApplicationSid
	return params
}
func (params *CreateIncomingPhoneNumberParams) SetVoiceCallerIdLookup(VoiceCallerIdLookup bool) *CreateIncomingPhoneNumberParams {
	params.VoiceCallerIdLookup = &VoiceCallerIdLookup
	return params
}
func (params *CreateIncomingPhoneNumberParams) SetVoiceFallbackMethod(VoiceFallbackMethod string) *CreateIncomingPhoneNumberParams {
	params.VoiceFallbackMethod = &VoiceFallbackMethod
	return params
}
func (params *CreateIncomingPhoneNumberParams) SetVoiceFallbackUrl(VoiceFallbackUrl string) *CreateIncomingPhoneNumberParams {
	params.VoiceFallbackUrl = &VoiceFallbackUrl
	return params
}
func (params *CreateIncomingPhoneNumberParams) SetVoiceMethod(VoiceMethod string) *CreateIncomingPhoneNumberParams {
	params.VoiceMethod = &VoiceMethod
	return params
}
func (params *CreateIncomingPhoneNumberParams) SetVoiceReceiveMode(VoiceReceiveMode string) *CreateIncomingPhoneNumberParams {
	params.VoiceReceiveMode = &VoiceReceiveMode
	return params
}
func (params *CreateIncomingPhoneNumberParams) SetVoiceUrl(VoiceUrl string) *CreateIncomingPhoneNumberParams {
	params.VoiceUrl = &VoiceUrl
	return params
}
func (c *ApiService) CreateIncomingPhoneNumber(params *CreateIncomingPhoneNumberParams) (*ApiV2010IncomingPhoneNumber, error) {
	path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers.json"
	if params != nil && params.PathAccountSid != nil {
		path = strings.Replace(path, "{"+"AccountSid"+"}", *params.PathAccountSid, -1)
	} else {
		path = strings.Replace(path, "{"+"AccountSid"+"}", c.requestHandler.Client.AccountSid(), -1)
	}
	data := url.Values{}
	headers := make(map[string]interface{})
	if params != nil && params.AddressSid != nil {
		data.Set("AddressSid", *params.AddressSid)
	}
	if params != nil && params.ApiVersion != nil {
		data.Set("ApiVersion", *params.ApiVersion)
	}
	if params != nil && params.AreaCode != nil {
		data.Set("AreaCode", *params.AreaCode)
	}
	if params != nil && params.BundleSid != nil {
		data.Set("BundleSid", *params.BundleSid)
	}
	if params != nil && params.EmergencyAddressSid != nil {
		data.Set("EmergencyAddressSid", *params.EmergencyAddressSid)
	}
	if params != nil && params.EmergencyStatus != nil {
		data.Set("EmergencyStatus", *params.EmergencyStatus)
	}
	if params != nil && params.FriendlyName != nil {
		data.Set("FriendlyName", *params.FriendlyName)
	}
	if params != nil && params.IdentitySid != nil {
		data.Set("IdentitySid", *params.IdentitySid)
	}
	if params != nil && params.PhoneNumber != nil {
		data.Set("PhoneNumber", *params.PhoneNumber)
	}
	if params != nil && params.SmsApplicationSid != nil {
		data.Set("SmsApplicationSid", *params.SmsApplicationSid)
	}
	if params != nil && params.SmsFallbackMethod != nil {
		data.Set("SmsFallbackMethod", *params.SmsFallbackMethod)
	}
	if params != nil && params.SmsFallbackUrl != nil {
		data.Set("SmsFallbackUrl", *params.SmsFallbackUrl)
	}
	if params != nil && params.SmsMethod != nil {
		data.Set("SmsMethod", *params.SmsMethod)
	}
	if params != nil && params.SmsUrl != nil {
		data.Set("SmsUrl", *params.SmsUrl)
	}
	if params != nil && params.StatusCallback != nil {
		data.Set("StatusCallback", *params.StatusCallback)
	}
	if params != nil && params.StatusCallbackMethod != nil {
		data.Set("StatusCallbackMethod", *params.StatusCallbackMethod)
	}
	if params != nil && params.TrunkSid != nil {
		data.Set("TrunkSid", *params.TrunkSid)
	}
	if params != nil && params.VoiceApplicationSid != nil {
		data.Set("VoiceApplicationSid", *params.VoiceApplicationSid)
	}
	if params != nil && params.VoiceCallerIdLookup != nil {
		data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup))
	}
	if params != nil && params.VoiceFallbackMethod != nil {
		data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod)
	}
	if params != nil && params.VoiceFallbackUrl != nil {
		data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl)
	}
	if params != nil && params.VoiceMethod != nil {
		data.Set("VoiceMethod", *params.VoiceMethod)
	}
	if params != nil && params.VoiceReceiveMode != nil {
		data.Set("VoiceReceiveMode", *params.VoiceReceiveMode)
	}
	if params != nil && params.VoiceUrl != nil {
		data.Set("VoiceUrl", *params.VoiceUrl)
	}
	resp, err := c.requestHandler.Post(c.baseURL+path, data, headers)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	ps := &ApiV2010IncomingPhoneNumber{}
	if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
		return nil, err
	}
	return ps, err
}
type DeleteIncomingPhoneNumberParams struct {
	PathAccountSid *string `json:"PathAccountSid,omitempty"`
}
func (params *DeleteIncomingPhoneNumberParams) SetPathAccountSid(PathAccountSid string) *DeleteIncomingPhoneNumberParams {
	params.PathAccountSid = &PathAccountSid
	return params
}
func (c *ApiService) DeleteIncomingPhoneNumber(Sid string, params *DeleteIncomingPhoneNumberParams) error {
	path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{Sid}.json"
	if params != nil && params.PathAccountSid != nil {
		path = strings.Replace(path, "{"+"AccountSid"+"}", *params.PathAccountSid, -1)
	} else {
		path = strings.Replace(path, "{"+"AccountSid"+"}", c.requestHandler.Client.AccountSid(), -1)
	}
	path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1)
	data := url.Values{}
	headers := make(map[string]interface{})
	resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers)
	if err != nil {
		return err
	}
	defer resp.Body.Close()
	return nil
}
type FetchIncomingPhoneNumberParams struct {
	PathAccountSid *string `json:"PathAccountSid,omitempty"`
}
func (params *FetchIncomingPhoneNumberParams) SetPathAccountSid(PathAccountSid string) *FetchIncomingPhoneNumberParams {
	params.PathAccountSid = &PathAccountSid
	return params
}