1/**
2 * Copyright 2016 IBM Corp.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *    http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/**
18 * AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
19 */
20
21package services
22
23import (
24	"fmt"
25	"strings"
26
27	"github.com/softlayer/softlayer-go/datatypes"
28	"github.com/softlayer/softlayer-go/session"
29	"github.com/softlayer/softlayer-go/sl"
30)
31
32// A monitoring agent object contains information describing the agent.
33type Monitoring_Agent struct {
34	Session *session.Session
35	Options sl.Options
36}
37
38// GetMonitoringAgentService returns an instance of the Monitoring_Agent SoftLayer service
39func GetMonitoringAgentService(sess *session.Session) Monitoring_Agent {
40	return Monitoring_Agent{Session: sess}
41}
42
43func (r Monitoring_Agent) Id(id int) Monitoring_Agent {
44	r.Options.Id = &id
45	return r
46}
47
48func (r Monitoring_Agent) Mask(mask string) Monitoring_Agent {
49	if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
50		mask = fmt.Sprintf("mask[%s]", mask)
51	}
52
53	r.Options.Mask = mask
54	return r
55}
56
57func (r Monitoring_Agent) Filter(filter string) Monitoring_Agent {
58	r.Options.Filter = filter
59	return r
60}
61
62func (r Monitoring_Agent) Limit(limit int) Monitoring_Agent {
63	r.Options.Limit = &limit
64	return r
65}
66
67func (r Monitoring_Agent) Offset(offset int) Monitoring_Agent {
68	r.Options.Offset = &offset
69	return r
70}
71
72// This method activates a SoftLayer_Monitoring_Agent.
73func (r Monitoring_Agent) Activate() (resp bool, err error) {
74	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "activate", nil, &r.Options, &resp)
75	return
76}
77
78// This method is used to apply changes to a monitoring agent's configuration for SoftLayer_Configuration_Template_Section with the property sectionType that has a keyName of 'TEMPLATE_SECTION'. Configuration values that are passed in can be new or updated objects but must have a definitionId and profileId defined for both. Existing SoftLayer_Monitoring_Agent_Configuration_Value values can be retrieved as a property of the SoftLayer_Configuration_Template_Section_Definition's from the monitoring agent's configurationTemplate property. New values will follow the structure of SoftLayer_Monitoring_Agent_Configuration_Value. It returns a SoftLayer_Provisioning_Version1_Transaction object to track the progress of the update being applied. Some configuration sections act as a template which helps to create additional monitoring configurations. For instance, Core Resource monitoring agent lets you create monitoring configurations for different disk volumes or disk path.
79func (r Monitoring_Agent) AddConfigurationProfile(configurationValues []datatypes.Monitoring_Agent_Configuration_Value) (resp datatypes.Provisioning_Version1_Transaction, err error) {
80	params := []interface{}{
81		configurationValues,
82	}
83	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "addConfigurationProfile", params, &r.Options, &resp)
84	return
85}
86
87// This method creates a transaction used to apply changes to a monitoring agent's configuration for an array of SoftLayer_Configuration_Template_Section that have the property sectionType with a name of 'Fixed section'. Configuration values that are passed in can be new or updated objects but must have a configurationDefinitionId defined for both. Existing SoftLayer_Monitoring_Agent_Configuration_Value values can be retrieved as a property of the SoftLayer_Configuration_Template_Section_Definition from the monitoring agent's configurationTemplate property. New values will follow the structure of SoftLayer_Monitoring_Agent_Configuration_Value. This method returns a SoftLayer_Provisioning_Version1_Transaction object to track the progress of the update being applied.
88func (r Monitoring_Agent) ApplyConfigurationValues(configurationValues []datatypes.Monitoring_Agent_Configuration_Value) (resp datatypes.Provisioning_Version1_Transaction, err error) {
89	params := []interface{}{
90		configurationValues,
91	}
92	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "applyConfigurationValues", params, &r.Options, &resp)
93	return
94}
95
96// This method will deactivate the monitoring agent, preventing it from generating any further alarms.
97func (r Monitoring_Agent) Deactivate() (resp bool, err error) {
98	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "deactivate", nil, &r.Options, &resp)
99	return
100}
101
102// This method will remove a SoftLayer_Configuration_Template_Section_Profile from a SoftLayer_Configuration_Template_Section by passing in the sectionId of the profile object and identifier of the profile. This will execute the action immediately on the server and the SoftLayer_Configuration_Template_Section returning a boolean true if successful.
103func (r Monitoring_Agent) DeleteConfigurationProfile(sectionId *int, profileId *int) (resp bool, err error) {
104	params := []interface{}{
105		sectionId,
106		profileId,
107	}
108	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "deleteConfigurationProfile", params, &r.Options, &resp)
109	return
110}
111
112// Initialize a monitoring agent and deploy it with the SoftLayer_Configuration_Template with the same identifier as the $configurationTemplateId parameter. If the configuration template ID is not provided, the current configuration template will be used. When executing this method, the existing configuration values will be lost. If no configuration template identifier is provided, the current configuration template will be used. '''Warning''' Reporting data may be lost as a result of executing this method.
113func (r Monitoring_Agent) DeployMonitoringAgent(configurationTemplateId *int) (resp datatypes.Provisioning_Version1_Transaction, err error) {
114	params := []interface{}{
115		configurationTemplateId,
116	}
117	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "deployMonitoringAgent", params, &r.Options, &resp)
118	return
119}
120
121// This method retrieves an array of SoftLayer_Notification_User_Subscriber objects belonging to the SoftLayer_Monitoring_Agent which are able to receive alarm notifications.
122func (r Monitoring_Agent) GetActiveAlarmSubscribers() (resp []datatypes.Notification_User_Subscriber, err error) {
123	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getActiveAlarmSubscribers", nil, &r.Options, &resp)
124	return
125}
126
127// Retrieve The current status of the corresponding agent
128func (r Monitoring_Agent) GetAgentStatus() (resp datatypes.Monitoring_Agent_Status, err error) {
129	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getAgentStatus", nil, &r.Options, &resp)
130	return
131}
132
133// This method returns an array of available SoftLayer_Configuration_Template objects for this monitoring agent.
134func (r Monitoring_Agent) GetAvailableConfigurationTemplates() (resp []datatypes.Configuration_Template, err error) {
135	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getAvailableConfigurationTemplates", nil, &r.Options, &resp)
136	return
137}
138
139// Returns an array of available configuration values that are specific to a server or a Virtual that this monitoring agent is running on. For example, invoking this method against "Network Traffic Monitoring Agent" will return all available network adapters on your system.
140func (r Monitoring_Agent) GetAvailableConfigurationValues(configurationDefinitionId *int, configValues []datatypes.Monitoring_Agent_Configuration_Value) (resp []datatypes.Monitoring_Agent_Configuration_Value, err error) {
141	params := []interface{}{
142		configurationDefinitionId,
143		configValues,
144	}
145	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getAvailableConfigurationValues", params, &r.Options, &resp)
146	return
147}
148
149// Retrieve All custom configuration profiles associated with the corresponding agent
150func (r Monitoring_Agent) GetConfigurationProfiles() (resp []datatypes.Configuration_Template_Section_Profile, err error) {
151	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getConfigurationProfiles", nil, &r.Options, &resp)
152	return
153}
154
155// Retrieve A template of an agent's current configuration which contains information about the structure of the configuration values.
156func (r Monitoring_Agent) GetConfigurationTemplate() (resp datatypes.Configuration_Template, err error) {
157	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getConfigurationTemplate", nil, &r.Options, &resp)
158	return
159}
160
161// Retrieve The values associated with the corresponding Agent configuration.
162func (r Monitoring_Agent) GetConfigurationValues() (resp []datatypes.Monitoring_Agent_Configuration_Value, err error) {
163	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getConfigurationValues", nil, &r.Options, &resp)
164	return
165}
166
167// This method returns an array of SoftLayer_User_Customer objects, representing those who are allowed to be used as alarm subscribers.
168func (r Monitoring_Agent) GetEligibleAlarmSubscibers() (resp []datatypes.User_Customer, err error) {
169	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getEligibleAlarmSubscibers", nil, &r.Options, &resp)
170	return
171}
172
173// This method returns a SoftLayer_Container_Bandwidth_GraphOutputs object containing a base64 PNG string graph of the provided configuration values for the given begin and end dates.
174func (r Monitoring_Agent) GetGraph(configurationValues []datatypes.Monitoring_Agent_Configuration_Value, beginDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Container_Monitoring_Graph_Outputs, err error) {
175	params := []interface{}{
176		configurationValues,
177		beginDate,
178		endDate,
179	}
180	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getGraph", params, &r.Options, &resp)
181	return
182}
183
184// This method returns the metric data for each of the configuration values provided during the given time range.
185func (r Monitoring_Agent) GetGraphData(metricDataTypes []datatypes.Container_Metric_Data_Type, startDate *datatypes.Time, endDate *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) {
186	params := []interface{}{
187		metricDataTypes,
188		startDate,
189		endDate,
190	}
191	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getGraphData", params, &r.Options, &resp)
192	return
193}
194
195// Retrieve SoftLayer hardware related to the agent.
196func (r Monitoring_Agent) GetHardware() (resp datatypes.Hardware, err error) {
197	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getHardware", nil, &r.Options, &resp)
198	return
199}
200
201// This method retrieves a monitoring agent whose identifier corresponds to the value provided in the initialization parameter passed to the SoftLayer_Monitoring_Agent service.
202func (r Monitoring_Agent) GetObject() (resp datatypes.Monitoring_Agent, err error) {
203	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getObject", nil, &r.Options, &resp)
204	return
205}
206
207// Retrieve Contains general information relating to a single SoftLayer product.
208func (r Monitoring_Agent) GetProductItem() (resp datatypes.Product_Item, err error) {
209	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getProductItem", nil, &r.Options, &resp)
210	return
211}
212
213// Retrieve A description for a specific installation of a Software Component
214func (r Monitoring_Agent) GetSoftwareDescription() (resp datatypes.Software_Description, err error) {
215	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getSoftwareDescription", nil, &r.Options, &resp)
216	return
217}
218
219// Retrieve Monitoring agent status name.
220func (r Monitoring_Agent) GetStatusName() (resp string, err error) {
221	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getStatusName", nil, &r.Options, &resp)
222	return
223}
224
225// Retrieve Softlayer_Virtual_Guest object related to the monitoring agent, which this virtual guest object and hardware is on the server of the running agent.
226func (r Monitoring_Agent) GetVirtualGuest() (resp datatypes.Virtual_Guest, err error) {
227	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getVirtualGuest", nil, &r.Options, &resp)
228	return
229}
230
231// Use of this method will allow removing active subscribers from the monitoring agent. The agent subscribers can be managed within the portal from the "Alarm Subscribers" tab of the monitoring agent configuration.
232func (r Monitoring_Agent) RemoveActiveAlarmSubscriber(userRecordId *int) (resp bool, err error) {
233	params := []interface{}{
234		userRecordId,
235	}
236	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "removeActiveAlarmSubscriber", params, &r.Options, &resp)
237	return
238}
239
240// Use of this method will allow removing all subscribers from the monitoring agent. The agent subscribers can be managed within the portal from the "Alarm Subscribers" tab of the monitoring agent configuration.
241func (r Monitoring_Agent) RemoveAllAlarmSubscribers() (resp bool, err error) {
242	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "removeAllAlarmSubscribers", nil, &r.Options, &resp)
243	return
244}
245
246// This method restarts a monitoring agent and sets the agent's status to 'ACTIVE'.
247func (r Monitoring_Agent) RestartMonitoringAgent() (resp bool, err error) {
248	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "restartMonitoringAgent", nil, &r.Options, &resp)
249	return
250}
251
252// This method assigns a user to receive the alerts generated by this SoftLayer_Monitoring_Agent.
253func (r Monitoring_Agent) SetActiveAlarmSubscriber(userRecordId *int) (resp bool, err error) {
254	params := []interface{}{
255		userRecordId,
256	}
257	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "setActiveAlarmSubscriber", params, &r.Options, &resp)
258	return
259}
260
261// The SoftLayer_Monitoring_Agent_Configuration_Template_Group class is consisted of configuration templates for agents in a monitoring package.
262type Monitoring_Agent_Configuration_Template_Group struct {
263	Session *session.Session
264	Options sl.Options
265}
266
267// GetMonitoringAgentConfigurationTemplateGroupService returns an instance of the Monitoring_Agent_Configuration_Template_Group SoftLayer service
268func GetMonitoringAgentConfigurationTemplateGroupService(sess *session.Session) Monitoring_Agent_Configuration_Template_Group {
269	return Monitoring_Agent_Configuration_Template_Group{Session: sess}
270}
271
272func (r Monitoring_Agent_Configuration_Template_Group) Id(id int) Monitoring_Agent_Configuration_Template_Group {
273	r.Options.Id = &id
274	return r
275}
276
277func (r Monitoring_Agent_Configuration_Template_Group) Mask(mask string) Monitoring_Agent_Configuration_Template_Group {
278	if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
279		mask = fmt.Sprintf("mask[%s]", mask)
280	}
281
282	r.Options.Mask = mask
283	return r
284}
285
286func (r Monitoring_Agent_Configuration_Template_Group) Filter(filter string) Monitoring_Agent_Configuration_Template_Group {
287	r.Options.Filter = filter
288	return r
289}
290
291func (r Monitoring_Agent_Configuration_Template_Group) Limit(limit int) Monitoring_Agent_Configuration_Template_Group {
292	r.Options.Limit = &limit
293	return r
294}
295
296func (r Monitoring_Agent_Configuration_Template_Group) Offset(offset int) Monitoring_Agent_Configuration_Template_Group {
297	r.Options.Offset = &offset
298	return r
299}
300
301// This method creates a SoftLayer_Monitoring_Agent_Configuration_Template_Group using the values provided in the template object. The template objects accountId will be overridden to use the active user's accountId as it shows on their associated SoftLayer_User_Customer object.
302func (r Monitoring_Agent_Configuration_Template_Group) CreateObject(templateObject *datatypes.Monitoring_Agent_Configuration_Template_Group) (resp datatypes.Monitoring_Agent_Configuration_Template_Group, err error) {
303	params := []interface{}{
304		templateObject,
305	}
306	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group", "createObject", params, &r.Options, &resp)
307	return
308}
309
310// Deletes a customer configuration template group.
311func (r Monitoring_Agent_Configuration_Template_Group) DeleteObject() (resp bool, err error) {
312	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group", "deleteObject", nil, &r.Options, &resp)
313	return
314}
315
316// This method edits an existing SoftLayer_Monitoring_Agent_Configuration_Template_Group using the values passed in the $object parameter. The $object parameter should use the same structure as a SoftLayer_Monitoring_Agent_Configuration_Template_Group object.
317func (r Monitoring_Agent_Configuration_Template_Group) EditObject(templateObject *datatypes.Monitoring_Agent_Configuration_Template_Group) (resp bool, err error) {
318	params := []interface{}{
319		templateObject,
320	}
321	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group", "editObject", params, &r.Options, &resp)
322	return
323}
324
325// Retrieve
326func (r Monitoring_Agent_Configuration_Template_Group) GetAccount() (resp datatypes.Account, err error) {
327	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group", "getAccount", nil, &r.Options, &resp)
328	return
329}
330
331// no documentation yet
332func (r Monitoring_Agent_Configuration_Template_Group) GetAllObjects() (resp []datatypes.Monitoring_Agent_Configuration_Template_Group, err error) {
333	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group", "getAllObjects", nil, &r.Options, &resp)
334	return
335}
336
337// This method retrieves an array of SoftLayer_Monitoring_Agent_Configuration_Template_Group objects that are available to the active user's account. The packageId parameter is not currently used.
338func (r Monitoring_Agent_Configuration_Template_Group) GetConfigurationGroups(packageId *int) (resp []datatypes.Monitoring_Agent_Configuration_Template_Group, err error) {
339	params := []interface{}{
340		packageId,
341	}
342	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group", "getConfigurationGroups", params, &r.Options, &resp)
343	return
344}
345
346// Retrieve
347func (r Monitoring_Agent_Configuration_Template_Group) GetConfigurationTemplateReferences() (resp []datatypes.Monitoring_Agent_Configuration_Template_Group_Reference, err error) {
348	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group", "getConfigurationTemplateReferences", nil, &r.Options, &resp)
349	return
350}
351
352// Retrieve
353func (r Monitoring_Agent_Configuration_Template_Group) GetConfigurationTemplates() (resp []datatypes.Configuration_Template, err error) {
354	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group", "getConfigurationTemplates", nil, &r.Options, &resp)
355	return
356}
357
358// Retrieve
359func (r Monitoring_Agent_Configuration_Template_Group) GetItem() (resp datatypes.Product_Item, err error) {
360	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group", "getItem", nil, &r.Options, &resp)
361	return
362}
363
364// This method retrieves a monitoring agent configuration template group whose identifier corresponds to the value provided in the initialization parameter passed to the SoftLayer_Monitoring_Agent_Configuration_Template_Group service.
365func (r Monitoring_Agent_Configuration_Template_Group) GetObject() (resp datatypes.Monitoring_Agent_Configuration_Template_Group, err error) {
366	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group", "getObject", nil, &r.Options, &resp)
367	return
368}
369
370// SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference class holds the reference information, essentially a SQL join, between a monitoring configuration group and agent configuration templates.
371type Monitoring_Agent_Configuration_Template_Group_Reference struct {
372	Session *session.Session
373	Options sl.Options
374}
375
376// GetMonitoringAgentConfigurationTemplateGroupReferenceService returns an instance of the Monitoring_Agent_Configuration_Template_Group_Reference SoftLayer service
377func GetMonitoringAgentConfigurationTemplateGroupReferenceService(sess *session.Session) Monitoring_Agent_Configuration_Template_Group_Reference {
378	return Monitoring_Agent_Configuration_Template_Group_Reference{Session: sess}
379}
380
381func (r Monitoring_Agent_Configuration_Template_Group_Reference) Id(id int) Monitoring_Agent_Configuration_Template_Group_Reference {
382	r.Options.Id = &id
383	return r
384}
385
386func (r Monitoring_Agent_Configuration_Template_Group_Reference) Mask(mask string) Monitoring_Agent_Configuration_Template_Group_Reference {
387	if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
388		mask = fmt.Sprintf("mask[%s]", mask)
389	}
390
391	r.Options.Mask = mask
392	return r
393}
394
395func (r Monitoring_Agent_Configuration_Template_Group_Reference) Filter(filter string) Monitoring_Agent_Configuration_Template_Group_Reference {
396	r.Options.Filter = filter
397	return r
398}
399
400func (r Monitoring_Agent_Configuration_Template_Group_Reference) Limit(limit int) Monitoring_Agent_Configuration_Template_Group_Reference {
401	r.Options.Limit = &limit
402	return r
403}
404
405func (r Monitoring_Agent_Configuration_Template_Group_Reference) Offset(offset int) Monitoring_Agent_Configuration_Template_Group_Reference {
406	r.Options.Offset = &offset
407	return r
408}
409
410// This method creates a monitoring agent configuration template group reference by passing in an object with the SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference structure as the $templateObject parameter.
411func (r Monitoring_Agent_Configuration_Template_Group_Reference) CreateObject(templateObject *datatypes.Monitoring_Agent_Configuration_Template_Group_Reference) (resp datatypes.Monitoring_Agent_Configuration_Template_Group_Reference, err error) {
412	params := []interface{}{
413		templateObject,
414	}
415	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference", "createObject", params, &r.Options, &resp)
416	return
417}
418
419// This method creates monitoring agent configuration template group references by passing in an array of objects with the SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference structure as the $templateObjects parameter. Setting the $bulkCommit parameter to true will commit the changes in one transaction, false will commit after each object is created.
420func (r Monitoring_Agent_Configuration_Template_Group_Reference) CreateObjects(templateObjects []datatypes.Monitoring_Agent_Configuration_Template_Group_Reference) (resp bool, err error) {
421	params := []interface{}{
422		templateObjects,
423	}
424	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference", "createObjects", params, &r.Options, &resp)
425	return
426}
427
428// This method updates a SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference record by passing in a modified instance of the object.
429func (r Monitoring_Agent_Configuration_Template_Group_Reference) EditObject(templateObject *datatypes.Monitoring_Agent_Configuration_Template_Group_Reference) (resp bool, err error) {
430	params := []interface{}{
431		templateObject,
432	}
433	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference", "editObject", params, &r.Options, &resp)
434	return
435}
436
437// This method updates a set of SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference records by passing in an array of modified instances of the objects. Setting the $bulkCommit parameter to true will commit the changes in one transaction, false will commit after each object is updated.
438func (r Monitoring_Agent_Configuration_Template_Group_Reference) EditObjects(templateObjects []datatypes.Monitoring_Agent_Configuration_Template_Group_Reference) (resp bool, err error) {
439	params := []interface{}{
440		templateObjects,
441	}
442	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference", "editObjects", params, &r.Options, &resp)
443	return
444}
445
446// This method retrieves all SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference objects accessible to the active user.
447func (r Monitoring_Agent_Configuration_Template_Group_Reference) GetAllObjects() (resp []datatypes.Monitoring_Agent_Configuration_Template_Group_Reference, err error) {
448	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference", "getAllObjects", nil, &r.Options, &resp)
449	return
450}
451
452// Retrieve
453func (r Monitoring_Agent_Configuration_Template_Group_Reference) GetConfigurationTemplate() (resp datatypes.Configuration_Template, err error) {
454	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference", "getConfigurationTemplate", nil, &r.Options, &resp)
455	return
456}
457
458// This method retrieves a monitoring agent configuration template group reference whose identifier corresponds to the value provided in the initialization parameter passed to the SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference service.
459func (r Monitoring_Agent_Configuration_Template_Group_Reference) GetObject() (resp datatypes.Monitoring_Agent_Configuration_Template_Group_Reference, err error) {
460	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference", "getObject", nil, &r.Options, &resp)
461	return
462}
463
464// Retrieve
465func (r Monitoring_Agent_Configuration_Template_Group_Reference) GetTemplateGroup() (resp datatypes.Monitoring_Agent_Configuration_Template_Group, err error) {
466	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference", "getTemplateGroup", nil, &r.Options, &resp)
467	return
468}
469
470// Monitoring agent configuration value
471type Monitoring_Agent_Configuration_Value struct {
472	Session *session.Session
473	Options sl.Options
474}
475
476// GetMonitoringAgentConfigurationValueService returns an instance of the Monitoring_Agent_Configuration_Value SoftLayer service
477func GetMonitoringAgentConfigurationValueService(sess *session.Session) Monitoring_Agent_Configuration_Value {
478	return Monitoring_Agent_Configuration_Value{Session: sess}
479}
480
481func (r Monitoring_Agent_Configuration_Value) Id(id int) Monitoring_Agent_Configuration_Value {
482	r.Options.Id = &id
483	return r
484}
485
486func (r Monitoring_Agent_Configuration_Value) Mask(mask string) Monitoring_Agent_Configuration_Value {
487	if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
488		mask = fmt.Sprintf("mask[%s]", mask)
489	}
490
491	r.Options.Mask = mask
492	return r
493}
494
495func (r Monitoring_Agent_Configuration_Value) Filter(filter string) Monitoring_Agent_Configuration_Value {
496	r.Options.Filter = filter
497	return r
498}
499
500func (r Monitoring_Agent_Configuration_Value) Limit(limit int) Monitoring_Agent_Configuration_Value {
501	r.Options.Limit = &limit
502	return r
503}
504
505func (r Monitoring_Agent_Configuration_Value) Offset(offset int) Monitoring_Agent_Configuration_Value {
506	r.Options.Offset = &offset
507	return r
508}
509
510// Retrieve
511func (r Monitoring_Agent_Configuration_Value) GetDefinition() (resp datatypes.Configuration_Template_Section_Definition, err error) {
512	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Value", "getDefinition", nil, &r.Options, &resp)
513	return
514}
515
516// Retrieve The metric data type used to retrieve metric data currently being tracked.
517func (r Monitoring_Agent_Configuration_Value) GetMetricDataType() (resp datatypes.Container_Metric_Data_Type, err error) {
518	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Value", "getMetricDataType", nil, &r.Options, &resp)
519	return
520}
521
522// Retrieve
523func (r Monitoring_Agent_Configuration_Value) GetMonitoringAgent() (resp datatypes.Monitoring_Agent, err error) {
524	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Value", "getMonitoringAgent", nil, &r.Options, &resp)
525	return
526}
527
528// no documentation yet
529func (r Monitoring_Agent_Configuration_Value) GetObject() (resp datatypes.Monitoring_Agent_Configuration_Value, err error) {
530	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Value", "getObject", nil, &r.Options, &resp)
531	return
532}
533
534// Retrieve
535func (r Monitoring_Agent_Configuration_Value) GetProfile() (resp datatypes.Configuration_Template_Section_Profile, err error) {
536	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Value", "getProfile", nil, &r.Options, &resp)
537	return
538}
539
540// Monitoring agent status
541type Monitoring_Agent_Status struct {
542	Session *session.Session
543	Options sl.Options
544}
545
546// GetMonitoringAgentStatusService returns an instance of the Monitoring_Agent_Status SoftLayer service
547func GetMonitoringAgentStatusService(sess *session.Session) Monitoring_Agent_Status {
548	return Monitoring_Agent_Status{Session: sess}
549}
550
551func (r Monitoring_Agent_Status) Id(id int) Monitoring_Agent_Status {
552	r.Options.Id = &id
553	return r
554}
555
556func (r Monitoring_Agent_Status) Mask(mask string) Monitoring_Agent_Status {
557	if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
558		mask = fmt.Sprintf("mask[%s]", mask)
559	}
560
561	r.Options.Mask = mask
562	return r
563}
564
565func (r Monitoring_Agent_Status) Filter(filter string) Monitoring_Agent_Status {
566	r.Options.Filter = filter
567	return r
568}
569
570func (r Monitoring_Agent_Status) Limit(limit int) Monitoring_Agent_Status {
571	r.Options.Limit = &limit
572	return r
573}
574
575func (r Monitoring_Agent_Status) Offset(offset int) Monitoring_Agent_Status {
576	r.Options.Offset = &offset
577	return r
578}
579
580// no documentation yet
581func (r Monitoring_Agent_Status) GetObject() (resp datatypes.Monitoring_Agent_Status, err error) {
582	err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Status", "getObject", nil, &r.Options, &resp)
583	return
584}
585
586// The SoftLayer_Monitoring_Robot data type contains general information relating to a monitoring robot.
587type Monitoring_Robot struct {
588	Session *session.Session
589	Options sl.Options
590}
591
592// GetMonitoringRobotService returns an instance of the Monitoring_Robot SoftLayer service
593func GetMonitoringRobotService(sess *session.Session) Monitoring_Robot {
594	return Monitoring_Robot{Session: sess}
595}
596
597func (r Monitoring_Robot) Id(id int) Monitoring_Robot {
598	r.Options.Id = &id
599	return r
600}
601
602func (r Monitoring_Robot) Mask(mask string) Monitoring_Robot {
603	if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
604		mask = fmt.Sprintf("mask[%s]", mask)
605	}
606
607	r.Options.Mask = mask
608	return r
609}
610
611func (r Monitoring_Robot) Filter(filter string) Monitoring_Robot {
612	r.Options.Filter = filter
613	return r
614}
615
616func (r Monitoring_Robot) Limit(limit int) Monitoring_Robot {
617	r.Options.Limit = &limit
618	return r
619}
620
621func (r Monitoring_Robot) Offset(offset int) Monitoring_Robot {
622	r.Options.Offset = &offset
623	return r
624}
625
626// Checks if a monitoring robot can communicate with SoftLayer monitoring management system via the private network.
627//
628// TCP port 48000 - 48002 must be open on your server or your virtual server in order for this test to succeed.
629func (r Monitoring_Robot) CheckConnection() (resp bool, err error) {
630	err = r.Session.DoRequest("SoftLayer_Monitoring_Robot", "checkConnection", nil, &r.Options, &resp)
631	return
632}
633
634// no documentation yet
635func (r Monitoring_Robot) DeployMonitoringAgents(configurationTemplateGroup *datatypes.Monitoring_Agent_Configuration_Template_Group) (resp datatypes.Provisioning_Version1_Transaction, err error) {
636	params := []interface{}{
637		configurationTemplateGroup,
638	}
639	err = r.Session.DoRequest("SoftLayer_Monitoring_Robot", "deployMonitoringAgents", params, &r.Options, &resp)
640	return
641}
642
643// Retrieve The account associated with the corresponding robot.
644func (r Monitoring_Robot) GetAccount() (resp datatypes.Account, err error) {
645	err = r.Session.DoRequest("SoftLayer_Monitoring_Robot", "getAccount", nil, &r.Options, &resp)
646	return
647}
648
649// Returns available configuration template groups for this monitoring agent.
650func (r Monitoring_Robot) GetAvailableConfigurationGroups() (resp []datatypes.Monitoring_Agent_Configuration_Template_Group, err error) {
651	err = r.Session.DoRequest("SoftLayer_Monitoring_Robot", "getAvailableConfigurationGroups", nil, &r.Options, &resp)
652	return
653}
654
655// Retrieve The program (monitoring agent) that gets details of a system or application and reporting of the metric data and triggers alarms for predefined events.
656func (r Monitoring_Robot) GetMonitoringAgents() (resp []datatypes.Monitoring_Agent, err error) {
657	err = r.Session.DoRequest("SoftLayer_Monitoring_Robot", "getMonitoringAgents", nil, &r.Options, &resp)
658	return
659}
660
661// no documentation yet
662func (r Monitoring_Robot) GetObject() (resp datatypes.Monitoring_Robot, err error) {
663	err = r.Session.DoRequest("SoftLayer_Monitoring_Robot", "getObject", nil, &r.Options, &resp)
664	return
665}
666
667// Retrieve The current status of the robot.
668func (r Monitoring_Robot) GetRobotStatus() (resp datatypes.Monitoring_Robot_Status, err error) {
669	err = r.Session.DoRequest("SoftLayer_Monitoring_Robot", "getRobotStatus", nil, &r.Options, &resp)
670	return
671}
672
673// Retrieve The SoftLayer_Software_Component that corresponds to the robot installation on the server.
674func (r Monitoring_Robot) GetSoftwareComponent() (resp datatypes.Software_Component, err error) {
675	err = r.Session.DoRequest("SoftLayer_Monitoring_Robot", "getSoftwareComponent", nil, &r.Options, &resp)
676	return
677}
678
679// If our monitoring management system is not able to connect to your monitoring robot, it sets the robot status to "Limited Connectivity". Robots in this status will not be process by our monitoring management system. You cannot manage monitoring agents either.
680//
681// Use this method to resets monitoring robot status to "Active" to indicate the connection issue is resolved.
682func (r Monitoring_Robot) ResetStatus() (resp bool, err error) {
683	err = r.Session.DoRequest("SoftLayer_Monitoring_Robot", "resetStatus", nil, &r.Options, &resp)
684	return
685}
686