product.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 // The SoftLayer_Product_Item data type contains general information relating to a single SoftLayer product.
26 type Product_Item struct {
27 Session session.SLSession
28 Options sl.Options
29 }
30
31 // GetProductItemService returns an instance of the Product_Item SoftLayer service
32 func GetProductItemService(sess session.SLSession) Product_Item {
33 return Product_Item{Session: sess}
34 }
35
36 func (r Product_Item) Id(id int) Product_Item {
37 r.Options.Id = &id
38 return r
39 }
40
41 func (r Product_Item) Mask(mask string) Product_Item {
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 Product_Item) Filter(filter string) Product_Item {
51 r.Options.Filter = filter
52 return r
53 }
54
55 func (r Product_Item) Limit(limit int) Product_Item {
56 r.Options.Limit = &limit
57 return r
58 }
59
60 func (r Product_Item) Offset(offset int) Product_Item {
61 r.Options.Offset = &offset
62 return r
63 }
64
65 // Retrieve
66 func (r Product_Item) GetActivePresaleEvents() (resp []datatypes.Sales_Presale_Event, err error) {
67 err = r.Session.DoRequest("SoftLayer_Product_Item", "getActivePresaleEvents", nil, &r.Options, &resp)
68 return
69 }
70
71 // Retrieve Active usage based prices.
72 func (r Product_Item) GetActiveUsagePrices() (resp []datatypes.Product_Item_Price, err error) {
73 err = r.Session.DoRequest("SoftLayer_Product_Item", "getActiveUsagePrices", nil, &r.Options, &resp)
74 return
75 }
76
77 // Retrieve The attribute values for a product item. These are additional properties that give extra information about the product being sold.
78 func (r Product_Item) GetAttributes() (resp []datatypes.Product_Item_Attribute, err error) {
79 err = r.Session.DoRequest("SoftLayer_Product_Item", "getAttributes", nil, &r.Options, &resp)
80 return
81 }
82
83 // Retrieve Attributes that govern when an item may no longer be available.
84 func (r Product_Item) GetAvailabilityAttributes() (resp []datatypes.Product_Item_Attribute, err error) {
85 err = r.Session.DoRequest("SoftLayer_Product_Item", "getAvailabilityAttributes", nil, &r.Options, &resp)
86 return
87 }
88
89 // Retrieve An item's special billing type, if applicable.
90 func (r Product_Item) GetBillingType() (resp string, err error) {
91 err = r.Session.DoRequest("SoftLayer_Product_Item", "getBillingType", nil, &r.Options, &resp)
92 return
93 }
94
95 // Retrieve An item's included product item references. Some items have other items included in them that we specifically detail. They are here called Bundled Items. An example is Plesk unlimited. It as a bundled item labeled 'SiteBuilder'. These are the SoftLayer_Product_Item_Bundles objects. See the SoftLayer_Product_Item::bundleItems property for bundle of SoftLayer_Product_Item of objects.
96 func (r Product_Item) GetBundle() (resp []datatypes.Product_Item_Bundles, err error) {
97 err = r.Session.DoRequest("SoftLayer_Product_Item", "getBundle", nil, &r.Options, &resp)
98 return
99 }
100
101 // Retrieve An item's included products. Some items have other items included in them that we specifically detail. They are here called Bundled Items. An example is Plesk unlimited. It as a bundled item labeled 'SiteBuilder'. These are the SoftLayer_Product_Item objects.
102 func (r Product_Item) GetBundleItems() (resp []datatypes.Product_Item, err error) {
103 err = r.Session.DoRequest("SoftLayer_Product_Item", "getBundleItems", nil, &r.Options, &resp)
104 return
105 }
106
107 // Retrieve When the product capacity is best described as a range, this holds the ceiling of the range.
108 func (r Product_Item) GetCapacityMaximum() (resp string, err error) {
109 err = r.Session.DoRequest("SoftLayer_Product_Item", "getCapacityMaximum", nil, &r.Options, &resp)
110 return
111 }
112
113 // Retrieve When the product capacity is best described as a range, this holds the floor of the range.
114 func (r Product_Item) GetCapacityMinimum() (resp string, err error) {
115 err = r.Session.DoRequest("SoftLayer_Product_Item", "getCapacityMinimum", nil, &r.Options, &resp)
116 return
117 }
118
119 // Retrieve This flag indicates that this product is restricted by a capacity on a related product.
120 func (r Product_Item) GetCapacityRestrictedProductFlag() (resp bool, err error) {
121 err = r.Session.DoRequest("SoftLayer_Product_Item", "getCapacityRestrictedProductFlag", nil, &r.Options, &resp)
122 return
123 }
124
125 // Retrieve An item's associated item categories.
126 func (r Product_Item) GetCategories() (resp []datatypes.Product_Item_Category, err error) {
127 err = r.Session.DoRequest("SoftLayer_Product_Item", "getCategories", nil, &r.Options, &resp)
128 return
129 }
130
131 // Retrieve Some product items have configuration templates which can be used to during provisioning of that product.
132 func (r Product_Item) GetConfigurationTemplates() (resp []datatypes.Configuration_Template, err error) {
133 err = r.Session.DoRequest("SoftLayer_Product_Item", "getConfigurationTemplates", nil, &r.Options, &resp)
134 return
135 }
136
137 // Retrieve An item's conflicts. For example, McAfee LinuxShield cannot be ordered with Windows. It was not meant for that operating system and as such is a conflict.
138 func (r Product_Item) GetConflicts() (resp []datatypes.Product_Item_Resource_Conflict, err error) {
139 err = r.Session.DoRequest("SoftLayer_Product_Item", "getConflicts", nil, &r.Options, &resp)
140 return
141 }
142
143 // Retrieve This flag indicates that this product is restricted by the number of cores on the compute instance. This is deprecated. Use [[SoftLayer_Product_Item/getCapacityRestrictedProductFlag|getCapacityRestrictedProductFlag]]
144 func (r Product_Item) GetCoreRestrictedItemFlag() (resp bool, err error) {
145 err = r.Session.DoRequest("SoftLayer_Product_Item", "getCoreRestrictedItemFlag", nil, &r.Options, &resp)
146 return
147 }
148
149 // Retrieve Some product items have a downgrade path. This is the first product item in the downgrade path.
150 func (r Product_Item) GetDowngradeItem() (resp datatypes.Product_Item, err error) {
151 err = r.Session.DoRequest("SoftLayer_Product_Item", "getDowngradeItem", nil, &r.Options, &resp)
152 return
153 }
154
155 // Retrieve Some product items have a downgrade path. These are those product items.
156 func (r Product_Item) GetDowngradeItems() (resp []datatypes.Product_Item, err error) {
157 err = r.Session.DoRequest("SoftLayer_Product_Item", "getDowngradeItems", nil, &r.Options, &resp)
158 return
159 }
160
161 // Retrieve An item's category conflicts. For example, 10 Gbps redundant network functionality cannot be ordered with a secondary GPU and as such is a conflict.
162 func (r Product_Item) GetGlobalCategoryConflicts() (resp []datatypes.Product_Item_Resource_Conflict, err error) {
163 err = r.Session.DoRequest("SoftLayer_Product_Item", "getGlobalCategoryConflicts", nil, &r.Options, &resp)
164 return
165 }
166
167 // Retrieve The generic hardware component that this item represents.
168 func (r Product_Item) GetHardwareGenericComponentModel() (resp datatypes.Hardware_Component_Model_Generic, err error) {
169 err = r.Session.DoRequest("SoftLayer_Product_Item", "getHardwareGenericComponentModel", nil, &r.Options, &resp)
170 return
171 }
172
173 // Retrieve
174 func (r Product_Item) GetHideFromPortalFlag() (resp bool, err error) {
175 err = r.Session.DoRequest("SoftLayer_Product_Item", "getHideFromPortalFlag", nil, &r.Options, &resp)
176 return
177 }
178
179 // Retrieve
180 func (r Product_Item) GetIneligibleForAccountDiscountFlag() (resp bool, err error) {
181 err = r.Session.DoRequest("SoftLayer_Product_Item", "getIneligibleForAccountDiscountFlag", nil, &r.Options, &resp)
182 return
183 }
184
185 // Retrieve DEPRECATED. An item's inventory status per datacenter.
186 func (r Product_Item) GetInventory() (resp []datatypes.Product_Package_Inventory, err error) {
187 err = r.Session.DoRequest("SoftLayer_Product_Item", "getInventory", nil, &r.Options, &resp)
188 return
189 }
190
191 // Retrieve Flag to indicate the server product is engineered for a multi-server solution. (Deprecated)
192 func (r Product_Item) GetIsEngineeredServerProduct() (resp bool, err error) {
193 err = r.Session.DoRequest("SoftLayer_Product_Item", "getIsEngineeredServerProduct", nil, &r.Options, &resp)
194 return
195 }
196
197 // Retrieve An item's primary item category.
198 func (r Product_Item) GetItemCategory() (resp datatypes.Product_Item_Category, err error) {
199 err = r.Session.DoRequest("SoftLayer_Product_Item", "getItemCategory", nil, &r.Options, &resp)
200 return
201 }
202
203 // Retrieve
204 func (r Product_Item) GetLocalDiskFlag() (resp bool, err error) {
205 err = r.Session.DoRequest("SoftLayer_Product_Item", "getLocalDiskFlag", nil, &r.Options, &resp)
206 return
207 }
208
209 // Retrieve An item's location conflicts. For example, Dual Path network functionality cannot be ordered in WDC and as such is a conflict.
210 func (r Product_Item) GetLocationConflicts() (resp []datatypes.Product_Item_Resource_Conflict, err error) {
211 err = r.Session.DoRequest("SoftLayer_Product_Item", "getLocationConflicts", nil, &r.Options, &resp)
212 return
213 }
214
215 // Retrieve Indicates whether an item is a M.2 disk controller.
216 func (r Product_Item) GetM2ControllerFlag() (resp bool, err error) {
217 err = r.Session.DoRequest("SoftLayer_Product_Item", "getM2ControllerFlag", nil, &r.Options, &resp)
218 return
219 }
220
221 // Retrieve Indicates whether an item is a M.2 drive.
222 func (r Product_Item) GetM2DriveFlag() (resp bool, err error) {
223 err = r.Session.DoRequest("SoftLayer_Product_Item", "getM2DriveFlag", nil, &r.Options, &resp)
224 return
225 }
226
227 // Retrieve The minimum number of bays that support NVMe SSDs.
228 func (r Product_Item) GetMinimumNvmeBays() (resp int, err error) {
229 err = r.Session.DoRequest("SoftLayer_Product_Item", "getMinimumNvmeBays", nil, &r.Options, &resp)
230 return
231 }
232
233 // Retrieve Indicates whether an item is a NVMe SSD.
234 func (r Product_Item) GetNvmeDiskFlag() (resp bool, err error) {
235 err = r.Session.DoRequest("SoftLayer_Product_Item", "getNvmeDiskFlag", nil, &r.Options, &resp)
236 return
237 }
238
239 // Product Items are the products SoftLayer sells. Items have many properties that help describe what each is for. Each product items holds within it a description, tax rate information, status, and upgrade downgrade path information.
240 func (r Product_Item) GetObject() (resp datatypes.Product_Item, err error) {
241 err = r.Session.DoRequest("SoftLayer_Product_Item", "getObject", nil, &r.Options, &resp)
242 return
243 }
244
245 // Retrieve
246 func (r Product_Item) GetObjectStorageClusterGeolocationType() (resp string, err error) {
247 err = r.Session.DoRequest("SoftLayer_Product_Item", "getObjectStorageClusterGeolocationType", nil, &r.Options, &resp)
248 return
249 }
250
251 // Retrieve
252 func (r Product_Item) GetObjectStorageItemFlag() (resp bool, err error) {
253 err = r.Session.DoRequest("SoftLayer_Product_Item", "getObjectStorageItemFlag", nil, &r.Options, &resp)
254 return
255 }
256
257 // Retrieve
258 func (r Product_Item) GetObjectStorageServiceClass() (resp string, err error) {
259 err = r.Session.DoRequest("SoftLayer_Product_Item", "getObjectStorageServiceClass", nil, &r.Options, &resp)
260 return
261 }
262
263 // Retrieve A collection of all the SoftLayer_Product_Package(s) in which this item exists.
264 func (r Product_Item) GetPackages() (resp []datatypes.Product_Package, err error) {
265 err = r.Session.DoRequest("SoftLayer_Product_Item", "getPackages", nil, &r.Options, &resp)
266 return
267 }
268
269 // Retrieve Indicates whether an item is a PCIe drive.
270 func (r Product_Item) GetPcieDriveFlag() (resp bool, err error) {
271 err = r.Session.DoRequest("SoftLayer_Product_Item", "getPcieDriveFlag", nil, &r.Options, &resp)
272 return
273 }
274
275 // Retrieve The number of cores that a processor has.
276 func (r Product_Item) GetPhysicalCoreCapacity() (resp string, err error) {
277 err = r.Session.DoRequest("SoftLayer_Product_Item", "getPhysicalCoreCapacity", nil, &r.Options, &resp)
278 return
279 }
280
281 // Retrieve
282 func (r Product_Item) GetPresaleEvents() (resp []datatypes.Sales_Presale_Event, err error) {
283 err = r.Session.DoRequest("SoftLayer_Product_Item", "getPresaleEvents", nil, &r.Options, &resp)
284 return
285 }
286
287 // Retrieve A product item's prices.
288 func (r Product_Item) GetPrices() (resp []datatypes.Product_Item_Price, err error) {
289 err = r.Session.DoRequest("SoftLayer_Product_Item", "getPrices", nil, &r.Options, &resp)
290 return
291 }
292
293 // Retrieve The number of private network interfaces provided by a port_speed product.
294 func (r Product_Item) GetPrivateInterfaceCount() (resp uint, err error) {
295 err = r.Session.DoRequest("SoftLayer_Product_Item", "getPrivateInterfaceCount", nil, &r.Options, &resp)
296 return
297 }
298
299 // Retrieve The number of public network interfaces provided by a port_speed product.
300 func (r Product_Item) GetPublicInterfaceCount() (resp uint, err error) {
301 err = r.Session.DoRequest("SoftLayer_Product_Item", "getPublicInterfaceCount", nil, &r.Options, &resp)
302 return
303 }
304
305 // Retrieve If an item must be ordered with another item, it will have a requirement item here.
306 func (r Product_Item) GetRequirements() (resp []datatypes.Product_Item_Requirement, err error) {
307 err = r.Session.DoRequest("SoftLayer_Product_Item", "getRequirements", nil, &r.Options, &resp)
308 return
309 }
310
311 // Retrieve An item's rules. This includes the requirements and conflicts to resources that an item has.
312 func (r Product_Item) GetRules() (resp []datatypes.Product_Item_Rule, err error) {
313 err = r.Session.DoRequest("SoftLayer_Product_Item", "getRules", nil, &r.Options, &resp)
314 return
315 }
316
317 // Retrieve The SoftLayer_Software_Description tied to this item. This will only be populated for software items.
318 func (r Product_Item) GetSoftwareDescription() (resp datatypes.Software_Description, err error) {
319 err = r.Session.DoRequest("SoftLayer_Product_Item", "getSoftwareDescription", nil, &r.Options, &resp)
320 return
321 }
322
323 // Retrieve The total number of cores for a speed select server product.
324 func (r Product_Item) GetSpeedSelectServerCoreCount() (resp string, err error) {
325 err = r.Session.DoRequest("SoftLayer_Product_Item", "getSpeedSelectServerCoreCount", nil, &r.Options, &resp)
326 return
327 }
328
329 // Retrieve Indicates a speed select server item.
330 func (r Product_Item) GetSpeedSelectServerFlag() (resp bool, err error) {
331 err = r.Session.DoRequest("SoftLayer_Product_Item", "getSpeedSelectServerFlag", nil, &r.Options, &resp)
332 return
333 }
334
335 // Retrieve The supported settings profiles for a server product.
336 func (r Product_Item) GetSupportedBiosSettingsProfiles() (resp []string, err error) {
337 err = r.Session.DoRequest("SoftLayer_Product_Item", "getSupportedBiosSettingsProfiles", nil, &r.Options, &resp)
338 return
339 }
340
341 // Retrieve An item's tax category, if applicable.
342 func (r Product_Item) GetTaxCategory() (resp datatypes.Product_Item_Tax_Category, err error) {
343 err = r.Session.DoRequest("SoftLayer_Product_Item", "getTaxCategory", nil, &r.Options, &resp)
344 return
345 }
346
347 // Retrieve Third-party policy assignments for this product.
348 func (r Product_Item) GetThirdPartyPolicyAssignments() (resp []datatypes.Product_Item_Policy_Assignment, err error) {
349 err = r.Session.DoRequest("SoftLayer_Product_Item", "getThirdPartyPolicyAssignments", nil, &r.Options, &resp)
350 return
351 }
352
353 // Retrieve The 3rd party vendor for a support subscription item. (Deprecated)
354 func (r Product_Item) GetThirdPartySupportVendor() (resp string, err error) {
355 err = r.Session.DoRequest("SoftLayer_Product_Item", "getThirdPartySupportVendor", nil, &r.Options, &resp)
356 return
357 }
358
359 // Retrieve The total number of physical processing cores (excluding virtual cores / hyperthreads) for this server.
360 func (r Product_Item) GetTotalPhysicalCoreCapacity() (resp int, err error) {
361 err = r.Session.DoRequest("SoftLayer_Product_Item", "getTotalPhysicalCoreCapacity", nil, &r.Options, &resp)
362 return
363 }
364
365 // Retrieve Shows the total number of cores. This is deprecated. Use [[SoftLayer_Product_Item/getCapacity|getCapacity]] for guest_core products and [[SoftLayer_Product_Item/getTotalPhysicalCoreCapacity|getTotalPhysicalCoreCapacity]] for server products
366 func (r Product_Item) GetTotalPhysicalCoreCount() (resp int, err error) {
367 err = r.Session.DoRequest("SoftLayer_Product_Item", "getTotalPhysicalCoreCount", nil, &r.Options, &resp)
368 return
369 }
370
371 // Retrieve The total number of processors for this server.
372 func (r Product_Item) GetTotalProcessorCapacity() (resp int, err error) {
373 err = r.Session.DoRequest("SoftLayer_Product_Item", "getTotalProcessorCapacity", nil, &r.Options, &resp)
374 return
375 }
376
377 // Retrieve Some product items have an upgrade path. This is the next product item in the upgrade path.
378 func (r Product_Item) GetUpgradeItem() (resp datatypes.Product_Item, err error) {
379 err = r.Session.DoRequest("SoftLayer_Product_Item", "getUpgradeItem", nil, &r.Options, &resp)
380 return
381 }
382
383 // Retrieve Some product items have an upgrade path. These are those upgrade product items.
384 func (r Product_Item) GetUpgradeItems() (resp []datatypes.Product_Item, err error) {
385 err = r.Session.DoRequest("SoftLayer_Product_Item", "getUpgradeItems", nil, &r.Options, &resp)
386 return
387 }
388
389 // The SoftLayer_Product_Item_Category data type contains general category information for prices.
390 type Product_Item_Category struct {
391 Session session.SLSession
392 Options sl.Options
393 }
394
395 // GetProductItemCategoryService returns an instance of the Product_Item_Category SoftLayer service
396 func GetProductItemCategoryService(sess session.SLSession) Product_Item_Category {
397 return Product_Item_Category{Session: sess}
398 }
399
400 func (r Product_Item_Category) Id(id int) Product_Item_Category {
401 r.Options.Id = &id
402 return r
403 }
404
405 func (r Product_Item_Category) Mask(mask string) Product_Item_Category {
406 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
407 mask = fmt.Sprintf("mask[%s]", mask)
408 }
409
410 r.Options.Mask = mask
411 return r
412 }
413
414 func (r Product_Item_Category) Filter(filter string) Product_Item_Category {
415 r.Options.Filter = filter
416 return r
417 }
418
419 func (r Product_Item_Category) Limit(limit int) Product_Item_Category {
420 r.Options.Limit = &limit
421 return r
422 }
423
424 func (r Product_Item_Category) Offset(offset int) Product_Item_Category {
425 r.Options.Offset = &offset
426 return r
427 }
428
429 // Returns a list of of active Items in the "Additional Services" package with their active prices for a given product item category and sorts them by price.
430 func (r Product_Item_Category) GetAdditionalProductsForCategory() (resp []datatypes.Product_Item, err error) {
431 err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getAdditionalProductsForCategory", nil, &r.Options, &resp)
432 return
433 }
434
435 // no documentation yet
436 func (r Product_Item_Category) GetBandwidthCategories() (resp []datatypes.Product_Item_Category, err error) {
437 err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getBandwidthCategories", nil, &r.Options, &resp)
438 return
439 }
440
441 // Retrieve The billing items associated with an account that share a category code with an item category's category code.
442 func (r Product_Item_Category) GetBillingItems() (resp []datatypes.Billing_Item, err error) {
443 err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getBillingItems", nil, &r.Options, &resp)
444 return
445 }
446
447 // This method returns a collection of computing categories. These categories are also top level items in a service offering.
448 func (r Product_Item_Category) GetComputingCategories(resetCache *bool) (resp []datatypes.Product_Item_Category, err error) {
449 params := []interface{}{
450 resetCache,
451 }
452 err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getComputingCategories", params, &r.Options, &resp)
453 return
454 }
455
456 // no documentation yet
457 func (r Product_Item_Category) GetCustomUsageRatesCategories(resetCache *bool) (resp []datatypes.Product_Item_Category, err error) {
458 params := []interface{}{
459 resetCache,
460 }
461 err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getCustomUsageRatesCategories", params, &r.Options, &resp)
462 return
463 }
464
465 // no documentation yet
466 func (r Product_Item_Category) GetExternalResourceCategories() (resp []datatypes.Product_Item_Category, err error) {
467 err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getExternalResourceCategories", nil, &r.Options, &resp)
468 return
469 }
470
471 // Retrieve This invoice item's "item category group".
472 func (r Product_Item_Category) GetGroup() (resp datatypes.Product_Item_Category_Group, err error) {
473 err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getGroup", nil, &r.Options, &resp)
474 return
475 }
476
477 // Retrieve A collection of service offering category groups. Each group contains a collection of items associated with this category.
478 func (r Product_Item_Category) GetGroups() (resp []datatypes.Product_Package_Item_Category_Group, err error) {
479 err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getGroups", nil, &r.Options, &resp)
480 return
481 }
482
483 // Each product item price must be tied to a category for it to be sold. These categories describe how a particular product item is sold. For example, the 250GB hard drive can be sold as disk0, disk1, ... disk11. There are different prices for this product item depending on which category it is. This keeps down the number of products in total.
484 func (r Product_Item_Category) GetObject() (resp datatypes.Product_Item_Category, err error) {
485 err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getObject", nil, &r.Options, &resp)
486 return
487 }
488
489 // no documentation yet
490 func (r Product_Item_Category) GetObjectStorageCategories(resetCache *bool) (resp []datatypes.Product_Item_Category, err error) {
491 params := []interface{}{
492 resetCache,
493 }
494 err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getObjectStorageCategories", params, &r.Options, &resp)
495 return
496 }
497
498 // Retrieve Any unique options associated with an item category.
499 func (r Product_Item_Category) GetOrderOptions() (resp []datatypes.Product_Item_Category_Order_Option_Type, err error) {
500 err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getOrderOptions", nil, &r.Options, &resp)
501 return
502 }
503
504 // Retrieve A list of configuration available in this category.'
505 func (r Product_Item_Category) GetPackageConfigurations() (resp []datatypes.Product_Package_Order_Configuration, err error) {
506 err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getPackageConfigurations", nil, &r.Options, &resp)
507 return
508 }
509
510 // Retrieve A list of preset configurations this category is used in.'
511 func (r Product_Item_Category) GetPresetConfigurations() (resp []datatypes.Product_Package_Preset_Configuration, err error) {
512 err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getPresetConfigurations", nil, &r.Options, &resp)
513 return
514 }
515
516 // Retrieve The question references that are associated with an item category.
517 func (r Product_Item_Category) GetQuestionReferences() (resp []datatypes.Product_Item_Category_Question_Xref, err error) {
518 err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getQuestionReferences", nil, &r.Options, &resp)
519 return
520 }
521
522 // Retrieve The questions that are associated with an item category.
523 func (r Product_Item_Category) GetQuestions() (resp []datatypes.Product_Item_Category_Question, err error) {
524 err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getQuestions", nil, &r.Options, &resp)
525 return
526 }
527
528 // no documentation yet
529 func (r Product_Item_Category) GetSoftwareCategories() (resp []datatypes.Product_Item_Category, err error) {
530 err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getSoftwareCategories", nil, &r.Options, &resp)
531 return
532 }
533
534 // This method returns a list of subnet categories.
535 func (r Product_Item_Category) GetSubnetCategories() (resp []datatypes.Product_Item_Category, err error) {
536 err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getSubnetCategories", nil, &r.Options, &resp)
537 return
538 }
539
540 // This method returns a collection of computing categories. These categories are also top level items in a service offering.
541 func (r Product_Item_Category) GetTopLevelCategories(resetCache *bool) (resp []datatypes.Product_Item_Category, err error) {
542 params := []interface{}{
543 resetCache,
544 }
545 err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getTopLevelCategories", params, &r.Options, &resp)
546 return
547 }
548
549 // This method returns service product categories that can be canceled via API. You can use these categories to find the billing items you wish to cancel.
550 func (r Product_Item_Category) GetValidCancelableServiceItemCategories() (resp []datatypes.Product_Item_Category, err error) {
551 err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getValidCancelableServiceItemCategories", nil, &r.Options, &resp)
552 return
553 }
554
555 // no documentation yet
556 func (r Product_Item_Category) GetVlanCategories() (resp []datatypes.Product_Item_Category, err error) {
557 err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getVlanCategories", nil, &r.Options, &resp)
558 return
559 }
560
561 // The SoftLayer_Product_Item_Category_Group data type contains general category group information.
562 type Product_Item_Category_Group struct {
563 Session session.SLSession
564 Options sl.Options
565 }
566
567 // GetProductItemCategoryGroupService returns an instance of the Product_Item_Category_Group SoftLayer service
568 func GetProductItemCategoryGroupService(sess session.SLSession) Product_Item_Category_Group {
569 return Product_Item_Category_Group{Session: sess}
570 }
571
572 func (r Product_Item_Category_Group) Id(id int) Product_Item_Category_Group {
573 r.Options.Id = &id
574 return r
575 }
576
577 func (r Product_Item_Category_Group) Mask(mask string) Product_Item_Category_Group {
578 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
579 mask = fmt.Sprintf("mask[%s]", mask)
580 }
581
582 r.Options.Mask = mask
583 return r
584 }
585
586 func (r Product_Item_Category_Group) Filter(filter string) Product_Item_Category_Group {
587 r.Options.Filter = filter
588 return r
589 }
590
591 func (r Product_Item_Category_Group) Limit(limit int) Product_Item_Category_Group {
592 r.Options.Limit = &limit
593 return r
594 }
595
596 func (r Product_Item_Category_Group) Offset(offset int) Product_Item_Category_Group {
597 r.Options.Offset = &offset
598 return r
599 }
600
601 // Each product item category must be tied to a category group. These category groups describe how a particular product item category is categorized. For example, the disk0, disk1, ... disk11 can be categorized as Server and Attached Services. There are different groups for each of this product item category depending on the function of the item product in the subject category.
602 func (r Product_Item_Category_Group) GetObject() (resp datatypes.Product_Item_Category_Group, err error) {
603 err = r.Session.DoRequest("SoftLayer_Product_Item_Category_Group", "getObject", nil, &r.Options, &resp)
604 return
605 }
606
607 // Represents the assignment of a policy to a product. The existence of a record means that the associated product is subject to the terms defined in the document content of the policy.
608 type Product_Item_Policy_Assignment struct {
609 Session session.SLSession
610 Options sl.Options
611 }
612
613 // GetProductItemPolicyAssignmentService returns an instance of the Product_Item_Policy_Assignment SoftLayer service
614 func GetProductItemPolicyAssignmentService(sess session.SLSession) Product_Item_Policy_Assignment {
615 return Product_Item_Policy_Assignment{Session: sess}
616 }
617
618 func (r Product_Item_Policy_Assignment) Id(id int) Product_Item_Policy_Assignment {
619 r.Options.Id = &id
620 return r
621 }
622
623 func (r Product_Item_Policy_Assignment) Mask(mask string) Product_Item_Policy_Assignment {
624 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
625 mask = fmt.Sprintf("mask[%s]", mask)
626 }
627
628 r.Options.Mask = mask
629 return r
630 }
631
632 func (r Product_Item_Policy_Assignment) Filter(filter string) Product_Item_Policy_Assignment {
633 r.Options.Filter = filter
634 return r
635 }
636
637 func (r Product_Item_Policy_Assignment) Limit(limit int) Product_Item_Policy_Assignment {
638 r.Options.Limit = &limit
639 return r
640 }
641
642 func (r Product_Item_Policy_Assignment) Offset(offset int) Product_Item_Policy_Assignment {
643 r.Options.Offset = &offset
644 return r
645 }
646
647 // Register the acceptance of the associated policy to product assignment, and link the created record to a Ticket.
648 func (r Product_Item_Policy_Assignment) AcceptFromTicket(ticketId *int) (resp bool, err error) {
649 params := []interface{}{
650 ticketId,
651 }
652 err = r.Session.DoRequest("SoftLayer_Product_Item_Policy_Assignment", "acceptFromTicket", params, &r.Options, &resp)
653 return
654 }
655
656 // no documentation yet
657 func (r Product_Item_Policy_Assignment) GetObject() (resp datatypes.Product_Item_Policy_Assignment, err error) {
658 err = r.Session.DoRequest("SoftLayer_Product_Item_Policy_Assignment", "getObject", nil, &r.Options, &resp)
659 return
660 }
661
662 // Retrieve the binary contents of the associated PDF policy document.
663 func (r Product_Item_Policy_Assignment) GetPolicyDocumentContents() (resp []byte, err error) {
664 err = r.Session.DoRequest("SoftLayer_Product_Item_Policy_Assignment", "getPolicyDocumentContents", nil, &r.Options, &resp)
665 return
666 }
667
668 // Retrieve The name of the assigned policy.
669 func (r Product_Item_Policy_Assignment) GetPolicyName() (resp string, err error) {
670 err = r.Session.DoRequest("SoftLayer_Product_Item_Policy_Assignment", "getPolicyName", nil, &r.Options, &resp)
671 return
672 }
673
674 // Retrieve The [[SoftLayer_Product_Item]] for this policy assignment.
675 func (r Product_Item_Policy_Assignment) GetProduct() (resp datatypes.Product_Item, err error) {
676 err = r.Session.DoRequest("SoftLayer_Product_Item_Policy_Assignment", "getProduct", nil, &r.Options, &resp)
677 return
678 }
679
680 // The SoftLayer_Product_Item_Price data type contains general information relating to a single SoftLayer product item price. You can find out what packages each price is in as well as which category under which this price is sold. All prices are returned in floating point values measured in US Dollars ($USD).
681 type Product_Item_Price struct {
682 Session session.SLSession
683 Options sl.Options
684 }
685
686 // GetProductItemPriceService returns an instance of the Product_Item_Price SoftLayer service
687 func GetProductItemPriceService(sess session.SLSession) Product_Item_Price {
688 return Product_Item_Price{Session: sess}
689 }
690
691 func (r Product_Item_Price) Id(id int) Product_Item_Price {
692 r.Options.Id = &id
693 return r
694 }
695
696 func (r Product_Item_Price) Mask(mask string) Product_Item_Price {
697 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
698 mask = fmt.Sprintf("mask[%s]", mask)
699 }
700
701 r.Options.Mask = mask
702 return r
703 }
704
705 func (r Product_Item_Price) Filter(filter string) Product_Item_Price {
706 r.Options.Filter = filter
707 return r
708 }
709
710 func (r Product_Item_Price) Limit(limit int) Product_Item_Price {
711 r.Options.Limit = &limit
712 return r
713 }
714
715 func (r Product_Item_Price) Offset(offset int) Product_Item_Price {
716 r.Options.Offset = &offset
717 return r
718 }
719
720 // Retrieve The account that the item price is restricted to.
721 func (r Product_Item_Price) GetAccountRestrictions() (resp []datatypes.Product_Item_Price_Account_Restriction, err error) {
722 err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getAccountRestrictions", nil, &r.Options, &resp)
723 return
724 }
725
726 // Retrieve
727 func (r Product_Item_Price) GetAttributes() (resp []datatypes.Product_Item_Price_Attribute, err error) {
728 err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getAttributes", nil, &r.Options, &resp)
729 return
730 }
731
732 // Retrieve Signifies pricing that is only available on a bare metal reserved capacity order.
733 func (r Product_Item_Price) GetBareMetalReservedCapacityFlag() (resp bool, err error) {
734 err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getBareMetalReservedCapacityFlag", nil, &r.Options, &resp)
735 return
736 }
737
738 // Retrieve Whether the price is for Big Data OS/Journal disks only. (Deprecated)
739 func (r Product_Item_Price) GetBigDataOsJournalDiskFlag() (resp bool, err error) {
740 err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getBigDataOsJournalDiskFlag", nil, &r.Options, &resp)
741 return
742 }
743
744 // Retrieve cross reference for bundles
745 func (r Product_Item_Price) GetBundleReferences() (resp []datatypes.Product_Item_Bundles, err error) {
746 err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getBundleReferences", nil, &r.Options, &resp)
747 return
748 }
749
750 // Retrieve The maximum capacity value for which this price is suitable.
751 func (r Product_Item_Price) GetCapacityRestrictionMaximum() (resp string, err error) {
752 err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getCapacityRestrictionMaximum", nil, &r.Options, &resp)
753 return
754 }
755
756 // Retrieve The minimum capacity value for which this price is suitable.
757 func (r Product_Item_Price) GetCapacityRestrictionMinimum() (resp string, err error) {
758 err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getCapacityRestrictionMinimum", nil, &r.Options, &resp)
759 return
760 }
761
762 // Retrieve The type of capacity restriction by which this price must abide.
763 func (r Product_Item_Price) GetCapacityRestrictionType() (resp string, err error) {
764 err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getCapacityRestrictionType", nil, &r.Options, &resp)
765 return
766 }
767
768 // Retrieve All categories which this item is a member.
769 func (r Product_Item_Price) GetCategories() (resp []datatypes.Product_Item_Category, err error) {
770 err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getCategories", nil, &r.Options, &resp)
771 return
772 }
773
774 // Retrieve Signifies pricing that is only available on a dedicated host virtual server order.
775 func (r Product_Item_Price) GetDedicatedHostInstanceFlag() (resp bool, err error) {
776 err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getDedicatedHostInstanceFlag", nil, &r.Options, &resp)
777 return
778 }
779
780 // Retrieve Whether this price defines a software license for its product item.
781 func (r Product_Item_Price) GetDefinedSoftwareLicenseFlag() (resp bool, err error) {
782 err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getDefinedSoftwareLicenseFlag", nil, &r.Options, &resp)
783 return
784 }
785
786 // Retrieve Eligibility strategy to assess if a customer can order using this price.
787 func (r Product_Item_Price) GetEligibilityStrategy() (resp string, err error) {
788 err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getEligibilityStrategy", nil, &r.Options, &resp)
789 return
790 }
791
792 // Retrieve The product item a price is tied to.
793 func (r Product_Item_Price) GetItem() (resp datatypes.Product_Item, err error) {
794 err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getItem", nil, &r.Options, &resp)
795 return
796 }
797
798 // no documentation yet
799 func (r Product_Item_Price) GetObject() (resp datatypes.Product_Item_Price, err error) {
800 err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getObject", nil, &r.Options, &resp)
801 return
802 }
803
804 // Retrieve
805 func (r Product_Item_Price) GetOrderPremiums() (resp []datatypes.Product_Item_Price_Premium, err error) {
806 err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getOrderPremiums", nil, &r.Options, &resp)
807 return
808 }
809
810 // Retrieve cross reference for packages
811 func (r Product_Item_Price) GetPackageReferences() (resp []datatypes.Product_Package_Item_Prices, err error) {
812 err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getPackageReferences", nil, &r.Options, &resp)
813 return
814 }
815
816 // Retrieve A price's packages under which this item is sold.
817 func (r Product_Item_Price) GetPackages() (resp []datatypes.Product_Package, err error) {
818 err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getPackages", nil, &r.Options, &resp)
819 return
820 }
821
822 // Retrieve A list of preset configurations this price is used in.'
823 func (r Product_Item_Price) GetPresetConfigurations() (resp []datatypes.Product_Package_Preset_Configuration, err error) {
824 err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getPresetConfigurations", nil, &r.Options, &resp)
825 return
826 }
827
828 // Retrieve The type keyname of this price which can be STANDARD, TIERED, or TERM.
829 func (r Product_Item_Price) GetPriceType() (resp string, err error) {
830 err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getPriceType", nil, &r.Options, &resp)
831 return
832 }
833
834 // Retrieve The pricing location group that this price is applicable for. Prices that have a pricing location group will only be available for ordering with the locations specified on the location group.
835 func (r Product_Item_Price) GetPricingLocationGroup() (resp datatypes.Location_Group_Pricing, err error) {
836 err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getPricingLocationGroup", nil, &r.Options, &resp)
837 return
838 }
839
840 // Retrieve The number of server cores required to order this item. This is deprecated. Use [[SoftLayer_Product_Item_Price/getCapacityRestrictionMinimum|getCapacityRestrictionMinimum]] and [[SoftLayer_Product_Item_Price/getCapacityRestrictionMaximum|getCapacityRestrictionMaximum]]
841 func (r Product_Item_Price) GetRequiredCoreCount() (resp int, err error) {
842 err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getRequiredCoreCount", nil, &r.Options, &resp)
843 return
844 }
845
846 // Retrieve Signifies pricing that is only available on a reserved capacity virtual server order.
847 func (r Product_Item_Price) GetReservedCapacityInstanceFlag() (resp bool, err error) {
848 err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getReservedCapacityInstanceFlag", nil, &r.Options, &resp)
849 return
850 }
851
852 // Returns a collection of rate-based [[SoftLayer_Product_Item_Price]] objects associated with the [[SoftLayer_Product_Item]] objects and the [[SoftLayer_Location]] specified. The location is required to get the appropriate rate-based prices because the usage rates may vary from datacenter to datacenter.
853 func (r Product_Item_Price) GetUsageRatePrices(location *datatypes.Location, items []datatypes.Product_Item) (resp []datatypes.Product_Item_Price, err error) {
854 params := []interface{}{
855 location,
856 items,
857 }
858 err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getUsageRatePrices", params, &r.Options, &resp)
859 return
860 }
861
862 // no documentation yet
863 type Product_Item_Price_Premium struct {
864 Session session.SLSession
865 Options sl.Options
866 }
867
868 // GetProductItemPricePremiumService returns an instance of the Product_Item_Price_Premium SoftLayer service
869 func GetProductItemPricePremiumService(sess session.SLSession) Product_Item_Price_Premium {
870 return Product_Item_Price_Premium{Session: sess}
871 }
872
873 func (r Product_Item_Price_Premium) Id(id int) Product_Item_Price_Premium {
874 r.Options.Id = &id
875 return r
876 }
877
878 func (r Product_Item_Price_Premium) Mask(mask string) Product_Item_Price_Premium {
879 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
880 mask = fmt.Sprintf("mask[%s]", mask)
881 }
882
883 r.Options.Mask = mask
884 return r
885 }
886
887 func (r Product_Item_Price_Premium) Filter(filter string) Product_Item_Price_Premium {
888 r.Options.Filter = filter
889 return r
890 }
891
892 func (r Product_Item_Price_Premium) Limit(limit int) Product_Item_Price_Premium {
893 r.Options.Limit = &limit
894 return r
895 }
896
897 func (r Product_Item_Price_Premium) Offset(offset int) Product_Item_Price_Premium {
898 r.Options.Offset = &offset
899 return r
900 }
901
902 // Retrieve
903 func (r Product_Item_Price_Premium) GetItemPrice() (resp datatypes.Product_Item_Price, err error) {
904 err = r.Session.DoRequest("SoftLayer_Product_Item_Price_Premium", "getItemPrice", nil, &r.Options, &resp)
905 return
906 }
907
908 // Retrieve
909 func (r Product_Item_Price_Premium) GetLocation() (resp datatypes.Location, err error) {
910 err = r.Session.DoRequest("SoftLayer_Product_Item_Price_Premium", "getLocation", nil, &r.Options, &resp)
911 return
912 }
913
914 // no documentation yet
915 func (r Product_Item_Price_Premium) GetObject() (resp datatypes.Product_Item_Price_Premium, err error) {
916 err = r.Session.DoRequest("SoftLayer_Product_Item_Price_Premium", "getObject", nil, &r.Options, &resp)
917 return
918 }
919
920 // Retrieve
921 func (r Product_Item_Price_Premium) GetPackage() (resp datatypes.Product_Package, err error) {
922 err = r.Session.DoRequest("SoftLayer_Product_Item_Price_Premium", "getPackage", nil, &r.Options, &resp)
923 return
924 }
925
926 // no documentation yet
927 type Product_Order struct {
928 Session session.SLSession
929 Options sl.Options
930 }
931
932 // GetProductOrderService returns an instance of the Product_Order SoftLayer service
933 func GetProductOrderService(sess session.SLSession) Product_Order {
934 return Product_Order{Session: sess}
935 }
936
937 func (r Product_Order) Id(id int) Product_Order {
938 r.Options.Id = &id
939 return r
940 }
941
942 func (r Product_Order) Mask(mask string) Product_Order {
943 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
944 mask = fmt.Sprintf("mask[%s]", mask)
945 }
946
947 r.Options.Mask = mask
948 return r
949 }
950
951 func (r Product_Order) Filter(filter string) Product_Order {
952 r.Options.Filter = filter
953 return r
954 }
955
956 func (r Product_Order) Limit(limit int) Product_Order {
957 r.Options.Limit = &limit
958 return r
959 }
960
961 func (r Product_Order) Offset(offset int) Product_Order {
962 r.Options.Offset = &offset
963 return r
964 }
965
966 // no documentation yet
967 func (r Product_Order) CheckItemAvailability(itemPrices []datatypes.Product_Item_Price, accountId *int, availabilityTypeKeyNames []string) (resp bool, err error) {
968 params := []interface{}{
969 itemPrices,
970 accountId,
971 availabilityTypeKeyNames,
972 }
973 err = r.Session.DoRequest("SoftLayer_Product_Order", "checkItemAvailability", params, &r.Options, &resp)
974 return
975 }
976
977 // no documentation yet
978 func (r Product_Order) CheckItemAvailabilityForImageTemplate(imageTemplateId *int, accountId *int, packageId *int, availabilityTypeKeyNames []string) (resp bool, err error) {
979 params := []interface{}{
980 imageTemplateId,
981 accountId,
982 packageId,
983 availabilityTypeKeyNames,
984 }
985 err = r.Session.DoRequest("SoftLayer_Product_Order", "checkItemAvailabilityForImageTemplate", params, &r.Options, &resp)
986 return
987 }
988
989 // Check order items for conflicts
990 func (r Product_Order) CheckItemConflicts(itemPrices []datatypes.Product_Item_Price) (resp bool, err error) {
991 params := []interface{}{
992 itemPrices,
993 }
994 err = r.Session.DoRequest("SoftLayer_Product_Order", "checkItemConflicts", params, &r.Options, &resp)
995 return
996 }
997
998 // no documentation yet
999 // Deprecated: This function has been marked as deprecated.
1000 func (r Product_Order) GetExternalPaymentAuthorizationReceipt(token *string, payerId *string) (resp datatypes.Container_Product_Order_Receipt, err error) {
1001 params := []interface{}{
1002 token,
1003 payerId,
1004 }
1005 err = r.Session.DoRequest("SoftLayer_Product_Order", "getExternalPaymentAuthorizationReceipt", params, &r.Options, &resp)
1006 return
1007 }
1008
1009 // This method is deprecated and always returns nothing.
1010 // Deprecated: This function has been marked as deprecated.
1011 func (r Product_Order) GetNetworks(locationId *int, packageId *int, accountId *int) (resp []datatypes.Container_Product_Order_Network, err error) {
1012 params := []interface{}{
1013 locationId,
1014 packageId,
1015 accountId,
1016 }
1017 err = r.Session.DoRequest("SoftLayer_Product_Order", "getNetworks", params, &r.Options, &resp)
1018 return
1019 }
1020
1021 // When the account is on an external reseller brand, this service will provide a SoftLayer_Product_Order with the the pricing adjusted by the external reseller.
1022 func (r Product_Order) GetResellerOrder(orderContainer *datatypes.Container_Product_Order) (resp datatypes.Container_Product_Order, err error) {
1023 params := []interface{}{
1024 orderContainer,
1025 }
1026 err = r.Session.DoRequest("SoftLayer_Product_Order", "getResellerOrder", params, &r.Options, &resp)
1027 return
1028 }
1029
1030 // Sometimes taxes cannot be calculated immediately, so we start the calculations and let them run in the background. This method will return the current progress and information related to a specific tax calculation, which allows real-time progress updates on tax calculations.
1031 func (r Product_Order) GetTaxCalculationResult(orderHash *string) (resp datatypes.Container_Tax_Cache, err error) {
1032 params := []interface{}{
1033 orderHash,
1034 }
1035 err = r.Session.DoRequest("SoftLayer_Product_Order", "getTaxCalculationResult", params, &r.Options, &resp)
1036 return
1037 }
1038
1039 // Return collections of public and private VLANs that are available during ordering. If a location ID is provided, the resulting VLANs will be limited to that location. If the Virtual Server package id (46) is provided, the VLANs will be narrowed down to those locations that contain routers with the VIRTUAL_IMAGE_STORE data attribute.
1040 //
1041 // For the selectedItems parameter, this is a comma-separated string of category codes and item values. For example:
1042 //
1043 // - `port_speed=10,guest_disk0=LOCAL_DISK`
1044 //
1045 // - `port_speed=100,disk0=SAN_DISK`
1046 //
1047 // - `port_speed=100,private_network_only=1,guest_disk0=LOCAL_DISK`
1048 //
1049 // This parameter is used to narrow the available results down even further. It's not necessary when selecting a VLAN, but it will help avoid errors when attempting to place an order. The only acceptable category codes are:
1050 //
1051 // - `port_speed`
1052 //
1053 // - A disk category, such as `guest_disk0` or `disk0`, with values of either `LOCAL_DISK` or `SAN_DISK`
1054 //
1055 // - `private_network_only`
1056 //
1057 // - `dual_path_network`
1058 //
1059 // For most customers, it's sufficient to only provide the first 2 parameters.
1060 func (r Product_Order) GetVlans(locationId *int, packageId *int, selectedItems *string, vlanIds []int, subnetIds []int, accountId *int, orderContainer *datatypes.Container_Product_Order, hardwareFirewallOrderedFlag *bool) (resp datatypes.Container_Product_Order_Network_Vlans, err error) {
1061 params := []interface{}{
1062 locationId,
1063 packageId,
1064 selectedItems,
1065 vlanIds,
1066 subnetIds,
1067 accountId,
1068 orderContainer,
1069 hardwareFirewallOrderedFlag,
1070 }
1071 err = r.Session.DoRequest("SoftLayer_Product_Order", "getVlans", params, &r.Options, &resp)
1072 return
1073 }
1074
1075 // Use this method to place bare metal server, virtual server and additional service orders with SoftLayer.
1076 // Upon success, your credit card or PayPal account will incur charges for the monthly order total
1077 // (or prorated value if ordered mid billing cycle). If all products on the order are only billed hourly,
1078 // you will be charged on your billing anniversary date, which occurs monthly on the day you ordered your first
1079 // service with SoftLayer. For new customers, you are required to provide billing information when you place an order.
1080 // For existing customers, the credit card on file will be charged. If you're a PayPal customer, a URL will be
1081 // returned from the call to [[SoftLayer_Product_Order/placeOrder]] which is to be used to finish the authorization
1082 // process. This authorization tells PayPal that you indeed want to place an order with SoftLayer.
1083 // From PayPal's web site, you will be redirected back to SoftLayer for your order receipt.
1084 //
1085 // When an order is placed, your order will be in a "pending approval" state. When all internal checks pass,
1086 // your order will be automatically approved. For orders that may need extra attention, a Sales representative
1087 // will review the order and contact you if necessary. Once the order is approved, your server or service will
1088 // be provisioned and available to you shortly thereafter. Depending on the type of server or service ordered,
1089 // provisioning times will vary.
1090 //
1091 // ## Order Containers
1092 //
1093 // When placing API orders, it's important to order your server and services on the appropriate
1094 // [[SoftLayer_Container_Product_Order]]. Failing to provide the correct container may delay your server or service
1095 // from being provisioned in a timely manner. Some common order containers are included below.
1096 //
1097 // **Note:** `SoftLayer_Container_Product_Order_` has been removed from the containers in the table below for readability.
1098 //
1099 // | Product | Order Container | Package Type |
1100 // | ------- | --------------- | ------------ |
1101 // | Bare metal server by CPU | [[SoftLayer_Container_Product_Order_Hardware_Server]] | BARE_METAL_CPU |
1102 // | Bare metal server by core | [[SoftLayer_Container_Product_Order_Hardware_Server]] | BARE_METAL_CORE |
1103 // | Virtual server | [[SoftLayer_Container_Product_Order_Virtual_Guest]] | VIRTUAL_SERVER_INSTANCE |
1104 // | Local & dedicated load balancers | [[SoftLayer_Container_Product_Order_Network_LoadBalancer]] | ADDITIONAL_SERVICES_LOAD_BALANCER |
1105 // | Content delivery network | [[SoftLayer_Container_Product_Order_Network_ContentDelivery_Account]] | ADDITIONAL_SERVICES_CDN |
1106 // | Content delivery network Addon | [[SoftLayer_Container_Product_Order_Network_ContentDelivery_Account_Addon]] | ADDITIONAL_SERVICES_CDN_ADDON |
1107 // | Hardware & software firewalls | [[SoftLayer_Container_Product_Order_Network_Protection_Firewall]] | ADDITIONAL_SERVICES_FIREWALL |
1108 // | Dedicated firewall | [[SoftLayer_Container_Product_Order_Network_Protection_Firewall_Dedicated]] | ADDITIONAL_SERVICES_FIREWALL |
1109 // | Object storage | [[SoftLayer_Container_Product_Order_Network_Storage_Object]] | ADDITIONAL_SERVICES_OBJECT_STORAGE |
1110 // | Object storage (hub) | [[SoftLayer_Container_Product_Order_Network_Storage_Hub]] | ADDITIONAL_SERVICES_OBJECT_STORAGE |
1111 // | Network attached storage | [[SoftLayer_Container_Product_Order_Network_Storage_Nas]] | ADDITIONAL_SERVICES_NETWORK_ATTACHED_STORAGE |
1112 // | Iscsi storage | [[SoftLayer_Container_Product_Order_Network_Storage_Iscsi]] | ADDITIONAL_SERVICES_ISCSI_STORAGE |
1113 // | Evault | [[SoftLayer_Container_Product_Order_Network_Storage_Backup_Evault_Vault]] | ADDITIONAL_SERVICES |
1114 // | Evault Plugin | [[SoftLayer_Container_Product_Order_Network_Storage_Backup_Evault_Plugin]] | ADDITIONAL_SERVICES |
1115 // | Application delivery appliance | [[SoftLayer_Container_Product_Order_Network_Application_Delivery_Controller]] | ADDITIONAL_SERVICES_APPLICATION_DELIVERY_APPLIANCE |
1116 // | Network subnet | [[SoftLayer_Container_Product_Order_Network_Subnet]] | ADDITIONAL_SERVICES |
1117 // | Global IPv4 | [[SoftLayer_Container_Product_Order_Network_Subnet]] | ADDITIONAL_SERVICES_GLOBAL_IP_ADDRESSES |
1118 // | Global IPv6 | [[SoftLayer_Container_Product_Order_Network_Subnet]] | ADDITIONAL_SERVICES_GLOBAL_IP_ADDRESSES |
1119 // | Network VLAN | [[SoftLayer_Container_Product_Order_Network_Vlan]] | ADDITIONAL_SERVICES_NETWORK_VLAN |
1120 // | Portable storage | [[SoftLayer_Container_Product_Order_Virtual_Disk_Image]] | ADDITIONAL_SERVICES_PORTABLE_STORAGE |
1121 // | SSL certificate | [[SoftLayer_Container_Product_Order_Security_Certificate]] | ADDITIONAL_SERVICES_SSL_CERTIFICATE |
1122 // | External authentication | [[SoftLayer_Container_Product_Order_User_Customer_External_Binding]] | ADDITIONAL_SERVICES |
1123 // | Dedicated Host | [[SoftLayer_Container_Product_Order_Virtual_DedicatedHost]] | DEDICATED_HOST |
1124 //
1125 // ## Server example
1126 //
1127 // This example includes a single bare metal server being ordered with monthly billing.
1128 //
1129 // **Warning:** the price ids provided below may be outdated or unavailable, so you will need to determine the
1130 //
1131 // available prices from the bare metal server [[SoftLayer_Product_Package/getAllObjects]], which have a
1132 // [[SoftLayer_Product_Package_Type]] of `BARE_METAL_CPU` or `BARE_METAL_CORE`. You can get a full list of
1133 // package types with [[SoftLayer_Product_Package_Type/getAllObjects]].
1134 //
1135 // ### Bare Metal Ordering
1136 //
1137 // ```xml
1138 // <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://api.service.softlayer.com/soap/v3/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
1139 //
1140 // <SOAP-ENV:Header>
1141 // <ns1:authenticate>
1142 // <username>your username</username>
1143 // <apiKey>your api key</apiKey>
1144 // </ns1:authenticate>
1145 // </SOAP-ENV:Header>
1146 // <SOAP-ENV:Body>
1147 // <ns1:placeOrder>
1148 // <orderData xsi:type="ns1:SoftLayer_Container_Product_Order_Hardware_Server">
1149 // <hardware SOAP-ENC:arrayType="ns1:SoftLayer_Hardware[1]" xsi:type="ns1:SoftLayer_HardwareArray">
1150 // <item xsi:type="ns1:SoftLayer_Hardware">
1151 // <domain xsi:type="xsd:string">example.com</domain>
1152 // <hostname xsi:type="xsd:string">server1</hostname>
1153 // </item>
1154 // </hardware>
1155 // <location xsi:type="xsd:string">138124</location>
1156 // <packageId xsi:type="xsd:int">142</packageId>
1157 // <prices SOAP-ENC:arrayType="ns1:SoftLayer_Product_Item_Price[14]" xsi:type="ns1:SoftLayer_Product_Item_PriceArray">
1158 // <item xsi:type="ns1:SoftLayer_Product_Item_Price">
1159 // <id xsi:type="xsd:int">58</id>
1160 // </item>
1161 // <item xsi:type="ns1:SoftLayer_Product_Item_Price">
1162 // <id xsi:type="xsd:int">22337</id>
1163 // </item>
1164 // <item xsi:type="ns1:SoftLayer_Product_Item_Price">
1165 // <id xsi:type="xsd:int">21189</id>
1166 // </item>
1167 // <item xsi:type="ns1:SoftLayer_Product_Item_Price">
1168 // <id xsi:type="xsd:int">876</id>
1169 // </item>
1170 // <item xsi:type="ns1:SoftLayer_Product_Item_Price">
1171 // <id xsi:type="xsd:int">57</id>
1172 // </item>
1173 // <item xsi:type="ns1:SoftLayer_Product_Item_Price">
1174 // <id xsi:type="xsd:int">55</id>
1175 // </item>
1176 // <item xsi:type="ns1:SoftLayer_Product_Item_Price">
1177 // <id xsi:type="xsd:int">21190</id>
1178 // </item>
1179 // <item xsi:type="ns1:SoftLayer_Product_Item_Price">
1180 // <id xsi:type="xsd:int">36381</id>
1181 // </item>
1182 // <item xsi:type="ns1:SoftLayer_Product_Item_Price">
1183 // <id xsi:type="xsd:int">21</id>
1184 // </item>
1185 // <item xsi:type="ns1:SoftLayer_Product_Item_Price">
1186 // <id xsi:type="xsd:int">22013</id>
1187 // </item>
1188 // <item xsi:type="ns1:SoftLayer_Product_Item_Price">
1189 // <id xsi:type="xsd:int">906</id>
1190 // </item>
1191 // <item xsi:type="ns1:SoftLayer_Product_Item_Price">
1192 // <id xsi:type="xsd:int">420</id>
1193 // </item>
1194 // <item xsi:type="ns1:SoftLayer_Product_Item_Price">
1195 // <id xsi:type="xsd:int">418</id>
1196 // </item>
1197 // <item xsi:type="ns1:SoftLayer_Product_Item_Price">
1198 // <id xsi:type="xsd:int">342</id>
1199 // </item>
1200 // </prices>
1201 // <useHourlyPricing xsi:type="xsd:boolean">false</useHourlyPricing>
1202 // </orderData>
1203 // <saveAsQuote xsi:nil="true" />
1204 // </ns1:placeOrder>
1205 // </SOAP-ENV:Body>
1206 //
1207 // </SOAP-ENV:Envelope>
1208 // ```
1209 //
1210 // ## Virtual server example
1211 //
1212 // This example includes 2 identical virtual servers (except for hostname) being ordered for hourly billing.
1213 // It includes an optional image template id and VLAN data specified on the virtualGuest objects -
1214 // `primaryBackendNetworkComponent` and `primaryNetworkComponent`.
1215 //
1216 // **Warning:** the price ids provided below may be outdated or unavailable, so you will need to determine the
1217 //
1218 // available prices from the virtual server package with [[SoftLayer_Product_Package/getAllObjects]],
1219 // which has a [[SoftLayer_Product_Package_Type]] of `VIRTUAL_SERVER_INSTANCE`.
1220 //
1221 // #### Virtual Ordering
1222 //
1223 // ```xml
1224 // <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://api.service.softlayer.com/soap/v3/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
1225 //
1226 // <SOAP-ENV:Header>
1227 // <ns1:authenticate>
1228 // <username>your username</username>
1229 // <apiKey>your api key</apiKey>
1230 // </ns1:authenticate>
1231 // </SOAP-ENV:Header>
1232 // <SOAP-ENV:Body>
1233 // <ns1:placeOrder>
1234 // <orderData xsi:type="ns1:SoftLayer_Container_Product_Order_Virtual_Guest">
1235 // <imageTemplateId xsi:type="xsd:int">13251</imageTemplateId>
1236 // <location xsi:type="xsd:string">37473</location>
1237 // <packageId xsi:type="xsd:int">46</packageId>
1238 // <prices SOAP-ENC:arrayType="ns1:SoftLayer_Product_Item_Price[13]" xsi:type="ns1:SoftLayer_Product_Item_PriceArray">
1239 // <item xsi:type="ns1:SoftLayer_Product_Item_Price">
1240 // <id xsi:type="xsd:int">2159</id>
1241 // </item>
1242 // <item xsi:type="ns1:SoftLayer_Product_Item_Price">
1243 // <id xsi:type="xsd:int">55</id>
1244 // </item>
1245 // <item xsi:type="ns1:SoftLayer_Product_Item_Price">
1246 // <id xsi:type="xsd:int">13754</id>
1247 // </item>
1248 // <item xsi:type="ns1:SoftLayer_Product_Item_Price">
1249 // <id xsi:type="xsd:int">1641</id>
1250 // </item>
1251 // <item xsi:type="ns1:SoftLayer_Product_Item_Price">
1252 // <id xsi:type="xsd:int">905</id>
1253 // </item>
1254 // <item xsi:type="ns1:SoftLayer_Product_Item_Price">
1255 // <id xsi:type="xsd:int">1800</id>
1256 // </item>
1257 // <item xsi:type="ns1:SoftLayer_Product_Item_Price">
1258 // <id xsi:type="xsd:int">58</id>
1259 // </item>
1260 // <item xsi:type="ns1:SoftLayer_Product_Item_Price">
1261 // <id xsi:type="xsd:int">21</id>
1262 // </item>
1263 // <item xsi:type="ns1:SoftLayer_Product_Item_Price">
1264 // <id xsi:type="xsd:int">1645</id>
1265 // </item>
1266 // <item xsi:type="ns1:SoftLayer_Product_Item_Price">
1267 // <id xsi:type="xsd:int">272</id>
1268 // </item>
1269 // <item xsi:type="ns1:SoftLayer_Product_Item_Price">
1270 // <id xsi:type="xsd:int">57</id>
1271 // </item>
1272 // <item xsi:type="ns1:SoftLayer_Product_Item_Price">
1273 // <id xsi:type="xsd:int">418</id>
1274 // </item>
1275 // <item xsi:type="ns1:SoftLayer_Product_Item_Price">
1276 // <id xsi:type="xsd:int">420</id>
1277 // </item>
1278 // </prices>
1279 // <quantity xsi:type="xsd:int">2</quantity>
1280 // <useHourlyPricing xsi:type="xsd:boolean">true</useHourlyPricing>
1281 // <virtualGuests SOAP-ENC:arrayType="ns1:SoftLayer_Virtual_Guest[1]" xsi:type="ns1:SoftLayer_Virtual_GuestArray">
1282 // <item xsi:type="ns1:SoftLayer_Virtual_Guest">
1283 // <domain xsi:type="xsd:string">example.com</domain>
1284 // <hostname xsi:type="xsd:string">server1</hostname>
1285 // <primaryBackendNetworkComponent xsi:type="ns1:SoftLayer_Virtual_Guest_Network_Component">
1286 // <networkVlan xsi:type="ns1:SoftLayer_Network_Vlan">
1287 // <id xsi:type="xsd:int">12345</id>
1288 // </networkVlan>
1289 // </primaryBackendNetworkComponent>
1290 // <primaryNetworkComponent xsi:type="ns1:SoftLayer_Virtual_Guest_Network_Component">
1291 // <networkVlan xsi:type="ns1:SoftLayer_Network_Vlan">
1292 // <id xsi:type="xsd:int">67890</id>
1293 // </networkVlan>
1294 // </primaryNetworkComponent>
1295 // </item>
1296 // <item xsi:type="ns1:SoftLayer_Virtual_Guest">
1297 // <domain xsi:type="xsd:string">example.com</domain>
1298 // <hostname xsi:type="xsd:string">server2</hostname>
1299 // <primaryBackendNetworkComponent xsi:type="ns1:SoftLayer_Virtual_Guest_Network_Component">
1300 // <networkVlan xsi:type="ns1:SoftLayer_Network_Vlan">
1301 // <id xsi:type="xsd:int">12345</id>
1302 // </networkVlan>
1303 // </primaryBackendNetworkComponent>
1304 // <primaryNetworkComponent xsi:type="ns1:SoftLayer_Virtual_Guest_Network_Component">
1305 // <networkVlan xsi:type="ns1:SoftLayer_Network_Vlan">
1306 // <id xsi:type="xsd:int">67890</id>
1307 // </networkVlan>
1308 // </primaryNetworkComponent>
1309 // </item>
1310 // </virtualGuests>
1311 // </orderData>
1312 // <saveAsQuote xsi:nil="true" />
1313 // </ns1:placeOrder>
1314 // </SOAP-ENV:Body>
1315 //
1316 // </SOAP-ENV:Envelope>
1317 // ```
1318 //
1319 // ## VLAN example
1320 //
1321 // **Warning:** the price ids provided below may be outdated or unavailable, so you will need to determine the
1322 //
1323 // available prices from the additional services pacakge with [[SoftLayer_Product_Package/getAllObjects]],
1324 // which has a [[SoftLayer_Product_Package_Type]] of `ADDITIONAL_SERVICES`.
1325 // You can get a full list of [[SoftLayer_Product_Package_Type/getAllObjects|]] to find other available additional
1326 // service packages.<br/><br/>
1327 //
1328 // ### VLAN Ordering
1329 //
1330 // ```xml
1331 // <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://api.service.softlayer.com/soap/v3/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
1332 //
1333 // <SOAP-ENV:Header>
1334 // <ns1:authenticate>
1335 // <username>your username</username>
1336 // <apiKey>your api key</apiKey>
1337 // </ns1:authenticate>
1338 // </SOAP-ENV:Header>
1339 // <SOAP-ENV:Body>
1340 // <ns1:placeOrder>
1341 // <orderData xsi:type="ns1:SoftLayer_Container_Product_Order_Network_Vlan">
1342 // <location xsi:type="xsd:string">154820</location>
1343 // <packageId xsi:type="xsd:int">0</packageId>
1344 // <prices SOAP-ENC:arrayType="ns1:SoftLayer_Product_Item_Price[2]" xsi:type="ns1:SoftLayer_Product_Item_PriceArray">
1345 // <item xsi:type="ns1:SoftLayer_Product_Item_Price">
1346 // <id xsi:type="xsd:int">2021</id>
1347 // </item>
1348 // <item xsi:type="ns1:SoftLayer_Product_Item_Price">
1349 // <id xsi:type="xsd:int">2018</id>
1350 // </item>
1351 // </prices>
1352 // <useHourlyPricing xsi:type="xsd:boolean">true</useHourlyPricing>
1353 // </orderData>
1354 // <saveAsQuote xsi:nil="true" />
1355 // </ns1:placeOrder>
1356 // </SOAP-ENV:Body>
1357 //
1358 // </SOAP-ENV:Envelope>
1359 // ```
1360 //
1361 // ## Multiple products example
1362 //
1363 // This example includes a combination of the above examples in a single order. Note that all the configuration
1364 // options for each individual order container are the same as above, except now we encapsulate each one within
1365 // the `orderContainers` property on the base [[SoftLayer_Container_Product_Order]].
1366 //
1367 // **Warning:** not all products are available to be ordered with other products. For example, since
1368 //
1369 // SSL certificates require validation from a 3rd party, the approval process may take days or even weeks,
1370 // and this would not be acceptable when you need your hourly virtual server right now. To better accommodate
1371 // customers, we restrict several products to be ordered individually.
1372 //
1373 // ### Bare metal server + virtual server + VLAN
1374 //
1375 // ```xml
1376 // <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://api.service.softlayer.com/soap/v3/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
1377 //
1378 // <SOAP-ENV:Header>
1379 // <ns1:authenticate>
1380 // <username>your username</username>
1381 // <apiKey>your api key</apiKey>
1382 // </ns1:authenticate>
1383 // </SOAP-ENV:Header>
1384 // <SOAP-ENV:Body>
1385 // <ns1:placeOrder>
1386 // <orderData xsi:type="ns1:SoftLayer_Container_Product_Order">
1387 // <orderContainers SOAP-ENC:arrayType="ns1:SoftLayer_Container_Product_Order[3]" xsi:type="ns1:SoftLayer_Container_Product_OrderArray">
1388 // <item xsi:type="ns1:SoftLayer_Container_Product_Order_Hardware_Server">
1389 // ...
1390 // </item>
1391 // <item xsi:type="ns1:SoftLayer_Container_Product_Order_Virtual_Guest">
1392 // ...
1393 // </item>
1394 // <item xsi:type="ns1:SoftLayer_Container_Product_Order_Network_Vlan">
1395 // ...
1396 // </item>
1397 // </orderContainers>
1398 // </orderData>
1399 // <saveAsQuote xsi:nil="true" />
1400 // </ns1:placeOrder>
1401 // </SOAP-ENV:Body>
1402 //
1403 // </SOAP-ENV:Envelope>
1404 // ```
1405 func (r Product_Order) PlaceOrder(orderData interface{}, saveAsQuote *bool) (resp datatypes.Container_Product_Order_Receipt, err error) {
1406 err = datatypes.SetComplexType(orderData)
1407 if err != nil {
1408 return
1409 }
1410 params := []interface{}{
1411 orderData,
1412 saveAsQuote,
1413 }
1414 err = r.Session.DoRequest("SoftLayer_Product_Order", "placeOrder", params, &r.Options, &resp)
1415 return
1416 }
1417
1418 // Use this method for placing server quotes and additional services quotes. The same applies for this as with verifyOrder. Send in the SoftLayer_Container_Product_Order_Hardware_Server for server quotes. After placing the quote, you must go to this URL to finish the order process. After going to this URL, it will direct you back to a SoftLayer webpage that tells us you have finished the process. After this, it will go to sales for final approval.
1419 func (r Product_Order) PlaceQuote(orderData interface{}) (resp datatypes.Container_Product_Order_Receipt, err error) {
1420 params := []interface{}{
1421 orderData,
1422 }
1423 err = r.Session.DoRequest("SoftLayer_Product_Order", "placeQuote", params, &r.Options, &resp)
1424 return
1425 }
1426
1427 // no documentation yet
1428 // Deprecated: This function has been marked as deprecated.
1429 func (r Product_Order) ProcessExternalPaymentAuthorization(token *string, payerId *string) (resp datatypes.Container_Product_Order, err error) {
1430 params := []interface{}{
1431 token,
1432 payerId,
1433 }
1434 err = r.Session.DoRequest("SoftLayer_Product_Order", "processExternalPaymentAuthorization", params, &r.Options, &resp)
1435 return
1436 }
1437
1438 // Get list of items that are required with the item prices provided
1439 func (r Product_Order) RequiredItems(itemPrices []datatypes.Product_Item_Price) (resp []datatypes.Product_Item, err error) {
1440 params := []interface{}{
1441 itemPrices,
1442 }
1443 err = r.Session.DoRequest("SoftLayer_Product_Order", "requiredItems", params, &r.Options, &resp)
1444 return
1445 }
1446
1447 // This service is used to verify that an order meets all the necessary requirements to purchase a server, virtual server or service from SoftLayer. It will verify that the products requested do not conflict. For example, you cannot order a Windows firewall with a Linux operating system. It will also check to make sure you have provided all the products that are required for the [[SoftLayer_Product_Package_Order_Configuration]] associated with the [[SoftLayer_Product_Package]] on each of the [[SoftLayer_Container_Product_Order]] specified.<br/><br/>
1448 //
1449 // This service returns the same container that was provided, but with additional information that can be used for debugging or validation. It will also contain pricing information (prorated if applicable) for each of the products on the order. If an exception occurs during verification, a container with the <code>SoftLayer_Exception_Order</code> exception type will be specified in the result.<br/><br/>
1450 //
1451 // <code>verifyOrder</code> accepts the same [[SoftLayer_Container_Product_Order]] as <code>placeOrder</code>, so see [[SoftLayer_Product_Order/placeOrder]] for more details.
1452 func (r Product_Order) VerifyOrder(orderData interface{}) (resp datatypes.Container_Product_Order, err error) {
1453 err = datatypes.SetComplexType(orderData)
1454 if err != nil {
1455 return
1456 }
1457 params := []interface{}{
1458 orderData,
1459 }
1460 err = r.Session.DoRequest("SoftLayer_Product_Order", "verifyOrder", params, &r.Options, &resp)
1461 return
1462 }
1463
1464 // The SoftLayer_Product_Package data type contains information about packages from which orders can be generated. Packages contain general information regarding what is in them, where they are currently sold, availability, and pricing.
1465 type Product_Package struct {
1466 Session session.SLSession
1467 Options sl.Options
1468 }
1469
1470 // GetProductPackageService returns an instance of the Product_Package SoftLayer service
1471 func GetProductPackageService(sess session.SLSession) Product_Package {
1472 return Product_Package{Session: sess}
1473 }
1474
1475 func (r Product_Package) Id(id int) Product_Package {
1476 r.Options.Id = &id
1477 return r
1478 }
1479
1480 func (r Product_Package) Mask(mask string) Product_Package {
1481 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
1482 mask = fmt.Sprintf("mask[%s]", mask)
1483 }
1484
1485 r.Options.Mask = mask
1486 return r
1487 }
1488
1489 func (r Product_Package) Filter(filter string) Product_Package {
1490 r.Options.Filter = filter
1491 return r
1492 }
1493
1494 func (r Product_Package) Limit(limit int) Product_Package {
1495 r.Options.Limit = &limit
1496 return r
1497 }
1498
1499 func (r Product_Package) Offset(offset int) Product_Package {
1500 r.Options.Offset = &offset
1501 return r
1502 }
1503
1504 // Retrieve The preset configurations available only for the authenticated account and this package.
1505 func (r Product_Package) GetAccountRestrictedActivePresets() (resp []datatypes.Product_Package_Preset, err error) {
1506 err = r.Session.DoRequest("SoftLayer_Product_Package", "getAccountRestrictedActivePresets", nil, &r.Options, &resp)
1507 return
1508 }
1509
1510 // Retrieve The results from this call are similar to [[SoftLayer_Product_Package/getCategories|getCategories]], but these ONLY include account-restricted prices. Not all accounts have restricted pricing.
1511 func (r Product_Package) GetAccountRestrictedCategories() (resp []datatypes.Product_Item_Category, err error) {
1512 err = r.Session.DoRequest("SoftLayer_Product_Package", "getAccountRestrictedCategories", nil, &r.Options, &resp)
1513 return
1514 }
1515
1516 // Retrieve The flag to indicate if there are any restricted prices in a package for the currently-active account.
1517 func (r Product_Package) GetAccountRestrictedPricesFlag() (resp bool, err error) {
1518 err = r.Session.DoRequest("SoftLayer_Product_Package", "getAccountRestrictedPricesFlag", nil, &r.Options, &resp)
1519 return
1520 }
1521
1522 // Return a list of Items in the package with their active prices.
1523 func (r Product_Package) GetActiveItems() (resp []datatypes.Product_Item, err error) {
1524 err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveItems", nil, &r.Options, &resp)
1525 return
1526 }
1527
1528 // <strong>This method is deprecated and should not be used in production code.</strong>
1529 //
1530 // This method will return the [[SoftLayer_Product_Package]] objects from which you can order a bare metal server, virtual server, service (such as CDN or Object Storage) or other software filtered by an attribute type associated with the package. Once you have the package you want to order from, you may query one of various endpoints from that package to get specific information about its products and pricing. See [[SoftLayer_Product_Package/getCategories|getCategories]] or [[SoftLayer_Product_Package/getItems|getItems]] for more information.
1531 // Deprecated: This function has been marked as deprecated.
1532 func (r Product_Package) GetActivePackagesByAttribute(attributeKeyName *string) (resp []datatypes.Product_Package, err error) {
1533 params := []interface{}{
1534 attributeKeyName,
1535 }
1536 err = r.Session.DoRequest("SoftLayer_Product_Package", "getActivePackagesByAttribute", params, &r.Options, &resp)
1537 return
1538 }
1539
1540 // Retrieve The available preset configurations for this package.
1541 func (r Product_Package) GetActivePresets() (resp []datatypes.Product_Package_Preset, err error) {
1542 err = r.Session.DoRequest("SoftLayer_Product_Package", "getActivePresets", nil, &r.Options, &resp)
1543 return
1544 }
1545
1546 // [DEPRECATED] This method pulls all the active private hosted cloud packages. This will give you a basic description of the packages that are currently active and from which you can order private hosted cloud configurations.
1547 // Deprecated: This function has been marked as deprecated.
1548 func (r Product_Package) GetActivePrivateHostedCloudPackages() (resp []datatypes.Product_Package, err error) {
1549 err = r.Session.DoRequest("SoftLayer_Product_Package", "getActivePrivateHostedCloudPackages", nil, &r.Options, &resp)
1550 return
1551 }
1552
1553 // Retrieve A collection of valid RAM items available for purchase in this package.
1554 func (r Product_Package) GetActiveRamItems() (resp []datatypes.Product_Item, err error) {
1555 err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveRamItems", nil, &r.Options, &resp)
1556 return
1557 }
1558
1559 // Retrieve A collection of valid server items available for purchase in this package.
1560 func (r Product_Package) GetActiveServerItems() (resp []datatypes.Product_Item, err error) {
1561 err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveServerItems", nil, &r.Options, &resp)
1562 return
1563 }
1564
1565 // Retrieve A collection of valid software items available for purchase in this package.
1566 func (r Product_Package) GetActiveSoftwareItems() (resp []datatypes.Product_Item, err error) {
1567 err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveSoftwareItems", nil, &r.Options, &resp)
1568 return
1569 }
1570
1571 // Retrieve A collection of [[SoftLayer_Product_Item_Price]] objects for pay-as-you-go usage.
1572 func (r Product_Package) GetActiveUsagePrices() (resp []datatypes.Product_Item_Price, err error) {
1573 err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveUsagePrices", nil, &r.Options, &resp)
1574 return
1575 }
1576
1577 // This method returns a collection of active usage rate [[SoftLayer_Product_Item_Price]] objects for the current package and specified datacenter. Optionally you can retrieve the active usage rate prices for a particular [[SoftLayer_Product_Item_Category]] by specifying a category code as the first parameter. This information is useful so that you can see "pay as you go" rates (if any) for the current package, location and optionally category.
1578 func (r Product_Package) GetActiveUsageRatePrices(locationId *int, categoryCode *string) (resp []datatypes.Product_Item_Price, err error) {
1579 params := []interface{}{
1580 locationId,
1581 categoryCode,
1582 }
1583 err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveUsageRatePrices", params, &r.Options, &resp)
1584 return
1585 }
1586
1587 // Retrieve This flag indicates that the package is an additional service.
1588 func (r Product_Package) GetAdditionalServiceFlag() (resp bool, err error) {
1589 err = r.Session.DoRequest("SoftLayer_Product_Package", "getAdditionalServiceFlag", nil, &r.Options, &resp)
1590 return
1591 }
1592
1593 // This method pulls all the active packages. This will give you a basic description of the packages that are currently active
1594 func (r Product_Package) GetAllObjects() (resp []datatypes.Product_Package, err error) {
1595 err = r.Session.DoRequest("SoftLayer_Product_Package", "getAllObjects", nil, &r.Options, &resp)
1596 return
1597 }
1598
1599 // Retrieve
1600 func (r Product_Package) GetAttributes() (resp []datatypes.Product_Package_Attribute, err error) {
1601 err = r.Session.DoRequest("SoftLayer_Product_Package", "getAttributes", nil, &r.Options, &resp)
1602 return
1603 }
1604
1605 // Retrieve A collection of valid locations for this package. (Deprecated - Use [[SoftLayer_Product_Package/getRegions|getRegions]])
1606 func (r Product_Package) GetAvailableLocations() (resp []datatypes.Product_Package_Locations, err error) {
1607 err = r.Session.DoRequest("SoftLayer_Product_Package", "getAvailableLocations", nil, &r.Options, &resp)
1608 return
1609 }
1610
1611 // no documentation yet
1612 func (r Product_Package) GetAvailablePackagesForImageTemplate(imageTemplate *datatypes.Virtual_Guest_Block_Device_Template_Group) (resp []datatypes.Product_Package, err error) {
1613 params := []interface{}{
1614 imageTemplate,
1615 }
1616 err = r.Session.DoRequest("SoftLayer_Product_Package", "getAvailablePackagesForImageTemplate", params, &r.Options, &resp)
1617 return
1618 }
1619
1620 // Retrieve The maximum number of available disk storage units associated with the servers in a package.
1621 func (r Product_Package) GetAvailableStorageUnits() (resp uint, err error) {
1622 err = r.Session.DoRequest("SoftLayer_Product_Package", "getAvailableStorageUnits", nil, &r.Options, &resp)
1623 return
1624 }
1625
1626 // Retrieve This is a collection of categories ([[SoftLayer_Product_Item_Category]]) associated with a package which can be used for ordering. These categories have several objects prepopulated which are useful when determining the available products for purchase. The categories contain groups ([[SoftLayer_Product_Package_Item_Category_Group]]) that organize the products and prices by similar features. For example, operating systems will be grouped by their manufacturer and virtual server disks will be grouped by their disk type (SAN vs. local). Each group will contain prices ([[SoftLayer_Product_Item_Price]]) which you can use determine the cost of each product. Each price has a product ([[SoftLayer_Product_Item]]) which provides the name and other useful information about the server, service or software you may purchase.
1627 func (r Product_Package) GetCategories() (resp []datatypes.Product_Item_Category, err error) {
1628 err = r.Session.DoRequest("SoftLayer_Product_Package", "getCategories", nil, &r.Options, &resp)
1629 return
1630 }
1631
1632 // no documentation yet
1633 func (r Product_Package) GetCdnItems() (resp []datatypes.Product_Item, err error) {
1634 err = r.Session.DoRequest("SoftLayer_Product_Package", "getCdnItems", nil, &r.Options, &resp)
1635 return
1636 }
1637
1638 // no documentation yet
1639 func (r Product_Package) GetCloudStorageItems(provider *int) (resp []datatypes.Product_Item, err error) {
1640 params := []interface{}{
1641 provider,
1642 }
1643 err = r.Session.DoRequest("SoftLayer_Product_Package", "getCloudStorageItems", params, &r.Options, &resp)
1644 return
1645 }
1646
1647 // Retrieve The item categories associated with a package, including information detailing which item categories are required as part of a SoftLayer product order.
1648 func (r Product_Package) GetConfiguration() (resp []datatypes.Product_Package_Order_Configuration, err error) {
1649 err = r.Session.DoRequest("SoftLayer_Product_Package", "getConfiguration", nil, &r.Options, &resp)
1650 return
1651 }
1652
1653 // Retrieve The default boot category code for the package.
1654 func (r Product_Package) GetDefaultBootCategoryCode() (resp string, err error) {
1655 err = r.Session.DoRequest("SoftLayer_Product_Package", "getDefaultBootCategoryCode", nil, &r.Options, &resp)
1656 return
1657 }
1658
1659 // Retrieve A collection of valid RAM items available for purchase in this package.
1660 func (r Product_Package) GetDefaultRamItems() (resp []datatypes.Product_Item, err error) {
1661 err = r.Session.DoRequest("SoftLayer_Product_Package", "getDefaultRamItems", nil, &r.Options, &resp)
1662 return
1663 }
1664
1665 // Retrieve The node type for a package in a solution deployment.
1666 func (r Product_Package) GetDeploymentNodeType() (resp string, err error) {
1667 err = r.Session.DoRequest("SoftLayer_Product_Package", "getDeploymentNodeType", nil, &r.Options, &resp)
1668 return
1669 }
1670
1671 // Retrieve The packages that are allowed in a multi-server solution. (Deprecated)
1672 func (r Product_Package) GetDeploymentPackages() (resp []datatypes.Product_Package, err error) {
1673 err = r.Session.DoRequest("SoftLayer_Product_Package", "getDeploymentPackages", nil, &r.Options, &resp)
1674 return
1675 }
1676
1677 // Retrieve The solution deployment type.
1678 func (r Product_Package) GetDeploymentType() (resp string, err error) {
1679 err = r.Session.DoRequest("SoftLayer_Product_Package", "getDeploymentType", nil, &r.Options, &resp)
1680 return
1681 }
1682
1683 // Retrieve The package that represents a multi-server solution. (Deprecated)
1684 func (r Product_Package) GetDeployments() (resp []datatypes.Product_Package, err error) {
1685 err = r.Session.DoRequest("SoftLayer_Product_Package", "getDeployments", nil, &r.Options, &resp)
1686 return
1687 }
1688
1689 // Retrieve This flag indicates the package does not allow custom disk partitions.
1690 func (r Product_Package) GetDisallowCustomDiskPartitions() (resp bool, err error) {
1691 err = r.Session.DoRequest("SoftLayer_Product_Package", "getDisallowCustomDiskPartitions", nil, &r.Options, &resp)
1692 return
1693 }
1694
1695 // Retrieve The Softlayer order step is optionally step-based. This returns the first SoftLayer_Product_Package_Order_Step in the step-based order process.
1696 func (r Product_Package) GetFirstOrderStep() (resp datatypes.Product_Package_Order_Step, err error) {
1697 err = r.Session.DoRequest("SoftLayer_Product_Package", "getFirstOrderStep", nil, &r.Options, &resp)
1698 return
1699 }
1700
1701 // Retrieve Whether the package is a specialized network gateway appliance package.
1702 func (r Product_Package) GetGatewayApplianceFlag() (resp bool, err error) {
1703 err = r.Session.DoRequest("SoftLayer_Product_Package", "getGatewayApplianceFlag", nil, &r.Options, &resp)
1704 return
1705 }
1706
1707 // Retrieve This flag indicates that the package supports GPUs.
1708 func (r Product_Package) GetGpuFlag() (resp bool, err error) {
1709 err = r.Session.DoRequest("SoftLayer_Product_Package", "getGpuFlag", nil, &r.Options, &resp)
1710 return
1711 }
1712
1713 // Retrieve Determines whether the package contains prices that can be ordered hourly.
1714 func (r Product_Package) GetHourlyBillingAvailableFlag() (resp bool, err error) {
1715 err = r.Session.DoRequest("SoftLayer_Product_Package", "getHourlyBillingAvailableFlag", nil, &r.Options, &resp)
1716 return
1717 }
1718
1719 // Retrieve Packages with this flag do not allow monthly orders.
1720 func (r Product_Package) GetHourlyOnlyOrders() (resp bool, err error) {
1721 err = r.Session.DoRequest("SoftLayer_Product_Package", "getHourlyOnlyOrders", nil, &r.Options, &resp)
1722 return
1723 }
1724
1725 // Returns a collection of SoftLayer_Product_Item_Attribute_Type objects. These item attribute types specifically deal with when an item, SoftLayer_Product_Item, from the product catalog may no longer be available. The keynames for these attribute types start with 'UNAVAILABLE_AFTER_DATE_*', where the '*' may represent any string. For example, 'UNAVAILABLE_AFTER_DATE_NEW_ORDERS', signifies that the item is not available for new orders. There is a catch all attribute type, 'UNAVAILABLE_AFTER_DATE_ALL'. If an item has one of these availability attributes set, the value should be a valid date in MM/DD/YYYY, indicating the date after which the item will no longer be available.
1726 func (r Product_Package) GetItemAvailabilityTypes() (resp []datatypes.Product_Item_Attribute_Type, err error) {
1727 err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemAvailabilityTypes", nil, &r.Options, &resp)
1728 return
1729 }
1730
1731 // Retrieve The item-item conflicts associated with a package.
1732 func (r Product_Package) GetItemConflicts() (resp []datatypes.Product_Item_Resource_Conflict, err error) {
1733 err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemConflicts", nil, &r.Options, &resp)
1734 return
1735 }
1736
1737 // Retrieve The item-location conflicts associated with a package.
1738 func (r Product_Package) GetItemLocationConflicts() (resp []datatypes.Product_Item_Resource_Conflict, err error) {
1739 err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemLocationConflicts", nil, &r.Options, &resp)
1740 return
1741 }
1742
1743 // Retrieve cross reference for item prices
1744 func (r Product_Package) GetItemPriceReferences() (resp []datatypes.Product_Package_Item_Prices, err error) {
1745 err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemPriceReferences", nil, &r.Options, &resp)
1746 return
1747 }
1748
1749 // Retrieve A collection of SoftLayer_Product_Item_Prices that are valid for this package.
1750 func (r Product_Package) GetItemPrices() (resp []datatypes.Product_Item_Price, err error) {
1751 err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemPrices", nil, &r.Options, &resp)
1752 return
1753 }
1754
1755 // Return a collection of SoftLayer_Item_Price objects from a collection of SoftLayer_Software_Description
1756 func (r Product_Package) GetItemPricesFromSoftwareDescriptions(softwareDescriptions []datatypes.Software_Description, includeTranslationsFlag *bool, returnAllPricesFlag *bool) (resp []datatypes.Product_Item_Price, err error) {
1757 params := []interface{}{
1758 softwareDescriptions,
1759 includeTranslationsFlag,
1760 returnAllPricesFlag,
1761 }
1762 err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemPricesFromSoftwareDescriptions", params, &r.Options, &resp)
1763 return
1764 }
1765
1766 // Retrieve A collection of valid items available for purchase in this package.
1767 func (r Product_Package) GetItems() (resp []datatypes.Product_Item, err error) {
1768 err = r.Session.DoRequest("SoftLayer_Product_Package", "getItems", nil, &r.Options, &resp)
1769 return
1770 }
1771
1772 // Return a collection of [[SoftLayer_Product_Item]] objects from a [[SoftLayer_Virtual_Guest_Block_Device_Template_Group]] object
1773 func (r Product_Package) GetItemsFromImageTemplate(imageTemplate *datatypes.Virtual_Guest_Block_Device_Template_Group) (resp []datatypes.Product_Item, err error) {
1774 params := []interface{}{
1775 imageTemplate,
1776 }
1777 err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemsFromImageTemplate", params, &r.Options, &resp)
1778 return
1779 }
1780
1781 // Retrieve A collection of valid locations for this package. (Deprecated - Use [[SoftLayer_Product_Package/getRegions|getRegions]])
1782 func (r Product_Package) GetLocations() (resp []datatypes.Location, err error) {
1783 err = r.Session.DoRequest("SoftLayer_Product_Package", "getLocations", nil, &r.Options, &resp)
1784 return
1785 }
1786
1787 // Retrieve The lowest server [[SoftLayer_Product_Item_Price]] related to this package.
1788 func (r Product_Package) GetLowestServerPrice() (resp datatypes.Product_Item_Price, err error) {
1789 err = r.Session.DoRequest("SoftLayer_Product_Package", "getLowestServerPrice", nil, &r.Options, &resp)
1790 return
1791 }
1792
1793 // Retrieve The maximum available network speed associated with the package.
1794 func (r Product_Package) GetMaximumPortSpeed() (resp uint, err error) {
1795 err = r.Session.DoRequest("SoftLayer_Product_Package", "getMaximumPortSpeed", nil, &r.Options, &resp)
1796 return
1797 }
1798
1799 // no documentation yet
1800 func (r Product_Package) GetMessageQueueItems() (resp []datatypes.Product_Item, err error) {
1801 err = r.Session.DoRequest("SoftLayer_Product_Package", "getMessageQueueItems", nil, &r.Options, &resp)
1802 return
1803 }
1804
1805 // Retrieve The minimum available network speed associated with the package.
1806 func (r Product_Package) GetMinimumPortSpeed() (resp uint, err error) {
1807 err = r.Session.DoRequest("SoftLayer_Product_Package", "getMinimumPortSpeed", nil, &r.Options, &resp)
1808 return
1809 }
1810
1811 // Retrieve This flag indicates that this is a MongoDB engineered package. (Deprecated)
1812 func (r Product_Package) GetMongoDbEngineeredFlag() (resp bool, err error) {
1813 err = r.Session.DoRequest("SoftLayer_Product_Package", "getMongoDbEngineeredFlag", nil, &r.Options, &resp)
1814 return
1815 }
1816
1817 // Retrieve Services ordered from this package cannot have upgrades or downgrades performed.
1818 func (r Product_Package) GetNoUpgradesFlag() (resp bool, err error) {
1819 err = r.Session.DoRequest("SoftLayer_Product_Package", "getNoUpgradesFlag", nil, &r.Options, &resp)
1820 return
1821 }
1822
1823 // Retrieve Whether the package is not in compliance with EU support.
1824 func (r Product_Package) GetNonEuCompliantFlag() (resp bool, err error) {
1825 err = r.Session.DoRequest("SoftLayer_Product_Package", "getNonEuCompliantFlag", nil, &r.Options, &resp)
1826 return
1827 }
1828
1829 // no documentation yet
1830 func (r Product_Package) GetObject() (resp datatypes.Product_Package, err error) {
1831 err = r.Session.DoRequest("SoftLayer_Product_Package", "getObject", nil, &r.Options, &resp)
1832 return
1833 }
1834
1835 // This method will return a collection of [[SoftLayer_Container_Product_Order_Network_Storage_Hub_Datacenter]] objects which contain a datacenter location and all the associated active usage rate prices where object storage is available. This method is really only applicable to the object storage additional service package which has a [[SoftLayer_Product_Package_Type]] of ”'ADDITIONAL_SERVICES_OBJECT_STORAGE”'. This information is useful so that you can see the "pay as you go" rates per datacenter.
1836 func (r Product_Package) GetObjectStorageDatacenters() (resp []datatypes.Container_Product_Order_Network_Storage_Hub_Datacenter, err error) {
1837 err = r.Session.DoRequest("SoftLayer_Product_Package", "getObjectStorageDatacenters", nil, &r.Options, &resp)
1838 return
1839 }
1840
1841 // This method will return a collection of [[SoftLayer_Container_Product_Order_Network_Storage_ObjectStorage_LocationGroup]] objects which contain a location group and all the associated active usage rate prices where object storage is available. This method is really only applicable to the object storage additional service package which has a [[SoftLayer_Product_Package_Type]] of ”'ADDITIONAL_SERVICES_OBJECT_STORAGE”'. This information is useful so that you can see the "pay as you go" rates per location group.
1842 func (r Product_Package) GetObjectStorageLocationGroups() (resp []datatypes.Container_Product_Order_Network_Storage_ObjectStorage_LocationGroup, err error) {
1843 err = r.Session.DoRequest("SoftLayer_Product_Package", "getObjectStorageLocationGroups", nil, &r.Options, &resp)
1844 return
1845 }
1846
1847 // Retrieve The premium price modifiers associated with the [[SoftLayer_Product_Item_Price]] and [[SoftLayer_Location]] objects in a package.
1848 func (r Product_Package) GetOrderPremiums() (resp []datatypes.Product_Item_Price_Premium, err error) {
1849 err = r.Session.DoRequest("SoftLayer_Product_Package", "getOrderPremiums", nil, &r.Options, &resp)
1850 return
1851 }
1852
1853 // Retrieve This flag indicates if the package may be available in PoP locations in addition to Datacenters.
1854 func (r Product_Package) GetPopLocationAvailabilityFlag() (resp bool, err error) {
1855 err = r.Session.DoRequest("SoftLayer_Product_Package", "getPopLocationAvailabilityFlag", nil, &r.Options, &resp)
1856 return
1857 }
1858
1859 // Retrieve This flag indicates the package is pre-configured. (Deprecated)
1860 func (r Product_Package) GetPreconfiguredFlag() (resp bool, err error) {
1861 err = r.Session.DoRequest("SoftLayer_Product_Package", "getPreconfiguredFlag", nil, &r.Options, &resp)
1862 return
1863 }
1864
1865 // Retrieve Whether the package requires the user to define a preset configuration.
1866 func (r Product_Package) GetPresetConfigurationRequiredFlag() (resp bool, err error) {
1867 err = r.Session.DoRequest("SoftLayer_Product_Package", "getPresetConfigurationRequiredFlag", nil, &r.Options, &resp)
1868 return
1869 }
1870
1871 // Retrieve Whether the package prevents the user from specifying a Vlan.
1872 func (r Product_Package) GetPreventVlanSelectionFlag() (resp bool, err error) {
1873 err = r.Session.DoRequest("SoftLayer_Product_Package", "getPreventVlanSelectionFlag", nil, &r.Options, &resp)
1874 return
1875 }
1876
1877 // Retrieve This flag indicates the package is for a private hosted cloud deployment. (Deprecated)
1878 func (r Product_Package) GetPrivateHostedCloudPackageFlag() (resp bool, err error) {
1879 err = r.Session.DoRequest("SoftLayer_Product_Package", "getPrivateHostedCloudPackageFlag", nil, &r.Options, &resp)
1880 return
1881 }
1882
1883 // Retrieve The server role of the private hosted cloud deployment. (Deprecated)
1884 func (r Product_Package) GetPrivateHostedCloudPackageType() (resp string, err error) {
1885 err = r.Session.DoRequest("SoftLayer_Product_Package", "getPrivateHostedCloudPackageType", nil, &r.Options, &resp)
1886 return
1887 }
1888
1889 // Retrieve Whether the package only has access to the private network.
1890 func (r Product_Package) GetPrivateNetworkOnlyFlag() (resp bool, err error) {
1891 err = r.Session.DoRequest("SoftLayer_Product_Package", "getPrivateNetworkOnlyFlag", nil, &r.Options, &resp)
1892 return
1893 }
1894
1895 // Retrieve Whether the package is a specialized mass storage QuantaStor package. (Deprecated)
1896 func (r Product_Package) GetQuantaStorPackageFlag() (resp bool, err error) {
1897 err = r.Session.DoRequest("SoftLayer_Product_Package", "getQuantaStorPackageFlag", nil, &r.Options, &resp)
1898 return
1899 }
1900
1901 // Retrieve This flag indicates the package does not allow different disks with RAID.
1902 func (r Product_Package) GetRaidDiskRestrictionFlag() (resp bool, err error) {
1903 err = r.Session.DoRequest("SoftLayer_Product_Package", "getRaidDiskRestrictionFlag", nil, &r.Options, &resp)
1904 return
1905 }
1906
1907 // Retrieve This flag determines if the package contains a redundant power supply product.
1908 func (r Product_Package) GetRedundantPowerFlag() (resp bool, err error) {
1909 err = r.Session.DoRequest("SoftLayer_Product_Package", "getRedundantPowerFlag", nil, &r.Options, &resp)
1910 return
1911 }
1912
1913 // Retrieve The regional locations that a package is available in.
1914 func (r Product_Package) GetRegions() (resp []datatypes.Location_Region, err error) {
1915 err = r.Session.DoRequest("SoftLayer_Product_Package", "getRegions", nil, &r.Options, &resp)
1916 return
1917 }
1918
1919 // This call is similar to [[SoftLayer_Product_Package/getCategories|getCategories]], except that it does not include account-restricted pricing. Not all accounts have restricted pricing.
1920 func (r Product_Package) GetStandardCategories() (resp []datatypes.Product_Item_Category, err error) {
1921 err = r.Session.DoRequest("SoftLayer_Product_Package", "getStandardCategories", nil, &r.Options, &resp)
1922 return
1923 }
1924
1925 // Retrieve The top level category code for this service offering.
1926 func (r Product_Package) GetTopLevelItemCategoryCode() (resp string, err error) {
1927 err = r.Session.DoRequest("SoftLayer_Product_Package", "getTopLevelItemCategoryCode", nil, &r.Options, &resp)
1928 return
1929 }
1930
1931 // Retrieve The type of service offering. This property can be used to help filter packages.
1932 func (r Product_Package) GetType() (resp datatypes.Product_Package_Type, err error) {
1933 err = r.Session.DoRequest("SoftLayer_Product_Package", "getType", nil, &r.Options, &resp)
1934 return
1935 }
1936
1937 // Package presets are used to simplify ordering by eliminating the need for price ids when submitting orders.
1938 //
1939 // Orders submitted with a preset id defined will use the prices included in the package preset. Prices submitted on an order with a preset id will replace the prices included in the package preset for that prices category. If the package preset has a fixed configuration flag <em>(fixedConfigurationFlag)</em> set then the prices included in the preset configuration cannot be replaced by prices submitted on the order. The only exception to the fixed configuration flag would be if a price submitted on the order is an account-restricted price for the same product item.
1940 type Product_Package_Preset struct {
1941 Session session.SLSession
1942 Options sl.Options
1943 }
1944
1945 // GetProductPackagePresetService returns an instance of the Product_Package_Preset SoftLayer service
1946 func GetProductPackagePresetService(sess session.SLSession) Product_Package_Preset {
1947 return Product_Package_Preset{Session: sess}
1948 }
1949
1950 func (r Product_Package_Preset) Id(id int) Product_Package_Preset {
1951 r.Options.Id = &id
1952 return r
1953 }
1954
1955 func (r Product_Package_Preset) Mask(mask string) Product_Package_Preset {
1956 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
1957 mask = fmt.Sprintf("mask[%s]", mask)
1958 }
1959
1960 r.Options.Mask = mask
1961 return r
1962 }
1963
1964 func (r Product_Package_Preset) Filter(filter string) Product_Package_Preset {
1965 r.Options.Filter = filter
1966 return r
1967 }
1968
1969 func (r Product_Package_Preset) Limit(limit int) Product_Package_Preset {
1970 r.Options.Limit = &limit
1971 return r
1972 }
1973
1974 func (r Product_Package_Preset) Offset(offset int) Product_Package_Preset {
1975 r.Options.Offset = &offset
1976 return r
1977 }
1978
1979 // This method returns all the active package presets.
1980 func (r Product_Package_Preset) GetAllObjects() (resp []datatypes.Product_Package_Preset, err error) {
1981 err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getAllObjects", nil, &r.Options, &resp)
1982 return
1983 }
1984
1985 // Retrieve
1986 func (r Product_Package_Preset) GetAvailableStorageUnits() (resp uint, err error) {
1987 err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getAvailableStorageUnits", nil, &r.Options, &resp)
1988 return
1989 }
1990
1991 // Retrieve When true this preset is for ordering a Bare Metal Reserved server.
1992 func (r Product_Package_Preset) GetBareMetalReservedFlag() (resp bool, err error) {
1993 err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getBareMetalReservedFlag", nil, &r.Options, &resp)
1994 return
1995 }
1996
1997 // Retrieve The item categories that are included in this package preset configuration.
1998 func (r Product_Package_Preset) GetCategories() (resp []datatypes.Product_Item_Category, err error) {
1999 err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getCategories", nil, &r.Options, &resp)
2000 return
2001 }
2002
2003 // Retrieve The compute family this configuration belongs to.
2004 func (r Product_Package_Preset) GetComputeGroup() (resp datatypes.Product_Item_Server_Group, err error) {
2005 err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getComputeGroup", nil, &r.Options, &resp)
2006 return
2007 }
2008
2009 // Retrieve The preset configuration (category and price).
2010 func (r Product_Package_Preset) GetConfiguration() (resp []datatypes.Product_Package_Preset_Configuration, err error) {
2011 err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getConfiguration", nil, &r.Options, &resp)
2012 return
2013 }
2014
2015 // Retrieve When true this preset is only allowed to upgrade/downgrade to other presets in the same compute family.
2016 func (r Product_Package_Preset) GetDisallowedComputeGroupUpgradeFlag() (resp bool, err error) {
2017 err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getDisallowedComputeGroupUpgradeFlag", nil, &r.Options, &resp)
2018 return
2019 }
2020
2021 // Retrieve A package preset with this flag set will not allow the price's defined in the preset configuration to be overriden during order placement.
2022 func (r Product_Package_Preset) GetFixedConfigurationFlag() (resp bool, err error) {
2023 err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getFixedConfigurationFlag", nil, &r.Options, &resp)
2024 return
2025 }
2026
2027 // Retrieve The locations this preset configuration is available in. If empty the preset is available in all locations the package is available in.
2028 func (r Product_Package_Preset) GetLocations() (resp []datatypes.Location, err error) {
2029 err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getLocations", nil, &r.Options, &resp)
2030 return
2031 }
2032
2033 // Retrieve The lowest server prices related to this package preset.
2034 func (r Product_Package_Preset) GetLowestPresetServerPrice() (resp datatypes.Product_Item_Price, err error) {
2035 err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getLowestPresetServerPrice", nil, &r.Options, &resp)
2036 return
2037 }
2038
2039 // no documentation yet
2040 func (r Product_Package_Preset) GetObject() (resp datatypes.Product_Package_Preset, err error) {
2041 err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getObject", nil, &r.Options, &resp)
2042 return
2043 }
2044
2045 // Retrieve The package this preset belongs to.
2046 func (r Product_Package_Preset) GetPackage() (resp datatypes.Product_Package, err error) {
2047 err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getPackage", nil, &r.Options, &resp)
2048 return
2049 }
2050
2051 // Retrieve The item categories associated with a package preset, including information detailing which item categories are required as part of a SoftLayer product order.
2052 func (r Product_Package_Preset) GetPackageConfiguration() (resp []datatypes.Product_Package_Order_Configuration, err error) {
2053 err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getPackageConfiguration", nil, &r.Options, &resp)
2054 return
2055 }
2056
2057 // Retrieve The item prices that are included in this package preset configuration.
2058 func (r Product_Package_Preset) GetPrices() (resp []datatypes.Product_Item_Price, err error) {
2059 err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getPrices", nil, &r.Options, &resp)
2060 return
2061 }
2062
2063 // Retrieve Describes how all disks in this preset will be configured.
2064 func (r Product_Package_Preset) GetStorageGroupTemplateArrays() (resp []datatypes.Configuration_Storage_Group_Template_Group, err error) {
2065 err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getStorageGroupTemplateArrays", nil, &r.Options, &resp)
2066 return
2067 }
2068
2069 // Retrieve The starting hourly price for this configuration. Additional options not defined in the preset may increase the cost.
2070 func (r Product_Package_Preset) GetTotalMinimumHourlyFee() (resp datatypes.Float64, err error) {
2071 err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getTotalMinimumHourlyFee", nil, &r.Options, &resp)
2072 return
2073 }
2074
2075 // Retrieve The starting monthly price for this configuration. Additional options not defined in the preset may increase the cost.
2076 func (r Product_Package_Preset) GetTotalMinimumRecurringFee() (resp datatypes.Float64, err error) {
2077 err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getTotalMinimumRecurringFee", nil, &r.Options, &resp)
2078 return
2079 }
2080
2081 // The SoftLayer_Product_Package_Server data type contains summarized information for bare metal servers regarding pricing, processor stats, and feature sets.
2082 type Product_Package_Server struct {
2083 Session session.SLSession
2084 Options sl.Options
2085 }
2086
2087 // GetProductPackageServerService returns an instance of the Product_Package_Server SoftLayer service
2088 func GetProductPackageServerService(sess session.SLSession) Product_Package_Server {
2089 return Product_Package_Server{Session: sess}
2090 }
2091
2092 func (r Product_Package_Server) Id(id int) Product_Package_Server {
2093 r.Options.Id = &id
2094 return r
2095 }
2096
2097 func (r Product_Package_Server) Mask(mask string) Product_Package_Server {
2098 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
2099 mask = fmt.Sprintf("mask[%s]", mask)
2100 }
2101
2102 r.Options.Mask = mask
2103 return r
2104 }
2105
2106 func (r Product_Package_Server) Filter(filter string) Product_Package_Server {
2107 r.Options.Filter = filter
2108 return r
2109 }
2110
2111 func (r Product_Package_Server) Limit(limit int) Product_Package_Server {
2112 r.Options.Limit = &limit
2113 return r
2114 }
2115
2116 func (r Product_Package_Server) Offset(offset int) Product_Package_Server {
2117 r.Options.Offset = &offset
2118 return r
2119 }
2120
2121 // This method will grab all the package servers.
2122 func (r Product_Package_Server) GetAllObjects() (resp []datatypes.Product_Package_Server, err error) {
2123 err = r.Session.DoRequest("SoftLayer_Product_Package_Server", "getAllObjects", nil, &r.Options, &resp)
2124 return
2125 }
2126
2127 // Retrieve
2128 func (r Product_Package_Server) GetCatalog() (resp datatypes.Product_Catalog, err error) {
2129 err = r.Session.DoRequest("SoftLayer_Product_Package_Server", "getCatalog", nil, &r.Options, &resp)
2130 return
2131 }
2132
2133 // Retrieve
2134 func (r Product_Package_Server) GetItem() (resp datatypes.Product_Item, err error) {
2135 err = r.Session.DoRequest("SoftLayer_Product_Package_Server", "getItem", nil, &r.Options, &resp)
2136 return
2137 }
2138
2139 // Retrieve
2140 func (r Product_Package_Server) GetItemPrice() (resp datatypes.Product_Item_Price, err error) {
2141 err = r.Session.DoRequest("SoftLayer_Product_Package_Server", "getItemPrice", nil, &r.Options, &resp)
2142 return
2143 }
2144
2145 // no documentation yet
2146 func (r Product_Package_Server) GetObject() (resp datatypes.Product_Package_Server, err error) {
2147 err = r.Session.DoRequest("SoftLayer_Product_Package_Server", "getObject", nil, &r.Options, &resp)
2148 return
2149 }
2150
2151 // Retrieve
2152 func (r Product_Package_Server) GetPackage() (resp datatypes.Product_Package, err error) {
2153 err = r.Session.DoRequest("SoftLayer_Product_Package_Server", "getPackage", nil, &r.Options, &resp)
2154 return
2155 }
2156
2157 // Retrieve
2158 func (r Product_Package_Server) GetPreset() (resp datatypes.Product_Package_Preset, err error) {
2159 err = r.Session.DoRequest("SoftLayer_Product_Package_Server", "getPreset", nil, &r.Options, &resp)
2160 return
2161 }
2162
2163 // The [[SoftLayer_Product_Package_Server_Option]] data type contains various data points associated with package servers that can be used in selection criteria.
2164 type Product_Package_Server_Option struct {
2165 Session session.SLSession
2166 Options sl.Options
2167 }
2168
2169 // GetProductPackageServerOptionService returns an instance of the Product_Package_Server_Option SoftLayer service
2170 func GetProductPackageServerOptionService(sess session.SLSession) Product_Package_Server_Option {
2171 return Product_Package_Server_Option{Session: sess}
2172 }
2173
2174 func (r Product_Package_Server_Option) Id(id int) Product_Package_Server_Option {
2175 r.Options.Id = &id
2176 return r
2177 }
2178
2179 func (r Product_Package_Server_Option) Mask(mask string) Product_Package_Server_Option {
2180 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
2181 mask = fmt.Sprintf("mask[%s]", mask)
2182 }
2183
2184 r.Options.Mask = mask
2185 return r
2186 }
2187
2188 func (r Product_Package_Server_Option) Filter(filter string) Product_Package_Server_Option {
2189 r.Options.Filter = filter
2190 return r
2191 }
2192
2193 func (r Product_Package_Server_Option) Limit(limit int) Product_Package_Server_Option {
2194 r.Options.Limit = &limit
2195 return r
2196 }
2197
2198 func (r Product_Package_Server_Option) Offset(offset int) Product_Package_Server_Option {
2199 r.Options.Offset = &offset
2200 return r
2201 }
2202
2203 // This method will grab all the package server options.
2204 func (r Product_Package_Server_Option) GetAllOptions() (resp []datatypes.Product_Package_Server_Option, err error) {
2205 err = r.Session.DoRequest("SoftLayer_Product_Package_Server_Option", "getAllOptions", nil, &r.Options, &resp)
2206 return
2207 }
2208
2209 // no documentation yet
2210 func (r Product_Package_Server_Option) GetObject() (resp datatypes.Product_Package_Server_Option, err error) {
2211 err = r.Session.DoRequest("SoftLayer_Product_Package_Server_Option", "getObject", nil, &r.Options, &resp)
2212 return
2213 }
2214
2215 // This method will grab all the package server options for the specified type.
2216 func (r Product_Package_Server_Option) GetOptions(typ *string) (resp []datatypes.Product_Package_Server_Option, err error) {
2217 params := []interface{}{
2218 typ,
2219 }
2220 err = r.Session.DoRequest("SoftLayer_Product_Package_Server_Option", "getOptions", params, &r.Options, &resp)
2221 return
2222 }
2223
2224 // The [[SoftLayer_Product_Package_Type]] object indicates the type for a service offering (package). The type can be used to filter packages. For example, if you are looking for the package representing virtual servers, you can filter on the type's key name of ”'VIRTUAL_SERVER_INSTANCE”'. For bare metal servers by core or CPU, filter on ”'BARE_METAL_CORE”' or ”'BARE_METAL_CPU”', respectively.
2225 type Product_Package_Type struct {
2226 Session session.SLSession
2227 Options sl.Options
2228 }
2229
2230 // GetProductPackageTypeService returns an instance of the Product_Package_Type SoftLayer service
2231 func GetProductPackageTypeService(sess session.SLSession) Product_Package_Type {
2232 return Product_Package_Type{Session: sess}
2233 }
2234
2235 func (r Product_Package_Type) Id(id int) Product_Package_Type {
2236 r.Options.Id = &id
2237 return r
2238 }
2239
2240 func (r Product_Package_Type) Mask(mask string) Product_Package_Type {
2241 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
2242 mask = fmt.Sprintf("mask[%s]", mask)
2243 }
2244
2245 r.Options.Mask = mask
2246 return r
2247 }
2248
2249 func (r Product_Package_Type) Filter(filter string) Product_Package_Type {
2250 r.Options.Filter = filter
2251 return r
2252 }
2253
2254 func (r Product_Package_Type) Limit(limit int) Product_Package_Type {
2255 r.Options.Limit = &limit
2256 return r
2257 }
2258
2259 func (r Product_Package_Type) Offset(offset int) Product_Package_Type {
2260 r.Options.Offset = &offset
2261 return r
2262 }
2263
2264 // This method will return all of the available package types.
2265 func (r Product_Package_Type) GetAllObjects() (resp []datatypes.Product_Package_Type, err error) {
2266 err = r.Session.DoRequest("SoftLayer_Product_Package_Type", "getAllObjects", nil, &r.Options, &resp)
2267 return
2268 }
2269
2270 // no documentation yet
2271 func (r Product_Package_Type) GetObject() (resp datatypes.Product_Package_Type, err error) {
2272 err = r.Session.DoRequest("SoftLayer_Product_Package_Type", "getObject", nil, &r.Options, &resp)
2273 return
2274 }
2275
2276 // Retrieve All the packages associated with the given package type.
2277 func (r Product_Package_Type) GetPackages() (resp []datatypes.Product_Package, err error) {
2278 err = r.Session.DoRequest("SoftLayer_Product_Package_Type", "getPackages", nil, &r.Options, &resp)
2279 return
2280 }
2281
2282 // no documentation yet
2283 type Product_Promotion struct {
2284 Session session.SLSession
2285 Options sl.Options
2286 }
2287
2288 // GetProductPromotionService returns an instance of the Product_Promotion SoftLayer service
2289 func GetProductPromotionService(sess session.SLSession) Product_Promotion {
2290 return Product_Promotion{Session: sess}
2291 }
2292
2293 func (r Product_Promotion) Id(id int) Product_Promotion {
2294 r.Options.Id = &id
2295 return r
2296 }
2297
2298 func (r Product_Promotion) Mask(mask string) Product_Promotion {
2299 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
2300 mask = fmt.Sprintf("mask[%s]", mask)
2301 }
2302
2303 r.Options.Mask = mask
2304 return r
2305 }
2306
2307 func (r Product_Promotion) Filter(filter string) Product_Promotion {
2308 r.Options.Filter = filter
2309 return r
2310 }
2311
2312 func (r Product_Promotion) Limit(limit int) Product_Promotion {
2313 r.Options.Limit = &limit
2314 return r
2315 }
2316
2317 func (r Product_Promotion) Offset(offset int) Product_Promotion {
2318 r.Options.Offset = &offset
2319 return r
2320 }
2321
2322 // Retrieves a promotion using its code.
2323 func (r Product_Promotion) FindByPromoCode(code *string) (resp datatypes.Container_Product_Promotion, err error) {
2324 params := []interface{}{
2325 code,
2326 }
2327 err = r.Session.DoRequest("SoftLayer_Product_Promotion", "findByPromoCode", params, &r.Options, &resp)
2328 return
2329 }
2330
2331 // no documentation yet
2332 func (r Product_Promotion) GetObject() (resp datatypes.Product_Promotion, err error) {
2333 err = r.Session.DoRequest("SoftLayer_Product_Promotion", "getObject", nil, &r.Options, &resp)
2334 return
2335 }
2336
2337 // The SoftLayer_Product_Upgrade_Request data type contains general information relating to a hardware, virtual server, or service upgrade. It also relates a [[SoftLayer_Billing_Order]] to a [[SoftLayer_Ticket]].
2338 type Product_Upgrade_Request struct {
2339 Session session.SLSession
2340 Options sl.Options
2341 }
2342
2343 // GetProductUpgradeRequestService returns an instance of the Product_Upgrade_Request SoftLayer service
2344 func GetProductUpgradeRequestService(sess session.SLSession) Product_Upgrade_Request {
2345 return Product_Upgrade_Request{Session: sess}
2346 }
2347
2348 func (r Product_Upgrade_Request) Id(id int) Product_Upgrade_Request {
2349 r.Options.Id = &id
2350 return r
2351 }
2352
2353 func (r Product_Upgrade_Request) Mask(mask string) Product_Upgrade_Request {
2354 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
2355 mask = fmt.Sprintf("mask[%s]", mask)
2356 }
2357
2358 r.Options.Mask = mask
2359 return r
2360 }
2361
2362 func (r Product_Upgrade_Request) Filter(filter string) Product_Upgrade_Request {
2363 r.Options.Filter = filter
2364 return r
2365 }
2366
2367 func (r Product_Upgrade_Request) Limit(limit int) Product_Upgrade_Request {
2368 r.Options.Limit = &limit
2369 return r
2370 }
2371
2372 func (r Product_Upgrade_Request) Offset(offset int) Product_Upgrade_Request {
2373 r.Options.Offset = &offset
2374 return r
2375 }
2376
2377 // When a change is made to an upgrade by Sales, this method will approve the changes that were made. A customer must acknowledge the change and approve it so that the upgrade request can proceed.
2378 func (r Product_Upgrade_Request) ApproveChanges() (resp bool, err error) {
2379 err = r.Session.DoRequest("SoftLayer_Product_Upgrade_Request", "approveChanges", nil, &r.Options, &resp)
2380 return
2381 }
2382
2383 // Retrieve The account that an order belongs to
2384 func (r Product_Upgrade_Request) GetAccount() (resp datatypes.Account, err error) {
2385 err = r.Session.DoRequest("SoftLayer_Product_Upgrade_Request", "getAccount", nil, &r.Options, &resp)
2386 return
2387 }
2388
2389 // Retrieve Indicates that the upgrade request has completed or has been cancelled.
2390 func (r Product_Upgrade_Request) GetCompletedFlag() (resp bool, err error) {
2391 err = r.Session.DoRequest("SoftLayer_Product_Upgrade_Request", "getCompletedFlag", nil, &r.Options, &resp)
2392 return
2393 }
2394
2395 // Retrieve This is the invoice associated with the upgrade request. For hourly servers or services, an invoice will not be available.
2396 func (r Product_Upgrade_Request) GetInvoice() (resp datatypes.Billing_Invoice, err error) {
2397 err = r.Session.DoRequest("SoftLayer_Product_Upgrade_Request", "getInvoice", nil, &r.Options, &resp)
2398 return
2399 }
2400
2401 // getObject retrieves a SoftLayer_Product_Upgrade_Request object on your account whose ID corresponds to the ID of the init parameter passed to the SoftLayer_Product_Upgrade_Request service.
2402 func (r Product_Upgrade_Request) GetObject() (resp datatypes.Product_Upgrade_Request, err error) {
2403 err = r.Session.DoRequest("SoftLayer_Product_Upgrade_Request", "getObject", nil, &r.Options, &resp)
2404 return
2405 }
2406
2407 // Retrieve An order record associated to the upgrade request
2408 func (r Product_Upgrade_Request) GetOrder() (resp datatypes.Billing_Order, err error) {
2409 err = r.Session.DoRequest("SoftLayer_Product_Upgrade_Request", "getOrder", nil, &r.Options, &resp)
2410 return
2411 }
2412
2413 // Retrieve A server object associated with the upgrade request if any.
2414 func (r Product_Upgrade_Request) GetServer() (resp datatypes.Hardware, err error) {
2415 err = r.Session.DoRequest("SoftLayer_Product_Upgrade_Request", "getServer", nil, &r.Options, &resp)
2416 return
2417 }
2418
2419 // Retrieve The current status of the upgrade request.
2420 func (r Product_Upgrade_Request) GetStatus() (resp datatypes.Product_Upgrade_Request_Status, err error) {
2421 err = r.Session.DoRequest("SoftLayer_Product_Upgrade_Request", "getStatus", nil, &r.Options, &resp)
2422 return
2423 }
2424
2425 // Retrieve The ticket that is used to coordinate the upgrade process.
2426 func (r Product_Upgrade_Request) GetTicket() (resp datatypes.Ticket, err error) {
2427 err = r.Session.DoRequest("SoftLayer_Product_Upgrade_Request", "getTicket", nil, &r.Options, &resp)
2428 return
2429 }
2430
2431 // Retrieve The user that placed the order.
2432 func (r Product_Upgrade_Request) GetUser() (resp datatypes.User_Customer, err error) {
2433 err = r.Session.DoRequest("SoftLayer_Product_Upgrade_Request", "getUser", nil, &r.Options, &resp)
2434 return
2435 }
2436
2437 // Retrieve A virtual server object associated with the upgrade request if any.
2438 func (r Product_Upgrade_Request) GetVirtualGuest() (resp datatypes.Virtual_Guest, err error) {
2439 err = r.Session.DoRequest("SoftLayer_Product_Upgrade_Request", "getVirtualGuest", nil, &r.Options, &resp)
2440 return
2441 }
2442
2443 // In case an upgrade cannot be performed, the maintenance window needs to be updated to a future date.
2444 func (r Product_Upgrade_Request) UpdateMaintenanceWindow(maintenanceStartTime *string, maintenanceWindowId *int) (resp bool, err error) {
2445 params := []interface{}{
2446 maintenanceStartTime,
2447 maintenanceWindowId,
2448 }
2449 err = r.Session.DoRequest("SoftLayer_Product_Upgrade_Request", "updateMaintenanceWindow", params, &r.Options, &resp)
2450 return
2451 }
2452