-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add integrations product. Create Client resource. (#10186) (#2080)
[upstream:d874e11de524dddb932b70f4ef1bc7905fb41846] Signed-off-by: Modular Magician <[email protected]>
- Loading branch information
1 parent
e47d477
commit 9fb9f25
Showing
1 changed file
with
57 additions
and
0 deletions.
There are no files selected for viewing
57 changes: 57 additions & 0 deletions
57
tfplan2cai/converters/google/resources/services/integrations/integrations_client.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// ---------------------------------------------------------------------------- | ||
// | ||
// *** AUTO GENERATED CODE *** Type: MMv1 *** | ||
// | ||
// ---------------------------------------------------------------------------- | ||
// | ||
// This file is automatically generated by Magic Modules and manual | ||
// changes will be clobbered when the file is regenerated. | ||
// | ||
// Please read more about how to change this file in | ||
// .github/CONTRIBUTING.md. | ||
// | ||
// ---------------------------------------------------------------------------- | ||
|
||
package integrations | ||
|
||
import ( | ||
"github.com/GoogleCloudPlatform/terraform-google-conversion/v5/tfplan2cai/converters/google/resources/cai" | ||
"github.com/hashicorp/terraform-provider-google-beta/google-beta/tpgresource" | ||
transport_tpg "github.com/hashicorp/terraform-provider-google-beta/google-beta/transport" | ||
) | ||
|
||
const IntegrationsClientAssetType string = "integrations.googleapis.com/Client" | ||
|
||
func ResourceConverterIntegrationsClient() cai.ResourceConverter { | ||
return cai.ResourceConverter{ | ||
AssetType: IntegrationsClientAssetType, | ||
Convert: GetIntegrationsClientCaiObject, | ||
} | ||
} | ||
|
||
func GetIntegrationsClientCaiObject(d tpgresource.TerraformResourceData, config *transport_tpg.Config) ([]cai.Asset, error) { | ||
name, err := cai.AssetName(d, config, "//integrations.googleapis.com/projects/{{project}}/locations/{{location}}/clients") | ||
if err != nil { | ||
return []cai.Asset{}, err | ||
} | ||
if obj, err := GetIntegrationsClientApiObject(d, config); err == nil { | ||
return []cai.Asset{{ | ||
Name: name, | ||
Type: IntegrationsClientAssetType, | ||
Resource: &cai.AssetResource{ | ||
Version: "v1", | ||
DiscoveryDocumentURI: "https://www.googleapis.com/discovery/v1/apis/integrations/v1/rest", | ||
DiscoveryName: "Client", | ||
Data: obj, | ||
}, | ||
}}, nil | ||
} else { | ||
return []cai.Asset{}, err | ||
} | ||
} | ||
|
||
func GetIntegrationsClientApiObject(d tpgresource.TerraformResourceData, config *transport_tpg.Config) (map[string]interface{}, error) { | ||
obj := make(map[string]interface{}) | ||
|
||
return obj, nil | ||
} |