Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add integrations product. Create Client resource. #2080

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}