software.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 // SoftLayer_Software_AccountLicense is a class that represents software licenses that are tied only to a customer's account and not to any particular hardware, IP address, etc.
26 type Software_AccountLicense struct {
27 Session session.SLSession
28 Options sl.Options
29 }
30
31 // GetSoftwareAccountLicenseService returns an instance of the Software_AccountLicense SoftLayer service
32 func GetSoftwareAccountLicenseService(sess session.SLSession) Software_AccountLicense {
33 return Software_AccountLicense{Session: sess}
34 }
35
36 func (r Software_AccountLicense) Id(id int) Software_AccountLicense {
37 r.Options.Id = &id
38 return r
39 }
40
41 func (r Software_AccountLicense) Mask(mask string) Software_AccountLicense {
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 Software_AccountLicense) Filter(filter string) Software_AccountLicense {
51 r.Options.Filter = filter
52 return r
53 }
54
55 func (r Software_AccountLicense) Limit(limit int) Software_AccountLicense {
56 r.Options.Limit = &limit
57 return r
58 }
59
60 func (r Software_AccountLicense) Offset(offset int) Software_AccountLicense {
61 r.Options.Offset = &offset
62 return r
63 }
64
65 // Retrieve The customer account this Account License belongs to.
66 func (r Software_AccountLicense) GetAccount() (resp datatypes.Account, err error) {
67 err = r.Session.DoRequest("SoftLayer_Software_AccountLicense", "getAccount", nil, &r.Options, &resp)
68 return
69 }
70
71 // no documentation yet
72 func (r Software_AccountLicense) GetAllObjects() (resp []datatypes.Software_AccountLicense, err error) {
73 err = r.Session.DoRequest("SoftLayer_Software_AccountLicense", "getAllObjects", nil, &r.Options, &resp)
74 return
75 }
76
77 // Retrieve The billing item for a software account license.
78 func (r Software_AccountLicense) GetBillingItem() (resp datatypes.Billing_Item, err error) {
79 err = r.Session.DoRequest("SoftLayer_Software_AccountLicense", "getBillingItem", nil, &r.Options, &resp)
80 return
81 }
82
83 // no documentation yet
84 func (r Software_AccountLicense) GetObject() (resp datatypes.Software_AccountLicense, err error) {
85 err = r.Session.DoRequest("SoftLayer_Software_AccountLicense", "getObject", nil, &r.Options, &resp)
86 return
87 }
88
89 // Retrieve The SoftLayer_Software_Description that this account license is for.
90 func (r Software_AccountLicense) GetSoftwareDescription() (resp datatypes.Software_Description, err error) {
91 err = r.Session.DoRequest("SoftLayer_Software_AccountLicense", "getSoftwareDescription", nil, &r.Options, &resp)
92 return
93 }
94
95 // A SoftLayer_Software_Component ties the installation of a specific piece of software onto a specific piece of hardware.
96 //
97 // SoftLayer_Software_Component works with SoftLayer_Software_License and SoftLayer_Software_Description to tie this all together.
98 //
99 // <ul> <li>SoftLayer_Software_Component is the installation of a specific piece of software onto a specific piece of hardware in accordance to a software license. <ul> <li>SoftLayer_Software_License dictates when and how a specific piece of software may be installed onto a piece of hardware. <ul> <li>SoftLayer_Software_Description describes a specific piece of software which can be installed onto hardware in accordance with it's license agreement. </li></ul></li></ul></li></ul>
100 type Software_Component struct {
101 Session session.SLSession
102 Options sl.Options
103 }
104
105 // GetSoftwareComponentService returns an instance of the Software_Component SoftLayer service
106 func GetSoftwareComponentService(sess session.SLSession) Software_Component {
107 return Software_Component{Session: sess}
108 }
109
110 func (r Software_Component) Id(id int) Software_Component {
111 r.Options.Id = &id
112 return r
113 }
114
115 func (r Software_Component) Mask(mask string) Software_Component {
116 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
117 mask = fmt.Sprintf("mask[%s]", mask)
118 }
119
120 r.Options.Mask = mask
121 return r
122 }
123
124 func (r Software_Component) Filter(filter string) Software_Component {
125 r.Options.Filter = filter
126 return r
127 }
128
129 func (r Software_Component) Limit(limit int) Software_Component {
130 r.Options.Limit = &limit
131 return r
132 }
133
134 func (r Software_Component) Offset(offset int) Software_Component {
135 r.Options.Offset = &offset
136 return r
137 }
138
139 // Retrieve The average amount of time that a software component takes to install.
140 func (r Software_Component) GetAverageInstallationDuration() (resp uint, err error) {
141 err = r.Session.DoRequest("SoftLayer_Software_Component", "getAverageInstallationDuration", nil, &r.Options, &resp)
142 return
143 }
144
145 // Retrieve The billing item for a software component.
146 func (r Software_Component) GetBillingItem() (resp datatypes.Billing_Item, err error) {
147 err = r.Session.DoRequest("SoftLayer_Software_Component", "getBillingItem", nil, &r.Options, &resp)
148 return
149 }
150
151 // Retrieve The hardware this Software Component is installed upon.
152 func (r Software_Component) GetHardware() (resp datatypes.Hardware, err error) {
153 err = r.Session.DoRequest("SoftLayer_Software_Component", "getHardware", nil, &r.Options, &resp)
154 return
155 }
156
157 // Attempt to retrieve the file associated with a software component. If the software component does not support downloading license files an exception will be thrown.
158 func (r Software_Component) GetLicenseFile() (resp string, err error) {
159 err = r.Session.DoRequest("SoftLayer_Software_Component", "getLicenseFile", nil, &r.Options, &resp)
160 return
161 }
162
163 // getObject retrieves the SoftLayer_Software_Component object whose ID corresponds to the ID number of the init parameter passed to the SoftLayer_Software_Component service.
164 //
165 // The best way to get software components is through getSoftwareComponents from the Hardware service.
166 func (r Software_Component) GetObject() (resp datatypes.Software_Component, err error) {
167 err = r.Session.DoRequest("SoftLayer_Software_Component", "getObject", nil, &r.Options, &resp)
168 return
169 }
170
171 // Retrieve History Records for Software Passwords.
172 func (r Software_Component) GetPasswordHistory() (resp []datatypes.Software_Component_Password_History, err error) {
173 err = r.Session.DoRequest("SoftLayer_Software_Component", "getPasswordHistory", nil, &r.Options, &resp)
174 return
175 }
176
177 // Retrieve Username/Password pairs used for access to this Software Installation.
178 func (r Software_Component) GetPasswords() (resp []datatypes.Software_Component_Password, err error) {
179 err = r.Session.DoRequest("SoftLayer_Software_Component", "getPasswords", nil, &r.Options, &resp)
180 return
181 }
182
183 // Retrieve The Software Description of this Software Component.
184 func (r Software_Component) GetSoftwareDescription() (resp datatypes.Software_Description, err error) {
185 err = r.Session.DoRequest("SoftLayer_Software_Component", "getSoftwareDescription", nil, &r.Options, &resp)
186 return
187 }
188
189 // Retrieve The License this Software Component uses.
190 func (r Software_Component) GetSoftwareLicense() (resp datatypes.Software_License, err error) {
191 err = r.Session.DoRequest("SoftLayer_Software_Component", "getSoftwareLicense", nil, &r.Options, &resp)
192 return
193 }
194
195 // no documentation yet
196 func (r Software_Component) GetVendorSetUpConfiguration() (resp string, err error) {
197 err = r.Session.DoRequest("SoftLayer_Software_Component", "getVendorSetUpConfiguration", nil, &r.Options, &resp)
198 return
199 }
200
201 // Retrieve The virtual guest this software component is installed upon.
202 func (r Software_Component) GetVirtualGuest() (resp datatypes.Virtual_Guest, err error) {
203 err = r.Session.DoRequest("SoftLayer_Software_Component", "getVirtualGuest", nil, &r.Options, &resp)
204 return
205 }
206
207 // This object specifies a specific type of Software Component: An Anti-virus/spyware instance. Anti-virus/spyware installations have specific properties and methods such as SoftLayer_Software_Component_AntivirusSpyware::updateAntivirusSpywarePolicy. Defaults are initiated by this object.
208 type Software_Component_AntivirusSpyware struct {
209 Session session.SLSession
210 Options sl.Options
211 }
212
213 // GetSoftwareComponentAntivirusSpywareService returns an instance of the Software_Component_AntivirusSpyware SoftLayer service
214 func GetSoftwareComponentAntivirusSpywareService(sess session.SLSession) Software_Component_AntivirusSpyware {
215 return Software_Component_AntivirusSpyware{Session: sess}
216 }
217
218 func (r Software_Component_AntivirusSpyware) Id(id int) Software_Component_AntivirusSpyware {
219 r.Options.Id = &id
220 return r
221 }
222
223 func (r Software_Component_AntivirusSpyware) Mask(mask string) Software_Component_AntivirusSpyware {
224 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
225 mask = fmt.Sprintf("mask[%s]", mask)
226 }
227
228 r.Options.Mask = mask
229 return r
230 }
231
232 func (r Software_Component_AntivirusSpyware) Filter(filter string) Software_Component_AntivirusSpyware {
233 r.Options.Filter = filter
234 return r
235 }
236
237 func (r Software_Component_AntivirusSpyware) Limit(limit int) Software_Component_AntivirusSpyware {
238 r.Options.Limit = &limit
239 return r
240 }
241
242 func (r Software_Component_AntivirusSpyware) Offset(offset int) Software_Component_AntivirusSpyware {
243 r.Options.Offset = &offset
244 return r
245 }
246
247 // Retrieve The average amount of time that a software component takes to install.
248 func (r Software_Component_AntivirusSpyware) GetAverageInstallationDuration() (resp uint, err error) {
249 err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "getAverageInstallationDuration", nil, &r.Options, &resp)
250 return
251 }
252
253 // Retrieve The billing item for a software component.
254 func (r Software_Component_AntivirusSpyware) GetBillingItem() (resp datatypes.Billing_Item, err error) {
255 err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "getBillingItem", nil, &r.Options, &resp)
256 return
257 }
258
259 // Retrieve The hardware this Software Component is installed upon.
260 func (r Software_Component_AntivirusSpyware) GetHardware() (resp datatypes.Hardware, err error) {
261 err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "getHardware", nil, &r.Options, &resp)
262 return
263 }
264
265 // Attempt to retrieve the file associated with a software component. If the software component does not support downloading license files an exception will be thrown.
266 func (r Software_Component_AntivirusSpyware) GetLicenseFile() (resp string, err error) {
267 err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "getLicenseFile", nil, &r.Options, &resp)
268 return
269 }
270
271 // no documentation yet
272 func (r Software_Component_AntivirusSpyware) GetObject() (resp datatypes.Software_Component_AntivirusSpyware, err error) {
273 err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "getObject", nil, &r.Options, &resp)
274 return
275 }
276
277 // Retrieve History Records for Software Passwords.
278 func (r Software_Component_AntivirusSpyware) GetPasswordHistory() (resp []datatypes.Software_Component_Password_History, err error) {
279 err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "getPasswordHistory", nil, &r.Options, &resp)
280 return
281 }
282
283 // Retrieve Username/Password pairs used for access to this Software Installation.
284 func (r Software_Component_AntivirusSpyware) GetPasswords() (resp []datatypes.Software_Component_Password, err error) {
285 err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "getPasswords", nil, &r.Options, &resp)
286 return
287 }
288
289 // Retrieve The Software Description of this Software Component.
290 func (r Software_Component_AntivirusSpyware) GetSoftwareDescription() (resp datatypes.Software_Description, err error) {
291 err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "getSoftwareDescription", nil, &r.Options, &resp)
292 return
293 }
294
295 // Retrieve The License this Software Component uses.
296 func (r Software_Component_AntivirusSpyware) GetSoftwareLicense() (resp datatypes.Software_License, err error) {
297 err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "getSoftwareLicense", nil, &r.Options, &resp)
298 return
299 }
300
301 // no documentation yet
302 func (r Software_Component_AntivirusSpyware) GetVendorSetUpConfiguration() (resp string, err error) {
303 err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "getVendorSetUpConfiguration", nil, &r.Options, &resp)
304 return
305 }
306
307 // Retrieve The virtual guest this software component is installed upon.
308 func (r Software_Component_AntivirusSpyware) GetVirtualGuest() (resp datatypes.Virtual_Guest, err error) {
309 err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "getVirtualGuest", nil, &r.Options, &resp)
310 return
311 }
312
313 // Update an anti-virus/spyware policy. The policy options that it accepts are the following:
314 // *1 - Minimal
315 // *2 - Relaxed
316 // *3 - Default
317 // *4 - High
318 // *5 - Ultimate
319 func (r Software_Component_AntivirusSpyware) UpdateAntivirusSpywarePolicy(newPolicy *string, enforce *bool) (resp bool, err error) {
320 params := []interface{}{
321 newPolicy,
322 enforce,
323 }
324 err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "updateAntivirusSpywarePolicy", params, &r.Options, &resp)
325 return
326 }
327
328 // This object specifies a specific type of Software Component: A Host Intrusion Protection System instance.
329 type Software_Component_HostIps struct {
330 Session session.SLSession
331 Options sl.Options
332 }
333
334 // GetSoftwareComponentHostIpsService returns an instance of the Software_Component_HostIps SoftLayer service
335 func GetSoftwareComponentHostIpsService(sess session.SLSession) Software_Component_HostIps {
336 return Software_Component_HostIps{Session: sess}
337 }
338
339 func (r Software_Component_HostIps) Id(id int) Software_Component_HostIps {
340 r.Options.Id = &id
341 return r
342 }
343
344 func (r Software_Component_HostIps) Mask(mask string) Software_Component_HostIps {
345 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
346 mask = fmt.Sprintf("mask[%s]", mask)
347 }
348
349 r.Options.Mask = mask
350 return r
351 }
352
353 func (r Software_Component_HostIps) Filter(filter string) Software_Component_HostIps {
354 r.Options.Filter = filter
355 return r
356 }
357
358 func (r Software_Component_HostIps) Limit(limit int) Software_Component_HostIps {
359 r.Options.Limit = &limit
360 return r
361 }
362
363 func (r Software_Component_HostIps) Offset(offset int) Software_Component_HostIps {
364 r.Options.Offset = &offset
365 return r
366 }
367
368 // Retrieve The average amount of time that a software component takes to install.
369 func (r Software_Component_HostIps) GetAverageInstallationDuration() (resp uint, err error) {
370 err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getAverageInstallationDuration", nil, &r.Options, &resp)
371 return
372 }
373
374 // Retrieve The billing item for a software component.
375 func (r Software_Component_HostIps) GetBillingItem() (resp datatypes.Billing_Item, err error) {
376 err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getBillingItem", nil, &r.Options, &resp)
377 return
378 }
379
380 // Get the current Host IPS policies.
381 func (r Software_Component_HostIps) GetCurrentHostIpsPolicies() (resp []datatypes.Container_Software_Component_HostIps_Policy, err error) {
382 err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getCurrentHostIpsPolicies", nil, &r.Options, &resp)
383 return
384 }
385
386 // Retrieve The hardware this Software Component is installed upon.
387 func (r Software_Component_HostIps) GetHardware() (resp datatypes.Hardware, err error) {
388 err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getHardware", nil, &r.Options, &resp)
389 return
390 }
391
392 // Attempt to retrieve the file associated with a software component. If the software component does not support downloading license files an exception will be thrown.
393 func (r Software_Component_HostIps) GetLicenseFile() (resp string, err error) {
394 err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getLicenseFile", nil, &r.Options, &resp)
395 return
396 }
397
398 // no documentation yet
399 func (r Software_Component_HostIps) GetObject() (resp datatypes.Software_Component_HostIps, err error) {
400 err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getObject", nil, &r.Options, &resp)
401 return
402 }
403
404 // Retrieve History Records for Software Passwords.
405 func (r Software_Component_HostIps) GetPasswordHistory() (resp []datatypes.Software_Component_Password_History, err error) {
406 err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getPasswordHistory", nil, &r.Options, &resp)
407 return
408 }
409
410 // Retrieve Username/Password pairs used for access to this Software Installation.
411 func (r Software_Component_HostIps) GetPasswords() (resp []datatypes.Software_Component_Password, err error) {
412 err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getPasswords", nil, &r.Options, &resp)
413 return
414 }
415
416 // Retrieve The Software Description of this Software Component.
417 func (r Software_Component_HostIps) GetSoftwareDescription() (resp datatypes.Software_Description, err error) {
418 err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getSoftwareDescription", nil, &r.Options, &resp)
419 return
420 }
421
422 // Retrieve The License this Software Component uses.
423 func (r Software_Component_HostIps) GetSoftwareLicense() (resp datatypes.Software_License, err error) {
424 err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getSoftwareLicense", nil, &r.Options, &resp)
425 return
426 }
427
428 // no documentation yet
429 func (r Software_Component_HostIps) GetVendorSetUpConfiguration() (resp string, err error) {
430 err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getVendorSetUpConfiguration", nil, &r.Options, &resp)
431 return
432 }
433
434 // Retrieve The virtual guest this software component is installed upon.
435 func (r Software_Component_HostIps) GetVirtualGuest() (resp datatypes.Virtual_Guest, err error) {
436 err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getVirtualGuest", nil, &r.Options, &resp)
437 return
438 }
439
440 // Update the Host IPS policies. To retrieve valid policy options you must use the provided relationships.
441 func (r Software_Component_HostIps) UpdateHipsPolicies(newIpsMode *string, newIpsProtection *string, newFirewallMode *string, newFirewallRuleset *string, newApplicationMode *string, newApplicationRuleset *string, newEnforcementPolicy *string) (resp bool, err error) {
442 params := []interface{}{
443 newIpsMode,
444 newIpsProtection,
445 newFirewallMode,
446 newFirewallRuleset,
447 newApplicationMode,
448 newApplicationRuleset,
449 newEnforcementPolicy,
450 }
451 err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "updateHipsPolicies", params, &r.Options, &resp)
452 return
453 }
454
455 // This SoftLayer_Software_Component_Password data type contains a password for a specific software component instance.
456 type Software_Component_Password struct {
457 Session session.SLSession
458 Options sl.Options
459 }
460
461 // GetSoftwareComponentPasswordService returns an instance of the Software_Component_Password SoftLayer service
462 func GetSoftwareComponentPasswordService(sess session.SLSession) Software_Component_Password {
463 return Software_Component_Password{Session: sess}
464 }
465
466 func (r Software_Component_Password) Id(id int) Software_Component_Password {
467 r.Options.Id = &id
468 return r
469 }
470
471 func (r Software_Component_Password) Mask(mask string) Software_Component_Password {
472 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
473 mask = fmt.Sprintf("mask[%s]", mask)
474 }
475
476 r.Options.Mask = mask
477 return r
478 }
479
480 func (r Software_Component_Password) Filter(filter string) Software_Component_Password {
481 r.Options.Filter = filter
482 return r
483 }
484
485 func (r Software_Component_Password) Limit(limit int) Software_Component_Password {
486 r.Options.Limit = &limit
487 return r
488 }
489
490 func (r Software_Component_Password) Offset(offset int) Software_Component_Password {
491 r.Options.Offset = &offset
492 return r
493 }
494
495 // Create a password for a software component.
496 func (r Software_Component_Password) CreateObject(templateObject *datatypes.Software_Component_Password) (resp datatypes.Software_Component_Password, err error) {
497 params := []interface{}{
498 templateObject,
499 }
500 err = r.Session.DoRequest("SoftLayer_Software_Component_Password", "createObject", params, &r.Options, &resp)
501 return
502 }
503
504 // Create more than one password for a software component.
505 func (r Software_Component_Password) CreateObjects(templateObjects []datatypes.Software_Component_Password) (resp bool, err error) {
506 params := []interface{}{
507 templateObjects,
508 }
509 err = r.Session.DoRequest("SoftLayer_Software_Component_Password", "createObjects", params, &r.Options, &resp)
510 return
511 }
512
513 // Delete a password from a software component.
514 func (r Software_Component_Password) DeleteObject() (resp bool, err error) {
515 err = r.Session.DoRequest("SoftLayer_Software_Component_Password", "deleteObject", nil, &r.Options, &resp)
516 return
517 }
518
519 // Delete more than one passwords from a software component.
520 func (r Software_Component_Password) DeleteObjects(templateObjects []datatypes.Software_Component_Password) (resp bool, err error) {
521 params := []interface{}{
522 templateObjects,
523 }
524 err = r.Session.DoRequest("SoftLayer_Software_Component_Password", "deleteObjects", params, &r.Options, &resp)
525 return
526 }
527
528 // Edit the properties of a software component password such as the username, password, port, and notes.
529 func (r Software_Component_Password) EditObject(templateObject *datatypes.Software_Component_Password) (resp bool, err error) {
530 params := []interface{}{
531 templateObject,
532 }
533 err = r.Session.DoRequest("SoftLayer_Software_Component_Password", "editObject", params, &r.Options, &resp)
534 return
535 }
536
537 // Edit more than one password from a software component.
538 func (r Software_Component_Password) EditObjects(templateObjects []datatypes.Software_Component_Password) (resp bool, err error) {
539 params := []interface{}{
540 templateObjects,
541 }
542 err = r.Session.DoRequest("SoftLayer_Software_Component_Password", "editObjects", params, &r.Options, &resp)
543 return
544 }
545
546 // no documentation yet
547 func (r Software_Component_Password) GetObject() (resp datatypes.Software_Component_Password, err error) {
548 err = r.Session.DoRequest("SoftLayer_Software_Component_Password", "getObject", nil, &r.Options, &resp)
549 return
550 }
551
552 // Retrieve The SoftLayer_Software_Component instance that this username/password pair is valid for.
553 func (r Software_Component_Password) GetSoftware() (resp datatypes.Software_Component, err error) {
554 err = r.Session.DoRequest("SoftLayer_Software_Component_Password", "getSoftware", nil, &r.Options, &resp)
555 return
556 }
557
558 // Retrieve SSH keys to be installed on the server during provisioning or an OS reload.
559 func (r Software_Component_Password) GetSshKeys() (resp []datatypes.Security_Ssh_Key, err error) {
560 err = r.Session.DoRequest("SoftLayer_Software_Component_Password", "getSshKeys", nil, &r.Options, &resp)
561 return
562 }
563
564 // This object specifies a specific type of Software Component: An Trellix instance. Trellix installations have specific properties and methods such as SoftLayer_Software_Component_Trellix::updateTrellixPolicy. Defaults are initiated by this object.
565 type Software_Component_Trellix struct {
566 Session session.SLSession
567 Options sl.Options
568 }
569
570 // GetSoftwareComponentTrellixService returns an instance of the Software_Component_Trellix SoftLayer service
571 func GetSoftwareComponentTrellixService(sess session.SLSession) Software_Component_Trellix {
572 return Software_Component_Trellix{Session: sess}
573 }
574
575 func (r Software_Component_Trellix) Id(id int) Software_Component_Trellix {
576 r.Options.Id = &id
577 return r
578 }
579
580 func (r Software_Component_Trellix) Mask(mask string) Software_Component_Trellix {
581 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
582 mask = fmt.Sprintf("mask[%s]", mask)
583 }
584
585 r.Options.Mask = mask
586 return r
587 }
588
589 func (r Software_Component_Trellix) Filter(filter string) Software_Component_Trellix {
590 r.Options.Filter = filter
591 return r
592 }
593
594 func (r Software_Component_Trellix) Limit(limit int) Software_Component_Trellix {
595 r.Options.Limit = &limit
596 return r
597 }
598
599 func (r Software_Component_Trellix) Offset(offset int) Software_Component_Trellix {
600 r.Options.Offset = &offset
601 return r
602 }
603
604 // Retrieve The average amount of time that a software component takes to install.
605 func (r Software_Component_Trellix) GetAverageInstallationDuration() (resp uint, err error) {
606 err = r.Session.DoRequest("SoftLayer_Software_Component_Trellix", "getAverageInstallationDuration", nil, &r.Options, &resp)
607 return
608 }
609
610 // Retrieve The billing item for a software component.
611 func (r Software_Component_Trellix) GetBillingItem() (resp datatypes.Billing_Item, err error) {
612 err = r.Session.DoRequest("SoftLayer_Software_Component_Trellix", "getBillingItem", nil, &r.Options, &resp)
613 return
614 }
615
616 // Get the current Host IPS policies.
617 func (r Software_Component_Trellix) GetCurrentHostIpsPolicies() (resp []datatypes.Container_Software_Component_HostIps_Policy, err error) {
618 err = r.Session.DoRequest("SoftLayer_Software_Component_Trellix", "getCurrentHostIpsPolicies", nil, &r.Options, &resp)
619 return
620 }
621
622 // Retrieve The hardware this Software Component is installed upon.
623 func (r Software_Component_Trellix) GetHardware() (resp datatypes.Hardware, err error) {
624 err = r.Session.DoRequest("SoftLayer_Software_Component_Trellix", "getHardware", nil, &r.Options, &resp)
625 return
626 }
627
628 // Attempt to retrieve the file associated with a software component. If the software component does not support downloading license files an exception will be thrown.
629 func (r Software_Component_Trellix) GetLicenseFile() (resp string, err error) {
630 err = r.Session.DoRequest("SoftLayer_Software_Component_Trellix", "getLicenseFile", nil, &r.Options, &resp)
631 return
632 }
633
634 // no documentation yet
635 func (r Software_Component_Trellix) GetObject() (resp datatypes.Software_Component_Trellix, err error) {
636 err = r.Session.DoRequest("SoftLayer_Software_Component_Trellix", "getObject", nil, &r.Options, &resp)
637 return
638 }
639
640 // Retrieve History Records for Software Passwords.
641 func (r Software_Component_Trellix) GetPasswordHistory() (resp []datatypes.Software_Component_Password_History, err error) {
642 err = r.Session.DoRequest("SoftLayer_Software_Component_Trellix", "getPasswordHistory", nil, &r.Options, &resp)
643 return
644 }
645
646 // Retrieve Username/Password pairs used for access to this Software Installation.
647 func (r Software_Component_Trellix) GetPasswords() (resp []datatypes.Software_Component_Password, err error) {
648 err = r.Session.DoRequest("SoftLayer_Software_Component_Trellix", "getPasswords", nil, &r.Options, &resp)
649 return
650 }
651
652 // Retrieve The Software Description of this Software Component.
653 func (r Software_Component_Trellix) GetSoftwareDescription() (resp datatypes.Software_Description, err error) {
654 err = r.Session.DoRequest("SoftLayer_Software_Component_Trellix", "getSoftwareDescription", nil, &r.Options, &resp)
655 return
656 }
657
658 // Retrieve The License this Software Component uses.
659 func (r Software_Component_Trellix) GetSoftwareLicense() (resp datatypes.Software_License, err error) {
660 err = r.Session.DoRequest("SoftLayer_Software_Component_Trellix", "getSoftwareLicense", nil, &r.Options, &resp)
661 return
662 }
663
664 // no documentation yet
665 func (r Software_Component_Trellix) GetVendorSetUpConfiguration() (resp string, err error) {
666 err = r.Session.DoRequest("SoftLayer_Software_Component_Trellix", "getVendorSetUpConfiguration", nil, &r.Options, &resp)
667 return
668 }
669
670 // Retrieve The virtual guest this software component is installed upon.
671 func (r Software_Component_Trellix) GetVirtualGuest() (resp datatypes.Virtual_Guest, err error) {
672 err = r.Session.DoRequest("SoftLayer_Software_Component_Trellix", "getVirtualGuest", nil, &r.Options, &resp)
673 return
674 }
675
676 // Update an anti-virus/spyware policy. The policy options that it accepts are the following:
677 // *1 - Minimal
678 // *2 - Relaxed
679 // *3 - Default
680 // *4 - High
681 // *5 - Ultimate
682 func (r Software_Component_Trellix) UpdateAntivirusSpywarePolicy(newPolicy *string, enforce *bool) (resp bool, err error) {
683 params := []interface{}{
684 newPolicy,
685 enforce,
686 }
687 err = r.Session.DoRequest("SoftLayer_Software_Component_Trellix", "updateAntivirusSpywarePolicy", params, &r.Options, &resp)
688 return
689 }
690
691 // Update the Host IPS policies. To retrieve valid policy options you must use the provided relationships.
692 func (r Software_Component_Trellix) UpdateHipsPolicies(newIpsMode *string, newIpsProtection *string, newFirewallMode *string, newFirewallRuleset *string, newApplicationMode *string, newApplicationRuleset *string, newEnforcementPolicy *string) (resp bool, err error) {
693 params := []interface{}{
694 newIpsMode,
695 newIpsProtection,
696 newFirewallMode,
697 newFirewallRuleset,
698 newApplicationMode,
699 newApplicationRuleset,
700 newEnforcementPolicy,
701 }
702 err = r.Session.DoRequest("SoftLayer_Software_Component_Trellix", "updateHipsPolicies", params, &r.Options, &resp)
703 return
704 }
705
706 // This class holds a description for a specific installation of a Software Component.
707 //
708 // SoftLayer_Software_Licenses tie a Software Component (A specific installation on a piece of hardware) to it's description.
709 //
710 // The "Manufacturer" and "Name" properties of a SoftLayer_Software_Description are used by the framework to factory specific objects, objects that may have special methods for that specific piece of software, or objects that contain application specific data, such as default ports. For example, if you create a SoftLayer_Software_Component who's SoftLayer_Software_License points to the SoftLayer_Software_Description for "Swsoft" "Plesk", you'll actually get a SoftLayer_Software_Component_Swsoft_Plesk object.
711 type Software_Description struct {
712 Session session.SLSession
713 Options sl.Options
714 }
715
716 // GetSoftwareDescriptionService returns an instance of the Software_Description SoftLayer service
717 func GetSoftwareDescriptionService(sess session.SLSession) Software_Description {
718 return Software_Description{Session: sess}
719 }
720
721 func (r Software_Description) Id(id int) Software_Description {
722 r.Options.Id = &id
723 return r
724 }
725
726 func (r Software_Description) Mask(mask string) Software_Description {
727 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
728 mask = fmt.Sprintf("mask[%s]", mask)
729 }
730
731 r.Options.Mask = mask
732 return r
733 }
734
735 func (r Software_Description) Filter(filter string) Software_Description {
736 r.Options.Filter = filter
737 return r
738 }
739
740 func (r Software_Description) Limit(limit int) Software_Description {
741 r.Options.Limit = &limit
742 return r
743 }
744
745 func (r Software_Description) Offset(offset int) Software_Description {
746 r.Options.Offset = &offset
747 return r
748 }
749
750 // no documentation yet
751 func (r Software_Description) GetAllObjects() (resp []datatypes.Software_Description, err error) {
752 err = r.Session.DoRequest("SoftLayer_Software_Description", "getAllObjects", nil, &r.Options, &resp)
753 return
754 }
755
756 // Retrieve
757 func (r Software_Description) GetAttributes() (resp []datatypes.Software_Description_Attribute, err error) {
758 err = r.Session.DoRequest("SoftLayer_Software_Description", "getAttributes", nil, &r.Options, &resp)
759 return
760 }
761
762 // Retrieve The average amount of time that a software description takes to install.
763 func (r Software_Description) GetAverageInstallationDuration() (resp int, err error) {
764 err = r.Session.DoRequest("SoftLayer_Software_Description", "getAverageInstallationDuration", nil, &r.Options, &resp)
765 return
766 }
767
768 // Retrieve A list of the software descriptions that are compatible with this software description.
769 func (r Software_Description) GetCompatibleSoftwareDescriptions() (resp []datatypes.Software_Description, err error) {
770 err = r.Session.DoRequest("SoftLayer_Software_Description", "getCompatibleSoftwareDescriptions", nil, &r.Options, &resp)
771 return
772 }
773
774 // no documentation yet
775 func (r Software_Description) GetCustomerOwnedLicenseDescriptions() (resp []datatypes.Software_Description, err error) {
776 err = r.Session.DoRequest("SoftLayer_Software_Description", "getCustomerOwnedLicenseDescriptions", nil, &r.Options, &resp)
777 return
778 }
779
780 // Retrieve The feature attributes of a software description.
781 func (r Software_Description) GetFeatures() (resp []datatypes.Software_Description_Feature, err error) {
782 err = r.Session.DoRequest("SoftLayer_Software_Description", "getFeatures", nil, &r.Options, &resp)
783 return
784 }
785
786 // Retrieve The latest version of a software description.
787 func (r Software_Description) GetLatestVersion() (resp []datatypes.Software_Description, err error) {
788 err = r.Session.DoRequest("SoftLayer_Software_Description", "getLatestVersion", nil, &r.Options, &resp)
789 return
790 }
791
792 // no documentation yet
793 func (r Software_Description) GetObject() (resp datatypes.Software_Description, err error) {
794 err = r.Session.DoRequest("SoftLayer_Software_Description", "getObject", nil, &r.Options, &resp)
795 return
796 }
797
798 // Retrieve The various product items to which this software description is linked.
799 func (r Software_Description) GetProductItems() (resp []datatypes.Product_Item, err error) {
800 err = r.Session.DoRequest("SoftLayer_Software_Description", "getProductItems", nil, &r.Options, &resp)
801 return
802 }
803
804 // Retrieve This details the provisioning transaction group for this software. This is only valid for Operating System software.
805 func (r Software_Description) GetProvisionTransactionGroup() (resp datatypes.Provisioning_Version1_Transaction_Group, err error) {
806 err = r.Session.DoRequest("SoftLayer_Software_Description", "getProvisionTransactionGroup", nil, &r.Options, &resp)
807 return
808 }
809
810 // Retrieve The transaction group that a software description belongs to. A transaction group is a sequence of transactions that must be performed in a specific order for the installation of software.
811 func (r Software_Description) GetReloadTransactionGroup() (resp datatypes.Provisioning_Version1_Transaction_Group, err error) {
812 err = r.Session.DoRequest("SoftLayer_Software_Description", "getReloadTransactionGroup", nil, &r.Options, &resp)
813 return
814 }
815
816 // Retrieve The default user created for a given a software description.
817 func (r Software_Description) GetRequiredUser() (resp string, err error) {
818 err = r.Session.DoRequest("SoftLayer_Software_Description", "getRequiredUser", nil, &r.Options, &resp)
819 return
820 }
821
822 // Retrieve Software Licenses that govern this Software Description.
823 func (r Software_Description) GetSoftwareLicenses() (resp []datatypes.Software_License, err error) {
824 err = r.Session.DoRequest("SoftLayer_Software_Description", "getSoftwareLicenses", nil, &r.Options, &resp)
825 return
826 }
827
828 // Retrieve A suggestion for an upgrade path from this Software Description
829 func (r Software_Description) GetUpgradeSoftwareDescription() (resp datatypes.Software_Description, err error) {
830 err = r.Session.DoRequest("SoftLayer_Software_Description", "getUpgradeSoftwareDescription", nil, &r.Options, &resp)
831 return
832 }
833
834 // Retrieve A suggestion for an upgrade path from this Software Description (Deprecated - Use upgradeSoftwareDescription)
835 func (r Software_Description) GetUpgradeSwDesc() (resp datatypes.Software_Description, err error) {
836 err = r.Session.DoRequest("SoftLayer_Software_Description", "getUpgradeSwDesc", nil, &r.Options, &resp)
837 return
838 }
839
840 // Retrieve
841 func (r Software_Description) GetValidFilesystemTypes() (resp []datatypes.Configuration_Storage_Filesystem_Type, err error) {
842 err = r.Session.DoRequest("SoftLayer_Software_Description", "getValidFilesystemTypes", nil, &r.Options, &resp)
843 return
844 }
845
846 // SoftLayer_Software_VirtualLicense is the application class that handles a special type of Software License. Most software licenses are licensed to a specific hardware ID; virtual licenses are designed for virtual machines and therefore are assigned to an IP Address. Not all software packages can be "virtual licensed".
847 type Software_VirtualLicense struct {
848 Session session.SLSession
849 Options sl.Options
850 }
851
852 // GetSoftwareVirtualLicenseService returns an instance of the Software_VirtualLicense SoftLayer service
853 func GetSoftwareVirtualLicenseService(sess session.SLSession) Software_VirtualLicense {
854 return Software_VirtualLicense{Session: sess}
855 }
856
857 func (r Software_VirtualLicense) Id(id int) Software_VirtualLicense {
858 r.Options.Id = &id
859 return r
860 }
861
862 func (r Software_VirtualLicense) Mask(mask string) Software_VirtualLicense {
863 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
864 mask = fmt.Sprintf("mask[%s]", mask)
865 }
866
867 r.Options.Mask = mask
868 return r
869 }
870
871 func (r Software_VirtualLicense) Filter(filter string) Software_VirtualLicense {
872 r.Options.Filter = filter
873 return r
874 }
875
876 func (r Software_VirtualLicense) Limit(limit int) Software_VirtualLicense {
877 r.Options.Limit = &limit
878 return r
879 }
880
881 func (r Software_VirtualLicense) Offset(offset int) Software_VirtualLicense {
882 r.Options.Offset = &offset
883 return r
884 }
885
886 // Retrieve The customer account this Virtual License belongs to.
887 func (r Software_VirtualLicense) GetAccount() (resp datatypes.Account, err error) {
888 err = r.Session.DoRequest("SoftLayer_Software_VirtualLicense", "getAccount", nil, &r.Options, &resp)
889 return
890 }
891
892 // Retrieve The billing item for a software virtual license.
893 func (r Software_VirtualLicense) GetBillingItem() (resp datatypes.Billing_Item, err error) {
894 err = r.Session.DoRequest("SoftLayer_Software_VirtualLicense", "getBillingItem", nil, &r.Options, &resp)
895 return
896 }
897
898 // Retrieve The hardware record to which the software virtual license is assigned.
899 func (r Software_VirtualLicense) GetHostHardware() (resp datatypes.Hardware_Server, err error) {
900 err = r.Session.DoRequest("SoftLayer_Software_VirtualLicense", "getHostHardware", nil, &r.Options, &resp)
901 return
902 }
903
904 // Retrieve The IP Address record associated with a virtual license.
905 func (r Software_VirtualLicense) GetIpAddressRecord() (resp datatypes.Network_Subnet_IpAddress, err error) {
906 err = r.Session.DoRequest("SoftLayer_Software_VirtualLicense", "getIpAddressRecord", nil, &r.Options, &resp)
907 return
908 }
909
910 // Attempt to retrieve the file associated with a virtual license, if such a file exists. If there is no file for this virtual license, calling this method will either throw an exception or return false.
911 func (r Software_VirtualLicense) GetLicenseFile() (resp []byte, err error) {
912 err = r.Session.DoRequest("SoftLayer_Software_VirtualLicense", "getLicenseFile", nil, &r.Options, &resp)
913 return
914 }
915
916 // getObject retrieves the SoftLayer_Software_VirtualLicense object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Software_VirtualLicense service. You can only retrieve Virtual Licenses assigned to your account number.
917 func (r Software_VirtualLicense) GetObject() (resp datatypes.Software_VirtualLicense, err error) {
918 err = r.Session.DoRequest("SoftLayer_Software_VirtualLicense", "getObject", nil, &r.Options, &resp)
919 return
920 }
921
922 // Retrieve The SoftLayer_Software_Description that this virtual license is for.
923 func (r Software_VirtualLicense) GetSoftwareDescription() (resp datatypes.Software_Description, err error) {
924 err = r.Session.DoRequest("SoftLayer_Software_VirtualLicense", "getSoftwareDescription", nil, &r.Options, &resp)
925 return
926 }
927
928 // Retrieve The subnet this Virtual License's IP address belongs to.
929 func (r Software_VirtualLicense) GetSubnet() (resp datatypes.Network_Subnet, err error) {
930 err = r.Session.DoRequest("SoftLayer_Software_VirtualLicense", "getSubnet", nil, &r.Options, &resp)
931 return
932 }
933