| 1 | // This file was automatically generated. DO NOT EDIT. |
| 2 | // If you have any remark or suggestion do not hesitate to open an issue. |
| 3 | |
| 4 | // Package ipam provides methods and message types of the ipam v1 API. |
| 5 | package ipamscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ |
| 6 | |
| 7 | import ( |
| 8 | "bytesscip-go gomod github.com/golang/go/src go1.17 bytes/" |
| 9 | "encoding/jsonscip-go gomod github.com/golang/go/src go1.17 `encoding/json`/" |
| 10 | "fmtscip-go gomod github.com/golang/go/src go1.17 fmt/" |
| 11 | "netscip-go gomod github.com/golang/go/src go1.17 net/" |
| 12 | "net/httpscip-go gomod github.com/golang/go/src go1.17 `net/http`/" |
| 13 | "net/urlscip-go gomod github.com/golang/go/src go1.17 `net/url`/" |
| 14 | "stringsscip-go gomod github.com/golang/go/src go1.17 strings/" |
| 15 | "timescip-go gomod github.com/golang/go/src go1.17 time/" |
| 16 | |
| 17 | "github.com/scaleway/scaleway-sdk-go/errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/" |
| 18 | "github.com/scaleway/scaleway-sdk-go/marshalerscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/marshaler`/" |
| 19 | "github.com/scaleway/scaleway-sdk-go/namegeneratorscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/namegenerator`/" |
| 20 | "github.com/scaleway/scaleway-sdk-go/parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/" |
| 21 | "github.com/scaleway/scaleway-sdk-go/scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/" |
| 22 | ) |
| 23 | |
| 24 | // always import dependencies |
| 25 | var ( |
| 26 | _ fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Stringerscip-go gomod github.com/golang/go/src go1.17 fmt/Stringer# |
| 27 | _ jsonscip-go gomod github.com/golang/go/src go1.17 `encoding/json`/.Unmarshalerscip-go gomod github.com/golang/go/src go1.17 `encoding/json`/Unmarshaler# |
| 28 | _ urlscip-go gomod github.com/golang/go/src go1.17 `net/url`/.URLscip-go gomod github.com/golang/go/src go1.17 `net/url`/URL# |
| 29 | _ netscip-go gomod github.com/golang/go/src go1.17 net/.IPscip-go gomod github.com/golang/go/src go1.17 net/IP# |
| 30 | _ httpscip-go gomod github.com/golang/go/src go1.17 `net/http`/.Headerscip-go gomod github.com/golang/go/src go1.17 `net/http`/Header# |
| 31 | _ bytesscip-go gomod github.com/golang/go/src go1.17 bytes/.Readerscip-go gomod github.com/golang/go/src go1.17 bytes/Reader# |
| 32 | _ timescip-go gomod github.com/golang/go/src go1.17 time/.Timescip-go gomod github.com/golang/go/src go1.17 time/Time# |
| 33 | _ = stringsscip-go gomod github.com/golang/go/src go1.17 strings/.Joinscip-go gomod github.com/golang/go/src go1.17 strings/Join(). |
| 34 | |
| 35 | _ scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.ScalewayRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest# |
| 36 | _ marshalerscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/marshaler`/.Durationscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/marshaler`/Duration# |
| 37 | _ scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Filescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/File# |
| 38 | _ = parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery(). |
| 39 | _ = namegeneratorscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/namegenerator`/.GetRandomNamescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/namegenerator`/GetRandomName(). |
| 40 | ) |
| 41 | |
| 42 | type ListIPsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequestOrderBy# string |
| 43 | |
| 44 | const ( |
| 45 | ListIPsRequestOrderByCreatedAtDescscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequestOrderByCreatedAtDesc. = ListIPsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequestOrderBy#("created_at_desc") |
| 46 | ListIPsRequestOrderByCreatedAtAscscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequestOrderByCreatedAtAsc. = ListIPsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequestOrderBy#("created_at_asc") |
| 47 | ListIPsRequestOrderByUpdatedAtDescscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequestOrderByUpdatedAtDesc. = ListIPsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequestOrderBy#("updated_at_desc") |
| 48 | ListIPsRequestOrderByUpdatedAtAscscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequestOrderByUpdatedAtAsc. = ListIPsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequestOrderBy#("updated_at_asc") |
| 49 | ListIPsRequestOrderByAttachedAtDescscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequestOrderByAttachedAtDesc. = ListIPsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequestOrderBy#("attached_at_desc") |
| 50 | ListIPsRequestOrderByAttachedAtAscscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequestOrderByAttachedAtAsc. = ListIPsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequestOrderBy#("attached_at_asc") |
| 51 | ) |
| 52 | |
| 53 | func (enum ListIPsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequestOrderBy#) Stringscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequestOrderBy#String().() string { |
| 54 | if enum == "" { |
| 55 | // return default value if empty |
| 56 | return "created_at_desc" |
| 57 | } |
| 58 | return string(enum) |
| 59 | } |
| 60 | |
| 61 | func (enum ListIPsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequestOrderBy#) Valuesscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequestOrderBy#Values().() []ListIPsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequestOrderBy# { |
| 62 | return []ListIPsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequestOrderBy#{ |
| 63 | "created_at_desc", |
| 64 | "created_at_asc", |
| 65 | "updated_at_desc", |
| 66 | "updated_at_asc", |
| 67 | "attached_at_desc", |
| 68 | "attached_at_asc", |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | func (enum ListIPsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequestOrderBy#) MarshalJSONscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequestOrderBy#MarshalJSON().() ([]byte, error) { |
| 73 | return []byte(fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.17 fmt/Sprintf().(`"%s"`, enum)), nil |
| 74 | } |
| 75 | |
| 76 | func (enum *ListIPsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequestOrderBy#) UnmarshalJSONscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequestOrderBy#UnmarshalJSON().(data []byte) error { |
| 77 | tmp := "" |
| 78 | |
| 79 | if err := jsonscip-go gomod github.com/golang/go/src go1.17 `encoding/json`/.Unmarshalscip-go gomod github.com/golang/go/src go1.17 `encoding/json`/Unmarshal().(data, &tmp); err != nil { |
| 80 | return err |
| 81 | } |
| 82 | |
| 83 | *enum = ListIPsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequestOrderBy#(ListIPsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequestOrderBy#(tmp).Stringscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequestOrderBy#String().()) |
| 84 | return nil |
| 85 | } |
| 86 | |
| 87 | type ResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType# string |
| 88 | |
| 89 | const ( |
| 90 | ResourceTypeUnknownTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceTypeUnknownType. = ResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType#("unknown_type") |
| 91 | ResourceTypeCustomscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceTypeCustom. = ResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType#("custom") |
| 92 | ResourceTypeInstanceServerscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceTypeInstanceServer. = ResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType#("instance_server") |
| 93 | ResourceTypeInstanceIPscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceTypeInstanceIP. = ResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType#("instance_ip") |
| 94 | ResourceTypeInstancePrivateNicscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceTypeInstancePrivateNic. = ResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType#("instance_private_nic") |
| 95 | ResourceTypeLBServerscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceTypeLBServer. = ResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType#("lb_server") |
| 96 | ResourceTypeFipIPscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceTypeFipIP. = ResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType#("fip_ip") |
| 97 | ResourceTypeVpcGatewayscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceTypeVpcGateway. = ResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType#("vpc_gateway") |
| 98 | ResourceTypeVpcGatewayNetworkscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceTypeVpcGatewayNetwork. = ResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType#("vpc_gateway_network") |
| 99 | ResourceTypeK8sNodescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceTypeK8sNode. = ResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType#("k8s_node") |
| 100 | ResourceTypeK8sClusterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceTypeK8sCluster. = ResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType#("k8s_cluster") |
| 101 | ResourceTypeRdbInstancescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceTypeRdbInstance. = ResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType#("rdb_instance") |
| 102 | ResourceTypeRedisClusterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceTypeRedisCluster. = ResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType#("redis_cluster") |
| 103 | ResourceTypeBaremetalServerscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceTypeBaremetalServer. = ResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType#("baremetal_server") |
| 104 | ResourceTypeBaremetalPrivateNicscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceTypeBaremetalPrivateNic. = ResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType#("baremetal_private_nic") |
| 105 | ResourceTypeLlmDeploymentscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceTypeLlmDeployment. = ResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType#("llm_deployment") |
| 106 | ResourceTypeMgdbInstancescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceTypeMgdbInstance. = ResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType#("mgdb_instance") |
| 107 | ResourceTypeAppleSiliconServerscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceTypeAppleSiliconServer. = ResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType#("apple_silicon_server") |
| 108 | ResourceTypeAppleSiliconPrivateNicscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceTypeAppleSiliconPrivateNic. = ResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType#("apple_silicon_private_nic") |
| 109 | ) |
| 110 | |
| 111 | func (enum ResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType#) Stringscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType#String().() string { |
| 112 | if enum == "" { |
| 113 | // return default value if empty |
| 114 | return "unknown_type" |
| 115 | } |
| 116 | return string(enum) |
| 117 | } |
| 118 | |
| 119 | func (enum ResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType#) Valuesscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType#Values().() []ResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType# { |
| 120 | return []ResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType#{ |
| 121 | "unknown_type", |
| 122 | "custom", |
| 123 | "instance_server", |
| 124 | "instance_ip", |
| 125 | "instance_private_nic", |
| 126 | "lb_server", |
| 127 | "fip_ip", |
| 128 | "vpc_gateway", |
| 129 | "vpc_gateway_network", |
| 130 | "k8s_node", |
| 131 | "k8s_cluster", |
| 132 | "rdb_instance", |
| 133 | "redis_cluster", |
| 134 | "baremetal_server", |
| 135 | "baremetal_private_nic", |
| 136 | "llm_deployment", |
| 137 | "mgdb_instance", |
| 138 | "apple_silicon_server", |
| 139 | "apple_silicon_private_nic", |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | func (enum ResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType#) MarshalJSONscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType#MarshalJSON().() ([]byte, error) { |
| 144 | return []byte(fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.17 fmt/Sprintf().(`"%s"`, enum)), nil |
| 145 | } |
| 146 | |
| 147 | func (enum *ResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType#) UnmarshalJSONscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType#UnmarshalJSON().(data []byte) error { |
| 148 | tmp := "" |
| 149 | |
| 150 | if err := jsonscip-go gomod github.com/golang/go/src go1.17 `encoding/json`/.Unmarshalscip-go gomod github.com/golang/go/src go1.17 `encoding/json`/Unmarshal().(data, &tmp); err != nil { |
| 151 | return err |
| 152 | } |
| 153 | |
| 154 | *enum = ResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType#(ResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType#(tmp).Stringscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType#String().()) |
| 155 | return nil |
| 156 | } |
| 157 | |
| 158 | // Resource: resource. |
| 159 | type Resourcescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/Resource# struct { |
| 160 | // Type: type of resource the IP is attached to. |
| 161 | // Default value: unknown_type |
| 162 | Typescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/Resource#Type. ResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType# `json:"type"` |
| 163 | |
| 164 | // ID: ID of the resource the IP is attached to. |
| 165 | IDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/Resource#ID. string `json:"id"` |
| 166 | |
| 167 | // MacAddress: mAC of the resource the IP is attached to. |
| 168 | MacAddressscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/Resource#MacAddress. *string `json:"mac_address"` |
| 169 | |
| 170 | // Name: when the IP is in a Private Network, then a DNS record is available to resolve the resource name to this IP. |
| 171 | Namescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/Resource#Name. *string `json:"name"` |
| 172 | } |
| 173 | |
| 174 | // Reverse: reverse. |
| 175 | type Reversescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/Reverse# struct { |
| 176 | // Hostname: reverse domain name. |
| 177 | Hostnamescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/Reverse#Hostname. string `json:"hostname"` |
| 178 | |
| 179 | // Address: IP corresponding to the hostname. |
| 180 | Addressscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/Reverse#Address. *netscip-go gomod github.com/golang/go/src go1.17 net/.IPscip-go gomod github.com/golang/go/src go1.17 net/IP# `json:"address"` |
| 181 | } |
| 182 | |
| 183 | // Source: source. |
| 184 | type Sourcescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/Source# struct { |
| 185 | // Zonal: this source is global. |
| 186 | // Precisely one of Zonal, PrivateNetworkID, SubnetID must be set. |
| 187 | Zonalscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/Source#Zonal. *string `json:"zonal,omitempty"` |
| 188 | |
| 189 | // PrivateNetworkID: this source is specific. |
| 190 | // Precisely one of Zonal, PrivateNetworkID, SubnetID must be set. |
| 191 | PrivateNetworkIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/Source#PrivateNetworkID. *string `json:"private_network_id,omitempty"` |
| 192 | |
| 193 | // SubnetID: this source is specific. |
| 194 | // Precisely one of Zonal, PrivateNetworkID, SubnetID must be set. |
| 195 | SubnetIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/Source#SubnetID. *string `json:"subnet_id,omitempty"` |
| 196 | } |
| 197 | |
| 198 | // CustomResource: custom resource. |
| 199 | type CustomResourcescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/CustomResource# struct { |
| 200 | // MacAddress: mAC address of the custom resource. |
| 201 | MacAddressscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/CustomResource#MacAddress. string `json:"mac_address"` |
| 202 | |
| 203 | // Name: when the resource is in a Private Network, a DNS record is available to resolve the resource name. |
| 204 | Namescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/CustomResource#Name. *string `json:"name"` |
| 205 | } |
| 206 | |
| 207 | // IP: ip. |
| 208 | type IPscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/IP# struct { |
| 209 | // ID: IP ID. |
| 210 | IDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/IP#ID. string `json:"id"` |
| 211 | |
| 212 | // Address: iPv4 or IPv6 address in CIDR notation. |
| 213 | Addressscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/IP#Address. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.IPNetscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/IPNet# `json:"address"` |
| 214 | |
| 215 | // ProjectID: scaleway Project the IP belongs to. |
| 216 | ProjectIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/IP#ProjectID. string `json:"project_id"` |
| 217 | |
| 218 | // IsIPv6: defines whether the IP is an IPv6 (false = IPv4). |
| 219 | IsIPv6scip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/IP#IsIPv6. bool `json:"is_ipv6"` |
| 220 | |
| 221 | // CreatedAt: date the IP was reserved. |
| 222 | CreatedAtscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/IP#CreatedAt. *timescip-go gomod github.com/golang/go/src go1.17 time/.Timescip-go gomod github.com/golang/go/src go1.17 time/Time# `json:"created_at"` |
| 223 | |
| 224 | // UpdatedAt: date the IP was last modified. |
| 225 | UpdatedAtscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/IP#UpdatedAt. *timescip-go gomod github.com/golang/go/src go1.17 time/.Timescip-go gomod github.com/golang/go/src go1.17 time/Time# `json:"updated_at"` |
| 226 | |
| 227 | // Source: source pool where the IP was reserved in. |
| 228 | Sourcescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/IP#Source. *Sourcescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/Source# `json:"source"` |
| 229 | |
| 230 | // Resource: resource which the IP is attached to. |
| 231 | Resourcescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/IP#Resource. *Resourcescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/Resource# `json:"resource"` |
| 232 | |
| 233 | // Tags: tags for the IP. |
| 234 | Tagsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/IP#Tags. []string `json:"tags"` |
| 235 | |
| 236 | // Reverses: array of reverses associated with the IP. |
| 237 | Reversesscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/IP#Reverses. []*Reversescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/Reverse# `json:"reverses"` |
| 238 | |
| 239 | // Region: region of the IP. |
| 240 | Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/IP#Region. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# `json:"region"` |
| 241 | |
| 242 | // Zone: zone of the IP, if zonal. |
| 243 | Zonescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/IP#Zone. *scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Zonescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Zone# `json:"zone"` |
| 244 | } |
| 245 | |
| 246 | // AttachIPRequest: attach ip request. |
| 247 | type AttachIPRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/AttachIPRequest# struct { |
| 248 | // Region: region to target. If none is passed will use default region from the config. |
| 249 | Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/AttachIPRequest#Region. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# `json:"-"` |
| 250 | |
| 251 | // IPID: IP ID. |
| 252 | IPIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/AttachIPRequest#IPID. string `json:"-"` |
| 253 | |
| 254 | // Resource: custom resource to be attached to the IP. |
| 255 | Resourcescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/AttachIPRequest#Resource. *CustomResourcescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/CustomResource# `json:"resource"` |
| 256 | } |
| 257 | |
| 258 | // BookIPRequest: book ip request. |
| 259 | type BookIPRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/BookIPRequest# struct { |
| 260 | // Region: region to target. If none is passed will use default region from the config. |
| 261 | Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/BookIPRequest#Region. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# `json:"-"` |
| 262 | |
| 263 | // ProjectID: when creating an IP in a Private Network, the Project must match the Private Network's Project. |
| 264 | ProjectIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/BookIPRequest#ProjectID. string `json:"project_id"` |
| 265 | |
| 266 | // Source: source in which to reserve the IP. Not all sources are available for reservation. |
| 267 | Sourcescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/BookIPRequest#Source. *Sourcescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/Source# `json:"source"` |
| 268 | |
| 269 | // IsIPv6: request an IPv6 instead of an IPv4. |
| 270 | IsIPv6scip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/BookIPRequest#IsIPv6. bool `json:"is_ipv6"` |
| 271 | |
| 272 | // Address: the requested address should not include the subnet mask (/suffix). Note that only the Private Network source allows you to pick a specific IP. If the requested IP is already reserved, then the call will fail. |
| 273 | Addressscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/BookIPRequest#Address. *netscip-go gomod github.com/golang/go/src go1.17 net/.IPscip-go gomod github.com/golang/go/src go1.17 net/IP# `json:"address,omitempty"` |
| 274 | |
| 275 | // Tags: tags for the IP. |
| 276 | Tagsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/BookIPRequest#Tags. []string `json:"tags"` |
| 277 | |
| 278 | // Resource: custom resource to attach to the IP being reserved. An example of a custom resource is a virtual machine hosted on an Elastic Metal server. Do not use this for attaching IP addresses to standard Scaleway resources, as it will fail - instead, see the relevant product API for an equivalent method. |
| 279 | Resourcescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/BookIPRequest#Resource. *CustomResourcescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/CustomResource# `json:"resource,omitempty"` |
| 280 | } |
| 281 | |
| 282 | // DetachIPRequest: detach ip request. |
| 283 | type DetachIPRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/DetachIPRequest# struct { |
| 284 | // Region: region to target. If none is passed will use default region from the config. |
| 285 | Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/DetachIPRequest#Region. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# `json:"-"` |
| 286 | |
| 287 | // IPID: IP ID. |
| 288 | IPIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/DetachIPRequest#IPID. string `json:"-"` |
| 289 | |
| 290 | // Resource: custom resource currently attached to the IP. |
| 291 | Resourcescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/DetachIPRequest#Resource. *CustomResourcescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/CustomResource# `json:"resource"` |
| 292 | } |
| 293 | |
| 294 | // GetIPRequest: get ip request. |
| 295 | type GetIPRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/GetIPRequest# struct { |
| 296 | // Region: region to target. If none is passed will use default region from the config. |
| 297 | Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/GetIPRequest#Region. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# `json:"-"` |
| 298 | |
| 299 | // IPID: IP ID. |
| 300 | IPIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/GetIPRequest#IPID. string `json:"-"` |
| 301 | } |
| 302 | |
| 303 | // ListIPsRequest: list i ps request. |
| 304 | type ListIPsRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest# struct { |
| 305 | // Region: region to target. If none is passed will use default region from the config. |
| 306 | Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#Region. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# `json:"-"` |
| 307 | |
| 308 | // OrderBy: sort order of the returned IPs. |
| 309 | // Default value: created_at_desc |
| 310 | OrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#OrderBy. ListIPsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequestOrderBy# `json:"-"` |
| 311 | |
| 312 | // Page: page number to return, from the paginated results. |
| 313 | Pagescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#Page. *int32 `json:"-"` |
| 314 | |
| 315 | // PageSize: maximum number of IPs to return per page. |
| 316 | PageSizescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#PageSize. *uint32 `json:"-"` |
| 317 | |
| 318 | // ProjectID: project ID to filter for. Only IPs belonging to this Project will be returned. |
| 319 | ProjectIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#ProjectID. *string `json:"-"` |
| 320 | |
| 321 | // Zonal: zone to filter for. Only IPs that are zonal, and in this zone, will be returned. |
| 322 | // Precisely one of Zonal, PrivateNetworkID, SubnetID must be set. |
| 323 | Zonalscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#Zonal. *string `json:"zonal,omitempty"` |
| 324 | |
| 325 | // PrivateNetworkID: only IPs that are private, and in this Private Network, will be returned. |
| 326 | // Precisely one of Zonal, PrivateNetworkID, SubnetID must be set. |
| 327 | PrivateNetworkIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#PrivateNetworkID. *string `json:"private_network_id,omitempty"` |
| 328 | |
| 329 | // SubnetID: only IPs inside this exact subnet will be returned. |
| 330 | // Precisely one of Zonal, PrivateNetworkID, SubnetID must be set. |
| 331 | SubnetIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#SubnetID. *string `json:"subnet_id,omitempty"` |
| 332 | |
| 333 | // VpcID: only IPs owned by resources in this VPC will be returned. |
| 334 | VpcIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#VpcID. *string `json:"-"` |
| 335 | |
| 336 | // Attached: defines whether to filter only for IPs which are attached to a resource. |
| 337 | Attachedscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#Attached. *bool `json:"-"` |
| 338 | |
| 339 | // ResourceName: attached resource name to filter for, only IPs attached to a resource with this string within their name will be returned. |
| 340 | ResourceNamescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#ResourceName. *string `json:"-"` |
| 341 | |
| 342 | // ResourceID: resource ID to filter for. Only IPs attached to this resource will be returned. |
| 343 | ResourceIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#ResourceID. *string `json:"-"` |
| 344 | |
| 345 | // ResourceIDs: resource IDs to filter for. Only IPs attached to at least one of these resources will be returned. |
| 346 | ResourceIDsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#ResourceIDs. []string `json:"-"` |
| 347 | |
| 348 | // ResourceType: resource type to filter for. Only IPs attached to this type of resource will be returned. |
| 349 | // Default value: unknown_type |
| 350 | ResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#ResourceType. ResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType# `json:"-"` |
| 351 | |
| 352 | // ResourceTypes: resource types to filter for. Only IPs attached to these types of resources will be returned. |
| 353 | ResourceTypesscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#ResourceTypes. []ResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ResourceType# `json:"-"` |
| 354 | |
| 355 | // MacAddress: mAC address to filter for. Only IPs attached to a resource with this MAC address will be returned. |
| 356 | MacAddressscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#MacAddress. *string `json:"-"` |
| 357 | |
| 358 | // Tags: tags to filter for, only IPs with one or more matching tags will be returned. |
| 359 | Tagsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#Tags. []string `json:"-"` |
| 360 | |
| 361 | // OrganizationID: organization ID to filter for. Only IPs belonging to this Organization will be returned. |
| 362 | OrganizationIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#OrganizationID. *string `json:"-"` |
| 363 | |
| 364 | // IsIPv6: defines whether to filter only for IPv4s or IPv6s. |
| 365 | IsIPv6scip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#IsIPv6. *bool `json:"-"` |
| 366 | |
| 367 | // IPIDs: IP IDs to filter for. Only IPs with these UUIDs will be returned. |
| 368 | IPIDsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#IPIDs. []string `json:"-"` |
| 369 | } |
| 370 | |
| 371 | // ListIPsResponse: list i ps response. |
| 372 | type ListIPsResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsResponse# struct { |
| 373 | TotalCountscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsResponse#TotalCount. uint64 `json:"total_count"` |
| 374 | |
| 375 | IPsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsResponse#IPs. []*IPscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/IP# `json:"ips"` |
| 376 | } |
| 377 | |
| 378 | // UnsafeGetTotalCount should not be used |
| 379 | // Internal usage only |
| 380 | func (r *ListIPsResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsResponse#) UnsafeGetTotalCountscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsResponse#UnsafeGetTotalCount().() uint64 { |
| 381 | return r.TotalCountscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsResponse#TotalCount. |
| 382 | } |
| 383 | |
| 384 | // UnsafeAppend should not be used |
| 385 | // Internal usage only |
| 386 | func (r *ListIPsResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsResponse#) UnsafeAppendscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsResponse#UnsafeAppend().(res interface{}) (uint64, error) { |
| 387 | results, ok := res.(*ListIPsResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsResponse#) |
| 388 | if !ok { |
| 389 | return 0, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("%T type cannot be appended to type %T", res, r) |
| 390 | } |
| 391 | |
| 392 | r.IPsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsResponse#IPs. = append(r.IPsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsResponse#IPs., results.IPsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsResponse#IPs....) |
| 393 | r.TotalCountscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsResponse#TotalCount. += uint64(len(results.IPsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsResponse#IPs.)) |
| 394 | return uint64(len(results.IPsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsResponse#IPs.)), nil |
| 395 | } |
| 396 | |
| 397 | // MoveIPRequest: move ip request. |
| 398 | type MoveIPRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/MoveIPRequest# struct { |
| 399 | // Region: region to target. If none is passed will use default region from the config. |
| 400 | Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/MoveIPRequest#Region. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# `json:"-"` |
| 401 | |
| 402 | // IPID: IP ID. |
| 403 | IPIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/MoveIPRequest#IPID. string `json:"-"` |
| 404 | |
| 405 | // FromResource: custom resource currently attached to the IP. |
| 406 | FromResourcescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/MoveIPRequest#FromResource. *CustomResourcescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/CustomResource# `json:"from_resource"` |
| 407 | |
| 408 | // ToResource: custom resource to be attached to the IP. |
| 409 | ToResourcescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/MoveIPRequest#ToResource. *CustomResourcescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/CustomResource# `json:"to_resource,omitempty"` |
| 410 | } |
| 411 | |
| 412 | // ReleaseIPRequest: release ip request. |
| 413 | type ReleaseIPRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ReleaseIPRequest# struct { |
| 414 | // Region: region to target. If none is passed will use default region from the config. |
| 415 | Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ReleaseIPRequest#Region. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# `json:"-"` |
| 416 | |
| 417 | // IPID: IP ID. |
| 418 | IPIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ReleaseIPRequest#IPID. string `json:"-"` |
| 419 | } |
| 420 | |
| 421 | // ReleaseIPSetRequest: release ip set request. |
| 422 | type ReleaseIPSetRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ReleaseIPSetRequest# struct { |
| 423 | // Region: region to target. If none is passed will use default region from the config. |
| 424 | Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ReleaseIPSetRequest#Region. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# `json:"-"` |
| 425 | |
| 426 | IPIDsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ReleaseIPSetRequest#IPIDs. []string `json:"ip_ids"` |
| 427 | } |
| 428 | |
| 429 | // UpdateIPRequest: update ip request. |
| 430 | type UpdateIPRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/UpdateIPRequest# struct { |
| 431 | // Region: region to target. If none is passed will use default region from the config. |
| 432 | Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/UpdateIPRequest#Region. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# `json:"-"` |
| 433 | |
| 434 | // IPID: IP ID. |
| 435 | IPIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/UpdateIPRequest#IPID. string `json:"-"` |
| 436 | |
| 437 | // Tags: tags for the IP. |
| 438 | Tagsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/UpdateIPRequest#Tags. *[]string `json:"tags,omitempty"` |
| 439 | |
| 440 | // Reverses: array of reverse domain names associated with an IP in the subnet of the current IP. |
| 441 | Reversesscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/UpdateIPRequest#Reverses. []*Reversescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/Reverse# `json:"reverses"` |
| 442 | } |
| 443 | |
| 444 | // This API allows you to manage your Scaleway IP addresses with our IP Address Management tool. |
| 445 | type APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API# struct { |
| 446 | clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#client. *scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client# |
| 447 | } |
| 448 | |
| 449 | // NewAPI returns a API object from a Scaleway client. |
| 450 | func NewAPIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/NewAPI().(client *scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#) *APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API# { |
| 451 | return &APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#{ |
| 452 | clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#client.: client, |
| 453 | } |
| 454 | } |
| 455 | func (s *APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#) Regionsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#Regions().() []scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# { |
| 456 | return []scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region#{scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RegionFrParscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RegionFrPar., scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RegionNlAmsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RegionNlAms., scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RegionPlWawscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RegionPlWaw.} |
| 457 | } |
| 458 | |
| 459 | // BookIP: Reserve a new IP from the specified source. Currently IPs can only be reserved from a Private Network. |
| 460 | func (s *APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#) BookIPscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#BookIP().(req *BookIPRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/BookIPRequest#, opts ...scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RequestOptionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RequestOption#) (*IPscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/IP#, error) { |
| 461 | var err error |
| 462 | |
| 463 | if req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/BookIPRequest#Region. == "" { |
| 464 | defaultRegion, _ := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#client..GetDefaultRegionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultRegion().() |
| 465 | req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/BookIPRequest#Region. = defaultRegion |
| 466 | } |
| 467 | |
| 468 | if req.ProjectIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/BookIPRequest#ProjectID. == "" { |
| 469 | defaultProjectID, _ := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#client..GetDefaultProjectIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultProjectID().() |
| 470 | req.ProjectIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/BookIPRequest#ProjectID. = defaultProjectID |
| 471 | } |
| 472 | |
| 473 | if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/BookIPRequest#Region.) == "" { |
| 474 | return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field Region cannot be empty in request") |
| 475 | } |
| 476 | |
| 477 | scwReq := &scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.ScalewayRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#{ |
| 478 | Methodscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Method.: "POST", |
| 479 | Pathscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Path.: "/ipam/v1/regions/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/BookIPRequest#Region.) + "/ips", |
| 480 | } |
| 481 | |
| 482 | err = scwReq.SetBodyscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#SetBody().(req) |
| 483 | if err != nil { |
| 484 | return nil, err |
| 485 | } |
| 486 | |
| 487 | var resp IPscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/IP# |
| 488 | |
| 489 | err = s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#client..Doscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#Do().(scwReq, &resp, opts...) |
| 490 | if err != nil { |
| 491 | return nil, err |
| 492 | } |
| 493 | return &resp, nil |
| 494 | } |
| 495 | |
| 496 | // ReleaseIP: Release an IP not currently attached to a resource, and returns it to the available IP pool. |
| 497 | func (s *APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#) ReleaseIPscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#ReleaseIP().(req *ReleaseIPRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ReleaseIPRequest#, opts ...scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RequestOptionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RequestOption#) error { |
| 498 | var err error |
| 499 | |
| 500 | if req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ReleaseIPRequest#Region. == "" { |
| 501 | defaultRegion, _ := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#client..GetDefaultRegionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultRegion().() |
| 502 | req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ReleaseIPRequest#Region. = defaultRegion |
| 503 | } |
| 504 | |
| 505 | if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ReleaseIPRequest#Region.) == "" { |
| 506 | return errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field Region cannot be empty in request") |
| 507 | } |
| 508 | |
| 509 | if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.IPIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ReleaseIPRequest#IPID.) == "" { |
| 510 | return errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field IPID cannot be empty in request") |
| 511 | } |
| 512 | |
| 513 | scwReq := &scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.ScalewayRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#{ |
| 514 | Methodscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Method.: "DELETE", |
| 515 | Pathscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Path.: "/ipam/v1/regions/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ReleaseIPRequest#Region.) + "/ips/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.IPIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ReleaseIPRequest#IPID.) + "", |
| 516 | } |
| 517 | |
| 518 | err = scwReq.SetBodyscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#SetBody().(req) |
| 519 | if err != nil { |
| 520 | return err |
| 521 | } |
| 522 | |
| 523 | err = s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#client..Doscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#Do().(scwReq, nil, opts...) |
| 524 | if err != nil { |
| 525 | return err |
| 526 | } |
| 527 | return nil |
| 528 | } |
| 529 | |
| 530 | // ReleaseIPSet: |
| 531 | func (s *APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#) ReleaseIPSetscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#ReleaseIPSet().(req *ReleaseIPSetRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ReleaseIPSetRequest#, opts ...scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RequestOptionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RequestOption#) error { |
| 532 | var err error |
| 533 | |
| 534 | if req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ReleaseIPSetRequest#Region. == "" { |
| 535 | defaultRegion, _ := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#client..GetDefaultRegionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultRegion().() |
| 536 | req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ReleaseIPSetRequest#Region. = defaultRegion |
| 537 | } |
| 538 | |
| 539 | if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ReleaseIPSetRequest#Region.) == "" { |
| 540 | return errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field Region cannot be empty in request") |
| 541 | } |
| 542 | |
| 543 | scwReq := &scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.ScalewayRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#{ |
| 544 | Methodscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Method.: "POST", |
| 545 | Pathscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Path.: "/ipam/v1/regions/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ReleaseIPSetRequest#Region.) + "/ip-sets/release", |
| 546 | } |
| 547 | |
| 548 | err = scwReq.SetBodyscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#SetBody().(req) |
| 549 | if err != nil { |
| 550 | return err |
| 551 | } |
| 552 | |
| 553 | err = s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#client..Doscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#Do().(scwReq, nil, opts...) |
| 554 | if err != nil { |
| 555 | return err |
| 556 | } |
| 557 | return nil |
| 558 | } |
| 559 | |
| 560 | // GetIP: Retrieve details of an existing IP, specified by its IP ID. |
| 561 | func (s *APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#) GetIPscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#GetIP().(req *GetIPRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/GetIPRequest#, opts ...scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RequestOptionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RequestOption#) (*IPscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/IP#, error) { |
| 562 | var err error |
| 563 | |
| 564 | if req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/GetIPRequest#Region. == "" { |
| 565 | defaultRegion, _ := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#client..GetDefaultRegionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultRegion().() |
| 566 | req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/GetIPRequest#Region. = defaultRegion |
| 567 | } |
| 568 | |
| 569 | if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/GetIPRequest#Region.) == "" { |
| 570 | return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field Region cannot be empty in request") |
| 571 | } |
| 572 | |
| 573 | if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.IPIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/GetIPRequest#IPID.) == "" { |
| 574 | return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field IPID cannot be empty in request") |
| 575 | } |
| 576 | |
| 577 | scwReq := &scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.ScalewayRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#{ |
| 578 | Methodscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Method.: "GET", |
| 579 | Pathscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Path.: "/ipam/v1/regions/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/GetIPRequest#Region.) + "/ips/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.IPIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/GetIPRequest#IPID.) + "", |
| 580 | } |
| 581 | |
| 582 | var resp IPscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/IP# |
| 583 | |
| 584 | err = s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#client..Doscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#Do().(scwReq, &resp, opts...) |
| 585 | if err != nil { |
| 586 | return nil, err |
| 587 | } |
| 588 | return &resp, nil |
| 589 | } |
| 590 | |
| 591 | // UpdateIP: Update parameters including tags of the specified IP. |
| 592 | func (s *APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#) UpdateIPscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#UpdateIP().(req *UpdateIPRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/UpdateIPRequest#, opts ...scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RequestOptionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RequestOption#) (*IPscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/IP#, error) { |
| 593 | var err error |
| 594 | |
| 595 | if req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/UpdateIPRequest#Region. == "" { |
| 596 | defaultRegion, _ := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#client..GetDefaultRegionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultRegion().() |
| 597 | req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/UpdateIPRequest#Region. = defaultRegion |
| 598 | } |
| 599 | |
| 600 | if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/UpdateIPRequest#Region.) == "" { |
| 601 | return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field Region cannot be empty in request") |
| 602 | } |
| 603 | |
| 604 | if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.IPIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/UpdateIPRequest#IPID.) == "" { |
| 605 | return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field IPID cannot be empty in request") |
| 606 | } |
| 607 | |
| 608 | scwReq := &scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.ScalewayRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#{ |
| 609 | Methodscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Method.: "PATCH", |
| 610 | Pathscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Path.: "/ipam/v1/regions/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/UpdateIPRequest#Region.) + "/ips/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.IPIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/UpdateIPRequest#IPID.) + "", |
| 611 | } |
| 612 | |
| 613 | err = scwReq.SetBodyscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#SetBody().(req) |
| 614 | if err != nil { |
| 615 | return nil, err |
| 616 | } |
| 617 | |
| 618 | var resp IPscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/IP# |
| 619 | |
| 620 | err = s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#client..Doscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#Do().(scwReq, &resp, opts...) |
| 621 | if err != nil { |
| 622 | return nil, err |
| 623 | } |
| 624 | return &resp, nil |
| 625 | } |
| 626 | |
| 627 | // ListIPs: List existing IPs in the specified region using various filters. For example, you can filter for IPs within a specified Private Network, or for public IPs within a specified Project. By default, the IPs returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. |
| 628 | func (s *APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#) ListIPsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#ListIPs().(req *ListIPsRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#, opts ...scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RequestOptionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RequestOption#) (*ListIPsResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsResponse#, error) { |
| 629 | var err error |
| 630 | |
| 631 | if req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#Region. == "" { |
| 632 | defaultRegion, _ := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#client..GetDefaultRegionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultRegion().() |
| 633 | req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#Region. = defaultRegion |
| 634 | } |
| 635 | |
| 636 | defaultPageSize, exist := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#client..GetDefaultPageSizescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultPageSize().() |
| 637 | if (req.PageSizescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#PageSize. == nil || *req.PageSizescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#PageSize. == 0) && exist { |
| 638 | req.PageSizescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#PageSize. = &defaultPageSize |
| 639 | } |
| 640 | |
| 641 | query := urlscip-go gomod github.com/golang/go/src go1.17 `net/url`/.Valuesscip-go gomod github.com/golang/go/src go1.17 `net/url`/Values#{} |
| 642 | parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "order_by", req.OrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#OrderBy.) |
| 643 | parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "page", req.Pagescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#Page.) |
| 644 | parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "page_size", req.PageSizescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#PageSize.) |
| 645 | parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "project_id", req.ProjectIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#ProjectID.) |
| 646 | parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "vpc_id", req.VpcIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#VpcID.) |
| 647 | parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "attached", req.Attachedscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#Attached.) |
| 648 | parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "resource_name", req.ResourceNamescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#ResourceName.) |
| 649 | parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "resource_id", req.ResourceIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#ResourceID.) |
| 650 | parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "resource_ids", req.ResourceIDsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#ResourceIDs.) |
| 651 | parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "resource_type", req.ResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#ResourceType.) |
| 652 | parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "resource_types", req.ResourceTypesscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#ResourceTypes.) |
| 653 | parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "mac_address", req.MacAddressscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#MacAddress.) |
| 654 | parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "tags", req.Tagsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#Tags.) |
| 655 | parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "organization_id", req.OrganizationIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#OrganizationID.) |
| 656 | parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "is_ipv6", req.IsIPv6scip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#IsIPv6.) |
| 657 | parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "ip_ids", req.IPIDsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#IPIDs.) |
| 658 | parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "zonal", req.Zonalscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#Zonal.) |
| 659 | parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "private_network_id", req.PrivateNetworkIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#PrivateNetworkID.) |
| 660 | parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "subnet_id", req.SubnetIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#SubnetID.) |
| 661 | |
| 662 | if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#Region.) == "" { |
| 663 | return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field Region cannot be empty in request") |
| 664 | } |
| 665 | |
| 666 | scwReq := &scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.ScalewayRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#{ |
| 667 | Methodscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Method.: "GET", |
| 668 | Pathscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Path.: "/ipam/v1/regions/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsRequest#Region.) + "/ips", |
| 669 | Queryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Query.: query, |
| 670 | } |
| 671 | |
| 672 | var resp ListIPsResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/ListIPsResponse# |
| 673 | |
| 674 | err = s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#client..Doscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#Do().(scwReq, &resp, opts...) |
| 675 | if err != nil { |
| 676 | return nil, err |
| 677 | } |
| 678 | return &resp, nil |
| 679 | } |
| 680 | |
| 681 | // AttachIP: Attach an existing reserved IP from a Private Network subnet to a custom, named resource via its MAC address. An example of a custom resource is a virtual machine hosted on an Elastic Metal server. Do not use this method for attaching IP addresses to standard Scaleway resources as it will fail - see the relevant product API for an equivalent method. |
| 682 | func (s *APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#) AttachIPscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#AttachIP().(req *AttachIPRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/AttachIPRequest#, opts ...scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RequestOptionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RequestOption#) (*IPscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/IP#, error) { |
| 683 | var err error |
| 684 | |
| 685 | if req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/AttachIPRequest#Region. == "" { |
| 686 | defaultRegion, _ := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#client..GetDefaultRegionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultRegion().() |
| 687 | req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/AttachIPRequest#Region. = defaultRegion |
| 688 | } |
| 689 | |
| 690 | if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/AttachIPRequest#Region.) == "" { |
| 691 | return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field Region cannot be empty in request") |
| 692 | } |
| 693 | |
| 694 | if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.IPIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/AttachIPRequest#IPID.) == "" { |
| 695 | return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field IPID cannot be empty in request") |
| 696 | } |
| 697 | |
| 698 | scwReq := &scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.ScalewayRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#{ |
| 699 | Methodscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Method.: "POST", |
| 700 | Pathscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Path.: "/ipam/v1/regions/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/AttachIPRequest#Region.) + "/ips/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.IPIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/AttachIPRequest#IPID.) + "/attach", |
| 701 | } |
| 702 | |
| 703 | err = scwReq.SetBodyscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#SetBody().(req) |
| 704 | if err != nil { |
| 705 | return nil, err |
| 706 | } |
| 707 | |
| 708 | var resp IPscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/IP# |
| 709 | |
| 710 | err = s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#client..Doscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#Do().(scwReq, &resp, opts...) |
| 711 | if err != nil { |
| 712 | return nil, err |
| 713 | } |
| 714 | return &resp, nil |
| 715 | } |
| 716 | |
| 717 | // DetachIP: Detach a private IP from a custom resource. An example of a custom resource is a virtual machine hosted on an Elastic Metal server. Do not use this method for detaching IP addresses from standard Scaleway resources (e.g. Instances, Load Balancers) as it will fail - see the relevant product API for an equivalent method. |
| 718 | func (s *APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#) DetachIPscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#DetachIP().(req *DetachIPRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/DetachIPRequest#, opts ...scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RequestOptionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RequestOption#) (*IPscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/IP#, error) { |
| 719 | var err error |
| 720 | |
| 721 | if req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/DetachIPRequest#Region. == "" { |
| 722 | defaultRegion, _ := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#client..GetDefaultRegionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultRegion().() |
| 723 | req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/DetachIPRequest#Region. = defaultRegion |
| 724 | } |
| 725 | |
| 726 | if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/DetachIPRequest#Region.) == "" { |
| 727 | return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field Region cannot be empty in request") |
| 728 | } |
| 729 | |
| 730 | if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.IPIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/DetachIPRequest#IPID.) == "" { |
| 731 | return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field IPID cannot be empty in request") |
| 732 | } |
| 733 | |
| 734 | scwReq := &scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.ScalewayRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#{ |
| 735 | Methodscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Method.: "POST", |
| 736 | Pathscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Path.: "/ipam/v1/regions/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/DetachIPRequest#Region.) + "/ips/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.IPIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/DetachIPRequest#IPID.) + "/detach", |
| 737 | } |
| 738 | |
| 739 | err = scwReq.SetBodyscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#SetBody().(req) |
| 740 | if err != nil { |
| 741 | return nil, err |
| 742 | } |
| 743 | |
| 744 | var resp IPscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/IP# |
| 745 | |
| 746 | err = s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#client..Doscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#Do().(scwReq, &resp, opts...) |
| 747 | if err != nil { |
| 748 | return nil, err |
| 749 | } |
| 750 | return &resp, nil |
| 751 | } |
| 752 | |
| 753 | // MoveIP: Move an existing reserved private IP from one custom resource (e.g. a virtual machine hosted on an Elastic Metal server) to another custom resource. This will detach it from the first resource, and attach it to the second. Do not use this method for moving IP addresses between standard Scaleway resources (e.g. Instances, Load Balancers) as it will fail - see the relevant product API for an equivalent method. |
| 754 | func (s *APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#) MoveIPscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#MoveIP().(req *MoveIPRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/MoveIPRequest#, opts ...scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RequestOptionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RequestOption#) (*IPscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/IP#, error) { |
| 755 | var err error |
| 756 | |
| 757 | if req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/MoveIPRequest#Region. == "" { |
| 758 | defaultRegion, _ := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#client..GetDefaultRegionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultRegion().() |
| 759 | req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/MoveIPRequest#Region. = defaultRegion |
| 760 | } |
| 761 | |
| 762 | if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/MoveIPRequest#Region.) == "" { |
| 763 | return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field Region cannot be empty in request") |
| 764 | } |
| 765 | |
| 766 | if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.IPIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/MoveIPRequest#IPID.) == "" { |
| 767 | return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field IPID cannot be empty in request") |
| 768 | } |
| 769 | |
| 770 | scwReq := &scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.ScalewayRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#{ |
| 771 | Methodscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Method.: "POST", |
| 772 | Pathscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Path.: "/ipam/v1/regions/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/MoveIPRequest#Region.) + "/ips/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.IPIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/MoveIPRequest#IPID.) + "/move", |
| 773 | } |
| 774 | |
| 775 | err = scwReq.SetBodyscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#SetBody().(req) |
| 776 | if err != nil { |
| 777 | return nil, err |
| 778 | } |
| 779 | |
| 780 | var resp IPscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/IP# |
| 781 | |
| 782 | err = s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/ipam/v1`/API#client..Doscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#Do().(scwReq, &resp, opts...) |
| 783 | if err != nil { |
| 784 | return nil, err |
| 785 | } |
| 786 | return &resp, nil |
| 787 | } |