Skip to content

Commit

Permalink
Add integrations product. Create Client resource. (#10186) (#2080)
Browse files Browse the repository at this point in the history
[upstream:d874e11de524dddb932b70f4ef1bc7905fb41846]

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Mar 20, 2024
1 parent e47d477 commit 9fb9f25
Showing 1 changed file with 57 additions and 0 deletions.
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
}

0 comments on commit 9fb9f25

Please sign in to comment.