@@ -13,16 +13,16 @@ import (
1313 oci_monitoring "github.com/oracle/oci-go-sdk/monitoring"
1414)
1515
16- func AlarmResource () * schema.Resource {
16+ func MonitoringAlarmResource () * schema.Resource {
1717 return & schema.Resource {
1818 Importer : & schema.ResourceImporter {
1919 State : schema .ImportStatePassthrough ,
2020 },
2121 Timeouts : DefaultTimeout ,
22- Create : createAlarm ,
23- Read : readAlarm ,
24- Update : updateAlarm ,
25- Delete : deleteAlarm ,
22+ Create : createMonitoringAlarm ,
23+ Read : readMonitoringAlarm ,
24+ Update : updateMonitoringAlarm ,
25+ Delete : deleteMonitoringAlarm ,
2626 Schema : map [string ]* schema.Schema {
2727 // Required
2828 "compartment_id" : {
@@ -149,73 +149,73 @@ func AlarmResource() *schema.Resource {
149149 }
150150}
151151
152- func createAlarm (d * schema.ResourceData , m interface {}) error {
153- sync := & AlarmResourceCrud {}
152+ func createMonitoringAlarm (d * schema.ResourceData , m interface {}) error {
153+ sync := & MonitoringAlarmResourceCrud {}
154154 sync .D = d
155155 sync .Client = m .(* OracleClients ).monitoringClient
156156
157157 return CreateResource (d , sync )
158158}
159159
160- func readAlarm (d * schema.ResourceData , m interface {}) error {
161- sync := & AlarmResourceCrud {}
160+ func readMonitoringAlarm (d * schema.ResourceData , m interface {}) error {
161+ sync := & MonitoringAlarmResourceCrud {}
162162 sync .D = d
163163 sync .Client = m .(* OracleClients ).monitoringClient
164164
165165 return ReadResource (sync )
166166}
167167
168- func updateAlarm (d * schema.ResourceData , m interface {}) error {
169- sync := & AlarmResourceCrud {}
168+ func updateMonitoringAlarm (d * schema.ResourceData , m interface {}) error {
169+ sync := & MonitoringAlarmResourceCrud {}
170170 sync .D = d
171171 sync .Client = m .(* OracleClients ).monitoringClient
172172
173173 return UpdateResource (d , sync )
174174}
175175
176- func deleteAlarm (d * schema.ResourceData , m interface {}) error {
177- sync := & AlarmResourceCrud {}
176+ func deleteMonitoringAlarm (d * schema.ResourceData , m interface {}) error {
177+ sync := & MonitoringAlarmResourceCrud {}
178178 sync .D = d
179179 sync .Client = m .(* OracleClients ).monitoringClient
180180 sync .DisableNotFoundRetries = true
181181
182182 return DeleteResource (d , sync )
183183}
184184
185- type AlarmResourceCrud struct {
185+ type MonitoringAlarmResourceCrud struct {
186186 BaseCrud
187187 Client * oci_monitoring.MonitoringClient
188188 Res * oci_monitoring.Alarm
189189 DisableNotFoundRetries bool
190190}
191191
192- func (s * AlarmResourceCrud ) ID () string {
192+ func (s * MonitoringAlarmResourceCrud ) ID () string {
193193 return * s .Res .Id
194194}
195195
196- func (s * AlarmResourceCrud ) CreatedPending () []string {
196+ func (s * MonitoringAlarmResourceCrud ) CreatedPending () []string {
197197 return []string {}
198198}
199199
200- func (s * AlarmResourceCrud ) CreatedTarget () []string {
200+ func (s * MonitoringAlarmResourceCrud ) CreatedTarget () []string {
201201 return []string {
202202 string (oci_monitoring .AlarmLifecycleStateActive ),
203203 }
204204}
205205
206- func (s * AlarmResourceCrud ) DeletedPending () []string {
206+ func (s * MonitoringAlarmResourceCrud ) DeletedPending () []string {
207207 return []string {
208208 string (oci_monitoring .AlarmLifecycleStateDeleting ),
209209 }
210210}
211211
212- func (s * AlarmResourceCrud ) DeletedTarget () []string {
212+ func (s * MonitoringAlarmResourceCrud ) DeletedTarget () []string {
213213 return []string {
214214 string (oci_monitoring .AlarmLifecycleStateDeleted ),
215215 }
216216}
217217
218- func (s * AlarmResourceCrud ) Create () error {
218+ func (s * MonitoringAlarmResourceCrud ) Create () error {
219219 request := oci_monitoring.CreateAlarmRequest {}
220220
221221 if body , ok := s .D .GetOkExists ("body" ); ok {
@@ -323,7 +323,7 @@ func (s *AlarmResourceCrud) Create() error {
323323 return nil
324324}
325325
326- func (s * AlarmResourceCrud ) Get () error {
326+ func (s * MonitoringAlarmResourceCrud ) Get () error {
327327 request := oci_monitoring.GetAlarmRequest {}
328328
329329 tmp := s .D .Id ()
@@ -340,7 +340,7 @@ func (s *AlarmResourceCrud) Get() error {
340340 return nil
341341}
342342
343- func (s * AlarmResourceCrud ) Update () error {
343+ func (s * MonitoringAlarmResourceCrud ) Update () error {
344344 request := oci_monitoring.UpdateAlarmRequest {}
345345
346346 tmp := s .D .Id ()
@@ -451,7 +451,7 @@ func (s *AlarmResourceCrud) Update() error {
451451 return nil
452452}
453453
454- func (s * AlarmResourceCrud ) Delete () error {
454+ func (s * MonitoringAlarmResourceCrud ) Delete () error {
455455 request := oci_monitoring.DeleteAlarmRequest {}
456456
457457 tmp := s .D .Id ()
@@ -463,7 +463,7 @@ func (s *AlarmResourceCrud) Delete() error {
463463 return err
464464}
465465
466- func (s * AlarmResourceCrud ) SetData () error {
466+ func (s * MonitoringAlarmResourceCrud ) SetData () error {
467467 if s .Res .Body != nil {
468468 s .D .Set ("body" , * s .Res .Body )
469469 }
@@ -537,7 +537,7 @@ func (s *AlarmResourceCrud) SetData() error {
537537 return nil
538538}
539539
540- func (s * AlarmResourceCrud ) mapToSuppression (fieldKeyFormat string ) (oci_monitoring.Suppression , error ) {
540+ func (s * MonitoringAlarmResourceCrud ) mapToSuppression (fieldKeyFormat string ) (oci_monitoring.Suppression , error ) {
541541 result := oci_monitoring.Suppression {}
542542
543543 if description , ok := s .D .GetOkExists (fmt .Sprintf (fieldKeyFormat , "description" )); ok {
0 commit comments