// ListForPatch handles making API request to get parent resource and
// extracting list of objects.
ListForPatch handles making API request to get parent resource and
extracting list of objects.
// ListForPatch handles making API request to get parent resource and // extracting list of objects .
func resourceComputeRouterBgpPeerListForPatch(d *schema.ResourceData, meta interface{}) ([]interface{}, error) {
	config := meta.(*Config)
	url, err := replaceVars(d, config, "{{ComputeBasePath}}projects/{{project}}/regions/{{region}}/routers/{{router}}")
	if err != nil {
		return nil, err
	}
	project, err := getProject(d, config)
	if err != nil {
		return nil, err
	}
	res, err := sendRequest(config, "GET", project, url, nil)
	if err != nil {
		return nil, err
	}
	var v interface{}
	var ok bool
	v, ok = res["bgpPeers"]
	if ok && v != nil {
		ls, lsOk := v.([]interface{})
		if !lsOk {
			return nil, fmt.Errorf(`expected list for nested field "bgpPeers"`)
		}
		return ls, nil
	}
	return nil, nil
}
func resourceComputeRouterBgpPeerListForPatch ( d * schema . ResourceData , meta interface { } ) ( [ ] interface { } , error ) { config := meta . ( * Config ) url , err := replaceVars ( d , config , " " ) if err != nil { return nil , err } project , err := getProject ( d , config ) if err != nil { return nil , err } res , err := sendRequest ( config , " " , project , url , nil ) if err != nil { return nil , err } var v interface { } var ok bool v , ok = res [ " " ] if ok && v != nil { ls , lsOk := v . ( [ ] interface { } ) if ! lsOk { return nil , fmt . Errorf ( `expected list for nested field "bgpPeers"` ) } return ls , nil } return nil , nil }
ListForPatch handles making API request to get parent resource and
extracting list of objects.
ListForPatch handles making API request to get parent resource and extracting list of objects .