in tfplan2cai/converters/google/resources/services/integrationconnectors/integrationconnectors_connection.go [57:145]
func GetIntegrationConnectorsConnectionApiObject(d tpgresource.TerraformResourceData, config *transport_tpg.Config) (map[string]interface{}, error) {
obj := make(map[string]interface{})
descriptionProp, err := expandIntegrationConnectorsConnectionDescription(d.Get("description"), d, config)
if err != nil {
return nil, err
} else if v, ok := d.GetOkExists("description"); !tpgresource.IsEmptyValue(reflect.ValueOf(descriptionProp)) && (ok || !reflect.DeepEqual(v, descriptionProp)) {
obj["description"] = descriptionProp
}
connectorVersionProp, err := expandIntegrationConnectorsConnectionConnectorVersion(d.Get("connector_version"), d, config)
if err != nil {
return nil, err
} else if v, ok := d.GetOkExists("connector_version"); !tpgresource.IsEmptyValue(reflect.ValueOf(connectorVersionProp)) && (ok || !reflect.DeepEqual(v, connectorVersionProp)) {
obj["connectorVersion"] = connectorVersionProp
}
configVariablesProp, err := expandIntegrationConnectorsConnectionConfigVariable(d.Get("config_variable"), d, config)
if err != nil {
return nil, err
} else if v, ok := d.GetOkExists("config_variable"); !tpgresource.IsEmptyValue(reflect.ValueOf(configVariablesProp)) && (ok || !reflect.DeepEqual(v, configVariablesProp)) {
obj["configVariables"] = configVariablesProp
}
authConfigProp, err := expandIntegrationConnectorsConnectionAuthConfig(d.Get("auth_config"), d, config)
if err != nil {
return nil, err
} else if v, ok := d.GetOkExists("auth_config"); !tpgresource.IsEmptyValue(reflect.ValueOf(authConfigProp)) && (ok || !reflect.DeepEqual(v, authConfigProp)) {
obj["authConfig"] = authConfigProp
}
lockConfigProp, err := expandIntegrationConnectorsConnectionLockConfig(d.Get("lock_config"), d, config)
if err != nil {
return nil, err
} else if v, ok := d.GetOkExists("lock_config"); !tpgresource.IsEmptyValue(reflect.ValueOf(lockConfigProp)) && (ok || !reflect.DeepEqual(v, lockConfigProp)) {
obj["lockConfig"] = lockConfigProp
}
destinationConfigsProp, err := expandIntegrationConnectorsConnectionDestinationConfig(d.Get("destination_config"), d, config)
if err != nil {
return nil, err
} else if v, ok := d.GetOkExists("destination_config"); !tpgresource.IsEmptyValue(reflect.ValueOf(destinationConfigsProp)) && (ok || !reflect.DeepEqual(v, destinationConfigsProp)) {
obj["destinationConfigs"] = destinationConfigsProp
}
serviceAccountProp, err := expandIntegrationConnectorsConnectionServiceAccount(d.Get("service_account"), d, config)
if err != nil {
return nil, err
} else if v, ok := d.GetOkExists("service_account"); !tpgresource.IsEmptyValue(reflect.ValueOf(serviceAccountProp)) && (ok || !reflect.DeepEqual(v, serviceAccountProp)) {
obj["serviceAccount"] = serviceAccountProp
}
suspendedProp, err := expandIntegrationConnectorsConnectionSuspended(d.Get("suspended"), d, config)
if err != nil {
return nil, err
} else if v, ok := d.GetOkExists("suspended"); !tpgresource.IsEmptyValue(reflect.ValueOf(suspendedProp)) && (ok || !reflect.DeepEqual(v, suspendedProp)) {
obj["suspended"] = suspendedProp
}
nodeConfigProp, err := expandIntegrationConnectorsConnectionNodeConfig(d.Get("node_config"), d, config)
if err != nil {
return nil, err
} else if v, ok := d.GetOkExists("node_config"); !tpgresource.IsEmptyValue(reflect.ValueOf(nodeConfigProp)) && (ok || !reflect.DeepEqual(v, nodeConfigProp)) {
obj["nodeConfig"] = nodeConfigProp
}
logConfigProp, err := expandIntegrationConnectorsConnectionLogConfig(d.Get("log_config"), d, config)
if err != nil {
return nil, err
} else if v, ok := d.GetOkExists("log_config"); !tpgresource.IsEmptyValue(reflect.ValueOf(logConfigProp)) && (ok || !reflect.DeepEqual(v, logConfigProp)) {
obj["logConfig"] = logConfigProp
}
sslConfigProp, err := expandIntegrationConnectorsConnectionSslConfig(d.Get("ssl_config"), d, config)
if err != nil {
return nil, err
} else if v, ok := d.GetOkExists("ssl_config"); !tpgresource.IsEmptyValue(reflect.ValueOf(sslConfigProp)) && (ok || !reflect.DeepEqual(v, sslConfigProp)) {
obj["sslConfig"] = sslConfigProp
}
eventingEnablementTypeProp, err := expandIntegrationConnectorsConnectionEventingEnablementType(d.Get("eventing_enablement_type"), d, config)
if err != nil {
return nil, err
} else if v, ok := d.GetOkExists("eventing_enablement_type"); !tpgresource.IsEmptyValue(reflect.ValueOf(eventingEnablementTypeProp)) && (ok || !reflect.DeepEqual(v, eventingEnablementTypeProp)) {
obj["eventingEnablementType"] = eventingEnablementTypeProp
}
eventingConfigProp, err := expandIntegrationConnectorsConnectionEventingConfig(d.Get("eventing_config"), d, config)
if err != nil {
return nil, err
} else if v, ok := d.GetOkExists("eventing_config"); !tpgresource.IsEmptyValue(reflect.ValueOf(eventingConfigProp)) && (ok || !reflect.DeepEqual(v, eventingConfigProp)) {
obj["eventingConfig"] = eventingConfigProp
}
labelsProp, err := expandIntegrationConnectorsConnectionEffectiveLabels(d.Get("effective_labels"), d, config)
if err != nil {
return nil, err
} else if v, ok := d.GetOkExists("effective_labels"); !tpgresource.IsEmptyValue(reflect.ValueOf(labelsProp)) && (ok || !reflect.DeepEqual(v, labelsProp)) {
obj["labels"] = labelsProp
}
return obj, nil
}