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