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