location.go raw
1 /**
2 * Copyright 2016-2024 IBM Corp.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5 * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 *
7 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
8 * on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9 * See the License for the specific language governing permissions and limitations under the License.
10 */
11
12 // AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
13
14 package services
15
16 import (
17 "fmt"
18 "strings"
19
20 "github.com/softlayer/softlayer-go/datatypes"
21 "github.com/softlayer/softlayer-go/session"
22 "github.com/softlayer/softlayer-go/sl"
23 )
24
25 // Every piece of hardware and network connection owned by SoftLayer is tracked physically by location and stored in the SoftLayer_Location data type. SoftLayer locations exist in parent/child relationships, a convenient way to track equipment from it's city, datacenter, server room, rack, then slot.
26 type Location struct {
27 Session session.SLSession
28 Options sl.Options
29 }
30
31 // GetLocationService returns an instance of the Location SoftLayer service
32 func GetLocationService(sess session.SLSession) Location {
33 return Location{Session: sess}
34 }
35
36 func (r Location) Id(id int) Location {
37 r.Options.Id = &id
38 return r
39 }
40
41 func (r Location) Mask(mask string) Location {
42 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
43 mask = fmt.Sprintf("mask[%s]", mask)
44 }
45
46 r.Options.Mask = mask
47 return r
48 }
49
50 func (r Location) Filter(filter string) Location {
51 r.Options.Filter = filter
52 return r
53 }
54
55 func (r Location) Limit(limit int) Location {
56 r.Options.Limit = &limit
57 return r
58 }
59
60 func (r Location) Offset(offset int) Location {
61 r.Options.Offset = &offset
62 return r
63 }
64
65 // Retrieve
66 func (r Location) GetActivePresaleEvents() (resp []datatypes.Sales_Presale_Event, err error) {
67 err = r.Session.DoRequest("SoftLayer_Location", "getActivePresaleEvents", nil, &r.Options, &resp)
68 return
69 }
70
71 // Object Storage is only available in select datacenters. This method will return all the datacenters where object storage is available.
72 func (r Location) GetAvailableObjectStorageDatacenters() (resp []datatypes.Location, err error) {
73 err = r.Session.DoRequest("SoftLayer_Location", "getAvailableObjectStorageDatacenters", nil, &r.Options, &resp)
74 return
75 }
76
77 // Retrieve A flag indicating whether or not the datacenter/location is BNPP compliant.
78 func (r Location) GetBnppCompliantFlag() (resp bool, err error) {
79 err = r.Session.DoRequest("SoftLayer_Location", "getBnppCompliantFlag", nil, &r.Options, &resp)
80 return
81 }
82
83 // Retrieve all datacenter locations. SoftLayer's datacenters exist in various cities and each contain one or more server rooms which house network and server infrastructure.
84 func (r Location) GetDatacenters() (resp []datatypes.Location, err error) {
85 err = r.Session.DoRequest("SoftLayer_Location", "getDatacenters", nil, &r.Options, &resp)
86 return
87 }
88
89 // no documentation yet
90 func (r Location) GetDatacentersWithVirtualImageStoreServiceResourceRecord() (resp []datatypes.Location, err error) {
91 err = r.Session.DoRequest("SoftLayer_Location", "getDatacentersWithVirtualImageStoreServiceResourceRecord", nil, &r.Options, &resp)
92 return
93 }
94
95 // Retrieve A flag indicating whether or not the datacenter/location is EU compliant.
96 func (r Location) GetEuCompliantFlag() (resp bool, err error) {
97 err = r.Session.DoRequest("SoftLayer_Location", "getEuCompliantFlag", nil, &r.Options, &resp)
98 return
99 }
100
101 // Retrieve A location can be a member of 1 or more groups. This will show which groups to which a location belongs.
102 func (r Location) GetGroups() (resp []datatypes.Location_Group, err error) {
103 err = r.Session.DoRequest("SoftLayer_Location", "getGroups", nil, &r.Options, &resp)
104 return
105 }
106
107 // Retrieve
108 func (r Location) GetHardwareFirewalls() (resp []datatypes.Hardware, err error) {
109 err = r.Session.DoRequest("SoftLayer_Location", "getHardwareFirewalls", nil, &r.Options, &resp)
110 return
111 }
112
113 // Retrieve A location's physical address.
114 func (r Location) GetLocationAddress() (resp datatypes.Account_Address, err error) {
115 err = r.Session.DoRequest("SoftLayer_Location", "getLocationAddress", nil, &r.Options, &resp)
116 return
117 }
118
119 // Retrieve A location's physical addresses.
120 func (r Location) GetLocationAddresses() (resp []datatypes.Account_Address, err error) {
121 err = r.Session.DoRequest("SoftLayer_Location", "getLocationAddresses", nil, &r.Options, &resp)
122 return
123 }
124
125 // Retrieve A location's Dedicated Rack member
126 func (r Location) GetLocationReservationMember() (resp datatypes.Location_Reservation_Rack_Member, err error) {
127 err = r.Session.DoRequest("SoftLayer_Location", "getLocationReservationMember", nil, &r.Options, &resp)
128 return
129 }
130
131 // Retrieve The current locations status.
132 func (r Location) GetLocationStatus() (resp datatypes.Location_Status, err error) {
133 err = r.Session.DoRequest("SoftLayer_Location", "getLocationStatus", nil, &r.Options, &resp)
134 return
135 }
136
137 // Retrieve
138 func (r Location) GetNetworkConfigurationAttribute() (resp datatypes.Hardware_Attribute, err error) {
139 err = r.Session.DoRequest("SoftLayer_Location", "getNetworkConfigurationAttribute", nil, &r.Options, &resp)
140 return
141 }
142
143 // no documentation yet
144 func (r Location) GetObject() (resp datatypes.Location, err error) {
145 err = r.Session.DoRequest("SoftLayer_Location", "getObject", nil, &r.Options, &resp)
146 return
147 }
148
149 // Retrieve The total number of users online using SoftLayer's SSL VPN service for a location.
150 func (r Location) GetOnlineSslVpnUserCount() (resp int, err error) {
151 err = r.Session.DoRequest("SoftLayer_Location", "getOnlineSslVpnUserCount", nil, &r.Options, &resp)
152 return
153 }
154
155 // Retrieve
156 func (r Location) GetPathString() (resp string, err error) {
157 err = r.Session.DoRequest("SoftLayer_Location", "getPathString", nil, &r.Options, &resp)
158 return
159 }
160
161 // Retrieve A location can be a member of 1 or more Price Groups. This will show which groups to which a location belongs.
162 func (r Location) GetPriceGroups() (resp []datatypes.Location_Group, err error) {
163 err = r.Session.DoRequest("SoftLayer_Location", "getPriceGroups", nil, &r.Options, &resp)
164 return
165 }
166
167 // Retrieve A location can be a member of 1 or more regions. This will show which regions to which a location belongs.
168 func (r Location) GetRegions() (resp []datatypes.Location_Region, err error) {
169 err = r.Session.DoRequest("SoftLayer_Location", "getRegions", nil, &r.Options, &resp)
170 return
171 }
172
173 // Retrieve
174 func (r Location) GetTimezone() (resp datatypes.Locale_Timezone, err error) {
175 err = r.Session.DoRequest("SoftLayer_Location", "getTimezone", nil, &r.Options, &resp)
176 return
177 }
178
179 // Retrieve A location can be a member of 1 Bandwidth Pooling Group. This will show which group to which a location belongs.
180 func (r Location) GetVdrGroup() (resp datatypes.Location_Group_Location_CrossReference, err error) {
181 err = r.Session.DoRequest("SoftLayer_Location", "getVdrGroup", nil, &r.Options, &resp)
182 return
183 }
184
185 // Retrieve all datacenter locations. SoftLayer's datacenters exist in various cities and each contain one or more server rooms which house network and server infrastructure.
186 func (r Location) GetViewableDatacenters() (resp []datatypes.Location, err error) {
187 err = r.Session.DoRequest("SoftLayer_Location", "getViewableDatacenters", nil, &r.Options, &resp)
188 return
189 }
190
191 // Retrieve all viewable pop and datacenter locations.
192 func (r Location) GetViewablePopsAndDataCenters() (resp []datatypes.Location, err error) {
193 err = r.Session.DoRequest("SoftLayer_Location", "getViewablePopsAndDataCenters", nil, &r.Options, &resp)
194 return
195 }
196
197 // Retrieve all viewable network locations.
198 func (r Location) GetViewablepointOfPresence() (resp []datatypes.Location, err error) {
199 err = r.Session.DoRequest("SoftLayer_Location", "getViewablepointOfPresence", nil, &r.Options, &resp)
200 return
201 }
202
203 // Retrieve all point of presence locations.
204 func (r Location) GetpointOfPresence() (resp []datatypes.Location, err error) {
205 err = r.Session.DoRequest("SoftLayer_Location", "getpointOfPresence", nil, &r.Options, &resp)
206 return
207 }
208
209 // SoftLayer_Location_Datacenter extends the [[SoftLayer_Location]] data type to include datacenter-specific properties.
210 type Location_Datacenter struct {
211 Session session.SLSession
212 Options sl.Options
213 }
214
215 // GetLocationDatacenterService returns an instance of the Location_Datacenter SoftLayer service
216 func GetLocationDatacenterService(sess session.SLSession) Location_Datacenter {
217 return Location_Datacenter{Session: sess}
218 }
219
220 func (r Location_Datacenter) Id(id int) Location_Datacenter {
221 r.Options.Id = &id
222 return r
223 }
224
225 func (r Location_Datacenter) Mask(mask string) Location_Datacenter {
226 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
227 mask = fmt.Sprintf("mask[%s]", mask)
228 }
229
230 r.Options.Mask = mask
231 return r
232 }
233
234 func (r Location_Datacenter) Filter(filter string) Location_Datacenter {
235 r.Options.Filter = filter
236 return r
237 }
238
239 func (r Location_Datacenter) Limit(limit int) Location_Datacenter {
240 r.Options.Limit = &limit
241 return r
242 }
243
244 func (r Location_Datacenter) Offset(offset int) Location_Datacenter {
245 r.Options.Offset = &offset
246 return r
247 }
248
249 // Retrieve
250 func (r Location_Datacenter) GetActiveItemPresaleEvents() (resp []datatypes.Sales_Presale_Event, err error) {
251 err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getActiveItemPresaleEvents", nil, &r.Options, &resp)
252 return
253 }
254
255 // Retrieve
256 func (r Location_Datacenter) GetActivePresaleEvents() (resp []datatypes.Sales_Presale_Event, err error) {
257 err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getActivePresaleEvents", nil, &r.Options, &resp)
258 return
259 }
260
261 // Object Storage is only available in select datacenters. This method will return all the datacenters where object storage is available.
262 func (r Location_Datacenter) GetAvailableObjectStorageDatacenters() (resp []datatypes.Location, err error) {
263 err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getAvailableObjectStorageDatacenters", nil, &r.Options, &resp)
264 return
265 }
266
267 // Retrieve
268 func (r Location_Datacenter) GetBackendHardwareRouters() (resp []datatypes.Hardware, err error) {
269 err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getBackendHardwareRouters", nil, &r.Options, &resp)
270 return
271 }
272
273 // Retrieve A flag indicating whether or not the datacenter/location is BNPP compliant.
274 func (r Location_Datacenter) GetBnppCompliantFlag() (resp bool, err error) {
275 err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getBnppCompliantFlag", nil, &r.Options, &resp)
276 return
277 }
278
279 // Retrieve Subnets which are directly bound in a given datacenter, and currently allow routing.
280 func (r Location_Datacenter) GetBoundSubnets() (resp []datatypes.Network_Subnet, err error) {
281 err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getBoundSubnets", nil, &r.Options, &resp)
282 return
283 }
284
285 // Retrieve This references relationship between brands, locations and countries associated with a user's account that are ineligible when ordering products. For example, the India datacenter may not be available on this brand for customers that live in Great Britain.
286 func (r Location_Datacenter) GetBrandCountryRestrictions() (resp []datatypes.Brand_Restriction_Location_CustomerCountry, err error) {
287 err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getBrandCountryRestrictions", nil, &r.Options, &resp)
288 return
289 }
290
291 // Retrieve all datacenter locations. SoftLayer's datacenters exist in various cities and each contain one or more server rooms which house network and server infrastructure.
292 func (r Location_Datacenter) GetDatacenters() (resp []datatypes.Location, err error) {
293 err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getDatacenters", nil, &r.Options, &resp)
294 return
295 }
296
297 // no documentation yet
298 func (r Location_Datacenter) GetDatacentersWithVirtualImageStoreServiceResourceRecord() (resp []datatypes.Location, err error) {
299 err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getDatacentersWithVirtualImageStoreServiceResourceRecord", nil, &r.Options, &resp)
300 return
301 }
302
303 // Retrieve A flag indicating whether or not the datacenter/location is EU compliant.
304 func (r Location_Datacenter) GetEuCompliantFlag() (resp bool, err error) {
305 err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getEuCompliantFlag", nil, &r.Options, &resp)
306 return
307 }
308
309 // Retrieve
310 func (r Location_Datacenter) GetFrontendHardwareRouters() (resp []datatypes.Hardware, err error) {
311 err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getFrontendHardwareRouters", nil, &r.Options, &resp)
312 return
313 }
314
315 // Retrieve A location can be a member of 1 or more groups. This will show which groups to which a location belongs.
316 func (r Location_Datacenter) GetGroups() (resp []datatypes.Location_Group, err error) {
317 err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getGroups", nil, &r.Options, &resp)
318 return
319 }
320
321 // Retrieve
322 func (r Location_Datacenter) GetHardwareFirewalls() (resp []datatypes.Hardware, err error) {
323 err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getHardwareFirewalls", nil, &r.Options, &resp)
324 return
325 }
326
327 // Retrieve
328 func (r Location_Datacenter) GetHardwareRouters() (resp []datatypes.Hardware, err error) {
329 err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getHardwareRouters", nil, &r.Options, &resp)
330 return
331 }
332
333 // Retrieve A location's physical address.
334 func (r Location_Datacenter) GetLocationAddress() (resp datatypes.Account_Address, err error) {
335 err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getLocationAddress", nil, &r.Options, &resp)
336 return
337 }
338
339 // Retrieve A location's physical addresses.
340 func (r Location_Datacenter) GetLocationAddresses() (resp []datatypes.Account_Address, err error) {
341 err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getLocationAddresses", nil, &r.Options, &resp)
342 return
343 }
344
345 // Retrieve A location's Dedicated Rack member
346 func (r Location_Datacenter) GetLocationReservationMember() (resp datatypes.Location_Reservation_Rack_Member, err error) {
347 err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getLocationReservationMember", nil, &r.Options, &resp)
348 return
349 }
350
351 // Retrieve The current locations status.
352 func (r Location_Datacenter) GetLocationStatus() (resp datatypes.Location_Status, err error) {
353 err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getLocationStatus", nil, &r.Options, &resp)
354 return
355 }
356
357 // Retrieve
358 func (r Location_Datacenter) GetNetworkConfigurationAttribute() (resp datatypes.Hardware_Attribute, err error) {
359 err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getNetworkConfigurationAttribute", nil, &r.Options, &resp)
360 return
361 }
362
363 // no documentation yet
364 func (r Location_Datacenter) GetObject() (resp datatypes.Location_Datacenter, err error) {
365 err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getObject", nil, &r.Options, &resp)
366 return
367 }
368
369 // Retrieve The total number of users online using SoftLayer's SSL VPN service for a location.
370 func (r Location_Datacenter) GetOnlineSslVpnUserCount() (resp int, err error) {
371 err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getOnlineSslVpnUserCount", nil, &r.Options, &resp)
372 return
373 }
374
375 // Retrieve
376 func (r Location_Datacenter) GetPathString() (resp string, err error) {
377 err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getPathString", nil, &r.Options, &resp)
378 return
379 }
380
381 // Retrieve
382 func (r Location_Datacenter) GetPresaleEvents() (resp []datatypes.Sales_Presale_Event, err error) {
383 err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getPresaleEvents", nil, &r.Options, &resp)
384 return
385 }
386
387 // Retrieve A location can be a member of 1 or more Price Groups. This will show which groups to which a location belongs.
388 func (r Location_Datacenter) GetPriceGroups() (resp []datatypes.Location_Group, err error) {
389 err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getPriceGroups", nil, &r.Options, &resp)
390 return
391 }
392
393 // Retrieve The regional group this datacenter belongs to.
394 func (r Location_Datacenter) GetRegionalGroup() (resp datatypes.Location_Group_Regional, err error) {
395 err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getRegionalGroup", nil, &r.Options, &resp)
396 return
397 }
398
399 // Retrieve
400 func (r Location_Datacenter) GetRegionalInternetRegistry() (resp datatypes.Network_Regional_Internet_Registry, err error) {
401 err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getRegionalInternetRegistry", nil, &r.Options, &resp)
402 return
403 }
404
405 // Retrieve A location can be a member of 1 or more regions. This will show which regions to which a location belongs.
406 func (r Location_Datacenter) GetRegions() (resp []datatypes.Location_Region, err error) {
407 err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getRegions", nil, &r.Options, &resp)
408 return
409 }
410
411 // Retrieve a graph of a SoftLayer datacenter's last 48 hours of network activity. Statistics graphs show traffic outbound from a datacenter on top and inbound traffic on the bottom followed by a legend of the network services tracked in the graph. getStatisticsGraphImage returns a PNG image of variable width and height depending on the number of services reported in the image.
412 func (r Location_Datacenter) GetStatisticsGraphImage() (resp []byte, err error) {
413 err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getStatisticsGraphImage", nil, &r.Options, &resp)
414 return
415 }
416
417 // Retrieve
418 func (r Location_Datacenter) GetTimezone() (resp datatypes.Locale_Timezone, err error) {
419 err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getTimezone", nil, &r.Options, &resp)
420 return
421 }
422
423 // Retrieve A location can be a member of 1 Bandwidth Pooling Group. This will show which group to which a location belongs.
424 func (r Location_Datacenter) GetVdrGroup() (resp datatypes.Location_Group_Location_CrossReference, err error) {
425 err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getVdrGroup", nil, &r.Options, &resp)
426 return
427 }
428
429 // Retrieve all datacenter locations. SoftLayer's datacenters exist in various cities and each contain one or more server rooms which house network and server infrastructure.
430 func (r Location_Datacenter) GetViewableDatacenters() (resp []datatypes.Location, err error) {
431 err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getViewableDatacenters", nil, &r.Options, &resp)
432 return
433 }
434
435 // Retrieve all viewable pop and datacenter locations.
436 func (r Location_Datacenter) GetViewablePopsAndDataCenters() (resp []datatypes.Location, err error) {
437 err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getViewablePopsAndDataCenters", nil, &r.Options, &resp)
438 return
439 }
440
441 // Retrieve all viewable network locations.
442 func (r Location_Datacenter) GetViewablepointOfPresence() (resp []datatypes.Location, err error) {
443 err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getViewablepointOfPresence", nil, &r.Options, &resp)
444 return
445 }
446
447 // Retrieve all point of presence locations.
448 func (r Location_Datacenter) GetpointOfPresence() (resp []datatypes.Location, err error) {
449 err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getpointOfPresence", nil, &r.Options, &resp)
450 return
451 }
452
453 // no documentation yet
454 type Location_Group struct {
455 Session session.SLSession
456 Options sl.Options
457 }
458
459 // GetLocationGroupService returns an instance of the Location_Group SoftLayer service
460 func GetLocationGroupService(sess session.SLSession) Location_Group {
461 return Location_Group{Session: sess}
462 }
463
464 func (r Location_Group) Id(id int) Location_Group {
465 r.Options.Id = &id
466 return r
467 }
468
469 func (r Location_Group) Mask(mask string) Location_Group {
470 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
471 mask = fmt.Sprintf("mask[%s]", mask)
472 }
473
474 r.Options.Mask = mask
475 return r
476 }
477
478 func (r Location_Group) Filter(filter string) Location_Group {
479 r.Options.Filter = filter
480 return r
481 }
482
483 func (r Location_Group) Limit(limit int) Location_Group {
484 r.Options.Limit = &limit
485 return r
486 }
487
488 func (r Location_Group) Offset(offset int) Location_Group {
489 r.Options.Offset = &offset
490 return r
491 }
492
493 // no documentation yet
494 func (r Location_Group) GetAllObjects() (resp []datatypes.Location_Group, err error) {
495 err = r.Session.DoRequest("SoftLayer_Location_Group", "getAllObjects", nil, &r.Options, &resp)
496 return
497 }
498
499 // Retrieve The type for this location group.
500 func (r Location_Group) GetLocationGroupType() (resp datatypes.Location_Group_Type, err error) {
501 err = r.Session.DoRequest("SoftLayer_Location_Group", "getLocationGroupType", nil, &r.Options, &resp)
502 return
503 }
504
505 // Retrieve The locations in a group.
506 func (r Location_Group) GetLocations() (resp []datatypes.Location, err error) {
507 err = r.Session.DoRequest("SoftLayer_Location_Group", "getLocations", nil, &r.Options, &resp)
508 return
509 }
510
511 // no documentation yet
512 func (r Location_Group) GetObject() (resp datatypes.Location_Group, err error) {
513 err = r.Session.DoRequest("SoftLayer_Location_Group", "getObject", nil, &r.Options, &resp)
514 return
515 }
516
517 // no documentation yet
518 type Location_Group_Pricing struct {
519 Session session.SLSession
520 Options sl.Options
521 }
522
523 // GetLocationGroupPricingService returns an instance of the Location_Group_Pricing SoftLayer service
524 func GetLocationGroupPricingService(sess session.SLSession) Location_Group_Pricing {
525 return Location_Group_Pricing{Session: sess}
526 }
527
528 func (r Location_Group_Pricing) Id(id int) Location_Group_Pricing {
529 r.Options.Id = &id
530 return r
531 }
532
533 func (r Location_Group_Pricing) Mask(mask string) Location_Group_Pricing {
534 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
535 mask = fmt.Sprintf("mask[%s]", mask)
536 }
537
538 r.Options.Mask = mask
539 return r
540 }
541
542 func (r Location_Group_Pricing) Filter(filter string) Location_Group_Pricing {
543 r.Options.Filter = filter
544 return r
545 }
546
547 func (r Location_Group_Pricing) Limit(limit int) Location_Group_Pricing {
548 r.Options.Limit = &limit
549 return r
550 }
551
552 func (r Location_Group_Pricing) Offset(offset int) Location_Group_Pricing {
553 r.Options.Offset = &offset
554 return r
555 }
556
557 // no documentation yet
558 func (r Location_Group_Pricing) GetAllObjects() (resp []datatypes.Location_Group, err error) {
559 err = r.Session.DoRequest("SoftLayer_Location_Group_Pricing", "getAllObjects", nil, &r.Options, &resp)
560 return
561 }
562
563 // Retrieve The type for this location group.
564 func (r Location_Group_Pricing) GetLocationGroupType() (resp datatypes.Location_Group_Type, err error) {
565 err = r.Session.DoRequest("SoftLayer_Location_Group_Pricing", "getLocationGroupType", nil, &r.Options, &resp)
566 return
567 }
568
569 // Retrieve The locations in a group.
570 func (r Location_Group_Pricing) GetLocations() (resp []datatypes.Location, err error) {
571 err = r.Session.DoRequest("SoftLayer_Location_Group_Pricing", "getLocations", nil, &r.Options, &resp)
572 return
573 }
574
575 // no documentation yet
576 func (r Location_Group_Pricing) GetObject() (resp datatypes.Location_Group_Pricing, err error) {
577 err = r.Session.DoRequest("SoftLayer_Location_Group_Pricing", "getObject", nil, &r.Options, &resp)
578 return
579 }
580
581 // Retrieve The prices that this pricing location group limits. All of these prices will only be available in the locations defined by this pricing location group.
582 func (r Location_Group_Pricing) GetPrices() (resp []datatypes.Product_Item_Price, err error) {
583 err = r.Session.DoRequest("SoftLayer_Location_Group_Pricing", "getPrices", nil, &r.Options, &resp)
584 return
585 }
586
587 // no documentation yet
588 type Location_Group_Regional struct {
589 Session session.SLSession
590 Options sl.Options
591 }
592
593 // GetLocationGroupRegionalService returns an instance of the Location_Group_Regional SoftLayer service
594 func GetLocationGroupRegionalService(sess session.SLSession) Location_Group_Regional {
595 return Location_Group_Regional{Session: sess}
596 }
597
598 func (r Location_Group_Regional) Id(id int) Location_Group_Regional {
599 r.Options.Id = &id
600 return r
601 }
602
603 func (r Location_Group_Regional) Mask(mask string) Location_Group_Regional {
604 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
605 mask = fmt.Sprintf("mask[%s]", mask)
606 }
607
608 r.Options.Mask = mask
609 return r
610 }
611
612 func (r Location_Group_Regional) Filter(filter string) Location_Group_Regional {
613 r.Options.Filter = filter
614 return r
615 }
616
617 func (r Location_Group_Regional) Limit(limit int) Location_Group_Regional {
618 r.Options.Limit = &limit
619 return r
620 }
621
622 func (r Location_Group_Regional) Offset(offset int) Location_Group_Regional {
623 r.Options.Offset = &offset
624 return r
625 }
626
627 // no documentation yet
628 func (r Location_Group_Regional) GetAllObjects() (resp []datatypes.Location_Group, err error) {
629 err = r.Session.DoRequest("SoftLayer_Location_Group_Regional", "getAllObjects", nil, &r.Options, &resp)
630 return
631 }
632
633 // Retrieve The datacenters in a group.
634 func (r Location_Group_Regional) GetDatacenters() (resp []datatypes.Location, err error) {
635 err = r.Session.DoRequest("SoftLayer_Location_Group_Regional", "getDatacenters", nil, &r.Options, &resp)
636 return
637 }
638
639 // Retrieve The type for this location group.
640 func (r Location_Group_Regional) GetLocationGroupType() (resp datatypes.Location_Group_Type, err error) {
641 err = r.Session.DoRequest("SoftLayer_Location_Group_Regional", "getLocationGroupType", nil, &r.Options, &resp)
642 return
643 }
644
645 // Retrieve The locations in a group.
646 func (r Location_Group_Regional) GetLocations() (resp []datatypes.Location, err error) {
647 err = r.Session.DoRequest("SoftLayer_Location_Group_Regional", "getLocations", nil, &r.Options, &resp)
648 return
649 }
650
651 // no documentation yet
652 func (r Location_Group_Regional) GetObject() (resp datatypes.Location_Group_Regional, err error) {
653 err = r.Session.DoRequest("SoftLayer_Location_Group_Regional", "getObject", nil, &r.Options, &resp)
654 return
655 }
656
657 // Retrieve The preferred datacenters of a group.
658 func (r Location_Group_Regional) GetPreferredDatacenter() (resp datatypes.Location_Datacenter, err error) {
659 err = r.Session.DoRequest("SoftLayer_Location_Group_Regional", "getPreferredDatacenter", nil, &r.Options, &resp)
660 return
661 }
662
663 // no documentation yet
664 type Location_Reservation struct {
665 Session session.SLSession
666 Options sl.Options
667 }
668
669 // GetLocationReservationService returns an instance of the Location_Reservation SoftLayer service
670 func GetLocationReservationService(sess session.SLSession) Location_Reservation {
671 return Location_Reservation{Session: sess}
672 }
673
674 func (r Location_Reservation) Id(id int) Location_Reservation {
675 r.Options.Id = &id
676 return r
677 }
678
679 func (r Location_Reservation) Mask(mask string) Location_Reservation {
680 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
681 mask = fmt.Sprintf("mask[%s]", mask)
682 }
683
684 r.Options.Mask = mask
685 return r
686 }
687
688 func (r Location_Reservation) Filter(filter string) Location_Reservation {
689 r.Options.Filter = filter
690 return r
691 }
692
693 func (r Location_Reservation) Limit(limit int) Location_Reservation {
694 r.Options.Limit = &limit
695 return r
696 }
697
698 func (r Location_Reservation) Offset(offset int) Location_Reservation {
699 r.Options.Offset = &offset
700 return r
701 }
702
703 // Retrieve The account that a billing item belongs to.
704 func (r Location_Reservation) GetAccount() (resp datatypes.Account, err error) {
705 err = r.Session.DoRequest("SoftLayer_Location_Reservation", "getAccount", nil, &r.Options, &resp)
706 return
707 }
708
709 // no documentation yet
710 func (r Location_Reservation) GetAccountReservations() (resp []datatypes.Location_Reservation, err error) {
711 err = r.Session.DoRequest("SoftLayer_Location_Reservation", "getAccountReservations", nil, &r.Options, &resp)
712 return
713 }
714
715 // Retrieve The bandwidth allotment that the reservation belongs to.
716 func (r Location_Reservation) GetAllotment() (resp datatypes.Network_Bandwidth_Version1_Allotment, err error) {
717 err = r.Session.DoRequest("SoftLayer_Location_Reservation", "getAllotment", nil, &r.Options, &resp)
718 return
719 }
720
721 // Retrieve The bandwidth allotment that the reservation belongs to.
722 func (r Location_Reservation) GetBillingItem() (resp datatypes.Billing_Item, err error) {
723 err = r.Session.DoRequest("SoftLayer_Location_Reservation", "getBillingItem", nil, &r.Options, &resp)
724 return
725 }
726
727 // Retrieve The datacenter location that the reservation belongs to.
728 func (r Location_Reservation) GetLocation() (resp datatypes.Location, err error) {
729 err = r.Session.DoRequest("SoftLayer_Location_Reservation", "getLocation", nil, &r.Options, &resp)
730 return
731 }
732
733 // Retrieve Rack information for the reservation
734 func (r Location_Reservation) GetLocationReservationRack() (resp datatypes.Location_Reservation_Rack, err error) {
735 err = r.Session.DoRequest("SoftLayer_Location_Reservation", "getLocationReservationRack", nil, &r.Options, &resp)
736 return
737 }
738
739 // no documentation yet
740 func (r Location_Reservation) GetObject() (resp datatypes.Location_Reservation, err error) {
741 err = r.Session.DoRequest("SoftLayer_Location_Reservation", "getObject", nil, &r.Options, &resp)
742 return
743 }
744
745 // no documentation yet
746 type Location_Reservation_Rack struct {
747 Session session.SLSession
748 Options sl.Options
749 }
750
751 // GetLocationReservationRackService returns an instance of the Location_Reservation_Rack SoftLayer service
752 func GetLocationReservationRackService(sess session.SLSession) Location_Reservation_Rack {
753 return Location_Reservation_Rack{Session: sess}
754 }
755
756 func (r Location_Reservation_Rack) Id(id int) Location_Reservation_Rack {
757 r.Options.Id = &id
758 return r
759 }
760
761 func (r Location_Reservation_Rack) Mask(mask string) Location_Reservation_Rack {
762 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
763 mask = fmt.Sprintf("mask[%s]", mask)
764 }
765
766 r.Options.Mask = mask
767 return r
768 }
769
770 func (r Location_Reservation_Rack) Filter(filter string) Location_Reservation_Rack {
771 r.Options.Filter = filter
772 return r
773 }
774
775 func (r Location_Reservation_Rack) Limit(limit int) Location_Reservation_Rack {
776 r.Options.Limit = &limit
777 return r
778 }
779
780 func (r Location_Reservation_Rack) Offset(offset int) Location_Reservation_Rack {
781 r.Options.Offset = &offset
782 return r
783 }
784
785 // Retrieve The bandwidth allotment that the reservation belongs to.
786 func (r Location_Reservation_Rack) GetAllotment() (resp datatypes.Network_Bandwidth_Version1_Allotment, err error) {
787 err = r.Session.DoRequest("SoftLayer_Location_Reservation_Rack", "getAllotment", nil, &r.Options, &resp)
788 return
789 }
790
791 // Retrieve Members of the rack.
792 func (r Location_Reservation_Rack) GetChildren() (resp []datatypes.Location_Reservation_Rack_Member, err error) {
793 err = r.Session.DoRequest("SoftLayer_Location_Reservation_Rack", "getChildren", nil, &r.Options, &resp)
794 return
795 }
796
797 // Retrieve
798 func (r Location_Reservation_Rack) GetLocation() (resp datatypes.Location, err error) {
799 err = r.Session.DoRequest("SoftLayer_Location_Reservation_Rack", "getLocation", nil, &r.Options, &resp)
800 return
801 }
802
803 // Retrieve
804 func (r Location_Reservation_Rack) GetLocationReservation() (resp datatypes.Location_Reservation, err error) {
805 err = r.Session.DoRequest("SoftLayer_Location_Reservation_Rack", "getLocationReservation", nil, &r.Options, &resp)
806 return
807 }
808
809 // no documentation yet
810 func (r Location_Reservation_Rack) GetObject() (resp datatypes.Location_Reservation_Rack, err error) {
811 err = r.Session.DoRequest("SoftLayer_Location_Reservation_Rack", "getObject", nil, &r.Options, &resp)
812 return
813 }
814
815 // no documentation yet
816 type Location_Reservation_Rack_Member struct {
817 Session session.SLSession
818 Options sl.Options
819 }
820
821 // GetLocationReservationRackMemberService returns an instance of the Location_Reservation_Rack_Member SoftLayer service
822 func GetLocationReservationRackMemberService(sess session.SLSession) Location_Reservation_Rack_Member {
823 return Location_Reservation_Rack_Member{Session: sess}
824 }
825
826 func (r Location_Reservation_Rack_Member) Id(id int) Location_Reservation_Rack_Member {
827 r.Options.Id = &id
828 return r
829 }
830
831 func (r Location_Reservation_Rack_Member) Mask(mask string) Location_Reservation_Rack_Member {
832 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
833 mask = fmt.Sprintf("mask[%s]", mask)
834 }
835
836 r.Options.Mask = mask
837 return r
838 }
839
840 func (r Location_Reservation_Rack_Member) Filter(filter string) Location_Reservation_Rack_Member {
841 r.Options.Filter = filter
842 return r
843 }
844
845 func (r Location_Reservation_Rack_Member) Limit(limit int) Location_Reservation_Rack_Member {
846 r.Options.Limit = &limit
847 return r
848 }
849
850 func (r Location_Reservation_Rack_Member) Offset(offset int) Location_Reservation_Rack_Member {
851 r.Options.Offset = &offset
852 return r
853 }
854
855 // Retrieve Location relation for the rack member
856 func (r Location_Reservation_Rack_Member) GetLocation() (resp datatypes.Location, err error) {
857 err = r.Session.DoRequest("SoftLayer_Location_Reservation_Rack_Member", "getLocation", nil, &r.Options, &resp)
858 return
859 }
860
861 // Retrieve
862 func (r Location_Reservation_Rack_Member) GetLocationReservationRack() (resp datatypes.Location_Reservation_Rack, err error) {
863 err = r.Session.DoRequest("SoftLayer_Location_Reservation_Rack_Member", "getLocationReservationRack", nil, &r.Options, &resp)
864 return
865 }
866
867 // no documentation yet
868 func (r Location_Reservation_Rack_Member) GetObject() (resp datatypes.Location_Reservation_Rack_Member, err error) {
869 err = r.Session.DoRequest("SoftLayer_Location_Reservation_Rack_Member", "getObject", nil, &r.Options, &resp)
870 return
871 }
872