11// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
22// Licensed under the Mozilla Public License v2.0
3-
43package sch
54
65import (
@@ -455,6 +454,10 @@ func SchServiceConnectorResource() *schema.Resource {
455454 },
456455
457456 // Computed
457+ "lifecycle_details" : {
458+ Type : schema .TypeString ,
459+ Computed : true ,
460+ },
458461 "lifecyle_details" : {
459462 Type : schema .TypeString ,
460463 Computed : true ,
@@ -949,13 +952,17 @@ func (s *SchServiceConnectorResourceCrud) SetData() error {
949952
950953 s .D .Set ("freeform_tags" , s .Res .FreeformTags )
951954
955+ if s .Res .LifecycleDetails != nil {
956+ s .D .Set ("lifecycle_details" , * s .Res .LifecycleDetails )
957+ }
958+
952959 if s .Res .LifecyleDetails != nil {
953960 s .D .Set ("lifecyle_details" , * s .Res .LifecyleDetails )
954961 }
955962
956963 if s .Res .Source != nil {
957964 sourceArray := []interface {}{}
958- if sourceMap := SourceDetailsToMap (& s .Res .Source ); sourceMap != nil {
965+ if sourceMap := SourceDetailsResponseToMap (& s .Res .Source ); sourceMap != nil {
959966 sourceArray = append (sourceArray , sourceMap )
960967 }
961968 s .D .Set ("source" , sourceArray )
@@ -971,7 +978,7 @@ func (s *SchServiceConnectorResourceCrud) SetData() error {
971978
972979 if s .Res .Target != nil {
973980 targetArray := []interface {}{}
974- if targetMap := TargetDetailsToMap (& s .Res .Target ); targetMap != nil {
981+ if targetMap := TargetDetailsResponseToMap (& s .Res .Target ); targetMap != nil {
975982 targetArray = append (targetArray , targetMap )
976983 }
977984 s .D .Set ("target" , targetArray )
@@ -981,7 +988,7 @@ func (s *SchServiceConnectorResourceCrud) SetData() error {
981988
982989 tasks := []interface {}{}
983990 for _ , item := range s .Res .Tasks {
984- tasks = append (tasks , TaskDetailsToMap (item ))
991+ tasks = append (tasks , TaskDetailsResponseToMap (item ))
985992 }
986993 s .D .Set ("tasks" , tasks )
987994
@@ -1323,6 +1330,7 @@ func ServiceConnectorSummaryToMap(obj oci_sch.ServiceConnectorSummary) map[strin
13231330 }
13241331
13251332 if obj .LifecycleDetails != nil {
1333+ result ["lifecyle_details" ] = string (* obj .LifecycleDetails )
13261334 result ["lifecycle_details" ] = string (* obj .LifecycleDetails )
13271335 }
13281336
@@ -1451,34 +1459,34 @@ func (s *SchServiceConnectorResourceCrud) mapToSourceDetails(fieldKeyFormat stri
14511459 return baseObject , nil
14521460}
14531461
1454- func SourceDetailsToMap (obj * oci_sch.SourceDetails ) map [string ]interface {} {
1462+ func SourceDetailsResponseToMap (obj * oci_sch.SourceDetailsResponse ) map [string ]interface {} {
14551463 result := map [string ]interface {}{}
14561464 switch v := (* obj ).(type ) {
1457- case oci_sch.LoggingSourceDetails :
1465+ case oci_sch.LoggingSourceDetailsResponse :
14581466 result ["kind" ] = "logging"
14591467
14601468 logSources := []interface {}{}
14611469 for _ , item := range v .LogSources {
14621470 logSources = append (logSources , LogSourceToMap (item ))
14631471 }
14641472 result ["log_sources" ] = logSources
1465- case oci_sch.MonitoringSourceDetails :
1473+ case oci_sch.MonitoringSourceDetailsResponse :
14661474 result ["kind" ] = "monitoring"
14671475
14681476 monitoringSources := []interface {}{}
14691477 for _ , item := range v .MonitoringSources {
14701478 monitoringSources = append (monitoringSources , MonitoringSourceToMap (item ))
14711479 }
14721480 result ["monitoring_sources" ] = monitoringSources
1473- case oci_sch.PluginSourceDetails :
1481+ case oci_sch.PluginSourceDetailsResponse :
14741482 result ["kind" ] = "plugin"
14751483
14761484 result ["config_map" ] = ConfigMapJsonObjectToString (v .ConfigMap )
14771485
14781486 if v .PluginName != nil {
14791487 result ["plugin_name" ] = string (* v .PluginName )
14801488 }
1481- case oci_sch.StreamingSourceDetails :
1489+ case oci_sch.StreamingSourceDetailsResponse :
14821490 result ["kind" ] = "streaming"
14831491
14841492 if v .Cursor != nil {
@@ -1661,10 +1669,10 @@ func (s *SchServiceConnectorResourceCrud) mapToTargetDetails(fieldKeyFormat stri
16611669 return baseObject , nil
16621670}
16631671
1664- func TargetDetailsToMap (obj * oci_sch.TargetDetails ) map [string ]interface {} {
1672+ func TargetDetailsResponseToMap (obj * oci_sch.TargetDetailsResponse ) map [string ]interface {} {
16651673 result := map [string ]interface {}{}
16661674 switch v := (* obj ).(type ) {
1667- case oci_sch.FunctionsTargetDetails :
1675+ case oci_sch.FunctionsTargetDetailsResponse :
16681676 result ["kind" ] = "functions"
16691677
16701678 if v .BatchSizeInKbs != nil {
@@ -1682,7 +1690,7 @@ func TargetDetailsToMap(obj *oci_sch.TargetDetails) map[string]interface{} {
16821690 if v .FunctionId != nil {
16831691 result ["function_id" ] = string (* v .FunctionId )
16841692 }
1685- case oci_sch.LoggingAnalyticsTargetDetails :
1693+ case oci_sch.LoggingAnalyticsTargetDetailsResponse :
16861694 result ["kind" ] = "loggingAnalytics"
16871695
16881696 if v .LogGroupId != nil {
@@ -1692,7 +1700,7 @@ func TargetDetailsToMap(obj *oci_sch.TargetDetails) map[string]interface{} {
16921700 if v .LogSourceIdentifier != nil {
16931701 result ["log_source_identifier" ] = string (* v .LogSourceIdentifier )
16941702 }
1695- case oci_sch.MonitoringTargetDetails :
1703+ case oci_sch.MonitoringTargetDetailsResponse :
16961704 result ["kind" ] = "monitoring"
16971705
16981706 if v .CompartmentId != nil {
@@ -1712,7 +1720,7 @@ func TargetDetailsToMap(obj *oci_sch.TargetDetails) map[string]interface{} {
17121720 if v .MetricNamespace != nil {
17131721 result ["metric_namespace" ] = string (* v .MetricNamespace )
17141722 }
1715- case oci_sch.NotificationsTargetDetails :
1723+ case oci_sch.NotificationsTargetDetailsResponse :
17161724 result ["kind" ] = "notifications"
17171725
17181726 if v .EnableFormattedMessaging != nil {
@@ -1722,7 +1730,7 @@ func TargetDetailsToMap(obj *oci_sch.TargetDetails) map[string]interface{} {
17221730 if v .TopicId != nil {
17231731 result ["topic_id" ] = string (* v .TopicId )
17241732 }
1725- case oci_sch.ObjectStorageTargetDetails :
1733+ case oci_sch.ObjectStorageTargetDetailsResponse :
17261734 result ["kind" ] = "objectStorage"
17271735
17281736 if v .BatchRolloverSizeInMBs != nil {
@@ -1744,7 +1752,7 @@ func TargetDetailsToMap(obj *oci_sch.TargetDetails) map[string]interface{} {
17441752 if v .ObjectNamePrefix != nil {
17451753 result ["object_name_prefix" ] = string (* v .ObjectNamePrefix )
17461754 }
1747- case oci_sch.StreamingTargetDetails :
1755+ case oci_sch.StreamingTargetDetailsResponse :
17481756 result ["kind" ] = "streaming"
17491757
17501758 if v .StreamId != nil {
@@ -1797,10 +1805,10 @@ func (s *SchServiceConnectorResourceCrud) mapToTaskDetails(fieldKeyFormat string
17971805 return baseObject , nil
17981806}
17991807
1800- func TaskDetailsToMap (obj oci_sch.TaskDetails ) map [string ]interface {} {
1808+ func TaskDetailsResponseToMap (obj oci_sch.TaskDetailsResponse ) map [string ]interface {} {
18011809 result := map [string ]interface {}{}
18021810 switch v := (obj ).(type ) {
1803- case oci_sch.FunctionTaskDetails :
1811+ case oci_sch.FunctionTaskDetailsResponse :
18041812 result ["kind" ] = "function"
18051813
18061814 if v .BatchSizeInKbs != nil {
@@ -1814,7 +1822,7 @@ func TaskDetailsToMap(obj oci_sch.TaskDetails) map[string]interface{} {
18141822 if v .FunctionId != nil {
18151823 result ["function_id" ] = string (* v .FunctionId )
18161824 }
1817- case oci_sch.LogRuleTaskDetails :
1825+ case oci_sch.LogRuleTaskDetailsResponse :
18181826 result ["kind" ] = "logRule"
18191827
18201828 if v .Condition != nil {
0 commit comments